Adding code to manuscript

12 views
Skip to first unread message

Patrik

unread,
Oct 27, 2016, 1:40:11 PM10/27/16
to Davis R Users' Group
I'm done writing a manuscript and I'm wondering what's the best way to incorporate the code used for data analyses and figures. I would like the entire paper to be completely reproducible. Suggestions?
I thought about splitting up the code into R Markdown files that I can refer to in the Results section as Supporting Information. 
Thanks a lot.
Patrik

Matthew D Pagel

unread,
Oct 27, 2016, 2:40:37 PM10/27/16
to davi...@googlegroups.com
In the past I've used a DOI service to make my code able to be cited by others (and myself). This makes sure the code is a "snapshot" of a given point in time, so that even if you later make modifications to your code, someone else can exactly reproduce your results (assuming the same input data). Of course, you can also maintain an updated "fork" of your code elsewhere.

For example, http://dx.doi.org/10.5281/zenodo.20043 points to https://github.com/MPagel/readseq/tree/v2.02, but I've made one additional modification to my main branch at github.../readseq/

(so zenodo is the DOI-issuer)


================
Matthew D. Pagel
Database Manager
Core Array: California Fish Tracking Consortium
Biotelemetry Lab
University of California, Davis

1331(*) Academic Surge Building
UCD Department of Wildlife, Fish and Conservation Biology
One Shields Ave
Davis, CA 95616

Office* Ph: 530 752-5372
Lab Ph: 530 752-1156
http://cftc.metro.ucdavis.edu/news/

*new information effective 2016-09-13
> --
> Check out our R resources at http://d-rug.github.io/
> ---
> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/davis-rug.
> For more options, visit https://groups.google.com/d/optout.

Jason Moore

unread,
Oct 27, 2016, 3:01:42 PM10/27/16
to davi...@googlegroups.com
Here is an example of a computationally reproducible paper I wrote a few years back:

https://github.com/csu-hmc/perturbed-data-paper

The source for the manuscript and the source to create the figures are in the repository. After cloning the repo, you can run a simple make command to build the paper. You have to install the software dependencies first (the main package dependency is versioned and hosted on a package repository), then you can simply call make to download the raw data, run analysis, and generate the paper in one command. In the caption of each figure or table I reference the script that generates that item.

I've had a number of people build the paper on their computer to ensure it worked cross-platform. The main hassle is installing the software, which I'd alleviate in the future with a conda environment or docker image.

This is one of many ways you could can do this.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com <mailto:davis-rug+unsubscribe@googlegroups.com>.
--
Check out our R resources at http://d-rug.github.io/
--- You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.

Myfanwy Johnston

unread,
Oct 27, 2016, 3:15:07 PM10/27/16
to davi...@googlegroups.com
Related to this topic, a new paper just came out on data storage for reproducibility: http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005097

To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.

--
Check out our R resources at http://d-rug.github.io/
--- You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.



--
Myfanwy Johnston
Ph.D Candidate, Animal Behavior
University of California at Davis
Biotelemetry Lab
--

Myfanwy Johnston
Ph.D Candidate, UC Davis
Animal Behavior Graduate Group
Biotelemetry Laboratory
__________________________
I welcome VSRE emails.  
Learn more at http://vsre.info/ 
Reply all
Reply to author
Forward
0 new messages