mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
feat(bbmap): Initialize pileup.sh
This commit is contained in:
parent
9e9ff6a86d
commit
83cc320f5c
6 changed files with 117 additions and 0 deletions
36
modules/bbmap/pileup/main.nf
Normal file
36
modules/bbmap/pileup/main.nf
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
process BBMAP_PILEUP {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_medium'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::bbmap=38.92 bioconda::samtools=1.13 pigz=2.6" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' :
|
||||||
|
'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(bam)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.stats.txt"), emit: stats
|
||||||
|
tuple val(meta), path("*.hist.txt") , emit: hist
|
||||||
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
|
script:
|
||||||
|
def args = task.ext.args ?: ''
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
"""
|
||||||
|
pileup.sh \\
|
||||||
|
-Xmx${task.memory.toGiga()}g \\
|
||||||
|
in=${bam} \\
|
||||||
|
out=${prefix}.coverage.stats.txt \\
|
||||||
|
hist=${prefix}.coverage.hist.txt \\
|
||||||
|
$args
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
bbmap: \$(bbversion.sh)
|
||||||
|
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||||
|
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
47
modules/bbmap/pileup/meta.yml
Normal file
47
modules/bbmap/pileup/meta.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: bbmap_pileup
|
||||||
|
## TODO nf-core: Add a description of the module and list keywords
|
||||||
|
description: write your description here
|
||||||
|
keywords:
|
||||||
|
- sort
|
||||||
|
tools:
|
||||||
|
- bbmap:
|
||||||
|
## TODO nf-core: Add a description and other details for the software below
|
||||||
|
description: BBMap is a short read aligner, as well as various other bioinformatic tools.
|
||||||
|
homepage: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/
|
||||||
|
documentation: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/
|
||||||
|
tool_dev_url: None
|
||||||
|
doi: ""
|
||||||
|
licence: ['UC-LBL license (see package)']
|
||||||
|
|
||||||
|
## TODO nf-core: Add a description of all of the variables used as input
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
## TODO nf-core: Delete / customise this example input
|
||||||
|
- bam:
|
||||||
|
type: file
|
||||||
|
description: BAM/CRAM/SAM file
|
||||||
|
pattern: "*.{bam,cram,sam}"
|
||||||
|
|
||||||
|
## TODO nf-core: Add a description of all of the variables used as output
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
## TODO nf-core: Delete / customise this example output
|
||||||
|
- bam:
|
||||||
|
type: file
|
||||||
|
description: Sorted BAM/CRAM/SAM file
|
||||||
|
pattern: "*.{bam,cram,sam}"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@Emiller88"
|
|
@ -82,6 +82,10 @@ bbmap/index:
|
||||||
- modules/bbmap/index/**
|
- modules/bbmap/index/**
|
||||||
- tests/modules/bbmap/index/**
|
- tests/modules/bbmap/index/**
|
||||||
|
|
||||||
|
bbmap/pileup:
|
||||||
|
- modules/bbmap/pileup/**
|
||||||
|
- tests/modules/bbmap/pileup/**
|
||||||
|
|
||||||
bcftools/concat:
|
bcftools/concat:
|
||||||
- modules/bcftools/concat/**
|
- modules/bcftools/concat/**
|
||||||
- tests/modules/bcftools/concat/**
|
- tests/modules/bcftools/concat/**
|
||||||
|
|
15
tests/modules/bbmap/pileup/main.nf
Normal file
15
tests/modules/bbmap/pileup/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { BBMAP_PILEUP } from '../../../../modules/bbmap/pileup/main.nf'
|
||||||
|
|
||||||
|
workflow test_bbmap_pileup {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
BBMAP_PILEUP ( input )
|
||||||
|
}
|
5
tests/modules/bbmap/pileup/nextflow.config
Normal file
5
tests/modules/bbmap/pileup/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
10
tests/modules/bbmap/pileup/test.yml
Normal file
10
tests/modules/bbmap/pileup/test.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
## TODO nf-core: Please run the following command to build this file:
|
||||||
|
# nf-core modules create-test-yml bbmap/pileup
|
||||||
|
- name: bbmap pileup
|
||||||
|
command: nextflow run ./tests/modules/bbmap/pileup -entry test_bbmap_pileup -c ./tests/config/nextflow.config -c ./tests/modules/bbmap/pileup/nextflow.config
|
||||||
|
tags:
|
||||||
|
- bbmap
|
||||||
|
- bbmap/pileup
|
||||||
|
files:
|
||||||
|
- path: output/bbmap/test.bam
|
||||||
|
md5sum: e667c7caad0bc4b7ac383fd023c654fc
|
Loading…
Reference in a new issue