Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw mean coverage difference with salting #103

Open
abolia opened this issue Jun 27, 2017 · 10 comments
Open

Raw mean coverage difference with salting #103

abolia opened this issue Jun 27, 2017 · 10 comments

Comments

@abolia
Copy link

abolia commented Jun 27, 2017

Hi Daniel,

Can you please explain me how is the raw mean coverage is calculated with BMFtools depth. When I change the salting parameter, the raw mean coverage also changes. If its just the mean coverage of total number of raw reads (from fastq) it should be same irrespective of salting used. Therefore, I wanted to check if there is a different logic behind calculating the raw mean coverage.

Thanks,
Ashini

@dnbaker
Copy link
Contributor

dnbaker commented Jun 28, 2017

That could depend on filter settings. How do those compare to the actual numbers of raw reads?

@abolia
Copy link
Author

abolia commented Jun 28, 2017

Sorry, I asked the wrong question. I meant to ask why is raw mean coverage changing based on different salting parameter used. Shouldn't that be same as its raw reads mean coverage.

The raw reads are consistent. Sorry about the confusion.

Thanks,
Ashini

@abolia abolia changed the title Raw read count difference with salting Raw mean coverage difference with salting Jun 28, 2017
@dnbaker
Copy link
Contributor

dnbaker commented Jun 29, 2017

As salting increases, so spurious unique observations increase due to errors in barcode reading, which should have been collapsed into another family.

Also, depending on how salting is performed affects how collapsed reads will align, so that could also be affecting it.

@abolia
Copy link
Author

abolia commented Jun 29, 2017

I understand that this could affect collapsed mean coverage, but I am still not getting how raw mean coverage gets affected by this. Isn't the raw coverage before collapsing so shouldn't it be consistent, irrespective of salting used during collapsing.

Thanks,
Ashini

@ARUP-NGS ARUP-NGS deleted a comment from Joshua-Weeks Jun 29, 2017
@dnbaker
Copy link
Contributor

dnbaker commented Jun 29, 2017

Raw mean coverage is repeating the collapsed coverage calculation with weighting by family size. We haven't actually aligned the raw dataset.

@ARUP-NGS ARUP-NGS deleted a comment from scotttball Jun 30, 2017
@ARUP-NGS ARUP-NGS deleted a comment from scotttball Jun 30, 2017
@abolia
Copy link
Author

abolia commented Jun 30, 2017

Hey Daniel,

Thanks for the reply. That makes sense now. I have another question on the total founding reads in BMFtools famstats. Does these represent raw reads ? When I compare them with a simple bwa aligned bam file (without any collapsing) I get 60,488,497 reads. However, the total founding reads in BMFTools famstats are only 25,396,920. So, I am wondering why are these so different?

Thanks again,
Ashini

@dnbaker
Copy link
Contributor

dnbaker commented Jul 1, 2017

Great question. What other processing have those files had? Checking the large validation dataset we used for 1.0/1.1 ensured that reads were all accounted for, so at least at that point, we weren't losing any records in the process.

In particular, was there any filtering done on the dataset (minimum family size or mapping quality)?

@abolia
Copy link
Author

abolia commented Jul 5, 2017

No, I did not filter any reads before calculating the coverage stats. The steps follow BMFtools, then skewer to mask adapters, bwa alignment and BMFtools coverage calculations. No filtering at any step.

Ashini

@dnbaker
Copy link
Contributor

dnbaker commented Jul 7, 2017

Thank you for reporting the issue, and I'm happy to help.

I'm a little unsure about how you got an uneven number of raw reads for paired-end sequencing, but it seems like you're definitely losing reads along the way.

I have a couple of questions to ask so I can help better.

First, can you reproduce the issue on a small (or smaller?) subset?

Second, would you be willing/able to provide a script listing commands performed and a dataset which reproduces the issue? (If you'd prefer it not be publicly available, feel free to email me it.)

@abolia
Copy link
Author

abolia commented Jul 12, 2017

Can you provide me your email address?

Thanks,
Ashini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants