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

Genome accessibility/callability #1219

Open
mufernando opened this issue May 22, 2024 · 4 comments
Open

Genome accessibility/callability #1219

mufernando opened this issue May 22, 2024 · 4 comments

Comments

@mufernando
Copy link

mufernando commented May 22, 2024

It is important to consider genome accessibility when computing rates from genomic data.

scikit-allel has options to include an "accessibility mask", a boolean array indicating whether a base is accessible or not, and can be used to properly normalize quantities.

I found mentions of implementing this in #341

I am happy to help make this happen, but since I am new to the codebase I'd need some hand-helding... Ideally we would need a way of reading BED files which can be attached to the genotype dataset. Then, when computing per base statistics, we would need to intersect the accessible intervals with the windows intervals to get the right denominator.

@jeromekelleher
Copy link
Collaborator

Sounds like adding a bed2zarr command to vcf2zarr would be a great starting point - fancy taking it on???

@percyfal
Copy link

This is something I'm also interested in and I have mentioned it to you @jeromekelleher in the context of our analyses on spruce.
What you're suggesting is that we first add a bed2zarr command that translates bed coordinates into Zarr 0/1-encoded arrays whose length should equal the sum of the contig lengths in contig_length. The windowed statistics would then need to be adjusted by a) excluding variant sites that are masked b) normalizing the windows by the number of accessible sites and not the window length (see https://onlinelibrary.wiley.com/cms/asset/2fb89448-2f39-4bef-bff2-c1fac98e120c/men13571-fig-0001-m.jpg for an overview of the effects of missing data).

@mufernando have you started looking into this or should I have a go?

@cademirch
Copy link

+1 for this. @percyfal and I have discussed this, and I would be happy to contribute here to help get this going.

@mufernando
Copy link
Author

I am not working on this right now!

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

4 participants