Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for Adjusting Scoring Logic in long_read_assigner.py (extra_left and extra_right) #270

Open
biosalt-cc opened this issue Dec 21, 2024 · 3 comments
Labels
algorithm Issue requires algorithmic improvement bug Something isn't working enhancement New feature or request

Comments

@biosalt-cc
Copy link

biosalt-cc commented Dec 21, 2024

Hi, IsoQuant is an incredible tool that has significantly streamlined long-read transcriptome analysis.

Issue Description:
While using IsoQuant, I noticed a potential improvement in the logic for calculating extra_left and extra_right in src/long_read_assigner.py.

File and Lines:
src/long_read_assigner.py, lines 187–188

Original Code:

extra_left = 1 if read_region[0] + self.params.delta < transcript_start else 0
extra_right = 1 if read_region[0] - self.params.delta > transcript_end else 0

Suggested Update:

extra_left = 0.5 if read_region[0] + self.params.delta < transcript_start else 0
extra_right = 0.5 if read_region[1] - self.params.delta > transcript_end else 0

Please let me know if this suggestion aligns with the intended design.

@andrewprzh
Copy link
Collaborator

Hi @biosalt-cc

Thank you for the feedback!

I am really amazed by the fact you were able to dig this deep. In general, I agree that alternative splicing events are not the same weight as terminal exon elongation. Do you have any specific cases where this comes into effect?

Best
Andrey

@andrewprzh andrewprzh added enhancement New feature or request algorithm Issue requires algorithmic improvement labels Dec 21, 2024
@biosalt-cc
Copy link
Author

Hi, @andrewprzh
Sorry, I didn't make the question clear.

I think [extra_right] is intended to assess whether the end of the read region extends beyond the end of the transcript region. However, it incorrectly uses [read_region[0]] (start position) instead of [read_region[1]] (end position).
This mistake may result in an inaccurate calculation of inconsistencies on the right side of the read, potentially leading to incorrect isoform selection.

In fact, while testing, I found that some reads were not correctly assigned to ISOforms, and I tracked down this potential problem step by step.

However, please double check if my understanding is correct.

@andrewprzh
Copy link
Collaborator

Dear @biosalt-cc

Yes, you are right, that's a bug.
I will fix it ASAP and will try to make a new release until the end of the year.

Best
Andrey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithm Issue requires algorithmic improvement bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants