summaryrefslogtreecommitdiff
path: root/src/python/quikr
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-05-14 19:50:28 -0400
committerCalvin <calvin@EESI>2013-05-14 19:50:28 -0400
commit3631a0c9d47d8ff72085bcc534bd24bfad4f73da (patch)
treea259116534e6b5522d065e7dd46a414d54d57075 /src/python/quikr
parent7ab43937c81ad5af1b7d6b5b1d3c317b58881e84 (diff)
use sensing matrix
Diffstat (limited to 'src/python/quikr')
-rwxr-xr-xsrc/python/quikr16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/python/quikr b/src/python/quikr
index bae2b9f..7c9ce25 100755
--- a/src/python/quikr
+++ b/src/python/quikr
@@ -9,15 +9,11 @@ def main():
parser = argparse.ArgumentParser(description=
"Quikr returns the estimated frequencies of batcteria present when given a \
- input FASTA file. \n \
- A default trained matrix will be used if none is supplied \n \
- You must supply a kmer and default lambda if using a custom trained \
- matrix.")
-
+ input FASTA file. \n")
parser.add_argument("-f", "--fasta", help="the sample's fasta file of NGS READS", required=True)
parser.add_argument("-o", "--output", help="OTU_FRACTION_PRESENT, a vector \
representing the percentage of database sequence's presence in a sequence. (csv output)", required=True)
- parser.add_argument("-t", "--trained-matrix", help="the trained matrix", required=True)
+ parser.add_argument("-s", "--sensing-matrix", help="the sensing matrix", required=True)
parser.add_argument("-l", "--lamb", type=int, help="the lambda size. (default is 10,000")
parser.add_argument("-k", "--kmer", type=int, required=True,
help="specifies the size of the kmer to use (the default is 6)")
@@ -33,8 +29,8 @@ def main():
if not os.path.isfile(args.fasta):
parser.error( "Input fasta file not found")
- if not os.path.isfile(args.trained_matrix):
- parser.error("Custom trained matrix not found")
+ if not os.path.isfile(args.sensing_matrix):
+ parser.error("Custom sensing matrix not found")
# use alternative lambda
if args.lamb is not None:
@@ -44,8 +40,8 @@ def main():
if args.kmer is not None:
kmer = args.kmer
- trained_matrix = quikr.load_trained_matrix_from_file(args.trained_matrix)
- xstar = quikr.calculate_estimated_frequencies(args.fasta, trained_matrix, kmer, lamb)
+ sensing_matrix = quikr.load_sensing_matrix_from_file(args.sensing_matrix)
+ xstar = quikr.calculate_estimated_frequencies(args.fasta, sensing_matrix, kmer, lamb)
np.savetxt(args.output, xstar, delimiter=",", fmt="%f")
return 0