annotate SMART/DiffExpAnal/loadMultiFastqFiles.sh @ 31:0ab839023fe4

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