Skip to content
Snippets Groups Projects
Commit ce463509 authored by Mike Smith's avatar Mike Smith
Browse files

updated bwa example to run longer

parent 2e7f9b26
No related branches found
No related tags found
No related merge requests found
#!/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
#!/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/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment