tools for writing edge case BAM Files for testing
1
0
Entering edit mode
10.4 years ago
Ann ★ 2.4k

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 python bam • 2.1k views
ADD COMMENT
1
Entering edit mode
10.4 years ago

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 COMMENT

Login before adding your answer.

Traffic: 2018 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6