Skip to content

Commit 3ff0e37

Browse files
committed
remove unused code
1 parent 92371f4 commit 3ff0e37

File tree

1 file changed

+1
-63
lines changed

1 file changed

+1
-63
lines changed

tbprofiler/rules.py

+1-63
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def process_variants(
7878

7979
target_vars_total_freq = math.ceil(sum([x.freq*100 for x in target_vars]))
8080
target_vars_total_freq = min(target_vars_total_freq,100)
81-
82-
print(source_vars_total_freq,target_vars_total_freq)
81+
8382
if source_vars and target_vars:
8483
source_vars_changes = ", ".join([x.change for x in source_vars])
8584
target_vars_changes = ", ".join([x.change for x in target_vars])
@@ -98,67 +97,6 @@ def apply_epistasis_rule(args: argparse.Namespace, variants: List[Variant], para
9897
logging.debug(f"Applying epistasis rule with parameters: {parameters}")
9998
epistasisRule().process_variants(args=args,variants=variants,**parameters)
10099

101-
# class MmpR5WHORule(ProfilePlugin):
102-
# """
103-
# Epistasis rule for mmpL5/mmpR5
104-
# """
105-
106-
# def process_variants(self,args,variants: List[Variant]):
107-
# """Generic variant processing method"""
108-
109-
# v1 = search_variant(variants,drug='bedaquiline',gene_name='mmpR5')
110-
# v2 = search_variant(variants,gene_name='mmpL5',type='LoF')
111-
112-
# v1_total_freq = math.ceil(sum([x.freq*100 for x in v1]))
113-
# v1_total_freq = min(v1_total_freq,100)
114-
115-
# v2_total_freq = math.ceil(sum([x.freq*100 for x in v2]))
116-
# v2_total_freq = min(v2_total_freq,100)
117-
118-
# if v1 and v2:
119-
# v1_changes = ", ".join([x.change for x in v1])
120-
# v2_changes = ", ".join([x.change for x in v2])
121-
# note = f"Loss of function mutation(s) detected in mmpL5 ({v2_changes}) which may abrogate the effect of the genetically linked mmpR5 mutation(s) ({v1_changes})."
122-
123-
# if v2_total_freq==100:
124-
# inactivate_drug_resistance(v1)
125-
# freq_diff = v1_total_freq - v2_total_freq
126-
# if freq_diff > 10:
127-
# note += f" However, the combined frequency of the mmpR5 mutation(s) is {freq_diff}% higher than the mmpL5 mutation(s), indicating a potential resistant subpopulation. Please consult the raw data for more information."
128-
129-
# args.notes.append(note)
130-
131-
132-
# class eisWHORule(ProfilePlugin):
133-
# """
134-
# Epistasis rule for mmpL5/mmpR5
135-
# """
136-
137-
# def process_variants(self,args,variants: List[Variant]):
138-
# """Generic variant processing method"""
139-
140-
# v1 = search_variant(variants,drug=['kanamycin','amikacin'],gene_name='eis')
141-
# v2 = search_variant(variants,gene_name='eis',type='LoF')
142-
143-
# v1_total_freq = math.ceil(sum([x.freq*100 for x in v1]))
144-
# v1_total_freq = min(v1_total_freq,100)
145-
146-
# v2_total_freq = math.ceil(sum([x.freq*100 for x in v2]))
147-
# v2_total_freq = min(v2_total_freq,100)
148-
149-
# if v1 and v2:
150-
# v1_changes = ", ".join([x.change for x in v1])
151-
# v2_changes = ", ".join([x.change for x in v2])
152-
# note = f"Loss of function mutation(s) detected in eis ({v2_changes}) which may abrogate the effect of the genetically linked eis promoter mutation(s) ({v1_changes})."
153-
154-
# if v2_total_freq==100:
155-
# inactivate_drug_resistance(v1)
156-
# freq_diff = v1_total_freq - v2_total_freq
157-
# if freq_diff > 10:
158-
# note += f" However, the combined frequency of the eis promoter mutation(s) is {freq_diff}% higher than the eis coding mutation(s), indicating a potential resistant subpopulation. Please consult the raw data for more information."
159-
160-
# args.notes.append(note)
161-
162100

163101
class SetConfidence(ProfilePlugin):
164102

0 commit comments

Comments
 (0)