How to down-sample a BAM file read depth to reduce heterogeneity in coverage while keeping heterozygosity
0
1
Entering edit mode
8.6 years ago
Bruno Vieira ▴ 10

Hi,

I want to take I high coverage alignment, like 90x, that has a lot of variation in coverage, and down-sample it to 20x to reduce the variation (i.e., like setting a maximum coverage threshold and cutting all the "peaks" above that coverage in the alignment).

Ideally, the removal of reads or bases from the alignment shouldn't affect heterozygosity too much (i.e., be random).

I've seen similar questions here, but the solutions seem to usually down-sample the average coverage without reducing the heterogeneity in coverage (e.g., samtools -s).

The closest solution I've found is this: Downsampling By Having A Ceiling On Number Of Reads At Each Site but maybe there's a better way or ready-made solution/tool out there?

Thank you,
Bruno Vieira

alignment • 6.4k views
ADD COMMENT
3
Entering edit mode

"maybe there's a better way " , I don't think there's a better way just because I wrote this tool :-P

ADD REPLY
0
Entering edit mode

I'm trying to accomplish the same goal. Pierre, are you saying you have written a tool? That would be great if you have. I looked through your blog and github but nothing jumped out at me as a tool to effect a max depth on a bam. Suggestions? Thanks!

ADD REPLY
0
Entering edit mode

yes sorry, my answer was not clear at all I thought the link was pointing to this link : Capping coverage in bam file + my answer: A: Capping coverage in bam file

ADD REPLY
0
Entering edit mode

Thank you - I look forward to trying this!

ADD REPLY

Login before adding your answer.

Traffic: 2367 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