This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BBmap caused Not in GZIP format

Hi, is there a way to support gz files in partition.sh?

   java -ea -Xmx1g -cp /miniconda2/envs/bbmap/opt/bbmap-38.73-0/current/ jgi.PartitionReads in=faspt-rm_adapters_correction_R1.fq.gz in2=faspt-rm_adapters_correction_R2.fq.gz out=split-fastq/faspt-rm_adapters_correction_R1.%.fq.gz out2=split-fastq/faspt-rm_adapters_correction_R2.%.fq.gz ways=1000
    Executing jgi.PartitionReads [in=faspt-rm_adapters_correction_R1.fq.gz, in2=faspt-rm_adapters_correction_R2.fq.gz, out=split-fastq/faspt-rm_adapters_correction_R1.%.fq.gz, out2=split-fastq/faspt-rm_adapters_correction_R2.%.fq.gz, ways=1000]

Set INTERLEAVED to false
Error when attempting to read faspt-rm_adapters_correction_R1.fq.gz
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: Not in GZIP format
        at fileIO.ReadWrite.getGZipInputStream(ReadWrite.java:1048)
        at fileIO.ReadWrite.getInputStream(ReadWrite.java:848)
        at fileIO.ByteFile1.open(ByteFile1.java:330)
        at fileIO.ByteFile1.<init>(ByteFile1.java:100)
        at fileIO.ByteFile.makeByteFile(ByteFile.java:38)
        at fileIO.ByteFile.makeByteFile(ByteFile.java:27)
        at stream.FastqReadInputStream.<init>(FastqReadInputStream.java:59)
        at stream.ConcurrentReadInputStream.getReadInputStream(ConcurrentReadInputStream.java:111)
        at stream.ConcurrentReadInputStream.getReadInputStream(ConcurrentReadInputStream.java:64)
        at jgi.PartitionReads.process(PartitionReads.java:241)
        at jgi.PartitionReads.main(PartitionReads.java:42)
Caused by: java.util.zip.ZipException: Not in GZIP format
        at java.base/java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:166)
        at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:80)
        at fileIO.ReadWrite.getGZipInputStream(ReadWrite.java:1042)
        ... 10 more

Thank you in advance.

bbmap sequencing

1 answer

bbmap supports gzipped files. Your file is apparently not gzipped. What is the output of file faspt-rm_adapters_correction_R1.fq.gz? Also try head faspt-rm_adapters_correction_R1.fq.gz? Maybe it carries the gz extension but is plain text. In that case output of head will be human readable text.

Yes, there was plain text and without gz it is working.`

Log in to answer this question.