mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
commit
50b98d56a1
5 changed files with 19 additions and 8 deletions
|
@ -34,7 +34,7 @@ process IVAR_CONSENSUS {
|
|||
def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
||||
"""
|
||||
samtools mpileup \\
|
||||
--fasta-ref $fasta \\
|
||||
--reference $fasta \\
|
||||
$options.args2 \\
|
||||
$bam | \\
|
||||
$save_mpileup \\
|
||||
|
|
|
@ -19,11 +19,12 @@ process IVAR_TRIM {
|
|||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
path bed
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
tuple val(meta), path('*.log'), emit: log
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
|
@ -34,7 +35,8 @@ process IVAR_TRIM {
|
|||
$options.args \\
|
||||
-i $bam \\
|
||||
-b $bed \\
|
||||
-p $prefix
|
||||
-p $prefix \\
|
||||
> ${prefix}.ivar.log
|
||||
|
||||
ivar version | head -n1 2>&1 | sed 's/^.*iVar version //g' > ${software}.version.txt
|
||||
"""
|
||||
|
|
|
@ -39,8 +39,12 @@ input:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: A sorted (with samtools sort) bam file
|
||||
description: Co-ordinate sorted BAM file
|
||||
pattern: "*.bam"
|
||||
- bai:
|
||||
type: file
|
||||
description: Index file for co-ordinate sorted BAM file
|
||||
pattern: "*.bai"
|
||||
- bed:
|
||||
type: file
|
||||
description: BED file with primer labels and positions
|
||||
|
@ -55,6 +59,10 @@ output:
|
|||
type: file
|
||||
description: iVar generated trimmed bam file (unsorted)
|
||||
pattern: "*.bam"
|
||||
- log:
|
||||
type: file
|
||||
description: Log file generated by iVar for use with MultiQC
|
||||
pattern: "*.log"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
|
|
BIN
tests/data/bam/test-sc2-artic-v3.bam.bai
Normal file
BIN
tests/data/bam/test-sc2-artic-v3.bam.bai
Normal file
Binary file not shown.
|
@ -5,11 +5,12 @@ nextflow.enable.dsl = 2
|
|||
include { IVAR_TRIM } from '../../../../software/ivar/trim/main.nf' addParams([:])
|
||||
|
||||
workflow test_ivar_trim {
|
||||
bed_file = file("${launchDir}/tests/data/bed/test-sc2-artic-v3.bed", checkIfExists: true)
|
||||
def bed = file("${launchDir}/tests/data/bed/test-sc2-artic-v3.bed", checkIfExists: true)
|
||||
|
||||
def input = []
|
||||
input = [ [ id:'test'],
|
||||
file("${launchDir}/tests/data/bam/test-sc2-artic-v3.bam", checkIfExists: true) ]
|
||||
input = [ [ id:'test'],
|
||||
file("${launchDir}/tests/data/bam/test-sc2-artic-v3.bam", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/bam/test-sc2-artic-v3.bam.bai", checkIfExists: true) ]
|
||||
|
||||
IVAR_TRIM ( input, bed_file )
|
||||
IVAR_TRIM ( input, bed )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue