Skip to content

Commit

Permalink
FIX ordering of subexons in chimeric alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
elolaine committed Apr 4, 2024
1 parent 598d55f commit 4b3893f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion thoraxe/subexons/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ def _create_subexon_index(subexon_table):
subset_columns = ['SubexonID', 'GeneID']
unique_subexons = subexon_table.drop_duplicates(subset=subset_columns)

# FIX the ordering of the subexons
# using the start for some (positive strand) and the end for others (negative strand)
# may result in discrepancies between genes
# the fix takes the start in both cases while still acounting fo the direction of the strand
unique_subexons = unique_subexons.assign(Order=[
row.SubexonCodingStart if row.Strand == 1 else (-1 *
row.SubexonCodingEnd)
# row.SubexonCodingEnd)
row.SubexonCodingStart)
for row in unique_subexons.itertuples()
])

Expand Down

0 comments on commit 4b3893f

Please sign in to comment.