-
Notifications
You must be signed in to change notification settings - Fork 6
Fingerprint #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
svural
wants to merge
20
commits into
dev
Choose a base branch
from
fingerprint
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fingerprint #115
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b7380d0
Update README.md
stevekm f988019
Merge branch 'dev'
stevekm 2e1a01a
update submodule
stevekm c689015
initial commmit
svural b70d5a5
corrected the doc string
svural e99c418
added test case
svural e7ddab7
added test case
svural b15a9be
update test case for tests/test_fingerprint_cwl.py add line count and…
stevekm f5e118a
update pluto
stevekm dee5c52
Merge branch 'dev' into fingerprint
stevekm c6f5c93
update submodule
stevekm cf87798
update fingerprint test case to use new settings paths and to use sam…
stevekm 1933fd0
move some sections around in cwl/fingerprint.cwl and fix some names
stevekm ea11881
update doc and comments and add ResourceRequirement for cwl/fingerpri…
stevekm cf05e0b
update tests/test_fingerprint_cwl.py test case to check for concordan…
stevekm da83aa5
version bump to new Conpair 1.0.2, update test cases to check hash an…
stevekm 1dd6595
version bump to Conpair release 1.0.3
stevekm 3656317
remove defaults for cwl/fingerprint.cwl; add usage of manifests flag;…
stevekm be0adcb
update test case for manifest json files usage
stevekm 1e6fd33
git submodule updated
svural File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,86 @@ | ||
| #!/usr/bin/env cwl-runner | ||
| cwlVersion: v1.0 | ||
|
|
||
| class: CommandLineTool | ||
| baseCommand: | ||
| - python | ||
| - /usr/bin/conpair/scripts/run_gatk_pileup_for_sample.py | ||
|
|
||
| id: conpair-pileup | ||
|
|
||
| requirements: | ||
| InlineJavascriptRequirement: {} | ||
| ResourceRequirement: | ||
| ramMin: 16000 | ||
| coresMin: 1 | ||
| DockerRequirement: | ||
| dockerPull: mskcc/roslin-variant-conpair:0.3.3 | ||
|
|
||
| doc: | | ||
| None | ||
|
|
||
| inputs: | ||
|
|
||
| ref: | ||
| type: File | ||
| inputBinding: | ||
| prefix: --reference | ||
| secondaryFiles: | ||
| - .amb | ||
| - .ann | ||
| - .bwt | ||
| - .pac | ||
| - .sa | ||
| - .fai | ||
| - ^.dict | ||
| java_xmx: | ||
| type: | ||
| - 'null' | ||
| - type: array | ||
| items: string | ||
| doc: set up java -Xmx parameter | ||
| inputBinding: | ||
| prefix: --xmx_java | ||
|
|
||
| java_temp: | ||
| type: ['null', string] | ||
| doc: temporary directory to set -Djava.io.tmpdir | ||
| inputBinding: | ||
| prefix: --temp_dir_java | ||
|
|
||
| gatk: | ||
| type: | ||
| - [File, string, "null"] | ||
| inputBinding: | ||
| prefix: --gatk | ||
|
|
||
| markers_bed: | ||
| type: | ||
| - [File, string] | ||
| inputBinding: | ||
| prefix: --markers | ||
|
|
||
| bam: | ||
| type: | ||
| - [File, string] | ||
| inputBinding: | ||
| prefix: --bam | ||
| secondaryFiles: | ||
| - ^.bai | ||
|
|
||
| outfile: | ||
| type: | ||
| - string | ||
| inputBinding: | ||
| prefix: --outfile | ||
|
|
||
| outputs: | ||
| out_file: | ||
| type: File | ||
| outputBinding: | ||
| glob: | | ||
| ${ | ||
| if (inputs.outfile) | ||
| return inputs.outfile; | ||
| return null; | ||
| } |
This file contains hidden or 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,143 @@ | ||
| #!/usr/bin/env cwl-runner | ||
| cwlVersion: v1.0 | ||
| class: Workflow | ||
| doc: " | ||
| Workflow to run generate fingerprint search on entire dmp normals and optionally on project normals | ||
| " | ||
|
|
||
| requirements: | ||
| MultipleInputFeatureRequirement: {} | ||
| ScatterFeatureRequirement: {} | ||
| StepInputExpressionRequirement: {} | ||
| InlineJavascriptRequirement: {} | ||
| SubworkflowFeatureRequirement: {} | ||
|
|
||
| hints: | ||
| cwltool:LoadListingRequirement: | ||
| loadListing: no_listing | ||
|
|
||
| inputs: | ||
| dmp_dir: | ||
| type: Directory | ||
| default: | ||
| class: Directory | ||
| path: /work/ci/dmp_finderprint_matching/dummy_pileup | ||
| conpair_markers_bed: # conpair_markers_txt | ||
| type: File | ||
| conpair_markers_txt: # conpair_markers_txt | ||
| type: File | ||
| tumor_bam: # GATK .pileup or likelihoods .pickle | ||
| type: File | ||
| secondaryFiles: ["^.bai"] | ||
| additional_normal_bams: | ||
| type: File[] | ||
| secondaryFiles: ["^.bai"] | ||
| default: [{class: File, path: /work/ci/dmp_finderprint_matching/dummy_bam/dummy.bam}] | ||
| ref_fasta: | ||
| type: File | ||
| secondaryFiles: | ||
| - .amb | ||
| - .ann | ||
| - .bwt | ||
| - .pac | ||
| - .sa | ||
| - .fai | ||
| - ^.dict | ||
|
|
||
|
|
||
| outputs: | ||
| output_file: | ||
| type: File | ||
| outputSource: run_conpair_concordance/output_file | ||
|
|
||
| steps: | ||
| run-pileup-tumor: | ||
| run: conpair-pileup.cwl | ||
| in: | ||
| bam: tumor_bam | ||
| ref: ref_fasta | ||
| gatk: | ||
| valueFrom: ${ return '/usr/bin/gatk.jar'; } | ||
| markers_bed: conpair_markers_bed | ||
| java_xmx: | ||
| valueFrom: ${ return ["24g"]; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not a default setting? |
||
| outfile: | ||
| valueFrom: ${ return inputs.bam.basename.replace(".bam", ".pileup"); } | ||
| out: [out_file] | ||
| ###### | ||
| run-pileup-additional_normals: | ||
| run: conpair-pileup.cwl | ||
| scatter: bam | ||
| in: | ||
| bam: additional_normal_bams | ||
| ref: ref_fasta | ||
| gatk: | ||
| valueFrom: ${ return '/usr/bin/gatk.jar'; } | ||
| markers_bed: conpair_markers_bed | ||
| java_xmx: | ||
| valueFrom: ${ return ["24g"]; } | ||
| outfile: | ||
| valueFrom: ${ return inputs.bam.basename.replace(".bam", ".pileup"); } | ||
| out: [out_file] | ||
|
|
||
| put-in-dir: | ||
| run: put_in_dir.cwl | ||
| in: | ||
| output_directory_name: | ||
| valueFrom: ${ return "additional_normals"; } | ||
| files: run-pileup-additional_normals/out_file | ||
| out: [ directory ] | ||
| ####### | ||
| run_conpair_concordance: | ||
| in: | ||
| dmp_dir: dmp_dir | ||
| markers: conpair_markers_txt | ||
| tumor_file: run-pileup-tumor/out_file | ||
| additional_normal_pickles: put-in-dir/directory | ||
|
|
||
| out: [output_file] | ||
|
|
||
| run: | ||
| class: CommandLineTool | ||
| baseCommand: ['bash', 'run.sh'] | ||
| requirements: | ||
| DockerRequirement: | ||
| dockerPull: mskcc/conpair:1.0.1 | ||
| InitialWorkDirRequirement: | ||
| listing: | ||
| # NOTE: might need dos2unix for some that give errors ERROR: Your MAF uses CR line breaks, which we can't support. Please use LF or CRLF. | ||
| # NOTE: might also need sanity check that maf has >1 line | ||
|
stevekm marked this conversation as resolved.
Outdated
|
||
| - entryname: run.sh | ||
| entry: |- | ||
| set -eu | ||
| path="${ return inputs.dmp_dir.path; }" | ||
| find "\$path"/ -type f > normal_dmp_pickles_file_list.txt | ||
|
|
||
| path="${ return inputs.additional_normal_pickles.path; }" | ||
| find "\$path"/ -type f >> normal_dmp_pickles_file_list.txt | ||
|
|
||
| tumor_pickle="${ return inputs.tumor_file.path; }" | ||
| markers="${ return inputs.markers.path; }" | ||
| run.py \\ | ||
| concordance \\ | ||
| \$tumor_pickle \\ | ||
| --normals-list normal_dmp_pickles_file_list.txt \\ | ||
| --markers \$markers \\ | ||
| --threads 10 \\ | ||
|
stevekm marked this conversation as resolved.
Outdated
|
||
| --output-file "${ return inputs.tumor_file.nameroot + '.concordance.tsv' }" | ||
| inputs: | ||
| dmp_dir: Directory | ||
| additional_normal_pickles: Directory | ||
| markers: File | ||
| tumor_file: File | ||
|
|
||
| outputs: | ||
| output_file: | ||
| type: File | ||
| outputBinding: | ||
| glob: ${ return inputs.tumor_file.nameroot + '.concordance.tsv' } | ||
|
|
||
|
|
||
|
|
||
| $namespaces: | ||
|
stevekm marked this conversation as resolved.
Outdated
|
||
| cwltool: "http://commonwl.org/cwltool#" | ||
This file contains hidden or 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,74 @@ | ||
| #!/usr/bin/env python3 | ||
| # -*- coding: utf-8 -*- | ||
| """ | ||
| unit tests for the fingerprint.cwl | ||
| """ | ||
| import os | ||
| import sys | ||
| import unittest | ||
| # import json | ||
| # from tempfile import TemporaryDirectory | ||
|
|
||
| THIS_DIR = os.path.dirname(os.path.realpath(__file__)) | ||
| PARENT_DIR = os.path.dirname(THIS_DIR) | ||
| sys.path.insert(0, PARENT_DIR) | ||
| from pluto.tools import PlutoTestCase, CWLFile | ||
| from pluto.serializer import OFile | ||
| sys.path.pop(0) | ||
|
|
||
|
|
||
| class TestFingerprint(PlutoTestCase): | ||
| cwl_file = CWLFile('fingerprint.cwl') | ||
|
|
||
|
|
||
| def test_fingerprint_1(self): | ||
| """ | ||
| """ | ||
|
|
||
| self.preserve = True | ||
|
|
||
| self.input = { | ||
| "conpair_markers_txt": { | ||
| "path": "/juno/work/ci/concordance-workflow/markers/IMPACT468/FP_tiling_genotypes_for_Conpair.txt", | ||
| "class": "File" | ||
| }, | ||
| "conpair_markers_bed": { | ||
| "path": "/juno/work/ci/concordance-workflow/markers/IMPACT468/FP_tiling_genotypes_for_Conpair.bed", | ||
| "class": "File" | ||
| }, | ||
| "ref_fasta": { | ||
| "path": "/juno/work/ci/resources/genomes/GRCh37/fasta/b37.fasta", | ||
| "class": "File" | ||
| }, | ||
| "runparams": { | ||
| "tmp_dir": "/scratch", | ||
| "gatk_jar_path": "/usr/bin/gatk.jar" | ||
| }, | ||
| "tumor_bam": { | ||
| "path": "/work/ci/dmp_finderprint_matching/dummy_bam/dummy.bam", | ||
| "class": "File" | ||
| }, | ||
| "dmp_dir": { | ||
| "class": "Directory", | ||
| "path": "/work/ci/dmp_finderprint_matching/dummy_pickle" | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| ##"/work/ci/dmp/likelihoods" | ||
|
|
||
| output_json, output_dir = self.run_cwl() | ||
|
|
||
| expected_output = { | ||
| 'output_file': OFile(name = 'dummy.concordance.tsv', hash = "sha1$6b1a5ef498be9c15c842033ba7b5cc970397b5f5", size = 487, dir = output_dir) | ||
| } | ||
|
|
||
|
|
||
| self.assertCWLDictEqual(expected_output, output_json) | ||
|
|
||
|
|
||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.