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

source activate nn_Polina_tf2;
WORK_DIR=/mnt/scratch/ws/psbelokopytova/202312241147Polina/loxP_project/2023-05-18
cd $WORK_DIR;
[ -d stat ] || mkdir stat

declare -a files=("sum_rear1" "sum_rear2" "sum_rear3" "sum_wt1" "sum_wt2")


for file in "${files[@]}"
do
echo ${file}
##find rearrs
samtools index $WORK_DIR/align/${file}/${file}_aboveMapq30_nodup2.sorted.bam > $WORK_DIR/align/${file}/${file}_aboveMapq30_nodup2.sorted.bam.bai
python /mnt/scratch/ws/psbelokopytova/202312241147Polina/loxP_project/find_rearr_places.py ${WORK_DIR} ${file} $WORK_DIR/stat/${file}_ins_sites.txt $WORK_DIR/align/${file}/${file}_aboveMapq30_nodup2.sorted.bam
done
