Samtools plugin wrapper -- sorted BAM files
I am attempting to create a plugin wrapper for variant calling with samtools mpileup. I understand each plugin must perform a single command (i.e. https://help.geneious.com/hc/en-us/articles/360045071171-What-kinds-of-programs-can-be-wrapped-by-the-Wrapper-Plugin-Creator-). To get around this I am attempting to create multiple plugins, each of which do a single step, that can be stitched together in a workflow.
Part of my pipeline requires a sorted BAM file. At the moment, I have a wrapper plugin that implements the following procedure:
output BAM file > sorts BAM file > inputs sorted BAM file to Geneious
samtools sort input.bam > output.sorted.bam
This works as anticipated, i.e. the sorted BAM file is imported to Geneious. However, if I try to export this sorted BAM file (output.sorted.bam), it is no longer sorted. Do you know why this might be the case? And how can I export a sorted BAM file?
Thanks for reaching out . Are you including the index file .bai file along when exporting the bam file ? Including the indexer bai file will make sure that the final exported bam file is properly sorted by genomic location.
Please sign in to leave a comment.