forked from mskcc/cwl-commandlinetools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
232 additions
and
32 deletions.
There are no files selected for viewing
File renamed without changes.
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
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,2 @@ | ||
# sequence_qc | ||
|
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,61 @@ | ||
# CWL and Dockerfile for running sequence_qc | ||
|
||
## Version of tools in docker image (/container/Dockerfile) | ||
|
||
| Tool | Version | Location | | ||
|--- |--- |--- | | ||
| sequence_qc | 0.2.24 | <https://github.org/msk-access/sequence_qc/> | | ||
|
||
## CWL | ||
|
||
- CWL specification 1.0 | ||
- Use example_inputs.yaml to see the inputs to the cwl | ||
- Example Command using [toil](https://toil.readthedocs.io): | ||
|
||
```bash | ||
> toil-cwl-runner sequence_qc_0.2.24.cwl example_inputs.yaml | ||
``` | ||
|
||
**If at MSK, using the JUNO cluster having installed toil version 3.19 and manually modifying [lsf.py](https://github.com/DataBiosphere/toil/blob/releases/3.19.0/src/toil/batchSystems/lsf.py#L170) by removing `type==X86_64 &&` you can use the following command** | ||
|
||
```bash | ||
#Using CWLTOOL | ||
> cwltool --singularity --non-strict /path/to/sequence_qc/0.2.24/sequence_qc_0.2.24.cwl /path/to/inputs.yaml | ||
|
||
#Using toil-cwl-runner | ||
> mkdir tool_toil_log | ||
> toil-cwl-runner --singularity --logFile /path/to/tool_toil_log/cwltoil.log --jobStore /path/to/tool_jobStore --batchSystem lsf --workDir /path/to/tool_toil_log --outdir . --writeLogs /path/to/tool_toil_log --logLevel DEBUG --stats --retryCount 2 --disableCaching --maxLogFileSize 20000000000 /path/to/sequence_qc/0.2.24/sequence_qc_0.2.24.cwl /path/to/inputs.yaml > tool_toil.stdout 2> tool_toil.stderr & | ||
``` | ||
|
||
### Usage | ||
|
||
```bash | ||
toil-cwl-runner sequence_qc_0.2.24.cwl -h | ||
|
||
usage: sequence_qc_0.2.24.cwl [-h] --reference REFERENCE --bam_file BAM_FILE | ||
--bed_file BED_FILE --sample_id SAMPLE_ID | ||
[--threshold THRESHOLD] [--truncate TRUNCATE] | ||
[--min_mapq MIN_MAPQ] [--min_basq MIN_BASQ] | ||
[job_order] | ||
|
||
positional arguments: | ||
job_order Job input json file | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
--reference REFERENCE | ||
Path to reference fasta, containing all regions in | ||
bed_file | ||
--bam_file BAM_FILE Path to BAM file for calculating noise [required] | ||
--bed_file BED_FILE Path to BED file containing regions over which to | ||
calculate noise [required] | ||
--sample_id SAMPLE_ID | ||
Prefix to include in all output file names | ||
--threshold THRESHOLD | ||
Alt allele frequency past which to ignore positions | ||
from the calculation. | ||
--truncate TRUNCATE Whether to exclude trailing bases from reads that only | ||
partially overlap the bed file (0 or 1) | ||
--min_mapq MIN_MAPQ Exclude reads with a lower mapping quality | ||
--min_basq MIN_BASQ Exclude bases with a lower base quality | ||
``` |
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 |
---|---|---|
@@ -1,20 +1,9 @@ | ||
toil-ionox0[cwl]==0.0.7 | ||
toil[cwl] | ||
pytz | ||
typing==3.7.4 | ||
|
||
# From fixing pkg_resources.ContextualVersionConflict: | ||
ruamel.yaml==0.15.77 | ||
|
||
# From requirements_dev | ||
pip>=21.1 | ||
bumpversion==0.5.3 | ||
wheel==0.32.1 | ||
watchdog==0.9.0 | ||
flake8==3.5.0 | ||
tox==3.5.2 | ||
coverage==4.5.1 | ||
Sphinx==1.8.1 | ||
twine==1.12.1 | ||
pytest==3.8.2 | ||
pytest-runner==4.2 | ||
coloredlogs==10.0.0 | ||
bumpversion | ||
flake8 | ||
tox | ||
twine | ||
pytest | ||
pytest-runner | ||
coloredlogs |
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,150 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.0 | ||
$namespaces: | ||
dct: 'http://purl.org/dc/terms/' | ||
doap: 'http://usefulinc.com/ns/doap#' | ||
foaf: 'http://xmlns.com/foaf/0.1/' | ||
sbg: 'https://www.sevenbridges.com/' | ||
id: calculate_noise_0_2_4 | ||
baseCommand: | ||
- calculate_noise | ||
inputs: | ||
- id: reference | ||
type: File | ||
inputBinding: | ||
position: 0 | ||
prefix: --ref_fasta | ||
secondaryFiles: | ||
- ^.fasta.fai | ||
doc: >- | ||
Path to reference fasta, containing all regions in bed_file | ||
- id: bam_file | ||
type: File | ||
inputBinding: | ||
position: 0 | ||
prefix: --bam_file | ||
secondaryFiles: | ||
- ^.bai | ||
doc: >- | ||
Path to BAM file for calculating noise [required] | ||
- id: bed_file | ||
type: File | ||
inputBinding: | ||
position: 0 | ||
prefix: --bed_file | ||
doc: >- | ||
Path to BED file containing regions over which to calculate noise [required] | ||
- id: sample_id | ||
type: string | ||
inputBinding: | ||
position: 0 | ||
prefix: --sample_id | ||
doc: >- | ||
Prefix to include in all output file names | ||
- id: threshold | ||
type: float? | ||
inputBinding: | ||
position: 0 | ||
prefix: --threshold | ||
doc: >- | ||
Alt allele frequency past which to ignore positions from the calculation. | ||
- id: truncate | ||
type: int? | ||
inputBinding: | ||
position: 0 | ||
prefix: --truncate | ||
doc: >- | ||
Whether to exclude trailing bases from reads that only partially overlap the bed file (0 or 1) | ||
- id: min_mapq | ||
type: int? | ||
inputBinding: | ||
position: 0 | ||
prefix: --min_mapq | ||
doc: >- | ||
Exclude reads with a lower mapping quality | ||
- id: min_basq | ||
type: int? | ||
inputBinding: | ||
position: 0 | ||
prefix: --min_basq | ||
doc: >- | ||
Exclude bases with a lower base quality | ||
outputs: | ||
- id: sequence_qc_pileup | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_pileup.tsv' | ||
} | ||
- id: sequence_qc_noise_positions | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_noise_positions.tsv' | ||
} | ||
- id: sequence_qc_noise_by_substitution | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_noise_by_substitution.tsv' | ||
} | ||
- id: sequence_qc_noise_acgt | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_noise_acgt.tsv' | ||
} | ||
- id: sequence_qc_noise_n | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_noise_n.tsv' | ||
} | ||
- id: sequence_qc_noise_del | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_noise_del.tsv' | ||
} | ||
- id: sequence_qc_figures | ||
type: File | ||
outputBinding: | ||
glob: |- | ||
${ | ||
return inputs.sample_id + '_noise.html' | ||
} | ||
requirements: | ||
- class: ResourceRequirement | ||
ramMin: 8000 | ||
coresMin: 1 | ||
- class: DockerRequirement | ||
dockerPull: 'ghcr.io/msk-access/sequence_qc:0.2.4' | ||
- class: InlineJavascriptRequirement | ||
- class: EnvVarRequirement | ||
envDef: | ||
LC_ALL: en_US.utf-8 | ||
LANG: en_US.utf-8 | ||
'dct:contributor': | ||
- class: 'foaf:Organization' | ||
'foaf:member': | ||
- class: 'foaf:Person' | ||
'foaf:mbox': 'mailto:shahr2@mskcc.org' | ||
'foaf:name': Ronak Shah | ||
'foaf:name': Memorial Sloan Kettering Cancer Center | ||
'dct:creator': | ||
- class: 'foaf:Organization' | ||
'foaf:member': | ||
- class: 'foaf:Person' | ||
'foaf:mbox': 'mailto:murphyc4@mskcc.org' | ||
'foaf:name': Charlie Murphy | ||
'foaf:name': Memorial Sloan Kettering Cancer Center | ||
'doap:release': | ||
- class: 'doap:Version' | ||
'doap:name': sesquence_qc | ||
'doap:revision': 0.2.4 |
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