#!/bin/bash
#SBATCH -t 2:00:00
#SBATCH --nodes=1 --ntasks-per-node=1
#SBATCH --export=NONE
./HTseq-count-sal.sh

#module load bowtie2/2.2.9-foss-2016b
module load HTSeq/0.8.0-foss-2016b-Python-2.7.12

#bowtie2 -x /home/ericalmeida/genomes/cmatcanu -1 ../CM_1_R1.fastq -2 ../CM_1_R2.fastq -S cm_monoDM-1.sam -p 2
#bowtie2 -x /home/ericalmeida/genomes/cmatcanu -1 ../CM_2_R1.fastq -2 ../CM_2_R2.fastq -S cm_monoDM-2.sam -p 2
#bowtie2 -x /home/ericalmeida/genomes/cmatcanu -1 ../CM_3_R1.fastq -2 ../CM_3_R2.fastq -S cm_monoDM-3.sam -p 2

htseq-count -s reverse -t CDS -a 1 -m intersection-nonempty -i ID cm_monoDM-1.sam /home/ericalmeida/genomes/cmatr.gff > cm_monoDM1.count.txt
htseq-count -s reverse -t CDS -a 1 -m intersection-nonempty -i ID cm_monoDM-2.sam /home/ericalmeida/genomes/cmatr.gff > cm_monoDM2.count.txt
htseq-count -s reverse -t CDS -a 1 -m intersection-nonempty -i ID cm_monoDM-3.sam /home/ericalmeida/genomes/cmatr.gff > cm_monoDM3.count.txt

#bowtie2 -x /home/ericalmeida/genomes/cmatcanu -1 ../SS2_1_R1.fastq.gz -2 ../SS2_1_R2.fastq.gz -S cm_salDM-1.sam -p 2
#bowtie2 -x /home/ericalmeida/genomes/cmatcanu -1 ../SS2_2_R1.fastq.gz -2 ../SS2_2_R2.fastq.gz -S cm_salDM-2.sam -p 2
#bowtie2 -x /home/ericalmeida/genomes/cmatcanu -1 ../SS2_3_R1.fastq.gz -2 ../SS2_3_R2.fastq.gz -S cm_salDM-3.sam -p 2

htseq-count -s reverse -t CDS -a 1 -m intersection-nonempty -i ID cm_salDM-1.sam /home/ericalmeida/genomes/cmatr.gff > cm_salDM1.count.txt
htseq-count -s reverse -t CDS -a 1 -m intersection-nonempty -i ID cm_salDM-2.sam /home/ericalmeida/genomes/cmatr.gff > cm_salDM2.count.txt
htseq-count -s reverse -t CDS -a 1 -m intersection-nonempty -i ID cm_salDM-3.sam /home/ericalmeida/genomes/cmatr.gff > cm_salDM3.count.txt
