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

Option to log fraction of ctx_db / regions overlap #19

Open
alexlenail opened this issue Feb 19, 2023 · 0 comments
Open

Option to log fraction of ctx_db / regions overlap #19

alexlenail opened this issue Feb 19, 2023 · 0 comments

Comments

@alexlenail
Copy link

I'm using the precomputed SCREEN regions ctx_db, but I don't know what fraction of my regions overlap with the regions in that database. This is the code that overlaps a database with a set of regions:

join_pr = target_pr.join(query_pr, report_overlap = True)
join_pr.Overlap_query = join_pr.Overlap/(join_pr.End_b - join_pr.Start_b)
join_pr.Overlap_target = join_pr.Overlap/(join_pr.End - join_pr.Start)
join_pr = join_pr[(join_pr.Overlap_query > fraction_overlap) | (join_pr.Overlap_target > fraction_overlap)]
target_regions = [str(chrom) + ":" + str(start) + '-' + str(end) for chrom, start, end in zip(list(join_pr.Chromosome), list(join_pr.Start), list(join_pr.End))]
query_regions = [str(chrom) + ":" + str(start) + '-' + str(end) for chrom, start, end in zip(list(join_pr.Chromosome), list(join_pr.Start_b), list(join_pr.End_b))]
target_to_query = pd.DataFrame([target_regions, query_regions], index=['Target', 'Query']).T

There doesn't appear to be an option to log statistics from this. There should be! That would help me decide whether I need to create my own database.

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

1 participant