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

Open PR for Streaming Partitioning #1502

Open
wants to merge 519 commits into
base: feature/assembly/junction_count
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
519 commits
Select commit Hold shift + click to select a range
89d4ddc
Use constexpr for members that are known at compile time
betatim Dec 20, 2016
03a8ff6
Add locking
betatim Dec 20, 2016
ced6a75
Fix one unique kmer counting bug
betatim Jan 4, 2017
2384b7d
Fix difference in unique kmers for NibbleStorage
betatim Jan 5, 2017
f67e197
Add mutex for consume and tag methods
betatim Jan 5, 2017
50a52a4
Fix missing return statement during conflict resolution
betatim Jan 9, 2017
2461fdb
Add per table mutex to nibblestorage
betatim Jan 9, 2017
be2f166
add tag-density, track new kmers
camillescott Jan 10, 2017
23b7c65
enable static building using pkg-config
satta Jan 15, 2017
5db005f
Modify partitioning test
camillescott Jan 17, 2017
ceba04b
First pass bringing over cython from other PR
camillescott Jan 18, 2017
54e2826
Merge pull request #1573 from satta/pkg-config
betatim Jan 18, 2017
45365fc
Some changes to parser
Jan 18, 2017
1135d2c
Rest of cython converted, at linker error
camillescott Jan 19, 2017
a232a19
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Jan 19, 2017
0e78965
Merge branch 'feature/nibble_storage' of github.com:dib-lab/khmer int…
ctb Jan 19, 2017
a8e67a0
add test_tabletype.py as an initial stab
ctb Jan 19, 2017
ec96957
more tests
ctb Jan 19, 2017
936556a
Fix khmer build when offline
betatim Nov 29, 2016
0c2f9c1
Undo offline build hack
betatim Dec 2, 2016
02dbb34
Add NibbleStorage
betatim Dec 2, 2016
5d94237
Add tests for 4bit Counttable
betatim Dec 2, 2016
be55364
Fix tablebytes calculation
betatim Dec 2, 2016
ef34129
Add C Python itnerface for SmallCounttable
betatim Dec 5, 2016
f806f07
Add save and load to SmallCounttable
betatim Dec 5, 2016
ad765e3
Add SmallCountgraph
betatim Dec 5, 2016
50d2cce
Expose SmallCounttable via a user script
betatim Dec 6, 2016
136d063
Mofiy tests to understand new command-line argument
betatim Dec 6, 2016
d6c9e06
Add documentation strings
betatim Dec 7, 2016
29d9071
Add ability to recognise and load small countgraphs
betatim Dec 7, 2016
02661ac
Export khmer filetypes to python
betatim Dec 7, 2016
9ad8f70
Switch to using a namedtuple for countgraph info
betatim Dec 7, 2016
fe34331
Add test for loading and saving of SmallCountgraph
betatim Dec 7, 2016
52f9a14
Add more tests
betatim Dec 7, 2016
7a8fbcd
Update Changelog
betatim Dec 7, 2016
215f074
Fix formatting
betatim Dec 7, 2016
d8159e0
Fix copyright information
betatim Dec 8, 2016
10c7f91
Add parametrised tests instead of for loops
betatim Dec 8, 2016
c0944a3
Use constexpr for members that are known at compile time
betatim Dec 20, 2016
32d62e5
Add locking
betatim Dec 20, 2016
936b346
Fix one unique kmer counting bug
betatim Jan 4, 2017
28a8575
Fix difference in unique kmers for NibbleStorage
betatim Jan 5, 2017
845ab7e
Add mutex for consume and tag methods
betatim Jan 5, 2017
c2b46f9
Fix missing return statement during conflict resolution
betatim Jan 9, 2017
d86b0c6
Add per table mutex to nibblestorage
betatim Jan 9, 2017
5e08ccf
remove redundant get_median_count
ctb Jan 19, 2017
1f9c012
list out Python-accessible functions
ctb Jan 19, 2017
76cdaa7
Merge branch 'feature/nibble_storage' of github.com:dib-lab/khmer int…
ctb Jan 19, 2017
e21b78f
Merge pull request #1551 from dib-lab/feature/nibble_storage
standage Jan 19, 2017
609e201
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Jan 19, 2017
d67a054
fix minor merge snafu
ctb Jan 21, 2017
bd06898
some tests and incipient docs
ctb Jan 21, 2017
ce3bb59
Merge branch 'master' into fix/graphsize
standage Jan 21, 2017
2df35f3
Fixed new test
standage Jan 21, 2017
6be3d4e
Clean up check_space_for_graph function
standage Jan 21, 2017
bf2cdc7
Improved tests for check_space_for_graph
standage Jan 21, 2017
6b769b0
Fixes #1548.
standage Jan 22, 2017
ec83036
some more tests for table types
ctb Jan 22, 2017
0ce5260
add test for quality attribute on fasta
ctb Jan 23, 2017
def7081
Merge pull request #1583 from dib-lab/test/read_parser_quality_fa
betatim Jan 23, 2017
4ad14d4
Rename annotations to description
betatim Jan 23, 2017
70ae926
Updating counttable so that hash of kmer matches hash of its reverse …
standage Jan 23, 2017
0cb1af2
Simplify
standage Jan 23, 2017
e484042
Merge branch 'master' into refactor/hashing2
standage Jan 23, 2017
eefb171
Update Hashtable::hash_dna() function so that it uses the correct has…
standage Jan 23, 2017
59874e0
Merge pull request #1584 from dib-lab/fix/rename-annotations
betatim Jan 23, 2017
705e138
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Jan 23, 2017
7a7a51d
add tests for embarrassing hash function misfire
ctb Jan 23, 2017
e730959
Cleanup
standage Jan 24, 2017
ed283b7
Merge branch 'master' into fix/graphsize
standage Jan 24, 2017
338fcd4
Changelog
standage Jan 24, 2017
8896b56
Oops.
standage Jan 24, 2017
ec58327
Compromise on non-ACGT; MurmurKmerHashIterator skips entire reads/seq…
standage Jan 24, 2017
8490f4d
Code comments [skip ci]
standage Jan 24, 2017
1c30867
Merge pull request #1549 from dib-lab/fix/graphsize
betatim Jan 24, 2017
acaf741
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Jan 24, 2017
ca9bf54
Follow up nitpicks for #1549
betatim Jan 24, 2017
dd28036
Merge pull request #1587 from dib-lab/fix/nitpick
betatim Jan 24, 2017
dbb3b17
Documentation for (Node|Graph)table requirement of only ACGT characters.
standage Jan 24, 2017
e3543e7
Added some tests for expected behavior
standage Jan 25, 2017
21b8504
Small changes
standage Jan 25, 2017
2b59d1b
New class design based on templated functors
standage Jan 25, 2017
37c27df
Redesign
standage Jan 26, 2017
54b0756
Raise better error message when encountering empty file
betatim Jan 23, 2017
84809e3
Add test for empty partition maps
betatim Jan 23, 2017
92789ee
make format and changelog entry
betatim Jan 26, 2017
62ce65f
Merge pull request #1581 from dib-lab/fix/reading-subsets
ctb Jan 26, 2017
58ea26b
fixed Notetable -> Nodetable in name
ctb Jan 26, 2017
b5842ae
(failing) tests for bad add/get behavior
ctb Jan 26, 2017
043c229
interim tests and fixes that need work
ctb Jan 26, 2017
0464801
Add computing cleaned_seq to c++ Read class
betatim Jan 24, 2017
7f1c78d
Remove write access to cleaned_seq attribute
betatim Jan 24, 2017
a9525aa
Move to using ReadParser instead of screed.open
betatim Jan 25, 2017
6e24baf
Add clean_input_reads back
betatim Jan 25, 2017
a613036
Switch to assuming that clean reads are passed in
betatim Jan 25, 2017
73c266b
Switch to ReadParser instead of screed open
betatim Jan 26, 2017
bdfd600
Add test for clean read equivalence
betatim Jan 26, 2017
6b923db
Changelog entry and formatting
betatim Jan 26, 2017
7d68ce4
Add test to assert exception is raised in clean_input_reads
betatim Jan 26, 2017
86101a6
Fixes
standage Jan 26, 2017
88a2f72
Fix hashtable
standage Jan 26, 2017
b768df9
Successfully first pass at splitting CPython wrapper. Removes
camillescott Jan 26, 2017
51ad293
Remove Cython generated cpp files
camillescott Jan 26, 2017
e91d7db
check k-mer size explicitly; ignore bad characters in DNA at CPython …
ctb Jan 26, 2017
b05f229
check that hashing bad dna is consistent
ctb Jan 26, 2017
e7e4895
add check here - this should be assured at CPython level already, but…
ctb Jan 26, 2017
6b5d08e
Hashgraph and hashtable
standage Jan 26, 2017
3458af6
fix py2
ctb Jan 26, 2017
d8a5b81
Library compiles!
standage Jan 26, 2017
40708b8
Fixing the CPython interface, spurring lots of cleanup
standage Jan 26, 2017
9dccc5d
Merge pull request #1593 from dib-lab/refactor/hashing_deux
ctb Jan 26, 2017
9ebf630
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Jan 26, 2017
48b6f2a
Merge branch 'refactor/hashing2' of github.com:dib-lab/khmer into ref…
ctb Jan 26, 2017
7ba8895
Merge branch 'refactor/hashing2' into fix/hashing2
ctb Jan 26, 2017
43fa822
Looks like we need to use std::memory pointers
standage Jan 26, 2017
3d9f796
Fix deprecatd use of has_next
camillescott Jan 26, 2017
5b6d369
Library compiles again after switch to std::memory ptrs
standage Jan 26, 2017
f853d30
Compiles! Now to debug tests...
standage Jan 26, 2017
daa85c0
Rename streaming module to parsing
camillescott Jan 26, 2017
a6004b6
The difference of a single symbol.
standage Jan 26, 2017
178cef4
Replace ParseFunctor typename since functors are not being used
standage Jan 27, 2017
cec544c
Merge branch 'master' into feature/bam-again
standage Jan 27, 2017
417a087
Fixed typo, updated change log
standage Jan 27, 2017
741939b
Merge pull request #1591 from dib-lab/fix/cleaned_seq_attr
betatim Jan 27, 2017
c0f98f3
Merge branch "master" into feature/bam-again
standage Jan 27, 2017
0fa632a
Add to python API documentation
betatim Jan 27, 2017
080ac7c
fix compile
ctb Jan 30, 2017
4b10651
Merge pull request #1598 from dib-lab/fix/hashing2-support
ctb Jan 30, 2017
decc0f1
Merge branch 'master' of github.com:dib-lab/khmer into fix/hashing2
ctb Jan 30, 2017
7fcc2fb
remove unneeded counttable test
ctb Jan 30, 2017
7e1ba7b
add test for too short a k-mer
ctb Jan 30, 2017
64fe859
use isinstance instead of explicit type checking
ctb Jan 30, 2017
da7334a
Merge branch 'refactor/hashing2' of github.com:dib-lab/khmer into fix…
ctb Jan 30, 2017
e85888c
Merge pull request #1596 from dib-lab/fix/hashing2
ctb Jan 30, 2017
0cad832
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Jan 30, 2017
6e371ec
Merge branch 'refactor/hashing2' of github.com:dib-lab/khmer into ref…
ctb Jan 30, 2017
42e412b
Add coment about gcc version requirement
betatim Jan 30, 2017
fe6dcfe
Fix pep8 nagging
betatim Jan 30, 2017
089f48f
add test for save/load
ctb Jan 30, 2017
7eee4c7
Merge branch 'refactor/hashing2' of github.com:dib-lab/khmer into ref…
ctb Jan 30, 2017
dd419fb
Add option to sidestep NFS issues
standage Jan 30, 2017
44c1f1b
Remove explicit cython import and update setuptools req
camillescott Jan 30, 2017
1a28b8f
Wrap alphabets for sanitize function, test FastxParser sanitiziation
camillescott Jan 30, 2017
915069c
Updated change log
standage Jan 30, 2017
910814b
Fixed const keyword to eliminate need for casting
standage Jan 31, 2017
18d0b58
Merge pull request #1600 from dib-lab/fix/min-gcc-version
standage Jan 31, 2017
38dc098
Merge branch 'master' into feature/bam-again
standage Jan 31, 2017
62825aa
Merge branch 'master' into fix/keep-temp
standage Jan 31, 2017
506f96f
Add some more exception handling to Readers
camillescott Jan 31, 2017
3ce66dd
Merge pull request #1597 from dib-lab/feature/bam-again
standage Feb 1, 2017
91fbfa7
Add close method to ReadParser
betatim Feb 1, 2017
791dd4d
Formating and adjust to new FastxReader
betatim Feb 2, 2017
081361b
Add separating sanitizing parser, bring over more old tests and updat…
camillescott Feb 2, 2017
926d4e3
Remove original read utils and import _oxli versions, fix LinearAssem…
camillescott Feb 2, 2017
29895b3
Convert LinearAssembler tests to work with the cython-wrapped LinearA…
camillescott Feb 3, 2017
7ffa6fc
Shift LinearAssembler tests to test_cython_assembly
camillescott Feb 3, 2017
5a30b2c
Merge branch 'master' into fix/keep-temp
standage Feb 6, 2017
2e03fe3
Catch OSError instead of adding a script option
standage Feb 7, 2017
7b641d8
Merge branch 'fix/keep-temp' of github.com:dib-lab/khmer into fix/kee…
standage Feb 7, 2017
dca360b
fix test_tabletype for py3
ctb Feb 7, 2017
5d06fae
rearrange documentation deck chairs
ctb Feb 7, 2017
a6f01c4
Resolve with current master
standage Feb 7, 2017
1e3076e
Merge pull request #1602 from dib-lab/fix/keep-temp
standage Feb 7, 2017
e11a98c
Merge branch 'master' into resolve/hashing2
standage Feb 7, 2017
8769ebb
Install pxd files
camillescott Feb 7, 2017
ae7ee8b
Remove redundant tests
camillescott Feb 7, 2017
838541b
Remove traversal cython module
camillescott Feb 7, 2017
aa81b94
Merge pull request #1607 from dib-lab/resolve/hashing2
ctb Feb 7, 2017
5bd074e
Bring in updated Cython integration, new c++ arch
camillescott Feb 7, 2017
faa10c8
Use c++ prime function
camillescott Feb 7, 2017
95f0d56
Move around include ordering to fix bug with Python.h macro overwrite
camillescott Feb 8, 2017
312d90d
Bring in fixes for OSX python.h macro bug
camillescott Feb 8, 2017
8e52823
Merge branch 'master' into fix/read-parser-close
standage Feb 9, 2017
29febda
Add add method to cython binding
camillescott Feb 9, 2017
42e3f88
Merge pull request #1604 from dib-lab/fix/read-parser-close
ctb Feb 9, 2017
2786547
Merge branch 'master' into refactor/hashing2
standage Feb 10, 2017
77ea37c
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Feb 10, 2017
524988b
more table tests - get_*_count, and consume_fasta*
ctb Feb 10, 2017
c996487
Merge branch 'refactor/hashing2' of github.com:dib-lab/khmer into ref…
ctb Feb 11, 2017
18a2b39
tests for trim_on_abundance / trim_below_abundance
ctb Feb 11, 2017
a342b4d
check get_use_bigcount and set_use_bigcount behavior
ctb Feb 12, 2017
719447e
update docs
ctb Feb 12, 2017
8553efd
fix typos
ctb Feb 12, 2017
49bd351
add tests for spectral_error_position code; fixed bug in murmur hash …
ctb Feb 12, 2017
a2a5e79
update docs
ctb Feb 12, 2017
d549a63
test abundance_distribution methods on all tabletypes, fix base class…
ctb Feb 12, 2017
6537eff
fix pep8
ctb Feb 12, 2017
32fcf25
updated ChangeLog
ctb Feb 12, 2017
bef16bb
Fix generation of coverage for c++ code
betatim Feb 13, 2017
4f1f0cc
Merge pull request #1617 from dib-lab/fix/gcovr
standage Feb 13, 2017
c1af197
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Feb 14, 2017
f234a9f
Add test to trigger #1353, implement one possible fix
luizirber Apr 27, 2016
9b4b038
Uses testcases suggested by @dkoslicki
luizirber Apr 27, 2016
6dd8430
Merge pull request #1355 from dib-lab/fix/1353
standage Feb 14, 2017
18a395e
Add missing header to build dependency
betatim Feb 14, 2017
8f9e8b0
fix counting types in python-apis
ctb Feb 14, 2017
87d17fb
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Feb 14, 2017
dc6b287
fix test_tabletype::test_save_load
ctb Feb 14, 2017
8c2b32c
Merge pull request #1620 from dib-lab/fix/headers
betatim Feb 14, 2017
be56172
Merge branch 'master' of github.com:dib-lab/khmer into refactor/hashing2
ctb Feb 14, 2017
b5659c9
Merge pull request #1511 from dib-lab/refactor/hashing2
standage Feb 14, 2017
017f27a
Add pxd and headers to MANIFEST, add CYSOURCES as build dep
camillescott Feb 14, 2017
b57ccef
Add shared library install target to top level Makefile, and install …
camillescott Feb 14, 2017
7a54b1a
Totally reorganize headers and sources into separate directories, sep…
camillescott Feb 15, 2017
1d8b31f
Replace khmer with oxli in liboxli; modify headers for new directory …
camillescott Feb 15, 2017
8a23735
Udpate doxyfile.in with new paths
camillescott Feb 15, 2017
f794bd8
Move lib gitignore, oxli.pc, and openmp check
camillescott Feb 15, 2017
39c5638
Update manifest
camillescott Feb 15, 2017
7f96287
Update Makefile
camillescott Feb 15, 2017
3370a96
Update include dir in magic
camillescott Feb 15, 2017
13fac5f
Update include dir in setup.cfg
camillescott Feb 15, 2017
c0ab231
Add osx min version param to link args to remove annoying linker warning
camillescott Feb 15, 2017
c9b232b
Change over remaining Makefile paths to new layout
camillescott Feb 15, 2017
5d1ffba
Expose add method
camillescott Feb 15, 2017
064b90d
Remove unneeded debug print statement
camillescott Feb 15, 2017
742a8df
consume_fasta --> consume_seqfile
standage Feb 15, 2017
d12a36a
Appease pep8
standage Feb 15, 2017
90e6163
Comments
standage Feb 15, 2017
c3c35b0
Document change in change log
standage Feb 15, 2017
b2ab515
Merge pull request #1621 from dib-lab/rename/consume_fasta
standage Feb 16, 2017
224926e
Flesh out the rest of the core oxli library in the cython wrapper pxd
camillescott Feb 16, 2017
326db36
Note changed dir structure in docs
camillescott Feb 16, 2017
7f1223a
Make sure to remove old headers before install liboxli
camillescott Feb 16, 2017
7853b9a
Add basic liboxli linking instructions
camillescott Feb 16, 2017
f18688c
Merge in master changes, update Cython wrapper to reflect new ReadPar…
camillescott Feb 17, 2017
9751f6c
Remove unneeded gcc color flag
camillescott Feb 17, 2017
4b433d1
Remove unneeded print statement
camillescott Feb 17, 2017
87dc442
pep8 corrections
camillescott Feb 17, 2017
dd864d7
Make Cython optional
camillescott Feb 17, 2017
25ceb24
Remove oxli cpps from gitignore, fix up Cython in setup
camillescott Feb 17, 2017
2139a43
Add the Cythonized cpp files
camillescott Feb 17, 2017
cd94bd1
Fix final pep8 silliness
camillescott Feb 17, 2017
4447361
Remove cpp files
camillescott Feb 17, 2017
680b5b7
Add Cython back as setup_requires dep and to dev packages
camillescott Feb 17, 2017
359ee1a
Fix py 2 and 3 string compat
camillescott Feb 18, 2017
a97a587
Fix some pep8 stuff
camillescott Feb 18, 2017
b4ec45d
Fix cython devpkg
camillescott Feb 18, 2017
3a248c6
move seqan includes into impl file, to stick with PIMPL philosophy an…
camillescott Feb 22, 2017
0b0c67b
Bring in cython_all_the_things
camillescott Feb 22, 2017
ed518f5
Add citations to partitioning script
camillescott Feb 23, 2017
4038b9b
Add partitioning to lib Makefile
camillescott Mar 1, 2017
c98a331
Change output format
camillescott Mar 2, 2017
98fe61a
Fix wrong var name
camillescott Mar 2, 2017
665c4a1
Add a tag density getter
camillescott Mar 8, 2017
9c694ad
Finish update of output format
camillescott Mar 8, 2017
f971cc6
Move sample-reads-randompy to cythonized reader
camillescott Mar 9, 2017
c085fd0
merge
camillescott Mar 9, 2017
47cbf62
Fix Count and Nodetable namespaces in wrapper
camillescott Apr 4, 2017
eb0cbe4
Add repr to Kmer
camillescott Apr 4, 2017
5a322b4
Add kmer generator to Sequence
camillescott Apr 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ pylint_report.txt
pep8_report.txt
pep257_report.txt
.cache/
khmer/_oxli/*.cpp
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include ChangeLog ez_setup.py IDEAS Makefile README.rst setup.cfg
include versioneer.py MANIFEST.in CITATION CONTRIBUTING.md Doxyfile.in
include LICENSE TODO .ycm_extra_conf.py
recursive-include lib *.hh *.cc [Mm]akefile* get_version.py
recursive-include khmer *.hh *.cc *.cpp
recursive-include third-party *.cc *.1 *.xsl README* sample* words* *.sh *.c
recursive-include third-party manual* [Mm]akefile* *.pl *.dsp CHANGES *.txt *.h
recursive-include third-party ChangeLog FAQ INDEX configure *.xsl
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@
# `SHELL=bash` Will break Titus's laptop, so don't use BASH-isms like
# `[[` conditional expressions.
CPPSOURCES=$(wildcard lib/*.cc lib/*.hh khmer/_khmer.cc) setup.py
CYSOURCES=$(wildcard khmer/_oxli/*.pyx khmer/_oxli/*.pxd)
PYSOURCES=$(filter-out khmer/_version.py, \
$(wildcard khmer/*.py scripts/*.py oxli/*.py) )
SOURCES=$(PYSOURCES) $(CPPSOURCES) setup.py
SOURCES=$(PYSOURCES) $(CPPSOURCES) $(CYSOURCES) setup.py

DEVPKGS=pep8==1.6.2 diff_cover autopep8 pylint coverage gcovr pytest \
pydocstyle screed pyenchant
pydocstyle screed pyenchant cython
GCOVRURL=git+https://github.com/nschum/gcovr.git@never-executed-branches

VERSION=$(shell ./setup.py version | grep Version | awk '{print $$4}' \
Expand Down Expand Up @@ -83,6 +84,7 @@ endif
MODEXT=$(shell python -c \
"import sysconfig;print(sysconfig.get_config_var('SO'))")
EXTENSION_MODULE = khmer/_khmer$(MODEXT)
CYTHON_MODULE = khmer/_oxli/_oxli$(MODEXT)

PYLINT_TEMPLATE="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"

Expand All @@ -102,11 +104,14 @@ install-dependencies:
pip install --upgrade --requirement doc/requirements.txt

## sharedobj : build khmer shared object file
sharedobj: $(EXTENSION_MODULE)
sharedobj: $(EXTENSION_MODULE) $(CYTHON_MODULE)

$(EXTENSION_MODULE): $(CPPSOURCES)
./setup.py build_ext --inplace

$(CYTHON_MODULE): $(CPPSOURCES) $(CYSOURCES)
./setup.py build_ext --inplace

coverage-debug: $(CPPSOURCES)
export CFLAGS="-pg -fprofile-arcs -ftest-coverage -O0"; ./setup.py \
build_ext --debug --inplace --libraries gcov
Expand All @@ -127,8 +132,9 @@ clean: FORCE
cd lib && $(MAKE) clean || true
cd tests && rm -rf khmertest_* || true
rm -f $(EXTENSION_MODULE)
rm -f $(CYTHON_MODULE)
rm -f khmer/*.pyc lib/*.pyc scripts/*.pyc tests/*.pyc oxli/*.pyc \
sandbox/*.pyc khmer/__pycache__/* sandbox/__pycache__/*
sandbox/*.pyc khmer/__pycache__/* sandbox/__pycache__/* khmer/_oxli/*.cpp
./setup.py clean --all || true
rm -f coverage-debug
rm -Rf .coverage
Expand Down
2 changes: 2 additions & 0 deletions khmer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
# tests/test_read_parsers.py,scripts/{filter-abund-single,load-graph}.py
# scripts/{abundance-dist-single,load-into-counting}.py

from khmer import _oxli

import sys

from struct import pack, unpack
Expand Down
93 changes: 2 additions & 91 deletions khmer/_khmer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Contact: [email protected]

// Must be first.
#include <Python.h>

#include "_khmer.hh"
#include <iostream>

#include "khmer.hh"
Expand Down Expand Up @@ -270,12 +270,6 @@ namespace khmer
namespace python
{

typedef struct {
PyObject_HEAD
//! Pointer to the low-level genomic read object.
read_parsers:: Read * read;
} khmer_Read_Object;


static
void
Expand Down Expand Up @@ -388,23 +382,6 @@ static PyTypeObject khmer_Read_Type = {
// ReadPairIterator -- return pairs of Read objects
//


typedef struct {
PyObject_HEAD
//! Pointer to the low-level parser object.
read_parsers:: IParser * parser;
} khmer_ReadParser_Object;


typedef struct {
PyObject_HEAD
//! Pointer to Python parser object for reference counting purposes.
PyObject * parent;
//! Persistent value of pair mode across invocations.
int pair_mode;
} khmer_ReadPairIterator_Object;


static
void
_ReadParser_dealloc(khmer_ReadParser_Object * obj)
Expand Down Expand Up @@ -785,11 +762,6 @@ _PyObject_to_khmer_ReadParser( PyObject * py_object )
return ((python:: khmer_ReadParser_Object *)py_object)->parser;
}

typedef struct {
PyObject_HEAD
pre_partition_info * PrePartitionInfo;
} khmer_PrePartitionInfo_Object;

static
void
khmer_PrePartitionInfo_dealloc(khmer_PrePartitionInfo_Object * obj)
Expand Down Expand Up @@ -827,11 +799,6 @@ static PyTypeObject khmer_PrePartitionInfo_Type = {
/***********************************************************************/
/***********************************************************************/

