
# step-6
# convert sam to bam 

for i in {56..65}
do

        sam_filt_name="SRR123315${i}_filt.sam"
        bam_name="SRR123315${i}.bam"
	bam_sort_name="SRR123315${i}_sort.bam"
        echo "makeing bam file from $sam_filt_name ... "
        samtools view -S -b $sam_filt_name > $bam_name
	echo "sorting bam file from $bam_name ..."
	samtools sort $bam_name -o $bam_sort_name
	echo "make bam index file from $bam_sort_name ..."
	samtools index $bam_sort_name
done
