Skip to content

Commit

Permalink
allow emmtyper to run via singularity
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-VM committed Jul 29, 2024
1 parent 071ffe7 commit 71f0aee
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ gzip -dkc \$file > data_NC/\$(basename "\$file" .gz)
EOF

# FIXME: conda & singularity load
# STEP 2: Setup exe file to perform unzip and emmtyper.
cat <<EOF > _01_emmtyper.sbatch
#!/bin/bash
Expand All @@ -50,28 +49,35 @@ cat <<EOF > _01_emmtyper.sbatch
#SBATCH --output ./$(date '+%Y%m%d')_emmtyper.log
# module load singularity
# conda activate emmtyper-0.2.0
# create results folder
mkdir -p 01-typing
mkdir -p 01-typing/tmps
blastdb_path=/data/bi/references/cdc_emm_blastdb
# Run emmtyper
emmtyper \\
singularity exec \\
--bind ${scratch_dir} \\
--bind ${scratch_dir}/../../ \\
--bind \$blastdb_path \\
/data/bi/pipelines/singularity-images/singularity-emmtyper.0.2.0--py_0 emmtyper \\
-w blast \\
--keep \\
--blast_db '/data/bi/references/cdc_emm_blastdb/cdc_emm_database29042024' \\
--blast_db "${blastdb_path}/cdc_emm_database29042024" \\
--percent-identity 95 \\
--culling-limit 5 \\
--output 01-typing/results_emmtyper.out \\
--output-format verbose \\
./data_NC/*.fasta
mv *emmtyper.log 01-typing/
mv *.tmp 01-typing/tmps
EOF

# Bash script that performs all steps above
echo "#!/bin/bash" > _ALLSTEPS_emmtyper.sh
echo "# # module load singularity" >> _ALLSTEPS_emmtyper.sh
echo "unzip_job_id=\$(sbatch _00_unzip_jobarray.sbatch | awk '{print \$4}')" >> _ALLSTEPS_emmtyper.sh
echo "sbatch --dependency=afterok:\${unzip_job_id} _01_emmtyper.sbatch" >> _ALLSTEPS_emmtyper.sh

chmod +x _ALLSTEPS_emmtyper.sh

0 comments on commit 71f0aee

Please sign in to comment.