#!/bin/bash
#SBATCH -t 12:00:00
#SBATCH --nodes 2 --ntasks-per-node=20
#SBATCH --mem=250G
#SBATCH --export=NONE
#SBATCH --mail-user=kramsey@uri.edu
#SBATCH --mail-type=BEGIN,END,FAIL

module load HTSeq/0.11.2-foss-2019b-Python-3.7.4

cd /data/kramseylab/sam/2106_RNA-Seq_sam/

for f in *.sam;
do
    PREFIX1="${f%.sam}"

    htseq-count -s reverse -a 1 -t gene -m intersection-nonempty -i locus_tag $f /data/kramseylab/genomefiles/NC_007880_annot_SASIG.gff > /data/kramseylab/counts/2106_RNA-Seq_counts/$PREFIX1\_counts.txt

done


