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

Avoid an ArityException on creating an index for BAM files without alignments #179

Merged
merged 2 commits into from
Sep 30, 2019

Conversation

alumi
Copy link
Member

@alumi alumi commented Sep 26, 2019

Problem

cljam.algo.bam-indexer/create-index throws an clojure.lang.ArityException when the target BAM contains no alignments

Cause

An initial value is not provided for (reduce merge-index []) in cljam.io.bam-index.writer/make-index-from-blocks

(reduce merge-index)))))]

Changes

Add a default value for make-index-from-blocks

Affects

  • cljam.algo.bam-indexer
  • cljam.io.bam-index.writer

Tests

  • lein check
  • lein test :all

@alumi alumi added the bug label Sep 26, 2019
@alumi alumi requested a review from a team September 26, 2019 04:44
@ghost ghost requested review from r6eve and yito88 and removed request for a team September 26, 2019 04:45
@codecov
Copy link

codecov bot commented Sep 26, 2019

Codecov Report

Merging #179 into master will not change coverage.
The diff coverage is 40%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #179   +/-   ##
=======================================
  Coverage   86.92%   86.92%           
=======================================
  Files          74       74           
  Lines        5765     5765           
  Branches      490      490           
=======================================
  Hits         5011     5011           
  Misses        264      264           
  Partials      490      490
Impacted Files Coverage Δ
src/cljam/io/bam_index/writer.clj 84.37% <40%> (ø) ⬆️

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 2db7fe7...53e10f7. Read the comment docs.

Copy link
Contributor

@r6eve r6eve 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 for the fix. Sounds good to me.

@alumi alumi changed the title Fix/create index header only bam Avoid an ArityException on creating an index for BAM files without alignments Sep 26, 2019
Copy link
Contributor

@yito88 yito88 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@alumi alumi merged commit 53720ae into master Sep 30, 2019
@alumi alumi deleted the fix/create-index-header-only-bam branch September 30, 2019 01:18
@alumi
Copy link
Member Author

alumi commented Sep 30, 2019

Thank you for reviewing! @r6eve @yito88

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