Sort it, index it,and count what mapped
The common path over a SAM, BAM or CRAM file.Sorted, indexed and summarized, into output.
$ dxflow workflow create --identity samtools hub://samtools --start
Three steps,and one job
Sort, index and flagstat, over whatever INPUT is pointing at.
SAM, BAM or CRAM — samtools works out the format on its own here.
sorted.bam and its .bai, ready for whatever needs to seek in one.
flagstat.txt: the totals, the mapped, the paired, the duplicates.
Sort it, index it,then count what is there
One alignment goes through the common path, and two variables steer it.
$ dxflow artifact upload sample.bam input/
$ dxflow workflow start samtools --override env.job.INPUT=/data/input/sample.bam
$ dxflow artifact download output/ ./aligned/
It runs,and then it stops
A job, not a session — it ends once the three files are written.
The common path,and the way past it
The step covers sort, index and summarize. Everything else SAMtools does is a shell away.
SAM, BAM and CRAM all go in the same way. The format is read off the file, not declared.
A sorted BAM, its index beside it, and the flagstat and stats tables for the run.
view, merge, mpileup and depth are all in the image. Open a shell and drive them yourself.
Pulled once,then it stays
SAMtools arrives as one image. This is what comes down the first time, and what the disk should have free for it.
What it wants,and what it needs
The definition asks for 4 cores and 4 GB. The image comes up on less than that, and a start given --fit trims the ask to whatever the machine actually has.
Machines that fit it
SAMtools asks for 4 cores and 4 GB. Cheapest first.