## get singularity image to your working directory
cp /storage/brno2/home/bartonv/singularities/sortmerna_4.3.6--h9ee0642_0.sif $PWD

## change code to fit your own reference (--ref) and reads (--reads)
## note - it is a dumb program, that can not clean afterself. Hence the rm -r .\sortmerna_tmp, otherwise it would raise an error.
## for single-end
singularity exec sortmerna_4.3.6--h9ee0642_0.sif sortmerna \
--ref ref.fasta \
--reads reads.fq.gz \
--workdir .\sortmerna_tmp \
--fastx \
--aligned aligned \
--other non-aligned

# delete temp directory
rm -r .\sortmerna_tmp


## for paired-end
singularity exec sortmerna_4.3.6--h9ee0642_0.sif sortmerna \
--ref ref.fasta \
--reads reads_1.fq.gz \
--reads reads_2.fq.gz \
--workdir .\sortmerna_tmp \
--fastx -paired_out -out2 \
--aligned aligned \
--other non-aligned

# delete temp directory
rm -r .\sortmerna_tmp
