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?