diff --git a/runBWA.sh b/runBWA.sh new file mode 100755 index 0000000..4d796b2 --- /dev/null +++ b/runBWA.sh @@ -0,0 +1,14 @@ +#!/bin/bash +module load bwa +module load samtools +GENOMEDIR="/work/GIF/arnstrm/GENOMEDB" +#GNAME="Btau_4.6.1_chromosomes.fa" +GNAME="$1" +REF="$GENOMEDIR/$GNAME" +THREADS="16" +READ1="$2" +READ2="$3" +SAM=$(basename ${READ1%.*} | cut -f 1-2 -d "_") +bwa mem -M -t ${THREADS} ${REF} ${READ1} ${READ2} > ${SAM}.sam +samtools view --threads 16 -b -o ${SAM}.bam ${SAM}.sam +samtools sort -m 8G -o ${SAM}_sorted.bam -T ${SAM}_temp --threads 16 ${SAM}.bam diff --git a/runHISAT2.sh b/runHISAT2.sh index 4ac8b5d..1001c50 100755 --- a/runHISAT2.sh +++ b/runHISAT2.sh @@ -15,7 +15,7 @@ hisat2 \ -p ${p} \ -x ${DBDIR}/${GENOME} \ -1 ${R1_FQ} \ - -2 ${R2_FQ} | \ + -2 ${R2_FQ} \ -S ${OUTPUT}.sam &> ${OUTPUT}.log samtools view --threads 16 -b -o ${OUTPUT}.bam ${OUTPUT}.sam samtools sort -m 7G -o ${OUTPUT}_sorted.bam -T ${OUTPUT}_temp --threads 16 ${OUTPUT}.bam