1919# FUNCTIONS
2020#
2121########################################################################
22- def getBreakendInfo (record , is_stranded , annot_field = "ANN" , assembly_id = None ):
22+ def getBreakendInfo (record , is_first , annot_field = "ANN" , assembly_id = None ):
2323 coordinates = {
2424 "region" : record .chrom ,
2525 "pos" : record .pos ,
@@ -28,7 +28,7 @@ def getBreakendInfo(record, is_stranded, annot_field="ANN", assembly_id=None):
2828 "ref" : record .ref ,
2929 "alt" : record .alt [0 ],
3030 "assembly" : None if assembly_id is None else assembly_id ,
31- "strand" : None if not is_stranded else getStrand (record )
31+ "strand" : getStrand (record , is_first )
3232 }
3333 if "ANNOT_POS_RVS" in record .info and record .info ["ANNOT_POS_RVS" ] != coordinates ["annot_pos" ]:
3434 coordinates ["annot_pos_rvs" ] = record .info ["ANNOT_POS_RVS" ]
@@ -168,8 +168,8 @@ def getFusionAnnot(record, mate, annot_field="ANN"):
168168 curr_json ["stranded_by" ] = "annot"
169169 # Coord information
170170 curr_json ["breakends" ] = [
171- getBreakendInfo (record , is_stranded , args .annotation_field , args .assembly_id ),
172- getBreakendInfo (mate , is_stranded , args .annotation_field , args .assembly_id )
171+ getBreakendInfo (record , True , args .annotation_field , args .assembly_id ),
172+ getBreakendInfo (mate , False , args .annotation_field , args .assembly_id )
173173 ]
174174 # Filters
175175 curr_json ["filters" ] = record .filter
0 commit comments