-
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.
Merge branch 'develop' into enhancement/produce_metafusion_ref
- Loading branch information
Showing
14 changed files
with
257 additions
and
109 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
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 |
---|---|---|
|
@@ -2,6 +2,17 @@ | |
"name": "mskcc/forte", | ||
"homePage": "https://github.com/mskcc/forte", | ||
"repos": { | ||
"[email protected]:mskcc-omics-workflows/modules.git": { | ||
"modules": { | ||
"msk": { | ||
"gbcms": { | ||
"branch": "develop", | ||
"git_sha": "e70681357ccd39e7a10d328ca696c074750d8163", | ||
"installed_by": ["modules"] | ||
} | ||
} | ||
} | ||
}, | ||
"https://github.com/nf-core/modules.git": { | ||
"modules": { | ||
"nf-core": { | ||
|
43 changes: 0 additions & 43 deletions
43
modules/local/getbasecountsmultisample/container/Dockerfile
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "gbcms" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
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,63 @@ | ||
process GBCMS { | ||
tag "$meta.id" | ||
label 'process_single' | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'ghcr.io/msk-access/gbcms:1.2.5': | ||
'ghcr.io/msk-access/gbcms:1.2.5' }" | ||
|
||
input: | ||
tuple val(meta), path(bam), path(bambai), path(variant_file), val(output) | ||
path(fasta) | ||
path(fastafai) | ||
|
||
output: | ||
tuple val(meta), path('*.{vcf,maf}') , emit: variant_file | ||
tuple val(meta), path("versions.yml") , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
script: | ||
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { | ||
error "GetBaseCountsMultiSample module does not support Conda. Please use Docker / Singularity instead." | ||
} | ||
def args = task.ext.args ?: '' | ||
def sample = meta.sample | ||
// determine if input file is a maf of vcf | ||
|
||
def input_ext = variant_file.getExtension() | ||
def variant_input = '' | ||
|
||
if(input_ext == 'maf') { | ||
variant_input = '--maf ' + variant_file | ||
} | ||
if(input_ext == 'vcf'){ | ||
variant_input = '--vcf ' + variant_file | ||
} | ||
if(variant_input == ''){ | ||
throw new Exception("Variant file must be maf or vcf, not ${input_ext}") | ||
} | ||
|
||
""" | ||
GetBaseCountsMultiSample --fasta ${fasta} \\ | ||
${variant_input} \\ | ||
--output ${output} \\ | ||
--bam $sample:${bam} $args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
GetBaseCountsMultiSample: \$(echo \$(GetBaseCountsMultiSample --help) | grep -oP '[0-9]\\.[0-9]\\.[0-9]') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
touch variant_file.maf | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
GetBaseCountsMultiSample: 1.2.5 | ||
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,59 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json | ||
name: "gbcms" | ||
description: This module wraps GetBaseCountsMultiSample, which calculates the base counts in multiple BAM files for all the sites in a given VCF file or MAF file | ||
keywords: | ||
- basecount | ||
- bams | ||
- vcf | ||
tools: | ||
- "gbcms": | ||
description: "Calculate the base counts in multiple BAM files for all the sites in a given VCF file or MAF file" | ||
homepage: "https://github.com/msk-access/GetBaseCountsMultiSample" | ||
documentation: "https://github.com/msk-access/GetBaseCountsMultiSample/blob/master/README.md" | ||
|
||
input: | ||
# Only when we have meta | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- fasta: | ||
type: file | ||
description: Input reference sequence file | ||
pattern: "*.fasta" | ||
|
||
- fastafai: | ||
type: file | ||
description: Index of the reference Fasta | ||
pattern: "*.fai" | ||
- bam: | ||
type: file | ||
description: Input bam file, in the format of SAMPLE_NAME:BAM_FILE. This paramter need to be specified at least once | ||
pattern: "*.bam" | ||
- bambai: | ||
type: file | ||
description: Index of Bam | ||
pattern: "*.bai" | ||
- variant_file: | ||
type: file | ||
description: Input variant file in TCGA maf format. --maf or --vcf need to be specified at least once. But --maf and --vcf are mutually exclusive | ||
pattern: "*.{maf,vcf}" | ||
- output: | ||
type: string | ||
description: Output file | ||
|
||
output: | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- variant_file: | ||
type: file | ||
description: base counts in multiple BAM files for all the sites in a given VCF file or MAF file | ||
pattern: "*.{vcf,maf}" | ||
|
||
authors: | ||
- "@buehlere" |
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,41 @@ | ||
// nf-core modules test gbcms | ||
nextflow_process { | ||
|
||
name "Test Process GBCMS" | ||
script "../main.nf" | ||
process "GBCMS" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "modules_msk" | ||
tag "gbcms" | ||
|
||
test("sarscov2 illumina paired-end [fastq]") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', sample:'197' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), | ||
"variant_file.vcf" | ||
] | ||
input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
input[2] = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,45 @@ | ||
{ | ||
"sarscov2 illumina paired-end [fastq]": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"sample": "197" | ||
}, | ||
"variant_file.vcf:md5,28c8df33c7ea5ed5d1cf9997d8e00ffa" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"sample": "197" | ||
}, | ||
"versions.yml:md5,a94265ed3bc4b5631d85b9b9b5d2b7e5" | ||
] | ||
], | ||
"variant_file": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"sample": "197" | ||
}, | ||
"variant_file.vcf:md5,28c8df33c7ea5ed5d1cf9997d8e00ffa" | ||
] | ||
], | ||
"versions": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"sample": "197" | ||
}, | ||
"versions.yml:md5,a94265ed3bc4b5631d85b9b9b5d2b7e5" | ||
] | ||
] | ||
} | ||
], | ||
"timestamp": "2023-12-13T15:05:34.981489" | ||
} | ||
} |
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,12 @@ | ||
params { | ||
enable_conda = false | ||
} | ||
|
||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
withName: "GBCMS" { | ||
ext.args = '' | ||
} | ||
|
||
} |
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 @@ | ||
gbcms: | ||
- "modules/msk/gbcms/**" |
Oops, something went wrong.