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

Do not return zero-length alignments #552

Merged
merged 1 commit into from
Feb 28, 2022
Merged

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Dec 3, 2019

This occurs when performing local alignment and setting the minimum
score to zero or smaller.

@nh13 nh13 requested a review from tfenne December 3, 2019 19:43
@nh13 nh13 added the bug label Dec 3, 2019
@codecov-io
Copy link

codecov-io commented Dec 3, 2019

Codecov Report

Merging #552 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
+ Coverage   94.96%   95.03%   +0.06%     
==========================================
  Files         104      104              
  Lines        5863     5863              
  Branches      399      371      -28     
==========================================
+ Hits         5568     5572       +4     
+ Misses        295      291       -4
Impacted Files Coverage Δ
.../scala/com/fulcrumgenomics/alignment/Aligner.scala 96.89% <100%> (+2.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11a4b9e...af89095. Read the comment docs.

Copy link
Member

@tfenne tfenne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this effect the methods that return the single best alignment? Maybe just add a line in the test to call align(query, target) and ensure it still returns a result?

@nh13 nh13 force-pushed the nh_min_score_local_alignment branch from 5bca79a to 0578139 Compare December 3, 2019 23:42
This occurs when performing local alignment and setting the minimum
score to zero or smaller.
@nh13 nh13 force-pushed the nh_min_score_local_alignment branch from 0578139 to af89095 Compare December 3, 2019 23:43
@nh13
Copy link
Member Author

nh13 commented Dec 3, 2019

@tfenne I updated the commit for local alignment in Aligner.findBest. This must return an alignment, but since local alignment has a minimum score of zero by definition, it will return an "empty" alignment (i.e. the cigar is empty). It probably would be better to return an Option[Alignment], but this is fine for now.

@tfenne tfenne merged commit 2fd2cbc into master Feb 28, 2022
@tfenne tfenne deleted the nh_min_score_local_alignment branch February 28, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants