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

o.b.n.core.sequence.CDSSequence doesn't reverse-complement correctly #1016

Open
richarda23 opened this issue Jan 4, 2022 · 0 comments
Open
Labels
bug Bugs and bugfixes

Comments

@richarda23
Copy link
Contributor

richarda23 commented Jan 4, 2022

Given a transcript sequence derived from a GeneSequence defined on reverse strand of a chromosomal sequence, the method getCodingSequence doesn't return the reverse complement, but just the reverse.

This seems to be due to the complement being made twice:

String sequence = this.getSequenceAsString(getBioBegin(), getBioEnd(), getStrand()); 

in CDSSequence# getCodingSequence()

generates the reverse complement, but subsequent code makes a complementary sequence again, so the end result is simply a reversed sequence.

A simple fix might be just to remove this second complementation, but possibly it might be needed in some circumstances.

The bug is exposed by test TranscriptSequenceTest#getCDNASeqNegativeStrand()

@josemduarte josemduarte added the bug Bugs and bugfixes label Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and bugfixes
Projects
None yet
Development

No branches or pull requests

2 participants