This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to find positions with higher depth relative to their surroundings

Hello.

I try to find positions that have higher depth significantly than their surroundings.

Is there a good way to do this?

Currently I have depth per position data from samtools depth.

depth python samtools

2 answers

The usual way of doing this is to use one of the many existing copy number variant caller. Doing this yourself is both a) complicated to do correctly (the stats for depth per position are complicated by the fact that adjacent position depths are highly correlated since they share reads), and b) already done by someone else.

TLDR: save yourself time and effort by using an existing CNV caller.

I saw you want to get regions that have significantly higher depth than their surroundings; you must get a p-value to show significant as well.

In my opinion, the mostly easy and correct way is using the tool called Genrich, It will calculate a p-value for each peak you got.

Log in to answer this question.