-
Notifications
You must be signed in to change notification settings - Fork 0
/
bcl2fastq_NovaSeq.sh
executable file
·80 lines (46 loc) · 2.12 KB
/
bcl2fastq_NovaSeq.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
###$1 is the sequencer name $2 is sequencing ID
if [ "$1" = "NovaSeq" ]; then
FOLDER_PATH="/home/genomics/genomics/data/Temp/Sequence_Temp/NovaSeq/Fastq_Generation"
SEQ_PATH="/home/genomics/genomics-archive/NovaSeq_RawData"
STR=$2
OUTPUT_FOLDER=${STR:(-9):9}
elif [ "$1" = "NextSeq" ]; then
FOLDER_PATH="/home/genomics/genomics/data/Temp/Sequence_Temp/NextSeq/Fastq_Generation"
SEQ_PATH="/home/genomics/genomics-archive/NextSeq500_RawData"
elif [ "$1" = "MiSeq" ]; then
FOLDER_PATH="/home/genomics/genomics/data/Temp/Sequence_Temp/MiSeq/Fastq_Generation"
SEQ_PATH="/home/genomics/genomics-archive/MiSeq_RawData"
else
echo "Please set the select the correct sequencer for data processing!"
fi
cd $FOLDER_PATH
mkdir $2
chmod 775 $2
cd $2
#bcl2fastq -R $SEQ_PATH/$2 -o $FOLDER_PATH/$2 -p 30 --ignore-missing-bcl --no-lane-splitting --ignore-missing-filter
if [ "$1" = "NovaSeq" ]; then
/usr/bin/perl /home/genomics/bin/bcl_summary_mail.pl $FOLDER_PATH/$2/Stats/DemultiplexingStats.xml $FOLDER_PATH/$2/ $2 NovaSeq $FOLDER_PATH/$2/Stats/Stats.json
sendmail -vt < ./mail.txt
# chmod -R 775 $FOLDER_PATH/$2
# chown genomics -R $FOLDER_PATH/$2
/home/genomics/bin/change_per.sh $FOLDER_PATH/$2
# rm mail.txt
elif [ "$1" = "NextSeq" ]; then
mkdir "Data_processing"
mv *.gz Data_processing
mv ./Data_processing/Undetermined* ./
# chmod -R 775 $FOLDER_PATH/$2
# chown genomics -R $FOLDER_PATH/$2
/usr/bin/perl /home/genomics/bin/bcl_summary_mail.pl $FOLDER_PATH/$2/Stats/DemultiplexingStats.xml $FOLDER_PATH/$2/Data_processing $2 NextSeq $FOLDER_PATH/$2/Stats/Stats.json
#echo "Subject: the fastq generation for $1 is done!" | sendmail -v [email protected]
sendmail -vt < ./mail.txt
/home/genomics/bin/change_per.sh $FOLDER_PATH/$2
# rm mail.txt
elif [ "$1" = "MiSeq" ]; then
/usr/bin/perl /home/genomics/bin/bcl_summary_mail.pl $FOLDER_PATH/$2/Stats/DemultiplexingStats.xml $FOLDER_PATH/$2/ $2 MiSeq $FOLDER_PATH/$2/Stats/Stats.json
sendmail -vt < ./mail.txt
/home/genomics/bin/change_per.sh $FOLDER_PATH/$2
# chmod -R 775 $FOLDER_PATH/$2
# chown genomics -R $FOLDER_PATH/$2
# rm mail.txt
fi