aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-02-27 13:23:41 -0500
committerCalvin <calvin@EESI>2013-02-27 13:23:41 -0500
commit0732d29b06f67ec8fb54958ff453699b4f0bdb4d (patch)
treeae72c5916af6bf047e51d8fa9e4cf9a005d0b76c
parente7473956c15a9881174d63a99cac735e9482038e (diff)
Update multifasta_to_otu.py for new quikr function
* Removed an old comment from the quikr function * Load the trained matrix from multifasta main. * This will reduce load times as we only need to call it once
-rwxr-xr-xmultifasta_to_otu.py4
-rwxr-xr-xquikr.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/multifasta_to_otu.py b/multifasta_to_otu.py
index 4a46be6..3e14fcf 100755
--- a/multifasta_to_otu.py
+++ b/multifasta_to_otu.py
@@ -12,7 +12,6 @@ import platform
# our defaults
kmer = 6
lamb = 10000
-trained_matrix = ""
output_directory = ""
input_directory = ""
@@ -65,6 +64,9 @@ def main():
if args.kmer is not None:
kmer = args.kmer
+ # Load trained matrix
+ trained_matrix = np.load(args.trained_matrix);
+
fasta_list = os.listdir(args.input_directory)
pool = Pool(processes=jobs)
diff --git a/quikr.py b/quikr.py
index 065590d..a6b8bd0 100755
--- a/quikr.py
+++ b/quikr.py
@@ -85,9 +85,6 @@ def quikr(input_fasta_location, trained_matrix, kmer, default_lambda):
counts = default_lambda * counts
counts = np.concatenate([np.zeros(1), counts])
- # load our trained matrix
-
-
#form the k-mer sensing matrix
trained_matrix = trained_matrix * default_lambda;
trained_matrix = np.flipud(trained_matrix);