mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Mpileup also likes intervals (#1445)
* Mpileup also likes intervals * Also update meta yml with inclusive input and intervals Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> Co-authored-by: Maxime U. Garcia <max.u.garcia@gmail.com>
This commit is contained in:
parent
e3a5795652
commit
b5825fe6b3
4 changed files with 36 additions and 7 deletions
|
@ -8,7 +8,7 @@ process SAMTOOLS_MPILEUP {
|
|||
'quay.io/biocontainers/samtools:1.15--h1170115_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
tuple val(meta), path(input), path(intervals)
|
||||
path fasta
|
||||
|
||||
output:
|
||||
|
@ -21,12 +21,13 @@ process SAMTOOLS_MPILEUP {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def intervals = intervals ? "-l ${intervals}" : ""
|
||||
"""
|
||||
samtools mpileup \\
|
||||
--fasta-ref $fasta \\
|
||||
--output ${prefix}.mpileup \\
|
||||
$args \\
|
||||
$bam
|
||||
$input
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||
|
|
|
@ -21,7 +21,7 @@ input:
|
|||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
- input:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
|
@ -29,6 +29,10 @@ input:
|
|||
type: file
|
||||
description: FASTA reference file
|
||||
pattern: "*.{fasta,fa}"
|
||||
- intervals:
|
||||
type: file
|
||||
description: Interval FILE
|
||||
pattern: "*.bed"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
|
|
@ -6,7 +6,18 @@ include { SAMTOOLS_MPILEUP } from '../../../../modules/samtools/mpileup/main.nf'
|
|||
|
||||
workflow test_samtools_mpileup {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
[]
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
|
||||
SAMTOOLS_MPILEUP ( input, fasta )
|
||||
}
|
||||
|
||||
workflow test_samtools_mpileup_intervals {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
- name: samtools mpileup
|
||||
command: nextflow run ./tests/modules/samtools/mpileup -entry test_samtools_mpileup -c ./tests/config/nextflow.config -c ./tests/modules/samtools/mpileup/nextflow.config
|
||||
- name: samtools mpileup test_samtools_mpileup
|
||||
command: nextflow run tests/modules/samtools/mpileup -entry test_samtools_mpileup -c tests/config/nextflow.config
|
||||
tags:
|
||||
- samtools
|
||||
- samtools/mpileup
|
||||
files:
|
||||
- path: ./output/samtools/test.mpileup
|
||||
- path: output/samtools/test.mpileup
|
||||
md5sum: 958e6bead4103d72026f80153b6b5150
|
||||
- path: output/samtools/versions.yml
|
||||
md5sum: 26350e1e145451f0b807911db029861e
|
||||
|
||||
- name: samtools mpileup test_samtools_mpileup_intervals
|
||||
command: nextflow run tests/modules/samtools/mpileup -entry test_samtools_mpileup_intervals -c tests/config/nextflow.config
|
||||
tags:
|
||||
- samtools
|
||||
- samtools/mpileup
|
||||
files:
|
||||
- path: output/samtools/test.mpileup
|
||||
md5sum: 958e6bead4103d72026f80153b6b5150
|
||||
- path: output/samtools/versions.yml
|
||||
md5sum: 11d8118a558efb9db6798453862d719c
|
||||
|
|
Loading…
Reference in a new issue