#!/bin/bash

READDIR="/home/reads/" # Directory all reads are stored in
GENOME="/home/ref_chr_17.stidx" # reference genome index file
GENOME2="home/ref_chr_17.sthash" # Reference genome hash file

for file in $READDIR*.1.fastq; do prefix=${file%%.1.fastq}; prefix=${prefix##$READDIR}; stampy.py -g $GENOME -h $GENOME2 -M $READDIR$prefix.1.fastq > ${prefix}.sam;done

