-
Notifications
You must be signed in to change notification settings - Fork 3
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
MuTect2 Module #153
Open
rnaidu
wants to merge
13
commits into
develop
Choose a base branch
from
feature/mutect2_module
base: develop
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
MuTect2 Module #153
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f6814a8
created mutect2 module
rnaidu 204b7e4
passing prettier lint check for meta.yml
rnaidu b5c7679
updated meta.yml
rnaidu 853a660
Update main.nf
buehlere 0462fbc
pushing snapshots and tags.yml
rnaidu 2816a23
Merge branch 'feature/mutect2_module' of https://github.com/mskcc-omi…
rnaidu 5631b2d
push update
rnaidu f50c132
disabling conda test and updating yml files to match nf-core lint upd…
rnaidu f893511
passing nf-core lint check
rnaidu d016778
added updated snapshots
rnaidu fae0ad9
fixed prettier lint check and updated yml files with verify markdown …
rnaidu 854c156
Merge branch 'develop' into feature/mutect2_module
rhshah d58db47
Merge branch 'develop' into feature/mutect2_module
rhshah 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 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,7 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- "YOUR-TOOL=HERE" |
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,49 @@ | ||
process MUTECT2 { | ||
tag "$meta.id" | ||
label 'process_high' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/gatk4:4.5.0.0--py36hdfd78af_0': | ||
'biocontainers/gatk4:4.5.0.0--py36hdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(case_bam), path(control_bam), path(case_bai), path(control_bai) | ||
tuple path(bed_file), path(fasta_file), path(fasta_index_file), path(fasta_dict_file) | ||
|
||
output: | ||
tuple val(meta), path("*.mutect2.vcf"), emit: mutect2_vcf | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def args2 = task.ext.args2 ?: '' | ||
def case_sample_name = task.ext.prefix ?: "${meta.case_id}" | ||
def control_sample_name = task.ext.prefix ?: "${meta.control_id}" | ||
def bed_file = bed_file ? "--intervals ${bed_file}" : '' | ||
|
||
|
||
""" | ||
gatk "Mutect2" \\ | ||
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. Might be good to add in an arg here so we can add java options. In tempo we set the Xmx for example so it may be good to add a ${jvmarg} here or something. This is how it looks in our Tempo Module. |
||
-R ${fasta_file} \\ | ||
-I ${case_bam} \\ | ||
-I ${control_bam} \\ | ||
-tumor ${case_sample_name} \\ | ||
-normal ${control_sample_name} \\ | ||
${args} \\ | ||
--output ${meta.id}.mutect2.vcf | ||
|
||
""" | ||
|
||
stub: | ||
""" | ||
touch ${meta.id}.mutect2.vcf | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
gatk "Mutect2": \$(gatk "Mutect2" --version | sed -e "s/gatk "Mutect2" v//g") | ||
END_VERSIONS | ||
""" | ||
} |
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,71 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "mutect2" | ||
|
||
description: | ||
This module wraps GATK 4.5.0 MuTect2 software, which generates VCF files | ||
and standard output from case-control sample BAM files, BED file coordinates, and | ||
a reference fasta. | ||
keywords: | ||
- vcf | ||
- case-control | ||
- bams | ||
tools: | ||
- "mutect2": | ||
description: | ||
"Generates MuTect2 VCF file and standard output for case-control | ||
sample BAM files." | ||
homepage: "https://gatk.broadinstitute.org/hc/en-us/articles/360037593851-Mutect2" | ||
|
||
identifier: "" | ||
input: | ||
# Only when we have meta | ||
- - meta: | ||
type: map | ||
description: | ||
Groovy Map containing sample information e.g. `[ tumor_id:'tumor_sample', | ||
normal_id:'normal_sample' ]` | ||
- case_bam: | ||
type: file | ||
description: Case sample BAM file | ||
pattern: "*.{bam}" | ||
- control_bam: | ||
type: file | ||
description: Control sample BAM file | ||
pattern: "*.{bam}" | ||
- case_bai: | ||
type: file | ||
description: Case sample BAM index file | ||
pattern: "*.{bai}" | ||
- control_bai: | ||
type: file | ||
description: Control sample BAM index file | ||
pattern: "*.{bai}" | ||
- - bed_file: | ||
type: file | ||
description: Input BED file | ||
pattern: "*.{bed}" | ||
- fasta_file: | ||
type: file | ||
description: Input reference fasta file | ||
pattern: "*.{fasta}" | ||
- fasta_index_file: | ||
type: list | ||
description: Input reference fasta index file | ||
pattern: "*.{fasta.fai}" | ||
- fasta_dict_file: | ||
type: file | ||
description: Input reference fasta dictionary file | ||
pattern: "*.{dict}" | ||
output: | ||
#Only when we have meta | ||
- mutect2_vcf: | ||
- meta: | ||
type: map | ||
description: Output meta map | ||
- "*.mutect2.vcf": | ||
type: file | ||
description: Output MuTect2 generated VCF file | ||
authors: | ||
- "@rnaidu" | ||
maintainers: | ||
- "@rnaidu" |
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,83 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process MUTECT2" | ||
script "../main.nf" | ||
process "MUTECT2" | ||
|
||
tag "modules" | ||
tag "modules_msk" | ||
tag "mutect2" | ||
|
||
|
||
test("mutect2 - test - vcf") { | ||
|
||
when { | ||
process { | ||
""" | ||
|
||
input[0] = [ | ||
[id: 'test', case_id: 'tumor',control_id: 'normal'], | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) | ||
] | ||
|
||
input[1] = [ | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) | ||
] | ||
|
||
|
||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success } | ||
) | ||
} | ||
|
||
} | ||
|
||
|
||
test("mutect2 - vcf - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
|
||
input[0] = [ | ||
[id: 'test', case_id: 'tumor',control_id: 'normal'], | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) | ||
] | ||
|
||
input[1] = [ | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true), | ||
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) | ||
] | ||
|
||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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 @@ | ||
mutect2: | ||
- "modules/msk/mutect2/**" |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're missing the
tag.yml
andmain.nf.test.snap
files. You might want to double check some other parts of the nf-test. This might be why the testing and linting aren't running properly?