Skip to content

Commit

Permalink
Merge pull request #2 from hdzierz/master
Browse files Browse the repository at this point in the history
Marcus course in R markdown
  • Loading branch information
mdavy86 committed May 1, 2016
2 parents 5778208 + 519e642 commit 80b5a6a
Show file tree
Hide file tree
Showing 47 changed files with 1,367 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ tmp/
*.cnt
*.fq
*.fasta
*.fastq
*.fastq.gz
*.bt2
*.zip
*.gz
*.h5

*.bt2

tt/
.Rproj.user
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: R
before_install:
- R --version
- RScript -e "library(knitr);"
- wget --version
- unzip --version
- wget --version
- unzip -h
- bowtie2 -h
- run_pipeline.pl -h
- pandoc --version
- module --version

13 changes: 13 additions & 0 deletions 00_AlignerIndices/load_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

if [ -f /input/genomic/TrainingData/BBS/gbs_rmd/00_AlignerIndices/GBS_Workshop_Maize.zip ];
then
echo "File found";
unzip /input/genomic/TrainingData/BBS/gbs_rmd/00_AlignerIndices/GBS_Workshop_Maize.zip
else
echo "File not found. Downloading";
wget -O GBS_Workshop_Maize.zip https://www.dropbox.com/sh/idwq4oo3uim31dw/AADW46CCFtxqnI4Kmjh_uAxoa?dl=1;
unzip GBS_Workshop_Maize.zip
fi


4 changes: 4 additions & 0 deletions 00_AlignerIndices/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
13 changes: 13 additions & 0 deletions 00_AlignerIndices/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Download Maize Index from Dropbox

- unzip index and delete zip afterwards
- convert mark down to html to load in browser


```{r test-bash, engine='bash'}
./load_data.sh
pandoc run.md -o run.html
```
14 changes: 14 additions & 0 deletions 01_RawSequence/load_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

rm -f C08L7ACXX_6_fastq.gz

if [ -f /input/genomic/TrainingData/BBS/gbs_rmd/01_RawSequence/C08L7ACXX_6_fastq.gz ];
then
echo "File found";
ln -s /input/genomic/TrainingData/BBS/gbs_rmd/01_RawSequence/C08L7ACXX_6_fastq.gz
else
echo "File not found. Downloading";
wget -O C08L7ACXX_6_fastq.gz "https://www.dropbox.com/s/vcrtcqunuxkwz90/C08L7ACXX_6_fastq.gz?dl=1";
fi


4 changes: 4 additions & 0 deletions 01_RawSequence/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
12 changes: 12 additions & 0 deletions 01_RawSequence/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Load data

- linking data from input for convenience
- convert output to html for loading into the browser


```{r test-bash, engine='bash'}
./load_data.sh
pandoc run.md -o run.html
```
14 changes: 14 additions & 0 deletions 02_TagCounts/01_IndividualTagCounts/FastqToTagCounts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<FastqToTagCountPlugin>
<i>../../01_RawSequence/</i>
<o>./</o>
<k>../../50_KeyFiles/GBS_Workshop_Maize_key.txt</k>
<e>ApeKI</e>
<s>3000000</s>
<c>1</c>
</FastqToTagCountPlugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 02_TagCounts/01_IndividualTagCounts/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
9 changes: 9 additions & 0 deletions 02_TagCounts/01_IndividualTagCounts/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Count GBS tags

```{r test-bash, engine='bash'}
module load tassel/3.0
run_pipeline.pl -configFile FastqToTagCounts.xml
pandoc run.md -o run.html
module unload tassel/3.0
```
11 changes: 11 additions & 0 deletions 02_TagCounts/02_MergedTagCounts/MergeTagCounts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<MergeMultipleTagCountPlugin>
<i>../01_IndividualTagCounts</i>
<o>./GBS_Workshop_Maize.cnt</o>
<c>5</c>
</MergeMultipleTagCountPlugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 02_TagCounts/02_MergedTagCounts/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
10 changes: 10 additions & 0 deletions 02_TagCounts/02_MergedTagCounts/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Merge tag count files

```{r test-bash, engine='bash'}
module load tassel/3.0
run_pipeline.pl -configFile MergeTagCounts.xml
module unload tassel/3.0
pandoc run.md -o run.html
```
11 changes: 11 additions & 0 deletions 02_TagCounts/03_TagCountToFastq/TagCountToFastq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<TagCountToFastqPlugin>
<i>../02_MergedTagCounts/GBS_Workshop_Maize.cnt</i>
<o>./GBS_Workshop_Maize.fq</o>
<c>5</c>
</TagCountToFastqPlugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 02_TagCounts/03_TagCountToFastq/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
11 changes: 11 additions & 0 deletions 02_TagCounts/03_TagCountToFastq/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Convert to Fastq

```{r test-bash, engine='bash'}
module load tassel/3.0
run_pipeline.pl -configFile TagCountToFastq.xml
module unload tassel/3.0
pandoc run.md -o run.html
```
4 changes: 4 additions & 0 deletions 03_SAM/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
9 changes: 9 additions & 0 deletions 03_SAM/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Align GBS tags to reference genome

```{r test-bash, engine='bash'}
module load bowtie2/2.2.5
bowtie2 -M 4 -p 15 --very-sensitive-local -x ../00_AlignerIndices/GBS_Workshop_Maize -U ../02_TagCounts/03_TagCountToFastq/GBS_Workshop_Maize.fq -S GBS_Workshop_Maize.sam
module unload bowtie2/2.2.5
```
10 changes: 10 additions & 0 deletions 04_TOPM/SAMConverter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<SAMConverterPlugin>
<i>../03_SAM/GBS_Workshop_Maize.sam</i>
<o>./GBS_Workshop_Maize.topm</o>
</SAMConverterPlugin>
</fork1>
<runfork1/>
</TasselPipeline>
10 changes: 10 additions & 0 deletions 04_TOPM/SAMConverter2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<SAMConverterPlugin>
<i>&lt;(samtools view -h ../03_SAM/GBS_Workshop_Maize.bam)</i>
<o>./GBS_Workshop_Maize.topm</o>
</SAMConverterPlugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 04_TOPM/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
9 changes: 9 additions & 0 deletions 04_TOPM/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Convert sam tags to tags on physical map (TOPM)

```{r test-bash, engine='bash'}
module load tassel/3.0
run_pipeline.pl -configFile SAMConverter.xml
module unload tassel/3.0
```
15 changes: 15 additions & 0 deletions 05_TBT/01_IndividualTBT/SeqToTBTHDF5Plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<SeqToTBTHDF5Plugin>
<i>../../01_RawSequence</i>
<k>../../50_KeyFiles/GBS_Workshop_Maize_key.txt</k>
<e>ApeKI</e>
<o>./GBS_Workshop_Maize.h5</o>
<s>100000000</s>
<L>GBS_Workshop_MaizeTBTHDF5_Log.txt</L>
<t>../../02_TagCounts/02_MergedTagCounts/GBS_Workshop_Maize.cnt</t>
</SeqToTBTHDF5Plugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 05_TBT/01_IndividualTBT/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
10 changes: 10 additions & 0 deletions 05_TBT/01_IndividualTBT/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Match tags to samples


```{r test-bash, engine='bash'}
module load tassel/3.0
run_pipeline.pl -configFile SeqToTBTHDF5Plugin.xml
module unload tassel/3.0
```
12 changes: 12 additions & 0 deletions 05_TBT/04_PivotMergedTaxaTBT/PivotTaxaTBTHDF5.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<ModifyTBTHDF5Plugin>
<o>../01_IndividualTBT/GBS_Workshop_Maize.h5</o>
<p>./PivotTaxaTBTHDF5.h5</p>
<L>./PivotTaxaTBTHDF5.log</L>
<c></c>
</ModifyTBTHDF5Plugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 05_TBT/04_PivotMergedTaxaTBT/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
10 changes: 10 additions & 0 deletions 05_TBT/04_PivotMergedTaxaTBT/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pivot the tbt to prepare for SNP calling


```{r test-bash, engine='bash'}
module load tassel/3.0
run_pipeline.pl -configFile ./PivotTaxaTBTHDF5.xml
module unload tassel/3.0
```
16 changes: 16 additions & 0 deletions 06_HapMap/SNP_Caller.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<TasselPipeline>
<fork1>
<TagsToSNPByAlignmentPlugin>
<i>../05_TBT/04_PivotMergedTaxaTBT/PivotTaxaTBTHDF5.h5</i>
<o>./SNP_Caller</o>
<m>../04_TOPM/GBS_Workshop_Maize.topm</m>
<mnF>0.8</mnF>
<mnMAF>0.02</mnMAF>
<mnMAC>100000</mnMAC>
<s>9</s>
<e>10</e>
</TagsToSNPByAlignmentPlugin>
</fork1>
<runfork1/>
</TasselPipeline>
4 changes: 4 additions & 0 deletions 06_HapMap/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

library(knitr)

knit('run.Rmd')
23 changes: 23 additions & 0 deletions 06_HapMap/run.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Call SNPs


```{r test-bash, engine='bash'}
if [! -d /output/genomic/TrainingData/BBS/gbs_rmd/06_HapMap/SNP_Caller];
then
mkdir -p /output/genomic/TrainingData/BBS/gbs_rmd/06_HapMap/SNP_Caller
fi
if [! -L 06_HapMap];
then
ln -s /output/genomic/TrainingData/BBS/gbs_rmd/06_HapMap
fi
module load tassel/3.0
run_pipeline.pl -configFile ./SNP_Caller.xml
module unload tassel/3.0
pandoc run.md -o run.html
```
Loading

0 comments on commit 80b5a6a

Please sign in to comment.