Using multiple pipe output

I have a script that finds all sffs and extracts them into .fastq file types. What I need to do is change the .fastq to .fasta using the below script. How can I change the input.fastq and output.fasta to mirror the file's name? Would I use an array and use the default iterator?

#!/bin/bash

find . -type f -name \*.sff | xargs python /usr/local/bin/sff_extract.py

find . -type f -name \*.fastq | xargs awk 'BEGIN{P=1}{if(P==1||P==2){gsub(/^[@]/,">");print}; if(P==4)P=0; P++}' input.fastq > output.fasta
#!/bin/bash
find . -type f -name \*.sff |
while read fname 
do
  python /usr/local/bin/sff_extract.py $fname
  iname=${fname/.sff/.fastq/}
  oname=${fname/.sff/.fasta/}
  awk 'BEGIN{P=1}
     {if(P==1||P==2){gsub(/^[@]/,">");print}; if(P==4)P=0; P++}' $iname > $oname

try that

It did not work. When I run sff extract I get something like file.MID38.fastq which is why I think it did not work, at first I was getting an error saying that it was not a directory. I removed the

iname=${fname/.sff/.fastq/}   oname=${fname/.sff/.fasta/}

and I did not get any error but it still did not change the fastq to a fasta.

Those are bash substitutions. There is a typo in what I gave you:

iname=${fname/.sff/.fastq/}   
oname=${fname/.sff/.fasta/}

Remove the trailing / (red)