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

Irma sif #8

Merged
merged 2 commits into from
Jun 20, 2024
Merged
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
11 changes: 6 additions & 5 deletions modules/local/irma.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ process IRMA {
stageInMode 'copy'

container "docker.io/staphb/irma:1.1.4"
containerOptions = "${ workflow.containerEngine == 'singularity' || workflow.containerEngine == 'apptainer' ? '--writable-tmpfs' : '' }"

input:
tuple val(meta), path(refs), path(reads)
Expand All @@ -25,8 +24,10 @@ process IRMA {
prefix = "${meta.id}"

"""
# determine IRMA path
# copy IRMA to workdir
irma_path=\$(which IRMA)
cp -r \${irma_path%IRMA} ./
irma_path="\$(dirname \${irma_path#/})/IRMA"

# create module
mod=\$(shuf -er -n20 {A..Z} {a..z} {0..9} | tr -d '\n')
Expand Down Expand Up @@ -56,7 +57,7 @@ process IRMA {
esac
## set QC thresholds
echo -e 'MIN_AMBIG=${params.cons_ratio}\nMIN_CONS_SUPPORT=${params.cons_depth}\nMIN_CONS_QUALITY=${params.cons_qual}\nDEL_TYPE=${ params.cons_amb == 'N' ? 'NNN' : params.cons_amb }' >> irma.config
# set elongation option
## set elongation option
echo -e 'SKIP_E=${ params.cons_elong ? '1' : '0' }' >> irma.config

# combine references into single file
Expand All @@ -71,7 +72,7 @@ process IRMA {
done

# run IRMA
IRMA \${mod} --external-config irma.config ${reads[0]} ${reads[1]} results
\$irma_path \${mod} --external-config irma.config ${reads[0]} ${reads[1]} results

# rename assemblies
for F in \$(ls results/*.fasta)
Expand All @@ -87,6 +88,6 @@ process IRMA {
done

# clean up
rm -r \${irma_path}_RES/modules/\${mod}
#rm -r \${irma_path}_RES/modules/\${mod}
"""
}
Loading