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

source activate nn_Polina_tf2;
WORK_DIR=/mnt/scratch/ws/psbelokopytova/202208081122polya_data/4c_plasmid/2022-06-20/
cd $WORK_DIR;
# Declare a string array with type
declare -a files=("D1203_E1")

for file in "${files[@]}"
do
echo  ${file}
#положить по файлам риды с разными адаптерами
python /mnt/scratch/ws/psbelokopytova/202208081122polya_data/4c_plasmid/extract_by_read_ids.py $WORK_DIR/cutadapt/cut_barc_praimers_cutIL_${file}_1.fq.gz $WORK_DIR/cutadapt/cut_barc_praimers_cutIL_${file}_2.fq.gz $WORK_DIR/cutadapt/${file}_pr_plasmid1.fq $WORK_DIR/cutadapt/${file}_pr_plasmid2.fq;
wait;
source ~/programms/ame/bin/activate
#обрезать риды, пришедшие со стороны NlaIII по TaiI
cutadapt -a TaiI=ACGT -y '{name}' -o $WORK_DIR/cutadapt/${file}_pr_plasmid1_cutTaiI.fq $WORK_DIR/cutadapt/${file}_pr_plasmid1.fq --overlap 4 -e 0;
done

