GenomicMedLab / cool-seq-tool

https://coolseqtool.readthedocs.io
MIT License
4 stars 0 forks source link

Add support for residue-coordinates and refactor exon offset #383

Open jarbesfeld opened 15 hours ago

jarbesfeld commented 15 hours ago

Describe the bug

Per discussion with @ahwagner: We should add support for users supplying residue-coordinates to genomic_to_tx_segment and refactor the way exon offset calculation is done to make this step more readable

Steps to reproduce

N/A

Expected behavior

Genomic coords that are supplied to genomic_to_tx_segment should be reduced by 1 if the offset is being computed with respect to alt_start_i

Current behavior

This step is not being performed

Possible reason(s)

No response

Suggested fix

No response

Branch, commit, and/or version

Main

Screenshots

No response

Environment details

N/A

Additional details

My thinking for the updated logic:

  1. Determine if the alt_start_i or alt_end_i value is needed
  2. If alt_start_i is needed and the coordinate is residue-based, subtract 1 from the coordinate
  3. Compute the offset given the strand that is transcribed, the alt_start_i or alt_end_i value, and the fusion junction breakpoint

Contribution

Yes, I can create a PR for this fix.

ahwagner commented 15 hours ago

Please tag me for PR review when this comes up.

korikuzma commented 20 minutes ago

@jarbesfeld this should be split into two separate issues / PRs

jarbesfeld commented 14 minutes ago

@korikuzma Is it ok if I leave as one PR? The modification step for residue-based coordinates is determined using a new method that I created when refactoring the exon offset step, so it would be easier to add to this PR