comparison SMART/DiffExpAnal/loadMultiFastqFiles.sh @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
comparison
equal deleted inserted replaced
17:b0e8584489e6 18:94ab73e8a190
1 #!/bin/bash
2
3 OUTFile=${1}
4 shift
5 groupCount=1
6 replicateNumber=1
7
8 arrayZ=( $@ )
9 #remove the last symble '@' given by commande line
10 unset arrayZ[${#arrayZ[@]}-1]
11
12 for FILE in ${arrayZ[@]}
13 do
14 #if a new group of fastq, re-count the replicateNumber
15 if echo $FILE | grep -q "@"
16 then
17 groupCount=$(($groupCount + 1))
18 replicateNumber=1
19 else
20 echo -e "Group${groupCount}_${replicateNumber}\t${FILE}" >>${OUTFile}
21 replicateNumber=$(($replicateNumber + 1))
22 fi
23 done
24