I am trying to process fastq files in order to build gene co-expression networks (by following this tutorial). When I download any fastq file from ENA, and try to process it with the command: ls *.fastq.gz | xargs -n1 fastqc $1, I get:

Failed to process SRR494099.fastq.gz
    at java.base/java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:269)
    at java.base/java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:259)
    at java.base/java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
    at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:80)
    at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:92)
    at uk.ac.babraham.FastQC.Utilities.MultiMemberGZIPInputStream.<init>(MultiMemberGZIPInputStream.java:37)
    at uk.ac.babraham.FastQC.Sequence.FastQFile.<init>(FastQFile.java:80)
    at uk.ac.babraham.FastQC.Sequence.SequenceFactory.getSequenceFile(SequenceFactory.java:106)
    at uk.ac.babraham.FastQC.Sequence.SequenceFactory.getSequenceFile(SequenceFactory.java:62)
    at uk.ac.babraham.FastQC.Analysis.OfflineRunner.processFile(OfflineRunner.java:159)
    at uk.ac.babraham.FastQC.Analysis.OfflineRunner.<init>(OfflineRunner.java:121)
    at uk.ac.babraham.FastQC.FastQCApplication.main(FastQCApplication.java:316)

Similarly, when I just download the fastq files and try to decompress them using gunzip, I get, for example: gzip: SRR494099.fastq.gz: unexpected end of file Why is this happening?

  • $\begingroup$ Likely that your fastq file is not successfully download based on unexpected end of file. Try zcat SRR494099.fastq.gz | tail $\endgroup$
    – Phoenix Mu
    May 17 '20 at 16:11
  • $\begingroup$ @PhoenixMu I get gzip: SRR494099.fastq.gz: unexpected end of file when I do this $\endgroup$ May 17 '20 at 16:13
  • $\begingroup$ fastqc by the way does read gzipped files, no need for decompression. $\endgroup$
    – ATpoint
    May 17 '20 at 16:32
  • $\begingroup$ @ATpoint yeah I was just trying to see if the problem was with fastqc or with the file itself. But none of the files that I download from ENA are working $\endgroup$ May 17 '20 at 18:13
  • 1
    $\begingroup$ do they provide file hashes such as e.g. checksums that you can use to ensure that nothing weird happened to the files? $\endgroup$ May 17 '20 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.