diff bwa_wrapper.py @ 2:3a001705dc94 draft default tip

Uploaded
author evan
date Fri, 06 Jun 2014 12:55:09 -0400
parents 8d92246f41bb
children
line wrap: on
line diff
--- a/bwa_wrapper.py	Fri Jun 06 12:39:56 2014 -0400
+++ b/bwa_wrapper.py	Fri Jun 06 12:55:09 2014 -0400
@@ -76,6 +76,7 @@
     parser.add_option( '-X', '--do_not_build_index', dest='do_not_build_index', action='store_true', help="Don't build index" )
     parser.add_option( '-H', '--suppressHeader', dest='suppressHeader', help='Suppress header' )
     parser.add_option( '-I', '--illumina1.3', dest='illumina13qual', help='Input FASTQ files have Illuina 1.3 quality scores' )
+    parser.add_option( '', '--meta_tsv', dest='metadata_tsv', help='Meta data for filling things like sequencing center' )
     (options, args) = parser.parse_args()
 
     # output version # of tool
@@ -204,7 +205,7 @@
         if options.metadata_tsv:
 	    f = open(options.metadata_tsv, 'r')
             cols = f.readline().split('\t')
-            readGroup = '@RG\tID:1\tDS:%s\tPU:%s\tLB:%s\tCN:BMGC\tDT:%s\tFR:%s\tRR:%s\tPL:ILLUMINA' % ( cols[4], cols[16], cols[14], cols[1], cols[19], cols[20]  )
+            readGroup = '@RG\tID:%s\tDS:%s\tPU:%s\tLB:%s\tCN:BMGC\tDT:%s\tFR:%s\tRR:%s\tPL:ILLUMINA\tSM:%s' % ( cols[0], cols[4], cols[16], cols[14], cols[1], cols[19], cols[20], cols[18]  )
             gen_alignment_cmds += ' -r "%s"' % readGroup
             print readGroup
         if options.rgid: