Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IRMA Module Output Settings and Modify Abricate_flu Module for Specific Flu B Classification #10

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading