1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/298b3077412d/ changeset: 298b3077412d user: kanwei date: 2011-08-24 19:14:49 summary: Fix sam2interval.py bug due to tab spacing affected #: 1 file (83 bytes) --- a/tools/samtools/sam2interval.py Wed Aug 24 10:19:38 2011 -0400 +++ b/tools/samtools/sam2interval.py Wed Aug 24 13:14:49 2011 -0400 @@ -44,7 +44,7 @@ '-r','--ref_column', dest='ref_col', default = '3', - help='Column containing name of the refernce sequence coordinate. 1-based') + help='Column containing name of the reference sequence coordinate. 1-based') parser.add_option( '-e','--read_column', @@ -53,26 +53,18 @@ help='Column containing read name. 1-based') parser.add_option( - '-d','--debug', - dest='debug', - action='store_true', - default = False, - help='Print debugging info') - - parser.add_option( '-p','--print_all', dest='prt_all', action='store_true', default = False, help='Print coordinates and original SAM?') - - + options, args = parser.parse_args() if options.input_sam: - infile = open ( options.input_sam, 'r') + infile = open ( options.input_sam, 'r') else: - infile = sys.stdin + infile = sys.stdin cigar = re.compile( '\d+M|\d+N|\d+D|\d+P' ) @@ -93,12 +85,12 @@ read_name = fields[ int( options.read_col ) - 1 ] ref_name = fields[ int( options.ref_col ) - 1 ] - if not ref_name == '*': - # Do not print lines with unmapped reads that contain '*' instead of chromosome name - if options.prt_all: - print '%s\t%s\t%s\t%s\t%s' % (ref_name, str(start), str(end+start), strand, line) - else: - print '%s\t%s\t%s\t%s' % (ref_name, str(start), str(end+start), strand) + if ref_name != '*': + # Do not print lines with unmapped reads that contain '*' instead of chromosome name + if options.prt_all: + print '%s\t%s\t%s\t%s\t%s' % (ref_name, str(start), str(end+start), strand, line) + else: + print '%s\t%s\t%s\t%s' % (ref_name, str(start), str(end+start), strand) if __name__ == "__main__": main() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.