View Single Post
Old 09-12-2019, 08:11 AM   #8
Registered Vendor
Location: Eugene, OR

Join Date: May 2013
Posts: 521

You should do the entire command as Genomax listed (with a change, I think, I'll mention below):

for i in *.bam; do in=${i}.bam out=${i}.fa; done

The first part (for i in *.bam) finds all the files ending in .bam in the directory, then passes them to the "do" command. So you should change the command to the below which removes the .bam from the in= name, since $i should already have the .bam at the end.

for i in *.bam; do in=$i out=${i}.fa; done

The output file will be named something like
Providing nextRAD genotyping and PacBio sequencing services.
SNPsaurus is offline   Reply With Quote