Loading wiki pages...

Wiki Version:
<p>Publication: <a href="https://peerj.com/articles/4152" rel="nofollow">https://peerj.com/articles/4152</a> <br> Docker Container: <a href="https://hub.docker.com/r/everhartlab/sclerotinia-366/" rel="nofollow">https://hub.docker.com/r/everhartlab/sclerotinia-366/</a> <br> GitHub: <a href="https://github.com/everhartlab/sclerotinia-366" rel="nofollow">https://github.com/everhartlab/sclerotinia-366</a> <br> Poster: <a href="https://doi.org/10.6084/m9.figshare.5791713" rel="nofollow">https://doi.org/10.6084/m9.figshare.5791713</a></p> <hr> <p>This OSF project contains the data, code, and manuscript for "Population structure and phenotypic variation of <em>Sclerotinia sclerotiorum</em> from dry bean (<em>Phaseolus vulgaris</em>) in the United States."</p> <h1>Data</h1> <p>If you wish to use these data, we suggest to use the data set located in <a href="https://osf.io/8x7b3/" rel="nofollow">https://osf.io/8x7b3/</a>. This data set has been validated and cleaned from the raw excel file. The first seven columns of the data represent:</p> <ol> <li>Severity (noted as aggressiveness in the manuscript)</li> <li>Mycelial Compatibility Group</li> <li>Region (State/Country)</li> <li>Source (field or white mold screening nursery)</li> <li>Year Collected</li> <li>Host Cultivar</li> <li>Isolate Name</li> </ol> <p>The rest of the 16 columns represent the fragment length at a given locus.</p> <h1>Analysis</h1> <h2>Background</h2> <p>The analysis is controlled via two docker containers:</p> <ol> <li><a href="https://hub.docker.com/r/everhartlab/sclerotinia-366-dependencies/" rel="nofollow">sclerotinia-366-dependencies</a>: defines the complete software environment used, built on top of the <a href="https://hub.docker.com/r/rocker/verse" rel="nofollow">rocker/verse:3.4.2</a> container. <strong>(See the <a href="https://osf.io/mwv6d/" rel="nofollow">Dockerfile</a>)</strong></li> <li><a href="https://hub.docker.com/r/everhartlab/sclerotinia-366/" rel="nofollow">sclerotinia-366</a> is built on top of the above container and contains the results of the analysis. <strong>(See the <a href="https://osf.io/tvfju/" rel="nofollow">Dockerfile</a>)</strong></li> </ol> <p>The <code>sclerotinia-366-dependencies</code> container is regularly rebuilt on docker hub whenever <code>rocker/verse:3.4.2</code> updates and the <code>sclerotinia-366</code> container is rebuilt on <a href="https://circleci.com/gh/everhartlab/sclerotinia-366" rel="nofollow">CircleCI</a> whenever the git repository is updated.</p> <p>As of this writing, the containers are up to date with R version 3.4.2 and packages downloaded from the <a href="https://mran.microsoft.com/snapshot/2017-10-31/" rel="nofollow">MRAN snapshot on 2017-10-31</a>. </p> <h2>Reproduction</h2> <p>All of the steps for reproduction detailed here assume that you have installed docker (<a href="https://docs.docker.com/engine/installation/#desktop" rel="nofollow">https://docs.docker.com/engine/installation/#desktop</a>). If you do not have Docker installed, please do so before continuing.</p> <h3>via RStudio Server</h3> <p>If you want to explore the analyses yourself, the easiest way to do this is through the RStudio server session inside of the Docker container. There are three steps to doing this, detailed below:</p> <ol> <li>Run the docker container from your command line (the container will automatically download from docker hub)</li> <li>Open your browser to <code>localhost:8787</code> and log in to RStudio (this is running within the docker container on your computer)</li> <li>copy the <code>/analysis</code> directory to your current directory and open the RStudio project.</li> </ol> <h4>Running the docker container</h4> <p>To run the docker container, make sure you have Docker running, open your terminal and type:</p> <pre class="highlight"><code class="language-bash">docker run --name ssc --rm -dp 8787:8787 -e ROOT=TRUE everhartlab/sclerotinia-366:latest</code></pre> <p>This will first check to make sure you have the container on your machine. If you don't, Docker will automatically download it for you. It will spin up the Docker container on your machine, give it the name "ssc", and expose it to port 8787. You can open your browser and type <code>localhost:8787</code>, and an instance of Rstudio server will appear. Sign in with the following credentials:</p> <ul> <li>username: rstudio </li> <li>password: rstudio.</li> </ul> <p>Since the files in <code>/analysis</code> are write-protected, if you wanted to explore, you should copy the directory to your current working space:</p> <ul> <li>in the R console type: <code>system("cp -R /analysis .")</code>. </li> <li>open <code>/analysis</code> and double click on znk_analysis.Rproj</li> </ul> <p>From here you can re-run the analyses to your heart's content. <strong>Don't forget to stop the container when you are finished:</strong></p> <pre class="highlight"><code class="language-bash">docker stop ssc</code></pre> <h3>via command line</h3> <p>If you want to re-run the analysis in the container you can do the following:</p> <pre class="highlight"><code class="language-bash">docker run --rm -it -e ROOT=TRUE everhartlab/sclerotinia-366:latest bash</code></pre> <p>Once your docker container has started, you can run the full analysis with (note: this can take about 2 hours depending on the speed of your processor):</p> <pre class="highlight"><code class="language-bash">cd analysis make clean # clear up all generated artifacts (reports, figures, tables) make # generate all data and analyses</code></pre> <h2>Workflow for editing the project on your local copy</h2> <p>This is the workflow I use when I want to work on the project on my local computer. I open up the terminal to the home directory of the project and type:</p> <pre class="highlight"><code class="language-bash">docker run --name ssc -dp 8787:8787 -v $(pwd):/home/rstudio/ -e ROOT=TRUE everhartlab/sclerotinia-366:latest</code></pre> <p>This will spin up the container and mount my current working directory to the home directory of RStudio. This way, whenever I make changes in the docker container, they will show up on my system and I can track them using git. Note: I don't use the git tab in the Rstudio window because I've found it to be a bit wonky. </p>
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.