lh3 / seqtk

Toolkit for processing sequences in FASTA/Q formats
MIT License
1.37k stars 308 forks source link

Batch fastq_to_fasta: how to append output file name? #107

Closed Opinel99 closed 6 years ago

Opinel99 commented 6 years ago

This is all quite new to me so I apologize in advance:

I would like to have a script that will do a batch fastq_to_fasta conversion with seperate output files with appended names, e.g.: X.fastq > X.fasta Y.fastq > Y.fasta Z.fastq > Z.fasta

There must be an easy way to do this but I just can't figure out the output...

lh3 commented 6 years ago
ls *.fastq | sed s,q$,, | xargs -i echo seqtk seq -a {}q > {}a | sh

If you have GNU parallel installed:

ls *.fastq | sed s,q$,, | xargs -i echo seqtk seq -a {}q > {}a | parallel