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

Add best alignment score to abpoa_res_t #4

Closed
subwaystation opened this issue Sep 23, 2020 · 4 comments
Closed

Add best alignment score to abpoa_res_t #4

subwaystation opened this issue Sep 23, 2020 · 4 comments

Comments

@subwaystation
Copy link

Hi @yangao07,

happy to see that abPOA is outperforming https://github.com/rvaser/spoa!

As indicated in #2, we are now trying to replace SPOA with abPOA in https://github.com/ekg/smoothxg/blob/57a9d568aec44986b8293ac1f33c1b128b8a0d46/src/smooth.cpp#L60.

I am hanging at the following:
When aligning a sequence to the abPOA graph, I need to know if the actual sequence or its reverse complement results in a better alignment score. I figured that best_score would deliver this, but it is not part of the abpoa_res_t. Could you add this, please?
Or ideally, abPOA already gives us this best alignment. I scanned the code, but could not find anything indicating that.
So, do you take the actual sequence and its reverse complement and perform alignments for both? Or just for the default sequence? Because we are still puzzled about this peculiar sequence in DRB1-3123. There is the rev_cigar argument, but it is only initialized as 0 and therefore does not have any effect, as far as I can tell.

Thanks for any feedback.

Best,
Simon

CC @ekg

@yangao07
Copy link
Owner

yangao07 commented Sep 24, 2020

Hi Simon,

abPOA right now does align the 'reverse complementary' sequence automatically.
As already requested by Erik in #2, I plan to add this feature recently.
Also, we sure can add the best_score to the abpoa_res_t.
The rev_cigar is simply the reversed cigar strings, nothing related to the reverse complementary.

Yan

@ekg
Copy link
Contributor

ekg commented Sep 24, 2020 via email

@yangao07
Copy link
Owner

Just updated the abPOA repo, please try out the ambiguous strand mode with '-s' (set abpt->amb_strand as 1).
Right now, the abpoa_res_t has both best_score and is_rc, and is_rc denotes whether or not the best score is from the reverse complementary sequence.

@subwaystation
Copy link
Author

Awesome! That was quick.

I just tried again @ekg's example from #2 with -s:

./bin/abpoa ~/git/HLA-zoo/seqs/DRB1-3123.fa -r 4 -s  > DRB1-3123.abpoa.gfa
odgi build -g DRB1-3123.abpoa.gfa -o - | odgi unchop -i - -o - | odgi sort -i - -o - >DRB1-3123.abpoa.og
odgi viz -i DRB1-3123.abpoa.og -b -w 20 -y 500 -o DRB1-3123.abpoa.og.viz.inv.png -z

image

Now we see what we expected.
And thanks for adding best_score and is_rc into abpoa_res_t. That will ease our work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants