Hi everybody. Previously I was using samtools to create "mini bams" (taking large bams and chopping small regions from them) however I've recently had the desire to move to python to simplify my scripts.
Previously I just used the command:
"samtools view -b -h input.bam chr1:start-end chr7:start-end output.bam"
I've played with pysams fetch and pileup however they appear to miss some of the reads (quantity wise) as opposed to just iterating over the samfile. However I am open to suggestions using those methods.
In addition I would also like to use pysam to crop fasta files in the same manner however this isn't something I have done before.
Previously I just used the command:
"samtools view -b -h input.bam chr1:start-end chr7:start-end output.bam"
I've played with pysams fetch and pileup however they appear to miss some of the reads (quantity wise) as opposed to just iterating over the samfile. However I am open to suggestions using those methods.
In addition I would also like to use pysam to crop fasta files in the same manner however this isn't something I have done before.
Comment