This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Does The Fastx_Toolkit Work On Gzip Compressed Files?

Does fastx_toolkit accept *fastq.gz file as input file? Or does it have to be fastq/a file?

I get the following error message when i try

fastx_clipper -Q33 -z -a GATC -i my.fastq.gz -o my_adapRem.fastq

fastx_clipper: input file (my.fastq.gz) has unknown file format (not FASTA or FASTQ), first character = (31)

is this because of zipped input data or am i missing something else?

fastx fastq

2 answers

jake9115 may have answered your question literally (no fastx-toolkit doesn't read .gz), but you should know that they DO take STDIN. Thus, since you're on a command line (or in a script), make a pipe:

gunzip -c my.fastq.gz | fastx_clipper -Q33 -z -a GATC -o my_adapRem.fastq

Thanks, this is great.

FASTX-Toolkit only can output files in compressed format, not use them as input. According to the documentation:

Some tools can compress the output with GZIP (-z).

Only in one reported case can the input be gzipped:

fasta_clipping_histogram.pl help page includes this: INPUT_FILE.FA = input file (in FASTA format, can be GZIPped)

Hope that helps!

Thank you, this is very clear

Log in to answer this question.