forked from CancerCollaboratory/dockstore-tool-bamstats
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from CancerCollaboratory/develop
This updates the fork with WDL and Nextflow versions of the tool
- Loading branch information
Showing
9 changed files
with
147 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
task bamstats { | ||
File bam_input | ||
Int mem_gb | ||
|
||
command { | ||
bash /usr/local/bin/bamstats ${mem_gb} ${bam_input} | ||
} | ||
|
||
output { | ||
File bamstats_report = "bamstats_report.zip" | ||
} | ||
|
||
runtime { | ||
docker: "quay.io/collaboratory/dockstore-tool-bamstats:1.25-6_1.0" | ||
memory: mem_gb + "GB" | ||
} | ||
|
||
meta { | ||
author: "Andrew Duncan" | ||
} | ||
} | ||
|
||
workflow bamstatsWorkflow { | ||
File bam_input | ||
Int mem_gb | ||
call bamstats { input: bam_input=bam_input, mem_gb=mem_gb } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
set -o xtrace | ||
|
||
if [[ "${LANGUAGE}" == "cwl" ]]; then | ||
pip2.7 install --user setuptools==24.0.3 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
set -o xtrace | ||
|
||
if [[ "${LANGUAGE}" == "cwl" ]]; then | ||
pip2.7 install --user cwl-runner cwltool==1.0.20160712154127 schema-salad==1.14.20160708181155 avro==1.8.1 | ||
elif [[ "${LANGUAGE}" == "wdl" ]]; then | ||
wget https://github.com/broadinstitute/cromwell/releases/download/32/cromwell-32.jar | ||
elif [[ "${LANGUAGE}" == "nfl" ]]; then | ||
curl -s https://get.nextflow.io | bash | ||
mv nextflow $HOME/bin | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
bamFile = file(params.bam_input) | ||
|
||
process bamstats { | ||
input: | ||
file bam_input from bamFile | ||
val mem_gb from params.mem_gb | ||
|
||
output: | ||
file 'bamstats_report.zip' | ||
|
||
""" | ||
bash /usr/local/bin/bamstats $mem_gb $bam_input | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
manifest { | ||
description = 'Generate some stats on a BAM file' | ||
author = 'Andrew Duncan' | ||
} | ||
|
||
params { | ||
bam_input = 'rna.SRR948778.bam' | ||
mem_gb = '4' | ||
} | ||
|
||
process.container = 'quay.io/collaboratory/dockstore-tool-bamstats:1.25-6_1.0' | ||
docker { | ||
enabled = true | ||
docker.runOptions = '-u $(id -u):$(id -g)' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
set -o xtrace | ||
|
||
if [[ "${LANGUAGE}" == "cwl" ]]; then | ||
cwltool --non-strict Dockstore.cwl test.json | ||
elif [[ "${LANGUAGE}" == "wdl" ]]; then | ||
java -jar cromwell-32.jar run Dockstore.wdl --inputs test.wdl.json | ||
elif [[ "${LANGUAGE}" == "nfl" ]]; then | ||
nextflow run main.nf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"bamstatsWorkflow.bam_input": "rna.SRR948778.bam", | ||
"bamstatsWorkflow.mem_gb": "4" | ||
} |