I see your intent here and it make sense --passing in a bamfile and sucking the read out to re-align them.
I see some issues to discuss though:
README and usage statement would need to be updated to discuss the new usage.
The SEQ is not required to be stored per the SAM spec. So it's possible that the user's input BAM file would in fact not have the sequences to extract. There should probably be some error handling for that.
Related to point two above: This is perhaps a samtools question, but how does samtools view deal with supplementary alignments, will it only output one read? If not, seems like some error handling for that would also be in order.
Allow bowtie2 .bam file as --readfile option without realignment. Usage: ShortStack.pl --readfile myBowtie2file.bam --genomefile hg38.fa --inbam