This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert multiple .fa file to .fastq in Shell

Hello everyone,

I know how to convert 1 .fa to .fastq but not many as a time in Shell

perl fasta_to_fastq.pl reads.fasta > my_converted_fasta.fq

please help me with this! Thank you very much!

assembly

use faToFastq utility and loop through your fasta files

2 answers

Using BBMap:

cat *.fasta | reformat.sh in=stdin.fa out=x.fq

There are few situations where this would be useful.

Assuming that script is valid you can probably just do a loop over the input files, e.g.:

for f in *.fasta ; do perl fasta_to_fastq.pl $f > $f.conv.fq ; done

Log in to answer this question.