|
@@ -2,18 +2,18 @@
|
2
|
2
|
raw_reads_dir=$1
|
3
|
3
|
output_dir=$2
|
4
|
4
|
|
5
|
|
-#mkdir $output_dir
|
6
|
|
-#mkdir trimmed_reads
|
|
5
|
+mkdir $output_dir
|
|
6
|
+mkdir trimmed_reads
|
7
|
7
|
#TRIM READS WITH ALIENTRIMMER
|
8
|
|
-#for R1 in $(ls $raw_reads_dir/*R1.fastq);
|
9
|
|
-# do
|
10
|
|
-# R2=`echo $R1 | sed 's/R1/R2/g'`
|
11
|
|
-# oR1=`echo $R1 | sed 's/\.fastq/\.at\.fq/g'`
|
12
|
|
-# oR1=`echo $oR1 | sed 's/fastq\///g'`
|
13
|
|
-# oR2=`echo $R2 | sed 's/\.fastq/\.at\.fq/g'`
|
14
|
|
-# oR2=`echo $oR2 | sed 's/fastq\///g'`
|
15
|
|
-# java -jar soft/AlienTrimmer.jar -if $R1 -ir $R2 -q 20 -c databases/contaminants.fasta -of trimmed_reads/$oR1 -or trimmed_reads/$oR2
|
16
|
|
-# done
|
|
8
|
+for R1 in $(ls $raw_reads_dir/*R1.fastq);
|
|
9
|
+ do
|
|
10
|
+ R2=`echo $R1 | sed 's/R1/R2/g'`
|
|
11
|
+ oR1=`echo $R1 | sed 's/\.fastq/\.at\.fq/g'`
|
|
12
|
+ oR1=`echo $oR1 | sed 's/fastq\///g'`
|
|
13
|
+ oR2=`echo $R2 | sed 's/\.fastq/\.at\.fq/g'`
|
|
14
|
+ oR2=`echo $oR2 | sed 's/fastq\///g'`
|
|
15
|
+ java -jar soft/AlienTrimmer.jar -if $R1 -ir $R2 -q 20 -c databases/contaminants.fasta -of trimmed_reads/$oR1 -or trimmed_reads/$oR2
|
|
16
|
+ done
|
17
|
17
|
|
18
|
18
|
|
19
|
19
|
# MERGE READS AND OUTPUT FASTA
|
|
@@ -31,4 +31,15 @@ for R1 in $(ls trimmed_reads/*R1.at.fq);
|
31
|
31
|
# MERGE ALL FASTAS TO 'amplicon.fasta'
|
32
|
32
|
cat fasta/*.fasta > fasta/amplicon.fasta
|
33
|
33
|
|
|
34
|
+# REMOVE ' ' FROM EACH READ NAME
|
|
35
|
+sed -i 's/ //g' fasta/amplicon.fasta
|
|
36
|
+
|
|
37
|
+# CREATE OTU
|
|
38
|
+# DEDUPLICATION
|
|
39
|
+mkdir otu
|
|
40
|
+soft/vsearch --derep_fulllength fasta/amplicon.fasta --output otu/fulllength_otu
|
|
41
|
+soft/vsearch --derep_prefix fasta/amplicon.fasta --output otu/prefix_otu
|
34
|
42
|
|
|
43
|
+# REMOVING SINGLETON
|
|
44
|
+soft/vsearch --derep_fulllength fasta/amplicon.fasta --output otu/fulllength_min10_otu --minuniquesize 10
|
|
45
|
+soft/vsearch --derep_prefix fasta/amplicon.fasta --output otu/prefix_min10_otu --minuniquesize 10
|