Question: tools for writing edge case BAM Files for testing
gravatar for Ann
5.6 years ago by
Concord NC USA
Ann2.3k wrote:


I have to write BAM files my group can use for testing.

I need to write files that have read alignments with various combinations of bit flags, quality scores, and so on. My plan is to use an existing set of BAM files, read in the data, and then extract examples I can use "as is" or modify slightly to get what I want.

Has anyone done this type of thing and if yes, what tool(s) would you recommend I look at?

If no such simple tool already exists, can you recommend a python library for reading and writing BAM files?

If I need to write something myself to do this, I would prefer to use python because I'm comfortable with python and like the interactive interpreter, but perl (second choice) or some other easy-to-script language would be fine.



rna-seq bam python • 1.4k views
ADD COMMENTlink modified 5.6 years ago by dariober11k • written 5.6 years ago by Ann2.3k
gravatar for dariober
5.6 years ago by
WCIP | Glasgow | UK
dariober11k wrote:

pysam for reading & writing bam files in python is pretty good.

For simulating fastq reads extracted from a reference fasta I used Sherman. It is designed for simulating BS-Seq reads, but if you set the conversion rate to 0 you effectively simulate regular sequencing. The simulated fastq files have to be mapped back to the reference of course.

ADD COMMENTlink written 5.6 years ago by dariober11k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1147 users visited in the last hour