-
Notifications
You must be signed in to change notification settings - Fork 6
modules for new gbcms #259
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7321fa1
modules for new gbcms
buehlere 9109160
PR response
buehlere 1cb83b3
add snapshots
buehlere c7be359
make cache deterministic
buehlere a7b5699
update snapshot
buehlere bd17f9e
update image
buehlere 915b999
update snapshots
buehlere 4792477
update snapshot
buehlere 63acd41
add note about filter duplicates
buehlere 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
| 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 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,49 @@ | ||
| process GBCMSRS_BUILDGTFCACHE { | ||
| tag "${variants.name}" | ||
| label 'process_single' | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'ghcr.io/msk-access/gbcms:6.3.0': | ||
|
nikhil marked this conversation as resolved.
Outdated
|
||
| 'ghcr.io/msk-access/gbcms:6.3.0' }" | ||
| containerOptions { workflow.containerEngine in ['docker', 'podman'] ? "--entrypoint ''" : '' } | ||
|
|
||
| input: | ||
| path variants | ||
| path gtf | ||
|
|
||
| output: | ||
| path "gbcms_gtf_cache", emit: cache_dir | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { | ||
| error "GBCMSRS_BUILDGTFCACHE module does not support Conda. Please use Docker / Singularity instead." | ||
| } | ||
| def args = task.ext.args ?: '' | ||
| """ | ||
| mkdir -p gbcms_gtf_cache | ||
| gbcms build-gtf-cache \\ | ||
| --gtf ${gtf} \\ | ||
| --variants ${variants} \\ | ||
| --gtf-cache-dir gbcms_gtf_cache \\ | ||
| $args | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| gbcms: \$(gbcms --version | sed 's/^gbcms //') | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| """ | ||
| mkdir -p gbcms_gtf_cache | ||
| touch gbcms_gtf_cache/gbcms-gtf-stub.idx | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| gbcms: 6.3.0 | ||
| END_VERSIONS | ||
| """ | ||
| } | ||
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,54 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json | ||
| name: "gbcmsrs_buildgtfcache" | ||
| description: | ||
| Pre-build the gbcms GTF index cache once for a cohort so that per-sample | ||
| `gbcms rna` runs skip re-parsing the GTF | ||
| keywords: | ||
| - cache | ||
| - gtf | ||
| - rna | ||
| - index | ||
| tools: | ||
| - "gbcms": | ||
| description: | ||
| "A high-performance, orientation-aware genotype counting system for | ||
| genomic variants (Rust rewrite of GetBaseCountsMultiSample)" | ||
| homepage: "https://github.com/msk-access/gbcms" | ||
| documentation: "https://msk-access.github.io/gbcms/" | ||
| tool_dev_url: "https://github.com/msk-access/gbcms" | ||
| licence: ["AGPL-3.0"] | ||
| identifier: "" | ||
|
|
||
| input: | ||
| - variants: | ||
| type: file | ||
| description: | ||
| Variant file (VCF/MAF) for the cohort. Only its chromosome set is | ||
| used, and it must be the same variant file the per-sample `gbcms rna` runs use | ||
| so the cache key lines up. | ||
| pattern: "*.{vcf,maf}" | ||
| ontologies: [] | ||
| - gtf: | ||
| type: file | ||
| description: GTF annotation file (Ensembl/GENCODE) | ||
| pattern: "*.gtf" | ||
| ontologies: [] | ||
| output: | ||
| cache_dir: | ||
| - gbcms_gtf_cache: | ||
| type: directory | ||
| description: | ||
| Directory containing the serialized GTF index cache. Point every | ||
| per-sample `gbcms rna --gtf-cache-dir` at this same directory. | ||
| pattern: "gbcms_gtf_cache" | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: "versions.yml" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 # YAML | ||
| authors: | ||
| - "@shahr" | ||
| maintainers: | ||
| - "@shahr" |
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,35 @@ | ||
| // nf-core modules test gbcmsrs/buildgtfcache | ||
| nextflow_process { | ||
|
|
||
| name "Test Process GBCMSRS_BUILDGTFCACHE" | ||
| script "../main.nf" | ||
| process "GBCMSRS_BUILDGTFCACHE" | ||
|
|
||
| tag "modules" | ||
| tag "modules_msk" | ||
| tag "gbcmsrs" | ||
| tag "gbcmsrs/buildgtfcache" | ||
|
|
||
| test("sarscov2 illumina - vcf gtf - stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) | ||
| input[1] = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } |
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,29 @@ | ||
| { | ||
| "sarscov2 illumina - vcf gtf - stub": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| "gbcms-gtf-stub.idx:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,caa12a2ea191d010798bbfbaae282c28" | ||
| ], | ||
| "cache_dir": [ | ||
| [ | ||
| "gbcms-gtf-stub.idx:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,caa12a2ea191d010798bbfbaae282c28" | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-08-25T11:12:12.859755", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "24.10.3" | ||
| } | ||
| } | ||
| } |
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,2 @@ | ||
| gbcmsrs/buildgtfcache: | ||
| - "modules/msk/gbcmsrs/buildgtfcache/**" |
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,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 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,52 @@ | ||
| process GBCMSRS_DNA { | ||
| tag "$meta.id" | ||
| label 'process_medium' | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'ghcr.io/msk-access/gbcms:6.3.0': | ||
| 'ghcr.io/msk-access/gbcms:6.3.0' }" | ||
| containerOptions { workflow.containerEngine in ['docker', 'podman'] ? "--entrypoint ''" : '' } | ||
|
|
||
| input: | ||
| tuple val(meta), path(variants), path(bams), path(bais) | ||
|
rhshah marked this conversation as resolved.
Outdated
|
||
| path fasta | ||
| path fasta_fai | ||
|
|
||
| output: | ||
| tuple val(meta), path("gbcms_out/*.{vcf,maf}"), emit: variant_file | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { | ||
| error "GBCMSRS_DNA module does not support Conda. Please use Docker / Singularity instead." | ||
| } | ||
| def args = task.ext.args ?: '' | ||
| def bam_args = bams.collect { "--bam ${it}" }.join(' ') | ||
| """ | ||
| gbcms dna \\ | ||
| --variants ${variants} \\ | ||
| ${bam_args} \\ | ||
| --fasta ${fasta} \\ | ||
| --output-dir gbcms_out \\ | ||
| --threads ${task.cpus} \\ | ||
| $args | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| gbcms: \$(gbcms --version | sed 's/^gbcms //') | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| """ | ||
| mkdir -p gbcms_out | ||
| touch gbcms_out/${variants.baseName}.vcf | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| gbcms: 6.3.0 | ||
| END_VERSIONS | ||
| """ | ||
| } | ||
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,77 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json | ||
| name: "gbcmsrs_dna" | ||
| description: | ||
| Count alleles in cfDNA/somatic DNA BAMs at known variant sites using | ||
| gbcms | ||
| keywords: | ||
| - basecount | ||
| - genotyping | ||
| - dna | ||
| - variants | ||
| tools: | ||
| - "gbcms": | ||
| description: | ||
| "A high-performance, orientation-aware genotype counting system for | ||
| genomic variants (Rust rewrite of GetBaseCountsMultiSample)" | ||
| homepage: "https://github.com/msk-access/gbcms" | ||
| documentation: "https://msk-access.github.io/gbcms/" | ||
| tool_dev_url: "https://github.com/msk-access/gbcms" | ||
| licence: ["AGPL-3.0"] | ||
| identifier: "" | ||
|
|
||
| input: | ||
|
rhshah marked this conversation as resolved.
|
||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test' ]` | ||
| - variants: | ||
| type: file | ||
| description: Input variant file in VCF or MAF format | ||
| pattern: "*.{vcf,maf}" | ||
| ontologies: [] | ||
| - bams: | ||
| type: file | ||
| description: One or more indexed BAM/CRAM files to count alleles in | ||
| pattern: "*.{bam,cram}" | ||
| ontologies: [] | ||
| - bais: | ||
| type: file | ||
| description: Index file(s) for the input BAM/CRAM file(s) | ||
| pattern: "*.{bai,crai}" | ||
| ontologies: [] | ||
| - fasta: | ||
| type: file | ||
| description: Reference genome FASTA file | ||
| pattern: "*.{fasta,fa}" | ||
| ontologies: [] | ||
| - fasta_fai: | ||
| type: file | ||
| description: Index of the reference genome FASTA file | ||
| pattern: "*.fai" | ||
| ontologies: [] | ||
| output: | ||
| variant_file: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test' ]` | ||
| - "gbcms_out/*.{vcf,maf}": | ||
| type: file | ||
| description: | ||
| Variant file annotated with allele counts, strand information, | ||
| and statistical annotations | ||
| pattern: "gbcms_out/*.{vcf,maf}" | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: "versions.yml" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 # YAML | ||
| authors: | ||
| - "@shahr" | ||
| maintainers: | ||
| - "@buehlere" | ||
| - "@shahr" | ||
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,41 @@ | ||
| // nf-core modules test gbcmsrs/dna | ||
| nextflow_process { | ||
|
|
||
| name "Test Process GBCMSRS_DNA" | ||
| script "../main.nf" | ||
| process "GBCMSRS_DNA" | ||
|
|
||
| tag "modules" | ||
| tag "modules_msk" | ||
| tag "gbcmsrs" | ||
| tag "gbcmsrs/dna" | ||
|
|
||
| test("sarscov2 illumina - vcf - stub") { | ||
|
rhshah marked this conversation as resolved.
Outdated
|
||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], // meta map | ||
| file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), | ||
| [ 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) ] | ||
| ] | ||
| 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() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.