changeset 77:f89704ed1d8f draft

Uploaded
author yhoogstrate
date Tue, 10 Jun 2014 10:42:22 -0400
parents 344f5b5ddfd3
children bd5fd2f82f3c
files varscan_mpileup2snp_from_bam.xml
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/varscan_mpileup2snp_from_bam.xml	Tue Jun 10 10:08:46 2014 -0400
+++ b/varscan_mpileup2snp_from_bam.xml	Tue Jun 10 10:42:22 2014 -0400
@@ -5,7 +5,6 @@
 		<requirement type="package" version="5.9">ncurses</requirement>
 		<requirement type="package" version="0.1.19a">samtools_parallel_mpileup_0_1_19a</requirement>
 		<requirement type="package" version="2.3.6">varscan</requirement>
-		<!-- <requirement type="package" version="0.1.19">package_samtools_0_1_19</requirement> -->
 		<requirement type="package" version="5.9">ncurses</requirement>
 		<requirement type="package" version="0.1.19">samtools</requirement>
 	</requirements>
@@ -13,6 +12,16 @@
 		#if $reference_genome_source.source_select == "attribute" and len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) != 1
 			echo "Invalid number of dbkeys are found: ${ len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) }, while only one should be used. Make sure that the alignments are done on the same reference genome and that 'tool-data/all_fasta.loc' is configured properly!" >&amp;2
 		#else
+			#import os.path
+			#for $alignment in $alignments
+				#if not os.path.isfile(str($alignment)+".bai")
+				 echo "- Indexing alignment file: $alignment.name " ; 
+				 samtools index $alignment 2>&amp;1 ; 
+				#else
+				 echo "- Skiping indexing: $alignment.name " ; 
+				#end if
+			#end for
+			
 			#if $mpileup_parallelization.mpileup_parallelization_select == "true"
 				samtools-parallel-mpileup mpileup
 				-t $mpileup_parallelization.samtools_threads