#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/storage/home/psbelokopytova/scratch/202312241147Polina/4c_plasmid/2023-03-14/remake_21.11.23
module load jre/1.8.0
cd $WORK_DIR;
# Declare a string array with type
declare -a files=("CS_100_ng_lig" "new_CS" "new_CS_100_ng_lig")

for file in "${files[@]}"
do
python ~/scratch/202312241147Polina/4c_plasmid/drop_duplicates.py $WORK_DIR/align/${file}/${file}_raw.sorted.bam $WORK_DIR/align/${file}/${file}_nodup_reads.txt
java -jar ~/programms/picard.jar FilterSamReads I=$WORK_DIR/align/${file}/${file}_raw.sorted.bam O=$WORK_DIR/align/${file}/${file}_nodup.sorted.bam READ_LIST_FILE=$WORK_DIR/align/${file}/${file}_nodup_reads.txt FILTER=includeReadList
done
  