INNER CODE UNIT · Python
right_flank_coord
hillerlab/TOGA · CESAR_wrapper.py:424
right_flank_coord = (max_pos, max_pos + EXON_SEQ_FLANK)
left_flank = chrom_seq[left_flank_coord[0]: left_flank_coord[1]].upper()
right_flank = chrom_seq[right_flank_coord[0]: right_flank_coord[1]].upper()
# correct for strand:
left_flank = left_flank if bed_data["strand"] else revert(left_flank)
right_flank = right_flank if bed_data["strand"] else revert(right_flank)
if not bed_data["strand"]:
left_flank, right_flank = right_flank, left_flank
# placeholder in case we coudld not extract flanks
left_flank = left_flank if len(left_flank) > 0 else "X"
right_flank = right_flank if len(right_flank) > 0 else "X"
exon_seq_raw = chrom_seq[start:end].upper()
# revert if negative strand
exon_seq_w_ss = revert(exon_seq_raw) if not bed_data["strand"] else exon_seq_raw
# trim splice sites
if not is_first_exon and not is_last_exon:
# both splice sites are here