Commit 859f779c authored by eortega's avatar eortega
Browse files

Updated script/02_trimm_and_clean and adjusted scripts/procedures.sh accordingly

parent a0e243ef
......@@ -2,21 +2,29 @@
## VARIABLES
#path=/home/enrique/work/Gandon/coevolution/phages/
# path=/home/enrique/work/Gandon/coevolution/phages/
path=$1
step_name=$2
n_threads=35
# n_threads=$3
## Maybe declaring the place where trimmomatic.jar is stored should vo to a variable
## SCRIPT
mkdir -p data/trimmed/{W_seq,R_seq,Other_seq}
mkdir -p ${path}steps/$step_name/{W_seq,R_seq,Other_seq,uniq}
trimm_summary=${path}data/summary_trimm
trimm_summary=${path}steps/$step_name/summary_trimm
rm -rf ${trimm_summary}_W ${trimm_summary}_R ${trimm_summary}_Other
touch ${trimm_summary}_W ${trimm_summary}_R ${trimm_summary}_Other
### CREATE SYMBOLIC LINKS TO SEQUENCE FILES
### DIIVIDED IN 3 DIRECTORIES
......@@ -43,7 +51,9 @@ touch ${trimm_summary}_W ${trimm_summary}_R ${trimm_summary}_Other
## DO TRIMMING FOR W_SEQUENCES.
for i in /home/enrique/work/Gandon/coevolution/phages/data/fastq_ln/W_seq/*_R1_*.fastq.gz
for i in ${path}/data/fastq_ln/W_seq/*_R1_*.fastq.gz
do
shortname=$(basename -s _L001_R1_001.fastq.gz $i);
echo $shortname >> ${trimm_summary}_W;
......@@ -56,21 +66,21 @@ do
-quiet \
$i \
${i/_R1_/_R2_} \
${path}data/trimmed/${shortname}_R1.fq.gz \
${path}test_trimm/U1.fq.gz \
${path}data/trimmed/${shortname}_R2.fq.gz \
test_trimm/U2.fq.gz \
${path}steps/$step_name/${shortname}_R1.fq.gz \
${path}steps/$step_name/uniq/U1.fq.gz \
${path}steps/$step_name/${shortname}_R2.fq.gz \
${path}steps/$step_name/uniq/U2.fq.gz \
CROP:145 \
HEADCROP:11 \
SLIDINGWINDOW:2:20 \
MINLEN:50
cat /tmp/tmp.trimm_summary >> ${trimm_summary}_W;
rm -rf ${path}test_trimm/*;
rm -rf ${path}steps/$step_name/uniq/*;
echo -e '\n####' >> ${trimm_summary}_W;
done
for i in /home/enrique/work/Gandon/coevolution/phages/data/fastq_ln/R_seq/*_R1_*.fastq.gz
for i in ${path}/data/fastq_ln/R_seq/*_R1_*.fastq.gz
do
shortname=$(basename -s _L001_R1_001.fastq.gz $i);
echo $shortname >> ${trimm_summary}_R;
......@@ -83,22 +93,22 @@ do
-quiet \
$i \
${i/_R1_/_R2_} \
${path}data/trimmed/R_seq/${shortname}_R1.fq.gz \
${path}test_trimm/U1.fq.gz \
${path}data/trimmed/R_seq/${shortname}_R2.fq.gz \
test_trimm/U2.fq.gz \
${path}steps/$step_name/R_seq/${shortname}_R1.fq.gz \
${path}steps/$step_name/uniq/U1.fq.gz \
${path}steps/$step_name/R_seq/${shortname}_R2.fq.gz \
${path}steps/$step_name/uniq/U2.fq.gz \
CROP:145 \
HEADCROP:11 \
SLIDINGWINDOW:2:20 \
MINLEN:50
cat /tmp/tmp.trimm_summary >> ${trimm_summary}_R;
rm -rf ${path}test_trimm/*;
rm -rf ${path}steps/$step_name/uniq/*;
echo -e '\n####' >> ${trimm_summary}_R;
done
for i in /home/enrique/work/Gandon/coevolution/phages/data/fastq_ln/Other_seq/*_R1_*.fastq.gz
for i in ${path}data/fastq_ln/Other_seq/*_R1_*.fastq.gz
do
shortname=$(basename -s _L001_R1_001.fastq.gz $i);
echo $shortname >> ${trimm_summary}_Other;
......@@ -111,17 +121,17 @@ do
-quiet \
$i \
${i/_R1_/_R2_} \
${path}data/trimmed/Other_seq/${shortname}_R1.fq.gz \
${path}test_trimm/U1.fq.gz \
${path}data/trimmed/Other_seq/${shortname}_R2.fq.gz \
test_trimm/U2.fq.gz \
${path}steps/$step_name/Other_seq/${shortname}_R1.fq.gz \
${path}steps/$step_name/uniq/U1.fq.gz \
${path}steps/$step_name/Other_seq/${shortname}_R2.fq.gz \
${path}steps/$step_name/uniq/U2.fq.gz \
CROP:145 \
HEADCROP:11 \
SLIDINGWINDOW:2:20 \
MINLEN:50
cat /tmp/tmp.trimm_summary >> ${trimm_summary}_Other;
rm -rf ${path}test_trimm/*;
rm -rf ${path}steps/$step_name/uniq/*;
echo -e '\n####' >> ${trimm_summary}_Other;
done
rm -rf ${path}steps/$step_name/uniq/
......@@ -47,7 +47,12 @@ done
## environment located in:
## ~/envs/coev/
###################################
## QUALITY CHECK
./scripts/01_quality_check.sh $PWD/ qc_raw_data
###################################
## Trimm and clean
./scripts/02_trimm_and_clean.sh $PWD/ trimming
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment