Commit f96f71e7 authored by Thonier Florian's avatar Thonier Florian

fuse.py; add fct to compute the rearangment status of a clone.

Link to #3902
parent bea9ac9c
......@@ -231,11 +231,46 @@ class Window:
return True
else:
return "unexpected"
if axe == "rearangment":
return self.get_reagmt()
return "todo"
except:
return "?"
def get_reagmt( self):
""" hard coded function to define the rearangement type of this clone """
complete = self.get_values("complete")
seg_vals = {
"5": self.get_values("seg5"),
"4a": self.get_values("seg4a"),
"4": self.get_values("seg4"),
"4b": self.get_values("seg4b"),
"3": self.get_values("seg3")
}
if complete == True:
if seg_vals["4a"] == "?" and seg_vals["4"] == "?" and seg_vals["4b"] == "?":
return "VJ"
elif seg_vals["4a"] == "?" and seg_vals["4b"] == "?":
return "VDJ"
elif seg_vals["4a"] == "?" or seg_vals["4b"] == "?":
return "VDDJ"
else:
return "VDDDJ"
elif complete == False:
# cas compliqué, DJ etant un 53, DD aussi et VD aussi
if "V" in seg_vals["5"] and "D" in seg_vals["3"]:
return "VD"
elif "D" in seg_vals["5"] and "J" in seg_vals["3"]:
return "DJ"
elif "D" in seg_vals["5"] and "D" in seg_vals["3"]:
return "DD"
elif complete == "unexpected":
return "unexpected"
else:
return "?"
def latex(self, point=0, base_germline=10000, base=10000, tag=''):
reads = self.d["reads"][point]
ratio_germline = float(reads)/base_germline
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment