I am trying to do mapping with multiple sequences against a reference genome. I tried the following code: The outputfile is .fastq.sam. I need only .sam. How do I get it?
for i in test/*.fastq;
do
./minimap2 -ax map-ont reference.fna $i > $i.sam;
done