#!/bin/bash
#SBATCH -t 18: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 bowtie2/2.2.4
module load SAMtools/1.3.1-foss-2016b


cd /data/kramseylab/compressed_fastq/2106_RNA-Seq/

for f in *_R1.fastq.gz;
do
        PREFIX1="${f%_R1.fastq.gz}"
        bowtie2 -N 1 -L 20 -i S,1,0.50 -D 20 --non-deterministic --no-mixed --no-discordant --no-unal -x /data/kramseylab/genomefiles/LVSgenome -1 $PREFIX1\_R1.fastq.gz -2 $PREFIX1\_R2.fastq.gz -S /data/kramseylab/sam/2106_RNA-Seq_sam/$PREFIX1.sam

done

