-
Notifications
You must be signed in to change notification settings - Fork 1k
Add fgumi/extract
#11546
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
Draft
atrigila
wants to merge
10
commits into
nf-core:master
Choose a base branch
from
atrigila:fgumi_add
base: master
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.
Draft
Add fgumi/extract
#11546
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
62e1dae
first draft of fgumi/extract
atrigila 58c621f
update fgumi
atrigila 84e5bfc
add library
atrigila a94cb40
Merge branch 'master' into fgumi_add
atrigila eed6d94
Merge branch 'master' into fgumi_add
SPPearce 517df53
add default prefix, fix linting
atrigila 545b8b5
Merge branch 'master' into fgumi_add
atrigila 045536e
remove default prefix
atrigila f11e659
Merge branch 'fgumi_add' of https://github.com/atrigila/modules into …
atrigila 84535d0
remove unused prefix
atrigila 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: | ||
| - "bioconda::fgumi=0.2.0" |
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,39 @@ | ||
| process FGUMI_EXTRACT { | ||
| tag "${meta.id}" | ||
| label 'process_single' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container | ||
| ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a5/a510706f3481fae12ff6100d6e4ad298b8bf464a2d93a6afe35e9cf26542d080/data' | ||
| : 'community.wave.seqera.io/library/fgumi:0.2.0--fe028e7a64e5da27'}" | ||
|
|
||
| input: | ||
| tuple val(meta), path(reads) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.bam"), emit: bam | ||
| tuple val("${task.process}"), val('fgumi'), eval('fgumi --version | sed "s/^fgumi //"'), topic: versions, emit: versions_fgumi | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| if (!args.contains('--sample') || !args.contains('--library')) { | ||
| error("fgumi extract requires both --sample and --library to be supplied via task.ext.args") | ||
| } | ||
|
|
||
| """ | ||
| fgumi extract \\ | ||
| --inputs ${reads.join(' ')} \\ | ||
| --output ${prefix}.bam \\ | ||
| ${args} | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| touch ${prefix}.bam | ||
| """ | ||
| } | ||
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,63 @@ | ||
| name: fgumi_extract | ||
| description: Extract unique molecular indices (UMIs) from FASTQ files and write an unaligned BAM file. | ||
| keywords: | ||
| - umi | ||
| - extract | ||
| - fastq | ||
| - bam | ||
| tools: | ||
| - fgumi: | ||
| description: High-performance tools for working with UMI-tagged sequencing data. | ||
| homepage: https://github.com/fulcrumgenomics/fgumi | ||
| documentation: https://docs.rs/fgumi | ||
| tool_dev_url: https://github.com/fulcrumgenomics/fgumi | ||
| licence: ["MIT"] | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - reads: | ||
| type: file | ||
| description: Input FASTQ files used for UMI extraction. | ||
| pattern: "*.fastq.gz" | ||
| ontologies: [] | ||
| output: | ||
| bam: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.bam": | ||
| type: file | ||
| description: Unaligned BAM with extracted UMIs in SAM tags. | ||
| pattern: "*.bam" | ||
| ontologies: [] | ||
| versions_fgumi: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The process the versions were collected from | ||
| - fgumi: | ||
| type: string | ||
| description: The tool name | ||
| - 'fgumi --version | sed "s/^fgumi //"': | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
|
|
||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The process the versions were collected from | ||
| - fgumi: | ||
| type: string | ||
| description: The tool name | ||
| - 'fgumi --version | sed "s/^fgumi //"': | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "@atrigila" | ||
| maintainers: | ||
| - "@atrigila" |
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,101 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process FGUMI_EXTRACT" | ||
| script "../main.nf" | ||
| process "FGUMI_EXTRACT" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "fgumi" | ||
| tag "fgumi/extract" | ||
|
|
||
| config "./nextflow.config" | ||
|
|
||
| test("homo_sapiens - [fastq1, fastq2]") { | ||
|
|
||
| when { | ||
| params { | ||
| module_args = '--library illumina' | ||
| prefix = '' | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], | ||
| [ | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) | ||
| ] | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| test("homo_sapiens - [fastq1, fastq2] - missing library") { | ||
|
|
||
| when { | ||
| params { | ||
| module_args = '--read-structures +T +M' | ||
| prefix = '' | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], | ||
| [ | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) | ||
| ] | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert !process.success }, | ||
| { assert process.errorReport.contains('fgumi extract requires both --sample and --library') } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("homo_sapiens - [fastq1, fastq2] - stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| params { | ||
| module_args = "--sample test --library test --read-structures +T +M" | ||
| prefix = '' | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], | ||
| [ | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) | ||
| ] | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(sanitizeOutput(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,54 @@ | ||
| { | ||
| "homo_sapiens - [fastq1, fastq2]": { | ||
| "content": [ | ||
| { | ||
| "bam": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.bam:md5,9c2476e5c354f57bed109e582b8953be" | ||
| ] | ||
| ], | ||
| "versions_fgumi": [ | ||
| [ | ||
| "FGUMI_EXTRACT", | ||
| "fgumi", | ||
| "0.2.0" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-05-05T17:49:43.490283983", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| }, | ||
| "homo_sapiens - [fastq1, fastq2] - stub": { | ||
| "content": [ | ||
| { | ||
| "bam": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_fgumi": [ | ||
| [ | ||
| "FGUMI_EXTRACT", | ||
| "fgumi", | ||
| "0.2.0" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-05-04T22:10:38.368295554", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| } | ||
| } |
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,6 @@ | ||
| process { | ||
| withName: FGUMI_EXTRACT { | ||
| ext.args = { "--sample ${meta.id} ${params.module_args}" } | ||
| ext.prefix = params.prefix | ||
| } | ||
| } |
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.