Skip to content

Commit

Permalink
Updating SNP ID (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmitchell authored Oct 27, 2023
1 parent be6eca5 commit 632174e
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 33 deletions.
2 changes: 1 addition & 1 deletion lusSTR/data/snp_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
"ReverseCompNeeded": "Yes",
"Coord": 50
},
"rs312262906_N29insA": {
"rs312262906": {
"Type": "p",
"Alleles": ["C", "insA"],
"ReverseCompNeeded": "No",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,6 @@ Kin_pos_1ng_set1 rs543502 3 4 42.0 33.0 75.0
Kin_pos_1ng_set1 rs6671673 4 2 45.0 30.0 75.0
Kin_pos_1ng_set1 rs7176165 4 75.0 75.0
Kin_pos_1ng_set1 rs7706034 1 75.0 75.0
Kin_pos_1ng_set1 N29insA 2 76.0 76.0
Kin_pos_1ng_set1 rs1009930 1 76.0 76.0
Kin_pos_1ng_set1 rs10167782 4 76.0 76.0
Kin_pos_1ng_set1 rs10196560 2 76.0 76.0
Expand Down Expand Up @@ -1949,6 +1948,7 @@ Kin_pos_1ng_set1 rs2723696 1 76.0 76.0
Kin_pos_1ng_set1 rs2816999 4 2 40.0 36.0 76.0
Kin_pos_1ng_set1 rs295340 1 76.0 76.0
Kin_pos_1ng_set1 rs3018845 2 4 44.0 32.0 76.0
Kin_pos_1ng_set1 rs312262906 2 76.0 76.0
Kin_pos_1ng_set1 rs340828 3 1 46.0 30.0 76.0
Kin_pos_1ng_set1 rs369005 2 4 39.0 37.0 76.0
Kin_pos_1ng_set1 rs3923451 4 76.0 76.0
Expand Down
2 changes: 1 addition & 1 deletion lusSTR/tests/data/kinsnps/evidence.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Sample Name Marker Allele 1 Allele 2 Height 1 Height 2
Kin_pos_1ng N29insA 2 76.0
Kin_pos_1ng rs1000022 2 4 176.0 142.0
Kin_pos_1ng rs1000137 4 2 66.0 36.0
Kin_pos_1ng rs10002268 4 365.0
Expand Down Expand Up @@ -4521,6 +4520,7 @@ Kin_pos_1ng rs3117915 1 3 85.0 117.0
Kin_pos_1ng rs3118520 3 554.0
Kin_pos_1ng rs312154 4 3 69.0 51.0
Kin_pos_1ng rs312185 1 2 152.0 146.0
Kin_pos_1ng rs312262906 2 76.0
Kin_pos_1ng rs312272 2 32.0
Kin_pos_1ng rs3124028 4 96.0
Kin_pos_1ng rs3124041 3 221.0
Expand Down
4 changes: 2 additions & 2 deletions lusSTR/tests/data/kinsnps/multiplerefs.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Sample Name Marker Allele 1 Allele 2
Kin_pos_reference N29insA 2 2
Kin_pos_reference rs1000022 2 4
Kin_pos_reference rs1000137 4 2
Kin_pos_reference rs10002268 4 4
Expand Down Expand Up @@ -4521,6 +4520,7 @@ Kin_pos_reference rs3117915 1 3
Kin_pos_reference rs3118520 3 3
Kin_pos_reference rs312154 4 3
Kin_pos_reference rs312185 1 2
Kin_pos_reference rs312262906 2 2
Kin_pos_reference rs312272 2 2
Kin_pos_reference rs3124028 4 4
Kin_pos_reference rs3124041 3 3
Expand Down Expand Up @@ -9235,7 +9235,6 @@ Kin_pos_reference rs999717 1 2
Kin_pos_reference rs999813 4 3
Kin_pos_reference rs9999446 1 3
Kin_pos_reference rs9999662 1 1
Kin_pos_1ng N29insA 2 2
Kin_pos_1ng rs1000022 2 4
Kin_pos_1ng rs1000137 4 2
Kin_pos_1ng rs10002268 4 4
Expand Down Expand Up @@ -13757,6 +13756,7 @@ Kin_pos_1ng rs3117915 1 3
Kin_pos_1ng rs3118520 3 3
Kin_pos_1ng rs312154 4 3
Kin_pos_1ng rs312185 1 2
Kin_pos_1ng rs312262906 2 2
Kin_pos_1ng rs312272 2 2
Kin_pos_1ng rs3124028 4 4
Kin_pos_1ng rs3124041 3 3
Expand Down
2 changes: 1 addition & 1 deletion lusSTR/tests/data/kinsnps/reference.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Sample Name Marker Allele 1 Allele 2
Kin_pos_reference N29insA 2 2
Kin_pos_reference rs1000022 2 4
Kin_pos_reference rs1000137 4 2
Kin_pos_reference rs10002268 4 4
Expand Down Expand Up @@ -4521,6 +4520,7 @@ Kin_pos_reference rs3117915 1 3
Kin_pos_reference rs3118520 3 3
Kin_pos_reference rs312154 4 3
Kin_pos_reference rs312185 1 2
Kin_pos_reference rs312262906 2 2
Kin_pos_reference rs312272 2 2
Kin_pos_reference rs3124028 4 4
Kin_pos_reference rs3124041 3 3
Expand Down
4 changes: 2 additions & 2 deletions lusSTR/tests/data/kinsnps/snps_kin_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10225,6 +10225,8 @@ Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs3124028 0 G G Kintelligence Contains untyped allele
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312272 32 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312272 10 T T Kintelligence Contains untyped allele
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312262906 76 C C Phenotype
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312262906 0 A A Phenotype Contains untyped allele
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312185 152 A A Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312185 146 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312154 69 T T Kintelligence
Expand Down Expand Up @@ -20075,5 +20077,3 @@ Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs100
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs1000137 36 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs1000022 176 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs1000022 142 T T Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method N29insA 76 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method N29insA 0 A A Kintelligence Contains untyped allele
2 changes: 1 addition & 1 deletion lusSTR/tests/data/kinsnps/snps_kin_filtered.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6692,6 +6692,7 @@ Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs3124041 221 G G Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs3124028 96 T T Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312272 32 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312262906 76 C C Phenotype
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312185 152 A A Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312185 146 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs312154 69 T T Kintelligence
Expand Down Expand Up @@ -13115,4 +13116,3 @@ Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs100
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs1000137 36 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs1000022 176 C C Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method rs1000022 142 T T Kintelligence
Kin_pos_reference Kintelligence Test Verogen Kintelligence Analysis Method N29insA 76 C C Kintelligence
2 changes: 1 addition & 1 deletion lusSTR/tests/data/snps_sr_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ SampleID Project Analysis SNP Reads Forward_Strand_Allele UAS_Allele Type Issues
2800M_STRaitRazor snps snps rs338882 70 G C Identity
2800M_STRaitRazor snps snps rs321198 111 T T Identity
2800M_STRaitRazor snps snps rs321198 1 C C Identity
2800M_STRaitRazor snps snps rs312262906_N29insA 379 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 379 C C Phenotype
2800M_STRaitRazor snps snps rs310644 50 T A Ancestry
2800M_STRaitRazor snps snps rs2920816 73 A T Identity
2800M_STRaitRazor snps snps rs2920816 1 T A Identity Allele call does not match expected allele!
Expand Down
34 changes: 17 additions & 17 deletions lusSTR/tests/data/snps_sr_all_full_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2116,23 +2116,23 @@ SampleID Project Analysis SNP Sequence Reads Forward_Strand_Allele UAS_Allele Ty
2800M_STRaitRazor snps snps rs321198 ATACAATTCTCAAATGAAATAACTAAATAAGGAAGCTGTGTTCCTTTCTCCTACACACAGGCTTCAGGTTACCTGTTTTCCTTTTGTGATTCCACTTCTGTGTGAAGCAAGTAGT 1 T T Identity
2800M_STRaitRazor snps snps rs321198 ATACAATTCTCAAATGAAATAACTAAATAAGGAAGCTGTGTTCCTTTCTCCTACACATAGGCTTCAGGTTACCTGTTTTCCTTTTGTGATTCCACTTCTGTGTGAAGCAAGCAGT 1 T T Identity
2800M_STRaitRazor snps snps rs321198 ATACAATTCTCAAATGAAATAACTAAATAAGGAAGCTGTGTTCCTTTCTCGTACACACAGGCTTCAGGTTACCTGTTTTCCTTTTGTGATTCCACTTCTGTGTGAAGCAAGCAGT 1 T T Identity
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 360 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGACTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 2 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTACCAACCAGACAGGAGCCCGGTGCCTGGAGGT 2 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGTTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 2 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCTGTTGCCTGGAGTT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCTCCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCGCATCTGGGGCTGGCTGCCAACCAGACAGGACCCCTGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGTGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCTAACCAGATACGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACATTATCCCGGTGCCTGTAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGTGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCAGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGATGGCTGCCAACCAGCCAGGCGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGCGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCCGGGGCTGGTTGCCAACCAGACAGGAGTCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGTAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906_N29insA CAACTCCACCCCCACAGCCATCCCCCAGCCGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 360 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGACTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 2 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTACCAACCAGACAGGAGCCCGGTGCCTGGAGGT 2 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGTTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 2 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCTGTTGCCTGGAGTT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCTCCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCGCATCTGGGGCTGGCTGCCAACCAGACAGGACCCCTGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGTGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCTAACCAGATACGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACATTATCCCGGTGCCTGTAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGTGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCAGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGATGGCTGCCAACCAGCCAGGCGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGCGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCCGGGGCTGGTTGCCAACCAGACAGGAGTCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCTGGGGCTGGCTGCCAACCAGACAGTAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs312262906 CAACTCCACCCCCACAGCCATCCCCCAGCCGGGGCTGGCTGCCAACCAGACAGGAGCCCGGTGCCTGGAGGT 1 C C Phenotype
2800M_STRaitRazor snps snps rs310644 AGGATATATATCATAGGATAACGTATCAGATTTCTA 50 T A Ancestry
2800M_STRaitRazor snps snps rs2920816 ATTATTTAACAGTTTCTGGAGTTATTAATAAATTGGATTATATAGCAATTGATAGCATGGAATTTGAAATAGAAAATATTAAAGTATTTCTATTTACAGATGATATAATAG 71 A T Identity
2800M_STRaitRazor snps snps rs2920816 ATTATTTAACAGTTTCTGGAGTTATTAATAAATTGGATTATATAGCAATTGATAGCATGGAACTTGAAATAGAAAATATTAAAGTATTTCTATTTACAGATGATATAATAG 1 A T Identity
Expand Down
4 changes: 2 additions & 2 deletions lusSTR/tests/data/snps_uas_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ Positive Control Project1 Analysis1 rs338882 66 G C Identity
Positive Control Project1 Analysis1 rs338882 0 A T Identity Contains untyped allele
Positive Control Project1 Analysis1 rs321198 196 T T Identity
Positive Control Project1 Analysis1 rs321198 0 C C Identity Contains untyped allele
Positive Control Project1 Analysis1 rs312262906_N29insA 273 C C Phenotype
Positive Control Project1 Analysis1 rs312262906_N29insA 0 insA insA Phenotype Contains untyped allele
Positive Control Project1 Analysis1 rs312262906 273 C C Phenotype
Positive Control Project1 Analysis1 rs312262906 0 insA insA Phenotype Contains untyped allele
Positive Control Project1 Analysis1 rs310644 34 T A Ancestry
Positive Control Project1 Analysis1 rs310644 0 C G Ancestry Contains untyped allele
Positive Control Project1 Analysis1 rs2920816 59 A T Identity
Expand Down
2 changes: 1 addition & 1 deletion lusSTR/tests/data/snps_uas_filtered.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Positive Control Project1 Analysis1 rs3737576 60 T A Ancestry
Positive Control Project1 Analysis1 rs354439 110 A T Identity
Positive Control Project1 Analysis1 rs338882 66 G C Identity
Positive Control Project1 Analysis1 rs321198 196 T T Identity
Positive Control Project1 Analysis1 rs312262906_N29insA 273 C C Phenotype
Positive Control Project1 Analysis1 rs312262906 273 C C Phenotype
Positive Control Project1 Analysis1 rs310644 34 T A Ancestry
Positive Control Project1 Analysis1 rs2920816 59 A T Identity
Positive Control Project1 Analysis1 rs28777 168 A A Phenotype
Expand Down
9 changes: 6 additions & 3 deletions lusSTR/wrappers/snps_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def parse_snp_table_from_sheet(infile, sheet, snp_type_arg, nofilter):
else:
data_typed = data[data["Typed Allele?"] == "Yes"]
concat_df = pd.DataFrame()
data_typed = data_typed.replace("rs312262906_N29insA", "rs312262906")
if snp_type_arg == "all":
concat_df = data_typed
else:
Expand Down Expand Up @@ -253,6 +254,8 @@ def create_row(df, j, sampleid, projectid, analysisid, ver):
in the same general format.
"""
snpid = df.loc[j, "Locus"]
if snpid == "N29insA" or snpid == "rs312262906_N29insA":
snpid = "rs312262906"
uas_allele = df.loc[j, "Allele Name"]
try:
metadata = snp_marker_data[snpid]
Expand Down Expand Up @@ -445,8 +448,8 @@ def collect_snp_info(infile, snpid, j, allowed_snptype, name, analysis):
incorrect allele call. This function also determines if the SNP should be included in the
final table based on the specified SNP type from the CLI.
"""
if snpid == "N29insA":
snpid = "rs312262906_N29insA"
if snpid == "N29insA" or snpid == "rs312262906_N29insA":
snpid = "rs312262906"
metadata = snp_marker_data[snpid]
current_snp_type = metadata["Type"]
seq = infile.loc[j, "Sequence"]
Expand All @@ -455,7 +458,7 @@ def collect_snp_info(infile, snpid, j, allowed_snptype, name, analysis):
all_rows = []
if len(seq) > snp_loc:
snp_call = seq[snp_loc]
if snpid == "rs312262906_N29insA" and snp_call == "A":
if snpid == "rs312262906" and snp_call == "A":
snp_call = "insA"
if metadata["ReverseCompNeeded"] == "Yes":
snp_call_uas = complement_base(snp_call)
Expand Down

0 comments on commit 632174e

Please sign in to comment.