Merge pull request #246 from drpatelh/master

Update iVar modules
This commit is contained in:
Harshil Patel 2021-02-24 13:00:05 +00:00 committed by GitHub
commit 50b98d56a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 8 deletions

View file

@ -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 \\

View file

@ -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
"""

View file

@ -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

Binary file not shown.

View file

@ -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) ]
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 )
}