From f53fc0eb3728f7933bf71c0090014f653b38861f Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 14 May 2013 20:49:41 -0400 Subject: add some documentation --- src/python/quikr.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/python/quikr.py b/src/python/quikr.py index 3c2b23a..cd6c8e0 100755 --- a/src/python/quikr.py +++ b/src/python/quikr.py @@ -1,3 +1,13 @@ +''' + This is a python implementation of the Quikr program. +''' +__author__ = "Calvin Morrison" +__credits__ = ["Calvin Morrison", "Gail Rosen", "Simon Foucart", "Jean-Luc Bouchot", "David Koslicki"] +__license__ = "GPL" +__maintainer__ = "Gail Rosen" +__email__ = "gailro@gmail.com" +__status__ = "Release" + import os import sys from StringIO import StringIO @@ -9,19 +19,15 @@ import gzip import itertools - def is_compressed(filename): - """ This function checks to see if the file is gzipped + """ This is a helper function to see if a file is gzipped >>> boolean_value = is_compressed("/path/to/compressed/gzip/file") >>> print boolean_value True - param filename: the filename to check - type filename: string - return: Returns whether the file is gzipped - rtype: boolean - + input: filename + output: boolean """ try: f = open(filename, "rb") @@ -40,6 +46,8 @@ def is_compressed(filename): def train_matrix(input_file_location, kmer): """ Takes a input fasta file, and kmer, returns a custom sensing matrix + + returns an ndarray """ input_file = Popen(["bash", "-c", "probabilities-by-read " + str(kmer) + " " + input_file_location + " <(generate_kmers 6)"], stdout=PIPE) -- cgit v1.2.3