annotate DiffExpAnal/loadMultiFastqFiles.sh @ 0:63799b789162 draft

Uploaded
author yufei-luo
date Tue, 22 Jan 2013 10:07:03 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
1 #!/bin/bash
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
2
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
3 OUTFile=${1}
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
4 shift
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
5 groupCount=1
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
6 replicateNumber=1
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
7
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
8 arrayZ=( $@ )
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
9 #remove the last symble '@' given by commande line
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
10 unset arrayZ[${#arrayZ[@]}-1]
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
11
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
12 for FILE in ${arrayZ[@]}
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
13 do
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
14 #if a new group of fastq, re-count the replicateNumber
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
15 if echo $FILE | grep -q "@"
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
16 then
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
17 groupCount=$(($groupCount + 1))
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
18 replicateNumber=1
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
19 else
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
20 echo -e "Group${groupCount}_${replicateNumber}\t${FILE}" >>${OUTFile}
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
21 replicateNumber=$(($replicateNumber + 1))
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
22 fi
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
23 done
63799b789162 Uploaded
yufei-luo
parents:
diff changeset
24