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

varlens-variants: add an annotation for membership in capture kit intervals #14

Open
timodonnell opened this issue Feb 17, 2016 · 1 comment

Comments

@timodonnell
Copy link
Collaborator

No description provided.

@timodonnell
Copy link
Collaborator Author

Relevant code from a pt189 notebook:

nimblegen_df = pandas.read_table("exome-capture-intervals-lists/SeqCap_EZ_Exome_v3.hg19.interval_list", comment='@', names=["contig", "start", "end", "strand", "comment"])
nimblegen_df

sureselect_df = pandas.read_table("exome-capture-intervals-lists/Human_All_Exon_V5.hg19.interval_list", comment='@', names=["contig", "start", "end", "strand", "comment"])
sureselect_df

def make_dict_intervals(df):
    result = collections.defaultdict(intervaltree.IntervalTree)
    total = 0
    for (contig, start, end) in zip(df["contig"], df["start"], df["end"]):
        total += abs(end - start)
        result[contig].addi(start, end)
    print(total)
    return result

nimblegen_intervals = make_dict_intervals(nimblegen_df)
sureselect_intervals = make_dict_intervals(sureselect_df)

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