Pārlūkot izejas kodu

initial commit, first part completed

nicolas-zimmermann 5 gadus atpakaļ
revīzija
d57ea41f99
1 mainītis faili ar 34 papildinājumiem un 0 dzēšanām
  1. 34 0
      16S_workflow.sh

+ 34 - 0
16S_workflow.sh Parādīt failu

@@ -0,0 +1,34 @@
1
+#!/bin/bash
2
+raw_reads_dir=$1
3
+output_dir=$2
4
+
5
+#mkdir $output_dir
6
+#mkdir trimmed_reads
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
17
+
18
+
19
+# MERGE READS AND OUTPUT FASTA
20
+mkdir fasta
21
+for R1 in $(ls trimmed_reads/*R1.at.fq);
22
+    do
23
+        R2=`echo $R1 | sed 's/R1/R2/g'`
24
+        outname=`echo $R1 | sed 's/_R1\.at\.fq/\.fasta/g'`
25
+        label=`echo $outname | sed 's/trimmed_reads\///g'`
26
+        outname=`echo $outname | sed 's/trimmed_reads/fasta/g'`
27
+        label=`echo $label | sed 's/\.fasta//g'`
28
+        soft/vsearch --fastq_mergepairs $R1 --reverse $R2 --fastaout $outname --label_suffix ";sample=$label;"
29
+    done
30
+
31
+# MERGE ALL FASTAS TO 'amplicon.fasta'
32
+cat fasta/*.fasta > fasta/amplicon.fasta
33
+
34
+