#!/usr/bin/env bash

#read in variables
source common_variables.sh

#set lengths and offsets. These are the final ones which you will use for any DE analysis.
#Use the plots generated by the periodicity and offset scripts to decide what values to set these at

lengths='30,31,32,33,34,35,36,37,38'
offsets='12,12,13,13,13,13,14,14,14'

#run counting script to generate <.counts> files

for filename in $RPF_filenames
do
counting_script.py -bam $BAM_dir/${filename}_pc_deduplicated_sorted.bam -fasta $most_abundant_fasta -len $lengths -offset $offsets -out_file ${filename}_pc_final.counts -out_dir $counts_dir &
done
wait
