Hi,

The attached patch enables the BWA wrapper to work with Illumina-1.3+ FASTQ 
files without Grooming (which goes well with the name of the tool: "Map with 
BWA for Illumina" ).

Actually,
Changing the XML and the python code, testing the tool and mapping to the mouse 
genome all together took less time than grooming one 4.2GB FASTQ file :)

Comments are welcomed,
 -gordon
diff -r c11a9cda522f tools/sr_mapping/bwa_wrapper.py
--- a/tools/sr_mapping/bwa_wrapper.py	Thu Jul 28 11:27:26 2011 -0400
+++ b/tools/sr_mapping/bwa_wrapper.py	Thu Jul 28 16:37:14 2011 -0400
@@ -75,6 +75,7 @@
     parser.add_option( '-D', '--dbkey', dest='dbkey', help='Dbkey for reference genome' )
     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' )
     (options, args) = parser.parse_args()
 
     # output version # of tool
@@ -163,10 +164,14 @@
             stop_err( 'Error indexing reference sequence. ' + str( e ) )
     else:
         ref_file_name = options.ref
+    if options.illumina13qual:
+        illumina_quals = "-I"
+    else:
+        illumina_quals = ""
 
     # set up aligning and generate aligning command options
     if options.params == 'pre_set':
-        aligning_cmds = '-t %s %s' % ( options.threads, color_space )
+        aligning_cmds = '-t %s %s %s' % ( options.threads, color_space, illumina_quals )
         gen_alignment_cmds = ''
     else:
         if options.maxEditDist != '0':
@@ -185,11 +190,11 @@
             noIterSearch = '-N'
         else:
             noIterSearch = ''
-        aligning_cmds = '-n %s -o %s -e %s -d %s -i %s %s -k %s -t %s -M %s -O %s -E %s %s %s %s' % \
+        aligning_cmds = '-n %s -o %s -e %s -d %s -i %s %s -k %s -t %s -M %s -O %s -E %s %s %s %s %s' % \
                         ( editDist, options.maxGapOpens, options.maxGapExtens, options.disallowLongDel,
                           options.disallowIndel, seed, options.maxEditDistSeed, options.threads,
                           options.mismatchPenalty, options.gapOpenPenalty, options.gapExtensPenalty,
-                          suboptAlign, noIterSearch, color_space )
+                          suboptAlign, noIterSearch, color_space, illumina_quals )
         if options.genAlignType == 'paired':
             gen_alignment_cmds = '-a %s -o %s' % ( options.maxInsertSize, options.maxOccurPairing )
             if options.outputTopNDisc:
diff -r c11a9cda522f tools/sr_mapping/bwa_wrapper.xml
--- a/tools/sr_mapping/bwa_wrapper.xml	Thu Jul 28 11:27:26 2011 -0400
+++ b/tools/sr_mapping/bwa_wrapper.xml	Thu Jul 28 16:37:14 2011 -0400
@@ -5,6 +5,12 @@
     bwa_wrapper.py 
       --threads="4"
 
+      #if $input1.ext == "fastqillumina":
+            --illumina1.3
+      #else if $input1.ext == "fastqsolexa":
+            --illumina1.3
+      #end if
+
       ## reference source
       --fileSource=$genomeSource.refGenomeSource
       #if $genomeSource.refGenomeSource == "history":
@@ -93,11 +99,11 @@
         <option value="paired">Paired-end</option>
       </param>
       <when value="single">
-        <param name="input1" type="data" format="fastqsanger" label="FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33" />
+        <param name="input1" type="data" format="fastqsanger,fastqillumina,fastqsolexa" label="FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33" />
       </when>
       <when value="paired">
-        <param name="input1" type="data" format="fastqsanger" label="Forward FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33" />
-        <param name="input2" type="data" format="fastqsanger" label="Reverse FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33" />
+        <param name="input1" type="data" format="fastqsanger,fastqillumina,fastqsolexa" label="Forward FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33" />
+        <param name="input2" type="data" format="fastqsanger,fastqillumina,fastqsolexa" label="Reverse FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33" />
       </when>
     </conditional>
     <conditional name="params">
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to