Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #74 from SciDAP/master
Browse files Browse the repository at this point in the history
Test files & sccript for bam-genomecov-bigwig.cwl workflow
  • Loading branch information
portah committed Apr 15, 2016
2 parents 9216904 + 5c3c02e commit b48c6e7
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 83 deletions.
2 changes: 1 addition & 1 deletion test/STAR-alignReads-job.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"readFilesIn": [{"class": "File", "path": "test-files/SRR1031972.fastq"}],
"genomeDir": {"class": "File", "path": "test-files/dm3/"},
"genomeDir": {"class": "File", "path": "test-files/dm3/Genome"},
"outFileNamePrefix":"./test-files/SRR1031972.",
"outSAMunmapped1": "Within",
"runThreadN": 1
Expand Down
2 changes: 1 addition & 1 deletion test/STAR-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

- args:
["STAR",
"--genomeDir", ./test-files/dm3/,
"--genomeDir", ./test-files/dm3,
"--outBAMcompression", "10",
"--outFileNamePrefix", "./test-files/SRR1031972.",
"--outSAMmode", "Full",
Expand Down
22 changes: 0 additions & 22 deletions test/test-files/mm10-chrNameLength.txt

This file was deleted.

56 changes: 0 additions & 56 deletions test/test-files/mm10.sh

This file was deleted.

22 changes: 22 additions & 0 deletions test/test-files/prepare_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

# Script has to be run in current directory ./test/test-files

#download test files
wget -q -O - ftp://hgdownload.cse.ucsc.edu/goldenPath/dm3/chromosomes/chr4.fa.gz|gunzip >dm3_chr4.fa
wget -q -O - https://scidap.com/tests/dm3.gtf.bz2 | bunzip2 > dm3_chr4.gtf
wget -q -O - https://scidap.com/tests/SRR1031972.fastq.bz2 |bunzip2 > SRR1031972.fastq
mkdir -p dm3

#generate required files. Reference genome. Align reads. Create index.
cd ..
cwltool ../tools/STAR.cwl ./STAR-genomeGenerate-job.json
cwltool ../tools/STAR.cwl ./STAR-alignReads-job.json
cwltool ../tools/samtools-index.cwl ./samtools-index-job.json
mv SRR1031972.Aligned.sortedByCoord.out.bam.bai ./test-files/
cd test-files

#link the job file into current directory. and run the pipeline
ln -s ../../workflows/scidap/bam-genomecov-bigwig-job.json ./bam-genomecov-bigwig-job.json
cwltool --tmpdir-prefix $(pwd) --tmp-outdir-prefix $(pwd) --debug ../../workflows/scidap/bam-genomecov-bigwig.cwl ./bam-genomecov-bigwig-job.json
rm ./bam-genomecov-bigwig-job.json
26 changes: 26 additions & 0 deletions tools/STAR.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,33 @@ inputs:
description: |
string: path to the directory where genome files are stored (if
runMode!=generateGenome) or will be generated (if runMode==generateGenome)
secondaryFiles: |
${
var p=inputs.genomeDir.path.split('/').slice(0,-1).join('/');
return [
{"path": p+"/SA", "class":"File"},
{"path": p+"/SAindex", "class":"File"},
{"path": p+"/chrNameLength.txt", "class":"File"},
{"path": p+"/chrLength.txt", "class":"File"},
{"path": p+"/chrStart.txt", "class":"File"},
{"path": p+"/geneInfo.tab", "class":"File"},
{"path": p+"/sjdbList.fromGTF.out.tab", "class":"File"},
{"path": p+"/chrName.txt", "class":"File"},
{"path": p+"/exonGeTrInfo.tab", "class":"File"},
{"path": p+"/genomeParameters.txt", "class":"File"},
{"path": p+"/sjdbList.out.tab", "class":"File"},
{"path": p+"/exonInfo.tab", "class":"File"},
{"path": p+"/sjdbInfo.txt", "class":"File"},
{"path": p+"/transcriptInfo.tab", "class":"File"}
];
}
inputBinding:
valueFrom: |
${
if (inputs.runMode != "genomeGenerate")
return inputs.genomeDir.path.split('/').slice(0,-1).join('/');
return inputs.genomeDir;
}
position: 1
prefix: '--genomeDir'

Expand Down
6 changes: 3 additions & 3 deletions workflows/scidap/bam-genomecov-bigwig-job.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"input": {
"class": "File",
"path": "./test-files/rna.SRR948778.bam"
"path": "./SRR1031972.Aligned.sortedByCoord.out.bam"
},
"genomeFile": {
"class": "File",
"path": "./test-files/mm10-chrNameLength.txt"
"path": "./dm3/chrNameLength.txt"
},
"scale": 1,
"dept":"-bg",
"bigWig": "./rna.SRR948778.bigwig"
"bigWig": "./SRR1031972.bigwig"
}

0 comments on commit b48c6e7

Please sign in to comment.