Search
Question: Duplicated author affiliations in BiocStyle-based HTML document
3
gravatar for Aaron Lun
9 weeks ago by
Aaron Lun16k
Cambridge, United Kingdom
Aaron Lun16k wrote:

I'm following the instructions in the "Authoring R Markdown vignettes" document, and I'm encountering some interesting behaviour when I try to specify the author list. My YAML header is:

---
title: "From reads to regions: a Bioconductor workflow to detect differential binding in ChIP-seq data"
author:
- name: Aaron T. L. Lun
  affiliation:
  - The Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, VIC 3052, Melbourne, Australia
  - Department of Medical Biology, The University of Melbourne, Parkville, VIC 3010, Melbourne, Australia
- name: Gordon K. Smyth
  affiliation:
  - The Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, VIC 3052, Melbourne, Australia
  - Department of Mathematics and Statistics, The University of Melbourne, Parkville, VIC 3010, Melbourne, Australia
date: 17 July 2017
output:
  BiocStyle::html_document2
vignette: >
  %\VignetteIndexEntry{From reads to regions: a Bioconductor workflow to detect differential binding in ChIP-seq data}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
bibliography: ref.bib
---

... in my Rmd file, on which I run rmarkdown::render. However, in the output HTML document, the author list is:

Aaron T. L. Lun1, Gordon K. Smyth2, Aaron T. L. Lun1 and Gordon K. Smyth4

1The Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, VIC 3052, Melbourne, Australia
2Department of Medical Biology, The University of Melbourne, Parkville, VIC 3010, Melbourne, Australia
3The Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, VIC 3052, Melbourne, Australia
4Department of Mathematics and Statistics, The University of Melbourne, Parkville, VIC 3010, Melbourne, Australia

Both author names are duplicated and the shared WEHI affiliation is not collapsed. Interestingly, this problem goes away if either unique affiliation is removed. I'm not sure whether the issue arises from BiocStyle or is general to rmarkdown, so any advice would be appreciated.

R version 3.4.0 Patched (2017-04-24 r72627)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /home/cri.camres.org/lun01/Software/R/R-3-4-branch_devel/lib/libRblas.so
LAPACK: /home/cri.camres.org/lun01/Software/R/R-3-4-branch_devel/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocStyle_2.5.7

loaded via a namespace (and not attached):
 [1] compiler_3.4.0  backports_1.1.0 bookdown_0.4    magrittr_1.5   
 [5] rprojroot_1.2   tools_3.4.0     htmltools_0.3.6 yaml_2.1.14    
 [9] Rcpp_0.12.12    stringi_1.1.5   rmarkdown_1.6   highr_0.6      
[13] knitr_1.16      stringr_1.2.0   digest_0.6.12   evaluate_0.10.1

P.S. The same problem shows up on both BioC-devel and release; I've just used devel out of habit.

ADD COMMENTlink modified 9 weeks ago by Andrzej Oleś670 • written 9 weeks ago by Aaron Lun16k
1

I can reproduce this. Andrzej is away until Wednesday. It seems possible that the problem has to do with code in BiocStyle/R/auth_affil.R.

ADD REPLYlink written 9 weeks ago by Wolfgang Huber13k
3
gravatar for Andrzej Oleś
9 weeks ago by
Andrzej Oleś670
EMBL Heidelberg, Germany
Andrzej Oleś670 wrote:

Good catch Aaron! Indeed, there was a bug in the BiocStyle function parsing author affiliations, which occurred in the special case when all authors had the same number of affiliations. This is now fixed in both devel and release.

ADD COMMENTlink written 9 weeks ago by Andrzej Oleś670
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 174 users visited in the last hour