#!/bin/tcsh

set read1File=$1
set read2File=$2
set progPath=$3
set datafile=$progPath/data/SpA.dbs
set assembly=$progPath/data/SpA.dbs
$progPath/code/bwa index -a is $datafile 
$progPath/code/bwa aln $assembly $read1File > 1002_s_1-ref.fastq.sai
$progPath/code/bwa aln $assembly $read2File > 1002_s_2-ref.fastq.sai
$progPath/code/bwa sampe -a 500 $assembly 1002_s_1-ref.fastq.sai 1002_s_2-ref.fastq.sai $read1File $read2File > bwa-ref.sam  

rm -rf 1002_s_1-ref.fastq.sai 1002_s_2-ref.fastq.sai

