Entering edit mode
7.1 years ago
lebedana21
•
0
I was trying to create a small .bam file with pysam (really small, to debug my code).
I did succeed by copping header from another file and inserting couple of manually created reads. However, I was not able to iterate over reads in the file with samfile.fetch()
ether similar iterators specifying position.
Does someone know how to do it properly? Is it happening because my reads are not aligned to reference? Is there a better tool for the purpose?
Thanks
samtools/ wgsim ? https://github.com/samtools/samtools/tree/develop/misc ?
Thank Pierre for the link. I finally had used wgsim and obtained the desired .bam file. I followed similar steps as those listed in the post Small SAM Examples to generate aligned paired end reads.
Executed steps were:
It's always helpful to show the code you used and the error message you get. Being blind to what you are exactly doing makes it very hard to troubleshoot.