Skip to content

Commit

Permalink
Merge pull request #16 from dbmi-bgm/manta_cf_fix
Browse files Browse the repository at this point in the history
SV confidence classes + Tests fixed
  • Loading branch information
B3rse authored Oct 21, 2022
2 parents bfdd56a + 20fa372 commit f732f7a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
37 changes: 10 additions & 27 deletions dockerfiles/sv_germline_granite/scripts/SV_confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,37 +132,20 @@ def calculate_confidence_manta(vnt_obj):
# currently we do not assign confidence to insertions
if svtype == INSERTION_SVTYPE_MANTA:
confidence = NA

elif (
(svlen > 250 or svtype == TRANSLOCATION_SVTYPE_MANTA)
and (
SR_alt >= 5
and PR_alt >= 5
and prop_spanning_reads >= 0.3
and prop_split_reads >= 0.3
)
) or (
svlen <= 250
and svtype != TRANSLOCATION_SVTYPE_MANTA
and SR_alt > 5
and prop_split_reads > 0.3
elif (svlen > 250 or svtype == TRANSLOCATION_SVTYPE_MANTA) and (
SR_alt >= 5
and PR_alt >= 5
and prop_spanning_reads >= 0.3
and prop_split_reads >= 0.3
):

confidence = HIGH_CONFIDENCE

elif (
(svlen > 250 or svtype == TRANSLOCATION_SVTYPE_MANTA)
and (
SR_alt >= 3
and PR_alt >= 3
and prop_spanning_reads >= 0.3
and prop_split_reads >= 0.3
)
) or (
svlen <= 250
and svtype != TRANSLOCATION_SVTYPE_MANTA
and SR_alt > 3
and prop_split_reads > 0.3
elif (svlen > 250 or svtype == TRANSLOCATION_SVTYPE_MANTA) and (
SR_alt >= 3
and PR_alt >= 3
and prop_spanning_reads >= 0.3
and prop_split_reads >= 0.3
):

confidence = MEDIUM_CONFIDENCE
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_end_not_found():
#Variables
args = {'inputvcf': 'test/files/cytoband_test_fail2.vcf.gz','outputfile':'output.vcf','cytoband':'test/files/cytoBand.txt'}
# Run and Tests
with pytest.raises(Exception, match="Unexpected variant format found - END not in 0th position of INFO. Quitting"):
with pytest.raises(Exception, match="ERROR in variant INFO field, END tag is missing"):
main_SV_cytoband(args)

def test_multiple_start_cytobands():
Expand Down

0 comments on commit f732f7a

Please sign in to comment.