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

Hi,

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.

-Ann

 

rna-seq bam python • 1.2k views
ADD COMMENTlink modified 4.8 years ago by dariober10.0k • written 4.8 years ago by Ann2.2k
1
gravatar for dariober
4.8 years ago by
dariober10.0k
WCIP | Glasgow | UK
dariober10.0k 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 4.8 years ago by dariober10.0k
Please log in to add an answer.

Help
Access

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