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

Remove N padding for out-of-range bases in read-sequence. #121

Merged
merged 2 commits into from
Nov 13, 2017

Conversation

alumi
Copy link
Member

@alumi alumi commented Nov 10, 2017

Summary

Fix for #120 comment

Tests

  • lein test :all 🆗

@alumi alumi requested a review from totakke November 10, 2017 05:39
@codecov
Copy link

codecov bot commented Nov 10, 2017

Codecov Report

Merging #121 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
- Coverage   84.93%   84.91%   -0.03%     
==========================================
  Files          62       62              
  Lines        4202     4196       -6     
  Branches      412      412              
==========================================
- Hits         3569     3563       -6     
  Misses        221      221              
  Partials      412      412
Impacted Files Coverage Δ
src/cljam/io/fasta/core.clj 94.54% <100%> (-0.2%) ⬇️
src/cljam/io/twobit/reader.clj 80.29% <100%> (ø) ⬆️
src/cljam/io/fasta/reader.clj 90.51% <100%> (-0.27%) ⬇️

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 5a4b5be...466bbc7. Read the comment docs.

@alumi alumi force-pushed the fix/sequence-out-of-range branch from e54ed1c to 39efba3 Compare November 10, 2017 06:06
Copy link
Member

@totakke totakke left a comment

Choose a reason for hiding this comment

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

Thank you. I added slight comments. The behavior is alright.

(when-let [len (:len (fasta-index/get-header fai name))]
(let [start' (max 1 (or start 1))
end' (min len (or end len))]
(when (<= 1 start' end' len)
Copy link
Member

Choose a reason for hiding this comment

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

(<= 1 start') is obvious from (max 1 (or start 1), and (<= end' len) is obvious from (min len (or end len)). So this predicate can be simplified as (<= start' end').

(.toString cb)))))
start' (max 1 (or start 1))
end' (min len (or end len))]
(when (<= 1 start' end' len)
Copy link
Member

Choose a reason for hiding this comment

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

Same as the comments in fasta.reader.

@alumi
Copy link
Member Author

alumi commented Nov 13, 2017

Thank you for the comment!
I fixed it 🙇

@totakke totakke merged commit 8cb494b into master Nov 13, 2017
@totakke
Copy link
Member

totakke commented Nov 13, 2017

Thanks!

@alumi alumi deleted the fix/sequence-out-of-range branch November 13, 2017 03:30
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

Successfully merging this pull request may close these issues.

2 participants