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

Streaming unique-kmers.py using consume_fasta #1204

Merged
merged 6 commits into from
Aug 10, 2015
Merged

Conversation

luizirber
Copy link
Member

Revert unique-kmers.py changes and use consume_fasta again. I wrote a write_record equivalent in C++ for this, currently living in lib/HLLCounter.cc, but I think this should probably go in lib/read_parsers.cc.

(reopening #1177 now that #1176 was merged)

@ctb
Copy link
Member

ctb commented Jul 29, 2015

cc #1053

@luizirber luizirber force-pushed the feature/omp_streaming branch from e13f5f9 to 1d003d2 Compare July 30, 2015 01:42
@luizirber
Copy link
Member Author

Update: I moved write_record to Read.write_to, it takes an ostream as argument (I'm using std::cout on HLLCounter.consume_fasta).

@luizirber
Copy link
Member Author

  • Is it mergeable?
  • Did it pass the tests?
  • If it introduces new functionality in scripts/ is it tested?
    Check for code coverage with make clean diff-cover
  • Is it well formatted? Look at make pep8, make diff_pylint_report,
    make cppcheck, and make doc output. Use make format and manual
    fixing as needed.
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Is it documented in the ChangeLog?
    http://en.wikipedia.org/wiki/Changelog#Format
  • Was a spellchecker run on the source code and documentation after
    changes were made?
  • Is the Copyright year up to date?

@luizirber
Copy link
Member Author

ready for review @ctb @mr-c @bocajnotnef


if (!PyArg_ParseTuple(args, "s", &filename)) {
if (!PyArg_ParseTuple(args, "s|O", &filename, &output_records_o)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Should output_records be a keyword on this method? I think it makes more sense, because calling it is a bit weird (check https://github.com/dib-lab/khmer/pull/1204/files#diff-7f09af630bd7b293c0827bba1d411617R120 for an example).

This also raises the question: do we want to do this in other places? We do have a lot of default arguments in the extension glue code that are not exposed nicely to Python land...

Copy link
Contributor

Choose a reason for hiding this comment

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

keyword is fine by me; how about a post-2.0 issue for the 2nd question?

@luizirber luizirber force-pushed the feature/omp_streaming branch from 1d003d2 to f7b94d0 Compare August 7, 2015 20:51
@luizirber luizirber force-pushed the feature/omp_streaming branch from a4716b4 to 01abd68 Compare August 10, 2015 20:34
@luizirber luizirber force-pushed the feature/omp_streaming branch from 84106a2 to 28abbda Compare August 10, 2015 21:55
@mr-c
Copy link
Contributor

mr-c commented Aug 10, 2015

LGTM. Merge once the tests pass.

luizirber added a commit that referenced this pull request Aug 10, 2015
Streaming unique-kmers.py using consume_fasta
@luizirber luizirber merged commit 28193b1 into master Aug 10, 2015
@luizirber luizirber deleted the feature/omp_streaming branch August 10, 2015 22:08
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.

3 participants