#PBS -q bl2x220g7q
#PBS -l select=1:ncpus=5:mem=10g
#PBS -l walltime=01:00:00
#PBS -l cput=01:00:00

source ~/programms/ame/bin/activate
WORK_DIR=~/loxP_project/2021-11-22_rings/
RAW_DATA=/mnt/scratch/ws/psbelokopytova/202112281307data_Polya/4c_plasmid/2021-11-22/P4C25/
cd $WORK_DIR;
#mkdir cutadapt;
# Declare a string array with type
declare -a files=("rings1")

for file in "${files[@]}"
do
cutadapt -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT -o $WORK_DIR/cutadapt/cutIL_${file}_R1.fq.gz -p $WORK_DIR/cutadapt/cutIL_${file}_R2.fq.gz $RAW_DATA/211102_M067_V350034057_L04_P4C25_1.fq.gz $RAW_DATA/211102_M067_V350034057_L04_P4C25_2.fq.gz -m 8;
wait;
cutadapt -g ada1=AAACGAGTTTTAATGACTCCAACTTAAGTGTATGTAAACTTCCGACTTCAACTGTA -y '{name}' -g ada2=ATGTCAGGAATTGTGAAAAAGTGAGTTTAAATGTATTTGGCTAAGGTGTATGTAAACTTCCGACTTCAACTGTA -y '{name}' -G ada1=AAACGAGTTTTAATGACTCCAACTTAAGTGTATGTAAACTTCCGACTTCAACTGTA -y '{name}' -G ada2=ATGTCAGGAATTGTGAAAAAGTGAGTTTAAATGTATTTGGCTAAGGTGTATGTAAACTTCCGACTTCAACTGTA -y '{name}' -o $WORK_DIR/cutadapt/cut_barc_praimers_cutIL_${file}_R1.fq.gz -p $WORK_DIR/cutadapt/cut_barc_praimers_cutIL_${file}_R2.fq.gz $WORK_DIR/cutadapt/cutIL_${file}_R1.fq.gz $WORK_DIR/cutadapt/cutIL_${file}_R2.fq.gz --overlap 20;
done
