Skip to content

Commit

Permalink
began adding in custom ranges for Y-STRs
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmitchell committed Jun 28, 2024
1 parent b2cbd5d commit 3921f69
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 18 deletions.
36 changes: 35 additions & 1 deletion lusSTR/data/str_markers.json
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@
"TCTA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TCTA",
"Sec": "",
"Tert": "",
Expand All @@ -579,7 +580,7 @@
"Power_5": 0,
"Power_3": 113,
"Custom_5": 0,
"Custom_3": -35,
"Custom_3": -39,
"Alleles": ["10", "11", "12", "13"]
},
"DYS643": {
Expand All @@ -589,6 +590,7 @@
"CTTTT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 5,
"LUS": "CTTTT",
"Sec": "",
"Tert": "",
Expand All @@ -608,6 +610,7 @@
"TAGA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TAGA",
"Sec": "",
"Tert": "",
Expand All @@ -626,6 +629,7 @@
"TCT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 3,
"LUS": "TCT",
"Sec": "TCT",
"Tert": "",
Expand All @@ -643,6 +647,7 @@
"AAAG"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "AAAG",
"Sec": "",
"Tert": "",
Expand All @@ -661,6 +666,7 @@
"TTTC"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TTTC",
"Sec": "",
"Tert": "",
Expand All @@ -679,6 +685,7 @@
"GATA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "GATA",
"Sec": "",
"Tert": "",
Expand All @@ -697,6 +704,7 @@
"TATC"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TATC",
"Sec": "",
"Tert": "",
Expand All @@ -715,6 +723,7 @@
"ATAG"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "ATAG",
"Sec": "",
"Tert": "",
Expand All @@ -729,6 +738,7 @@
"TCCT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TCCT",
"Sec": "",
"Tert": "",
Expand All @@ -743,6 +753,7 @@
"CTT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 3,
"LUS": "CTT",
"Sec": "",
"Tert": "",
Expand All @@ -761,6 +772,7 @@
"CTAT"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "CTAT",
"Sec": "",
"Tert": "",
Expand All @@ -775,6 +787,7 @@
"GAAA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "GAAA",
"Sec": "",
"Tert": "",
Expand All @@ -791,6 +804,7 @@
"AGAT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "AGAT",
"Sec": "",
"Tert": "",
Expand All @@ -807,6 +821,7 @@
"AGAGAT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 6,
"LUS": "AGAGAT",
"Sec": "AGAGAT",
"Tert": "",
Expand All @@ -825,6 +840,7 @@
"GATA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "GATA",
"Sec": "",
"Tert": "",
Expand All @@ -843,6 +859,7 @@
"TTTTC"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 5,
"LUS": "TTTTC",
"Sec": "",
"Tert": "",
Expand All @@ -861,6 +878,7 @@
"TCTA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TCTA",
"Sec": "",
"Tert": "",
Expand All @@ -879,6 +897,7 @@
"AGAT"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "AGAT",
"Sec": "",
"Tert": "",
Expand All @@ -895,6 +914,7 @@
"ATA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 3,
"LUS": "ATA",
"Sec": "",
"Tert": "",
Expand All @@ -913,6 +933,7 @@
"TCTA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TCTA",
"Sec": "",
"Tert": "",
Expand All @@ -933,6 +954,7 @@
"GAGA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TAGA",
"Sec": "CAGA",
"Tert": "GAGA",
Expand All @@ -952,6 +974,7 @@
"CAGG"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TAGA",
"Sec": "TAGA",
"Tert": "CAGG",
Expand All @@ -970,6 +993,7 @@
"TAGA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TAGA",
"Sec": "",
"Tert": "",
Expand All @@ -988,6 +1012,7 @@
"TTTC"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TTTC",
"Sec": "",
"Tert": "",
Expand All @@ -1006,6 +1031,7 @@
"TCTA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TCTA",
"Sec": "",
"Tert": "",
Expand All @@ -1025,6 +1051,7 @@
"GAAG"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "AAAG",
"Sec": "GAAG",
"Tert": "",
Expand All @@ -1039,6 +1066,7 @@
"ATCT"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "ATCT",
"Sec": "",
"Tert": "",
Expand All @@ -1053,6 +1081,7 @@
"ATAG"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "ATAG",
"Sec": "",
"Tert": "",
Expand All @@ -1067,6 +1096,7 @@
"TGGA"
],
"ReverseCompNeeded": "Yes",
"NumBasesToSeparate": 4,
"LUS": "TGGA",
"Sec": "",
"Tert": "",
Expand All @@ -1081,6 +1111,7 @@
"TAGA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TAGA",
"Sec": "",
"Tert": "",
Expand All @@ -1096,6 +1127,7 @@
"AAGG"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "AAGA",
"Sec": "AAGG",
"Tert": "",
Expand All @@ -1116,6 +1148,7 @@
"AAAA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "AAGA",
"Sec": "AAAA",
"Tert": "",
Expand All @@ -1133,6 +1166,7 @@
"TAGA"
],
"ReverseCompNeeded": "No",
"NumBasesToSeparate": 4,
"LUS": "TAGA",
"Sec": "TAGA",
"Tert": "",
Expand Down
22 changes: 18 additions & 4 deletions lusSTR/scripts/marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1411,10 +1411,13 @@ def canonical(self):
def convert(self):
sequence = self.forward_sequence
if self.kit == "powerseq":
final_seq = (
f"{collapse_repeats_by_length_flanks(sequence[:6], 4)} "
f"{collapse_repeats_by_length(sequence[6:], 4)}"
)
if len(sequence) < 6:
final_seq = sequence
else:
final_seq = (
f"{collapse_repeats_by_length_flanks(sequence[:6], 4)} "
f"{collapse_repeats_by_length(sequence[6:], 4)}"
)
elif len(sequence) % 4 != 0:
final_seq = sequence_to_bracketed_form(sequence, self.repeat_size, self.repeats)
else:
Expand Down Expand Up @@ -1446,6 +1449,17 @@ def convert(self):
)
return final_string

@property
def custom_brack(self):
if self.custom:
sequence = self.custom_sequence
final_string = (
f"{collapse_repeats_by_length(sequence[:14], 4)} "
f"{collapse_repeats_by_length(sequence[14:], 4)}"
)
return final_string
return None


class STRMarker_HPRTB(STRMarker):
@property
Expand Down
Loading

0 comments on commit 3921f69

Please sign in to comment.