Skip to content

Commit

Permalink
Umitools prepareforrsem (nf-core#4897)
Browse files Browse the repository at this point in the history
* Add umitools/prepareforrsem

* Remove trailing newlines

* Fix software env

* appease eclint

* fix linting

* fix comment

* Don't snapshot python version

* Readd snapshot file

* Apply suggestions from code review

Co-authored-by: Maxime U Garcia <[email protected]>

---------

Co-authored-by: Maxime U Garcia <[email protected]>
  • Loading branch information
pinin4fjords and maxulysse committed Feb 13, 2024
1 parent 105968d commit 44e0ab0
Show file tree
Hide file tree
Showing 7 changed files with 533 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/nf-core/umitools/prepareforrsem/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: umitools_prepareforrsem
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::umi_tools=1.1.4
34 changes: 34 additions & 0 deletions modules/nf-core/umitools/prepareforrsem/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
process UMITOOLS_PREPAREFORRSEM {
tag "$meta.id"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/umi_tools:1.1.4--py38hbff2b2d_1' :
'biocontainers/umi_tools:1.1.4--py38hbff2b2d_1' }"

input:
tuple val(meta), path(bam), path(bai)

output:
tuple val(meta), path('*.bam'), emit: bam
tuple val(meta), path('*.log'), emit: log
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
template 'prepare-for-rsem.py'

stub:
"""
touch ${meta.id}.bam
touch ${meta.id}.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' )
END_VERSIONS
"""
}
53 changes: 53 additions & 0 deletions modules/nf-core/umitools/prepareforrsem/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: umitools_prepareforrsem
description: Make the output from umi_tools dedup or group compatible with RSEM
keywords:
- umitools
- rsem
- salmon
- dedup
tools:
- umi_tools:
description: >
UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes
documentation: https://umi-tools.readthedocs.io/en/latest/
license: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: |
BAM file containing reads to be deduplicated via UMIs.
pattern: "*.{bam}"
- bai:
type: file
description: |
BAM index files corresponding to the input BAM file.
pattern: "*.{bai}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Prepared BAM file.
pattern: "*.{bam}"
- log:
type: file
description: File with logging information
pattern: "*.{log}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@drpatelh"
- "@pinin4fjords"
maintainers:
- "@drpatelh"
- "@pinin4fjords"
Loading

0 comments on commit 44e0ab0

Please sign in to comment.