diff --git a/exercises/batch_job.sh b/exercises/batch_job.sh index 7d6ad3b643e0f88032efb63ca409eab2068c9ca5..ee756302053531441eb42100e3078973af3e13f9 100644 --- a/exercises/batch_job.sh +++ b/exercises/batch_job.sh @@ -1,3 +1,7 @@ #!/bin/bash #SBATCH --mem=150 -./hpc_example.py -t 60 -l 2000 + +srun ./hpc_example.py -t 40 -l 2000 + +srun --mem=3000 ./hpc_example.py -t 30 -l 80000000 + diff --git a/exercises/bwa/bwa_batch.sh b/exercises/bwa/bwa_batch.sh index 9540f7ad559afdf1ef769d02fff1764581ddaf54..72422049ae7c7faba1c4d69a912b44d954b006cc 100644 --- a/exercises/bwa/bwa_batch.sh +++ b/exercises/bwa/bwa_batch.sh @@ -1,19 +1,23 @@ #!/bin/bash -#SBATCH -t 00:15:00 +#SBATCH -t 00:06:00 #SBATCH --mem=150 #SBATCH --nodes=1 +## load required modules +module load SAMtools BWA + ## copy data to /scratch and change directory -cp reference.fa reads.fq $SCRATCHDIR && cd $SCRATCHDIR +cp /g/huber/users/msmith/embl_hpc/Ecoli_genome.fa.gz /g/huber/users/msmith/embl_hpc/reads_*.fq.gz $SCRATCHDIR +cd $SCRATCHDIR ## create an index -bwa index reference.fa +bwa index -p ecoli Ecoli_genome.fa.gz ## perform alignment -bwa aln -I reference.fa reads.fq > out.sai +bwa mem ecoli reads_1.fq.gz reads_2.fq.gz > aligned.sam -## create SAM file -bwa samse reference.fa out.sai reads.fq > out.sam +## create a compressed BAM file +samtools view -b aligned.sam > aligned.bam ## copy results back -cp out.sam $HOME/embl_hpc/exercises/bwa/ +cp aligned.bam $HOME/embl_hpc/exercises/bwa/