diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2014-04-07 16:38:11 -0400 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2014-04-07 16:38:11 -0400 |
commit | 4590e113ffae34e96f498fe8987737c5d08b92a1 (patch) | |
tree | 3214212b0af7531cc24928ba30d42d15804202a4 | |
parent | 5ec3ac48a80b4ebdf8a895bfa744218d70a15159 (diff) |
working output full genome.py
-rwxr-xr-x | src/output_full_genome.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/output_full_genome.py b/src/output_full_genome.py index a4f99d5..b4fc8de 100755 --- a/src/output_full_genome.py +++ b/src/output_full_genome.py @@ -4,7 +4,7 @@ import os import argparse mers = {} -debug = False +debug = os.environ.get("debug", False) from subprocess import Popen from subprocess import PIPE @@ -12,14 +12,14 @@ from subprocess import PIPE def get_sequence(pt): - for it, seq in enumerate(seq_ends): + for it, seq in enumerate(seq_ends, start=1): if pt <= seq: return it def load_end_points(fn): ''' get all the points of the end of each sequence in a sample ''' - end_points = [0] + end_points = [] cmd = "sequence_end_points < " + fn @@ -81,6 +81,8 @@ def populate_locations(selected_mers, mer_dic, input_fn, length): "| tr [ACGT] [TGCA] | strstream ", True]) for (cmd, reverse) in cmds: + if(debug): + print(cmd) _, merlist_fn = tempfile.mkstemp() # write our mers out to a fifi |