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

[MRG] remove lingering uses of sourmash_lib #626

Merged
merged 3 commits into from
Jan 13, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import unicode_literals

from screed.fasta import fasta_iter
from sourmash_lib._minhash import MinHash
from sourmash._minhash import MinHash
from tests.sourmash_tst_utils import get_test_data


Expand Down
4 changes: 2 additions & 2 deletions tests/test_lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from . import sourmash_tst_utils as utils
import sourmash

from sourmash_lib.lca import lca_utils
from sourmash_lib.lca.lca_utils import *
from sourmash.lca import lca_utils
from sourmash.lca.lca_utils import *

## lca_utils tests

Expand Down
14 changes: 7 additions & 7 deletions utils/compute-dna-mh-another-way.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def kmers(seq, k):

import sys, screed
import mmh3
import sourmash_lib
print('imported sourmash:', sourmash_lib, file=sys.stderr)
from sourmash_lib import MinHash
import sourmash_lib.signature
import sourmash
print('imported sourmash:', sourmash, file=sys.stderr)
from sourmash import MinHash
import sourmash.signature

record = next(iter(screed.open(sys.argv[1])))
print('loaded', record.name, file=sys.stderr)
revcomp = reverse(complement((record.sequence)))

mh = sourmash_lib.MinHash(ksize=K, n=500, is_protein=False)
mh = sourmash.MinHash(ksize=K, n=500, is_protein=False)

#
# compute the actual hashes to insert by breaking down the sequence
Expand All @@ -71,5 +71,5 @@ def kmers(seq, k):

mh.add_hash(hash)

s = sourmash_lib.signature.SourmashSignature('', mh, name=record.name)
print(sourmash_lib.signature.save_signatures([s]))
s = sourmash.signature.SourmashSignature('', mh, name=record.name)
print(sourmash.signature.save_signatures([s]))
14 changes: 7 additions & 7 deletions utils/compute-input-prot-another-way.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def kmers(seq, k):

import sys, screed
import mmh3
import sourmash_lib
print('imported sourmash:', sourmash_lib, file=sys.stderr)
from sourmash_lib import MinHash
import sourmash_lib.signature
import sourmash
print('imported sourmash:', sourmash, file=sys.stderr)
from sourmash import MinHash
import sourmash.signature

record = next(iter(screed.open(sys.argv[1])))
print('loaded', record.name, file=sys.stderr)

mh = sourmash_lib.MinHash(ksize=K, n=500, is_protein=True)
mh = sourmash.MinHash(ksize=K, n=500, is_protein=True)
prot_ksize = int(K / 3)

for kmer in kmers(record.sequence, prot_ksize):
Expand All @@ -87,5 +87,5 @@ def kmers(seq, k):

mh.add_hash(hash)

s = sourmash_lib.signature.SourmashSignature('', mh, name=record.name)
print(sourmash_lib.signature.save_signatures([s]))
s = sourmash.signature.SourmashSignature('', mh, name=record.name)
print(sourmash.signature.save_signatures([s]))
14 changes: 7 additions & 7 deletions utils/compute-prot-mh-another-way.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def kmers(seq, k):

import sys, screed
import mmh3
import sourmash_lib
print('imported sourmash:', sourmash_lib, file=sys.stderr)
from sourmash_lib import MinHash
import sourmash_lib.signature
import sourmash
print('imported sourmash:', sourmash, file=sys.stderr)
from sourmash import MinHash
import sourmash.signature

record = next(iter(screed.open(sys.argv[1])))
print('loaded', record.name, file=sys.stderr)

mh = sourmash_lib.MinHash(ksize=K, n=500, is_protein=True)
mh = sourmash.MinHash(ksize=K, n=500, is_protein=True)
prot_ksize = int(K / 3)

for trans in translate(record.sequence):
Expand All @@ -88,5 +88,5 @@ def kmers(seq, k):

mh.add_hash(hash)

s = sourmash_lib.signature.SourmashSignature('', mh, name=record.name)
print(sourmash_lib.signature.save_signatures([s]))
s = sourmash.signature.SourmashSignature('', mh, name=record.name)
print(sourmash.signature.save_signatures([s]))
37 changes: 0 additions & 37 deletions utils/setname.py

This file was deleted.