mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +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 |" : ""
|
def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
||||||
"""
|
"""
|
||||||
samtools mpileup \\
|
samtools mpileup \\
|
||||||
--fasta-ref $fasta \\
|
--reference $fasta \\
|
||||||
$options.args2 \\
|
$options.args2 \\
|
||||||
$bam | \\
|
$bam | \\
|
||||||
$save_mpileup \\
|
$save_mpileup \\
|
||||||
|
|
|
@ -19,11 +19,12 @@ process IVAR_TRIM {
|
||||||
}
|
}
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam), path(bai)
|
||||||
path bed
|
path bed
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bam"), emit: bam
|
tuple val(meta), path("*.bam"), emit: bam
|
||||||
|
tuple val(meta), path('*.log'), emit: log
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
@ -34,7 +35,8 @@ process IVAR_TRIM {
|
||||||
$options.args \\
|
$options.args \\
|
||||||
-i $bam \\
|
-i $bam \\
|
||||||
-b $bed \\
|
-b $bed \\
|
||||||
-p $prefix
|
-p $prefix \\
|
||||||
|
> ${prefix}.ivar.log
|
||||||
|
|
||||||
ivar version | head -n1 2>&1 | sed 's/^.*iVar version //g' > ${software}.version.txt
|
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 ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- bam:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
description: A sorted (with samtools sort) bam file
|
description: Co-ordinate sorted BAM file
|
||||||
pattern: "*.bam"
|
pattern: "*.bam"
|
||||||
|
- bai:
|
||||||
|
type: file
|
||||||
|
description: Index file for co-ordinate sorted BAM file
|
||||||
|
pattern: "*.bai"
|
||||||
- bed:
|
- bed:
|
||||||
type: file
|
type: file
|
||||||
description: BED file with primer labels and positions
|
description: BED file with primer labels and positions
|
||||||
|
@ -55,6 +59,10 @@ output:
|
||||||
type: file
|
type: file
|
||||||
description: iVar generated trimmed bam file (unsorted)
|
description: iVar generated trimmed bam file (unsorted)
|
||||||
pattern: "*.bam"
|
pattern: "*.bam"
|
||||||
|
- log:
|
||||||
|
type: file
|
||||||
|
description: Log file generated by iVar for use with MultiQC
|
||||||
|
pattern: "*.log"
|
||||||
- version:
|
- version:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software version
|
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([:])
|
include { IVAR_TRIM } from '../../../../software/ivar/trim/main.nf' addParams([:])
|
||||||
|
|
||||||
workflow test_ivar_trim {
|
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 = []
|
def input = []
|
||||||
input = [ [ id:'test'],
|
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", 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