typedef struct {
PyObject_HEAD
SeenSet * hashes;
WordLength ksize;
} khmer_HashSet_Object;

static khmer_HashSet_Object * create_HashSet_Object(SeenSet * h, WordLength k);

Expand Down Expand Up @@ -886,12 +853,6 @@ static PyObject* khmer_HashSet_new(PyTypeObject * type, PyObject * args,

/***********************************************************************/

typedef struct {
PyObject_HEAD
khmer_HashSet_Object * parent;
SeenSet::iterator * it;
} _HashSet_iterobj;

static
void
_HashSet_iter_dealloc(_HashSet_iterobj * obj)
Expand Down Expand Up @@ -1190,16 +1151,6 @@ static khmer_HashSet_Object * create_HashSet_Object(SeenSet * h, WordLength k)

/***********************************************************************/

typedef struct {
PyObject_HEAD
Hashtable * hashtable;
} khmer_KHashtable_Object;

typedef struct {
PyObject_HEAD
SubsetPartition * subset;
} khmer_KSubsetPartition_Object;

static void khmer_subset_dealloc(khmer_KSubsetPartition_Object * obj);

static PyTypeObject khmer_KSubsetPartition_Type = {
Expand All @@ -1226,10 +1177,7 @@ static PyTypeObject khmer_KSubsetPartition_Type = {
"subset object", /* tp_doc */
};

typedef struct {
khmer_KHashtable_Object khashtable;
Hashbits * hashbits;
} khmer_KHashbits_Object;


static void khmer_hashbits_dealloc(khmer_KHashbits_Object * obj);
static PyObject* khmer_hashbits_new(PyTypeObject * type, PyObject * args,
Expand Down Expand Up @@ -3219,16 +3167,6 @@ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF("khmer_KHashtable_Object")
// KCountingHash object
//

typedef struct {
khmer_KHashtable_Object khashtable;
CountingHash * counting;
} khmer_KCountingHash_Object;

typedef struct {
PyObject_HEAD
ReadAligner * aligner;
} khmer_ReadAligner_Object;

static void khmer_counting_dealloc(khmer_KCountingHash_Object * obj);

static
Expand Down Expand Up @@ -4039,11 +3977,6 @@ static PyMethodDef khmer_subset_methods[] = {
{NULL, NULL, 0, NULL} /* sentinel */
};

typedef struct {
PyObject_HEAD
LabelHash * labelhash;
} khmer_KGraphLabels_Object;

static PyObject * khmer_graphlabels_new(PyTypeObject * type, PyObject *args,
PyObject *kwds);

Expand Down Expand Up @@ -4852,11 +4785,6 @@ static void khmer_subset_dealloc(khmer_KSubsetPartition_Object * obj)
// KHLLCounter object
//

typedef struct {
PyObject_HEAD
HLLCounter * hllcounter;
} khmer_KHLLCounter_Object;

static PyObject* khmer_hllcounter_new(PyTypeObject * type, PyObject * args,
PyObject * kwds)
{
Expand Down Expand Up @@ -5220,11 +5148,6 @@ static PyObject * hllcounter_merge(khmer_KHLLCounter_Object * me,
********************************/


typedef struct {
PyObject_HEAD
LinearAssembler * assembler;
} khmer_KLinearAssembler_Object;

#define is_linearassembler_obj(v) (Py_TYPE(v) == &khmer_KLinearAssembler_Type)

static void khmer_linearassembler_dealloc(khmer_KLinearAssembler_Object * obj)
Expand Down Expand Up @@ -5382,13 +5305,6 @@ static PyTypeObject khmer_KLinearAssembler_Type = {
};



typedef struct {
PyObject_HEAD
SimpleLabeledAssembler * assembler;
} khmer_KSimpleLabeledAssembler_Object;


static void khmer_simplelabeledassembler_dealloc(khmer_KLinearAssembler_Object * obj)
{
delete obj->assembler;
Expand Down Expand Up @@ -5533,11 +5449,6 @@ static PyTypeObject khmer_KSimpleLabeledAssembler_Type = {
********************************/


typedef struct {
PyObject_HEAD
JunctionCountAssembler * assembler;
} khmer_KJunctionCountAssembler_Object;

#define is_junctioncountassembler_obj(v) (Py_TYPE(v) == &khmer_KJunctionCountAssembler_Type)

static void khmer_junctioncountassembler_dealloc(khmer_KJunctionCountAssembler_Object * obj)
Expand Down
126 changes: 126 additions & 0 deletions khmer/_khmer.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#include <Python.h>

#include <iostream>

#include "khmer.hh"
#include "kmer_hash.hh"
#include "hashtable.hh"
#include "hashbits.hh"
#include "counting.hh"
#include "assembler.hh"
#include "read_aligner.hh"
#include "labelhash.hh"
#include "khmer_exception.hh"
#include "hllcounter.hh"


namespace khmer {
namespace python {


typedef struct {
PyObject_HEAD
//! Pointer to the low-level genomic read object.
read_parsers:: Read * read;
} khmer_Read_Object;


typedef struct {
PyObject_HEAD
//! Pointer to the low-level parser object.
read_parsers:: IParser * parser;
} khmer_ReadParser_Object;


typedef struct {
PyObject_HEAD
//! Pointer to Python parser object for reference counting purposes.
PyObject * parent;
//! Persistent value of pair mode across invocations.
int pair_mode;
} khmer_ReadPairIterator_Object;

}; //python

typedef struct {
PyObject_HEAD
pre_partition_info * PrePartitionInfo;
} khmer_PrePartitionInfo_Object;



typedef struct {
PyObject_HEAD
SeenSet * hashes;
WordLength ksize;
} khmer_HashSet_Object;


typedef struct {
PyObject_HEAD
khmer_HashSet_Object * parent;
SeenSet::iterator * it;
} _HashSet_iterobj;


typedef struct {
PyObject_HEAD
Hashtable * hashtable;
} khmer_KHashtable_Object;


typedef struct {
PyObject_HEAD
SubsetPartition * subset;
} khmer_KSubsetPartition_Object;


typedef struct {
khmer_KHashtable_Object khashtable;
Hashbits * hashbits;
} khmer_KHashbits_Object;


typedef struct {
khmer_KHashtable_Object khashtable;
CountingHash * counting;
} khmer_KCountingHash_Object;

typedef struct {
PyObject_HEAD
ReadAligner * aligner;
} khmer_ReadAligner_Object;


typedef struct {
PyObject_HEAD
LabelHash * labelhash;
} khmer_KGraphLabels_Object;


typedef struct {
PyObject_HEAD
HLLCounter * hllcounter;
} khmer_KHLLCounter_Object;


typedef struct {
PyObject_HEAD
LinearAssembler * assembler;
} khmer_KLinearAssembler_Object;


typedef struct {
PyObject_HEAD
SimpleLabeledAssembler * assembler;
} khmer_KSimpleLabeledAssembler_Object;


typedef struct {
PyObject_HEAD
JunctionCountAssembler * assembler;
} khmer_KJunctionCountAssembler_Object;



};
Empty file added khmer/_oxli/__init__.py
Empty file.
Loading