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

Namespace refactoring #83

Merged
merged 4 commits into from Jun 20, 2017
Merged

Namespace refactoring #83

merged 4 commits into from Jun 20, 2017

Conversation

totakke
Copy link
Member

@totakke totakke commented Jun 20, 2017

Changes namespaces of the whole source to make the project more simple.

  • ns related to I/O => cljam.io
  • ns related to algorithm like sorting => cljam.algo
  • ns related to command-line tools => cljam.tools

These are breaking changes. Besides, unused items are removed. Please let me know if there's anything that you are concerned about.


In the next stage, I intend to change public I/O APIs as follows:

  • cljam.io => cljam.io.protocols
  • cljam.io.sam and cljam.io.bam => cljam.io.sam
  • cljam.io.vcf and cljam.io.bcf => cljam.io.vcf
  • cljam.io.fasta and cljam.io.twobit => cljam.io.sequence

Current cljam.io is not user-friendly because it has unnecessary functions in some cases. Each format ns wraps protocol functions in the next version. To read SAM/BAM,

(require '[cljam.io.sam :as sam])

(with-open [rdr (sam/reader "foo.bam")]
  (sam/read-alignments rdr))

@codecov
Copy link

codecov bot commented Jun 20, 2017

Codecov Report

Merging #83 into master will decrease coverage by 0.02%.
The diff coverage is 91.89%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #83      +/-   ##
========================================
- Coverage   83.02%    83%   -0.03%     
========================================
  Files          62     63       +1     
  Lines        4160   4142      -18     
  Branches      430    432       +2     
========================================
- Hits         3454   3438      -16     
+ Misses        276    272       -4     
- Partials      430    432       +2
Impacted Files Coverage Δ
src/cljam/common.clj 100% <ø> (ø) ⬆️
src/cljam/util.clj 79.22% <ø> (-1.27%) ⬇️
src/cljam/io/bam_index/core.clj 70.17% <0%> (ø)
src/cljam/io/dict/core.clj 58.33% <0%> (ø)
src/cljam/io/bed.clj 91.4% <0%> (ø)
src/cljam/io/sam/common.clj 100% <100%> (ø)
src/cljam/io/fasta/writer.clj 93.87% <100%> (ø)
src/cljam/io/sam/reader.clj 96.55% <100%> (ø)
src/cljam/algo/level.clj 88.31% <100%> (ø)
src/cljam/io/util/bgzf.clj 83.33% <100%> (ø)
... and 55 more

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 67a7737...4d9a139. Read the comment docs.

@totakke totakke requested a review from alumi June 20, 2017 06:49
Copy link
Member

@alumi alumi left a comment

Choose a reason for hiding this comment

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

Great changes! Looks much more organized.

@alumi
Copy link
Member

alumi commented Jun 20, 2017

unused items are removed. Please let me know if there's anything that you are concerned about.

Currently, I don't use them too. Thank you for removing.

In the next stage, I intend to change public I/O APIs as follows:

  • cljam.io => cljam.io.protocols
  • cljam.io.sam and cljam.io.bam => cljam.io.sam
  • cljam.io.vcf and cljam.io.bcf => cljam.io.vcf
  • cljam.io.fasta and cljam.io.twobit => cljam.io.sequence

I understand. some read/write-*** functions are triplicated now.

@alumi alumi merged commit 7dda17a into master Jun 20, 2017
@alumi alumi deleted the fix/ns-refactoring branch June 20, 2017 07:58
@alumi
Copy link
Member

alumi commented Jun 20, 2017

Merged. Thank you! 👍

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.

None yet

2 participants