#!/bin/bash

READDIR="/home/reads/" # Directory all reads are stored in
GENOME="/home/ref_chr_17" # reference genome 
THREADS="8" # no. of threads available


for file in $READDIR*.1.fastq; do prefix=${file%%.1.fastq}; prefix=${prefix##$READDIR};../smalt-0.5.8/smalt_x86_64 map -f sam -n $THREADS -o $prefix.sam $GENOME $READDIR$prefix\.1.fastq $READDIR$prefix\.2.fastq; done

