[hg] galaxy 1472: Some tool fixes:

classic Classic list List threaded Threaded
1 message Options
| Threaded
Open this post in threaded view
|

[hg] galaxy 1472: Some tool fixes:

Nate Coraor (nate@bx.psu.edu)
details:   http://www.bx.psu.edu/hg/galaxy/rev/c81fa25c67e5
changeset: 1472:c81fa25c67e5
user:      Greg Von Kuster <[hidden email]>
date:      Tue Aug 19 10:44:08 2008 -0400
description:
Some tool fixes:
1) fix for interval_maf_to_merged_fasta when strand column not included in input metadata
2) Tools using alignseq.loc now split on TAB rather than wihite space

3 file(s) affected in this change:

tools/extract/extract_genomic_dna.py
tools/maf/interval_maf_to_merged_fasta.py
tools/metag_tools/blat_wrapper.py

diffs (84 lines):

diff -r 1958657d8f8d -r c81fa25c67e5 tools/extract/extract_genomic_dna.py
--- a/tools/extract/extract_genomic_dna.py Tue Aug 12 10:04:28 2008 -0400
+++ b/tools/extract/extract_genomic_dna.py Tue Aug 19 10:44:08 2008 -0400
@@ -35,7 +35,7 @@
     for line in open( nib_file ):
         line = line.rstrip( '\r\n' )
         if line and not line.startswith( "#" ) and line.startswith( 'seq' ):
-            fields = line.split()
+            fields = line.split( '\t' )
             if len( fields ) < 3:
                 continue
             if fields[1] == dbkey:
@@ -49,7 +49,7 @@
     for line in open( twobit_file ):
         line = line.rstrip( '\r\n' )
         if line and not line.startswith( "#" ):
-            fields = line.split()
+            fields = line.split( '\t' )
             if len( fields ) < 2:
                 continue
             if fields[0] == dbkey:
diff -r 1958657d8f8d -r c81fa25c67e5 tools/maf/interval_maf_to_merged_fasta.py
--- a/tools/maf/interval_maf_to_merged_fasta.py Tue Aug 12 10:04:28 2008 -0400
+++ b/tools/maf/interval_maf_to_merged_fasta.py Tue Aug 19 10:44:08 2008 -0400
@@ -67,25 +67,29 @@
         sys.exit()
     
     if not options.geneBED:
-        if options.chromCol: chr_col = int( options.chromCol ) - 1
+        if options.chromCol:
+            chr_col = int( options.chromCol ) - 1
         else:
-            print >>sys.stderr, "Chromosome column has not been specified."
+            print >>sys.stderr, "Chromosome column not set, click the pencil icon in the history item to set the metadata attributes."
             sys.exit()
         
-        if options.startCol: start_col = int( options.startCol ) - 1
+        if options.startCol:
+            start_col = int( options.startCol ) - 1
         else:
-            print >>sys.stderr, "Start column has not been specified."
+            print >>sys.stderr, "Start column not set, click the pencil icon in the history item to set the metadata attributes."
             sys.exit()
         
-        if options.endCol: end_col = int( options.endCol ) - 1
+        if options.endCol:
+            end_col = int( options.endCol ) - 1
         else:
-            print >>sys.stderr, "End column has not been specified."
+            print >>sys.stderr, "End column not set, click the pencil icon in the history item to set the metadata attributes."
             sys.exit()
         
-        if options.strandCol: strand_col = int( options.strandCol ) - 1
+        if options.strandCol:
+            strand_col = int( options.strandCol ) - 1
         else:
-            print >>sys.stderr, "Strand column has not been specified."
-            sys.exit()
+            strandCol = -1
+
     mafIndexFile = "%s/maf_index.loc" % options.mafIndexFileDir
     #Finish parsing command line
         
diff -r 1958657d8f8d -r c81fa25c67e5 tools/metag_tools/blat_wrapper.py
--- a/tools/metag_tools/blat_wrapper.py Tue Aug 12 10:04:28 2008 -0400
+++ b/tools/metag_tools/blat_wrapper.py Tue Aug 19 10:44:08 2008 -0400
@@ -15,7 +15,7 @@
     for i, line in enumerate( file( nib_file ) ):
         line = line.rstrip( '\r\n' )
         if line and not line.startswith( "#" ):
-            fields = line.split()
+            fields = line.split( '\t' )
             if len( fields ) < 3:
                 continue
             if fields[0] == 'seq':
@@ -31,7 +31,7 @@
     for i, line in enumerate( file( twobit_file ) ):
         line = line.rstrip( '\r\n' )
         if line and not line.startswith( "#" ):
-            fields = line.split()
+            fields = line.split( '\t' )
             if len( fields ) < 2:
                 continue
             twobits[( fields[0] )] = fields[1]