Created
January 26, 2018 16:05
-
-
Save gamazeps/a894e35a1c51745f9d30fba6c51a2bc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deepSv_predict(reads, reference, representation, model): | |
stats = generate_read_stats(reads) # we grab std and mean for insert and read size | |
candidates = paired_read_analysis(reads, stats) # generate candidate variants | |
calls = set() | |
for (variant, supporting_reads) in candidates: | |
proba = model.predict(representation.generate(variant, supporting_reads)) | |
if proba > 0.5: | |
calls.add((variant, supporting_reads)) | |
refined_calls = set() | |
for (variant, supporting_reads) in refined_calls: | |
located_call = split_read_location(reads, variant, reference) | |
if located_call is None: | |
located_call = supporting_reads_bounding(supporting_reads, variant) | |
refined_calls.add(located_call) | |
return format_to_vcf(refined_calls) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment