Skip to content

Commit

Permalink
Update IRMA output settings and refine Abricate flu B classification
Browse files Browse the repository at this point in the history
  • Loading branch information
tives82 committed Apr 9, 2024
1 parent 4cceb7e commit 565cbb5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions modules/local/abricate_flu.nf
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ process ABRICATE_FLU {
# Find INSaFLU subtype if Type B
if grep -q "Type_B" $abricate_type; then
if grep -q "Victoria" ${meta.id}_abricate_hits.tsv; then
# Check for Victoria with hemagglutinin or neuraminidase or both
if (grep -q "Victoria" ${meta.id}_abricate_hits.tsv && grep -q "hemagglutinin" ${meta.id}_abricate_hits.tsv) || \
(grep -q "Victoria" ${meta.id}_abricate_hits.tsv && grep -q "neuraminidase" ${meta.id}_abricate_hits.tsv); then
echo "Victoria" > $abricate_subtype
elif grep -q "Yamagata" ${meta.id}_abricate_hits.tsv; then
# Check for Yamagata with hemagglutinin or neuraminidase or both
elif (grep -q "Yamagata" ${meta.id}_abricate_hits.tsv && grep -q "hemagglutinin" ${meta.id}_abricate_hits.tsv) || \
(grep -q "Yamagata" ${meta.id}_abricate_hits.tsv && grep -q "neuraminidase" ${meta.id}_abricate_hits.tsv); then
echo "Yamagata" > $abricate_subtype
else
echo "No abricate subtype" > $abricate_subtype
Expand Down Expand Up @@ -114,10 +118,12 @@ process ABRICATE_FLU {
elif grep -q "H10" ${meta.id}_abricate_hits.tsv && grep -q "N8" ${meta.id}_abricate_hits.tsv; then
echo "H10N8" > $abricate_subtype
# Victoria
elif grep -q "Victoria" ${meta.id}_abricate_hits.tsv; then
elif (grep -q "Victoria" ${meta.id}_abricate_hits.tsv && grep -q "hemagglutinin" ${meta.id}_abricate_hits.tsv) || \
(grep -q "Victoria" ${meta.id}_abricate_hits.tsv && grep -q "neuraminidase" ${meta.id}_abricate_hits.tsv); then
echo "Victoria" > $abricate_subtype
# Yamagata
elif grep -q "Yamagata" ${meta.id}_abricate_hits.tsv; then
elif (grep -q "Yamagata" ${meta.id}_abricate_hits.tsv && grep -q "hemagglutinin" ${meta.id}_abricate_hits.tsv) || \
(grep -q "Yamagata" ${meta.id}_abricate_hits.tsv && grep -q "neuraminidase" ${meta.id}_abricate_hits.tsv); then
echo "Yamagata" > $abricate_subtype
else
echo "No abricate subtype" > $abricate_subtype
Expand Down
4 changes: 2 additions & 2 deletions modules/local/irma.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ process IRMA {

output:
tuple val(meta), path("${meta.id}/") , emit: irma
tuple val(meta), path("${meta.id}/*.bam") , emit: irma_bam
tuple val(meta), path("${meta.id}/*.fasta") , emit: irma_fasta
tuple val(meta), path("${meta.id}/*.bam") , optional:true, emit: irma_bam
tuple val(meta), path("${meta.id}/*.fasta") , optional:true, emit: irma_fasta
tuple val(meta), path("*.irma.consensus.fasta") , optional:true, emit: assembly
tuple val(meta), path("*_LOW_ABUNDANCE.txt") , optional:true, emit: failed_assembly
tuple val(meta), path("*_HA.fasta") , optional:true, emit: HA
Expand Down

0 comments on commit 565cbb5

Please sign in to comment.