make it possible to include all alignments, not just the ones that match
authorDiane Trout <diane@caltech.edu>
Sat, 10 May 2008 04:32:25 +0000 (04:32 +0000)
committerDiane Trout <diane@caltech.edu>
Sat, 10 May 2008 04:32:25 +0000 (04:32 +0000)
chromosomes.

gaworkflow/util/makebed.py

index d2389ba0441fb2a7154d8c48919106efa59edd32..738b815b270d2d8352d6157a7b5e1948b437e3a3 100755 (executable)
@@ -25,7 +25,9 @@ def make_bed_from_eland_stream(instream, outstream, name, description, chromosom
   for line in instream:
     fields = line.split()
     # we need more than the CHR field, and it needs to match a chromosome
-    if len(fields) <= CHR or fields[CHR][:3] != chromosome_prefix:
+    if len(fields) <= CHR or \
+          (chromosome_prefix is not None and \
+             fields[CHR][:3] != chromosome_prefix):
       continue
     start = fields[START]
     stop = int(start) + len(fields[SEQ])