From 14d2b50c054e0be4f299709f4b52d8152afa2cd4 Mon Sep 17 00:00:00 2001
From: kohleman <kohleman>
Date: Wed, 28 Oct 2009 11:16:32 +0000
Subject: [PATCH] - number of lane is now a mandatory parameter - added
 parallel usage (backgrounding of one process per lane)

SVN: 13110
---
 deep_sequencing_unit/source/bash/lanes2srf_RTA | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/deep_sequencing_unit/source/bash/lanes2srf_RTA b/deep_sequencing_unit/source/bash/lanes2srf_RTA
index 2d065d4f8cd..11dd1770087 100755
--- a/deep_sequencing_unit/source/bash/lanes2srf_RTA
+++ b/deep_sequencing_unit/source/bash/lanes2srf_RTA
@@ -1,11 +1,21 @@
 #!/bin/bash
 
 export BUSTARD=$1
+export NUMBER_OF_LANES=$2
 export SRF_DIR=Srf_RTA
 export ILLUMINA2SRF=/usr/local/dsu/bin/illumina2srf
 
+export PRG=`basename $0`
+export USAGE="Usage: ${PRG} <Path_to_Bustard_Folder> <Number_of_Lanes> \n\nEXAMPLE: ${PRG} /array0/Runs/090720_42HUDAAXX/Data/Intensities/Bustard/ 8" 
+
+if [ -z "${BUSTARD}"  -o -z "${NUMBER_OF_LANES}" ]
+then
+   echo "${USAGE}"
+   exit 1
+fi
+
 [ -d $SRF_DIR ] || mkdir $SRF_DIR
-for a in 1 2 3 4 5 6 7 8; do
+for  (( a=1; a<=$NUMBER_OF_LANES; a++ )); do
   echo Converting Lane $a to SRF
-  $ILLUMINA2SRF -b -o $SRF_DIR/s_${a}_RTA.srf $BUSTARD/s_${a}_*_qseq.txt ;
-done
+  $ILLUMINA2SRF -b -o $SRF_DIR/s_${a}_RTA.srf $BUSTARD/s_${a}_*_qseq.txt &;
+done
\ No newline at end of file
-- 
GitLab