diff options
| author | Calvin <calvin@EESI> | 2013-02-27 14:40:15 -0500 | 
|---|---|---|
| committer | Calvin <calvin@EESI> | 2013-02-27 14:40:15 -0500 | 
| commit | d5528274719639989634f296f37da270fe88dd5d (patch) | |
| tree | cefc34f91d690fd9d3615318b265df3784ade6a6 | |
| parent | 0732d29b06f67ec8fb54958ff453699b4f0bdb4d (diff) | |
Write the comments in for the work to be done
Comment first, write code later! Also I fixed an erroneous space that
really didn't need to be there. Laid down the import for biopyton.
Created the basic iteration through our fasta files and added
loading of fasta file titles through biopython
| -rwxr-xr-x | multifasta_to_otu.py | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/multifasta_to_otu.py b/multifasta_to_otu.py index 3e14fcf..e313e4a 100755 --- a/multifasta_to_otu.py +++ b/multifasta_to_otu.py @@ -1,5 +1,6 @@  #!/usr/bin/python  from multiprocessing import Pool +from Bio import SeqIO  import multiprocessing  import os  import quikr_train as qt @@ -54,7 +55,7 @@ def main():    if not os.path.isfile(args.trained_matrix):      parser.error("custom trained matrix not found") -    # use alternative lambda +  # use alternative lambda    if args.lamb is not None:      lamb = args.lamb @@ -67,11 +68,24 @@ def main():    # Load trained matrix    trained_matrix = np.load(args.trained_matrix); +  # Return a list of the input directory    fasta_list = os.listdir(args.input_directory) +  # Queue up and run our quikr functions.    pool = Pool(processes=jobs)    results = pool.map(quikr_call, fasta_list) +  # Create a dictionary and load up our keys +   + +  for fasta in fasta_list: +    fasta_file = open(input_directory + fasta, "rU") + +    for record in SeqIO.parse(fasta_file, "fasta") : + +  # load the keys with values from each fasta result + +  # Write the otu table    return 0  def quikr_call(fasta_file): | 
