gunzip error: File not in gzip format
3
0
Entering edit mode
2.4 years ago

So I'm currently trying to unzip an .rds.gz file with the command:

gunzip filename.rds.gz

But keep receiving the error,

gzip: filename.rds.gz: not in gzip format

Any suggestions?

gunzip linux gzip • 3.9k views
ADD COMMENT
0
Entering edit mode

Why do you believe that this file was gzipped to begin with? How did you acquire the file? Did you generate it yourself?

What happens when you start R and, once R has started, you type:

myfile <- readRDS("filename.rds.gz")
ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

And which file is it from the NCBI page?

ADD REPLY
0
Entering edit mode

"GSE132355_E10-P45_umap_data.rds.gz"

ADD REPLY
0
Entering edit mode

Same error. Already tried this.

ADD REPLY
0
Entering edit mode

Your file may not be in gzip format because it has simply been archived and not compressed. Please could you check the format of your file with file filename.rds.gz?

ADD REPLY
2
Entering edit mode
2.4 years ago
PKW ▴ 110

If you intend to read the file you could use R (or any other software) as suggested by Friederike. Otherwise, as the error suggests, the file is likely not compressed. You can check the format using

file filename.rds.gz

A quick google search lead me to this site which gives a good description (there are multiple others).

ADD COMMENT
0
Entering edit mode

I'm looking to decompress and read the file; yes, I have already looked at other resources.

ADD REPLY
1
Entering edit mode

Please answer to the question(s) people have raised here (especially the file command one). Doing so will increase the content and decrease the time it takes to resolve this.

ADD REPLY
1
Entering edit mode

OK, have you tried to read the file in R?

ADD REPLY
2
Entering edit mode
2.4 years ago
patrickdm ▴ 240

Try download it again.

Here I get:

$ file GSE132355_E10-P45_umap_data.csv.gz 

GSE132355_E10-P45_umap_data.csv.gz: gzip compressed data, was "GSE132355_E10-P45_umap_data.csv", last modified: Fri May 31 18:29:05 2019, from Unix, original size modulo 2^32 10020866

$ gunzip GSE132355_E10-P45_umap_data.csv.gz 

$ ls GSE132355_E10-P45_umap_data.csv

GSE132355_E10-P45_umap_data.csv

$ file GSE132355_E10-P45_umap_data.csv  GSE132355_E10-P45_umap_data.csv: CSV text

$ head GSE132355_E10-P45_umap_data.csv  ,X,Y,Z,Age,Cluster E10_AAACCTGAGAGAACAG,2.339453139,-1.460134786,-3.280235386,E10,Neuroepithelium E10_AAACCTGAGGGTTCCC,0.377776651,5.207414433,-13.76702484,E10,Endothelial cells E10_AAACCTGAGTGCTGCC,4.908790257,-2.062134981,-4.072996184,E10,Neuroepithelium E10_AAACCTGCAGCCACCA,2.984554671,-1.315386607,-4.15868427,E10,Neuroepithelium E10_AAACCTGCATTCCTGC,4.401765532,-1.712143088,-4.252494383,E10,Neuroepithelium E10_AAACCTGGTAGCGTAG,3.11400317,-1.501352402,-3.459717893,E10,Neuroepithelium E10_AAACCTGGTCAATGTC,3.4002515,-2.33864262,-4.068272767,E10,Meningeal cells E10_AAACCTGGTCTCCATC,3.289397802,-1.406725979,-3.971118807,E10,Neuroepithelium E10_AAACCTGGTCTGCAAT,3.285394114,-2.492063981,-4.035709575,E10,Meningeal cells
ADD COMMENT
0
Entering edit mode

OP seems to have the .rds.gz file ?

ADD REPLY
0
Entering edit mode

whoops.... :s

$ file GSE132355_E10-P45_umap_data.rds.gz  
GSE132355_E10-P45_umap_data.rds.gz: gzip compressed data, was "GSE132355_E10-P45_umap_data.rds", last modified: Fri May 31 18:29:06 2019, from Unix, original size modulo 2^32 2797009

$ gunzip GSE132355_E10-P45_umap_data.rds.gz  

$ ls GSE132355_E10-P45_umap_data.rds 
GSE132355_E10-P45_umap_data.rds

$ file GSE132355_E10-P45_umap_data.rds 
GSE132355_E10-P45_umap_data.rds: gzip compressed data, from HPFS filesystem (OS/2, NT), original size modulo 2^32 4502300
ADD REPLY
2
Entering edit mode
2.4 years ago
Gordon Smyth ★ 7.7k

I had no trouble unzipping the file (gzip -d and 7-Zip Windows app both worked) and the unzipped file is valid RDS format:

> x <- readRDS("GSE132355_E10-P45_umap_data.rds")
> head(x)
          X         Y          Z Age
1 2.3394531 -1.460135  -3.280235 E10
2 0.3777767  5.207414 -13.767025 E10
3 4.9087903 -2.062135  -4.072996 E10
4 2.9845547 -1.315387  -4.158684 E10
5 4.4017655 -1.712143  -4.252494 E10
6 3.1140032 -1.501352  -3.459718 E10
ADD COMMENT
0
Entering edit mode

Agree, works for me as well, so your download might be corrupted.

ADD REPLY

Login before adding your answer.

Traffic: 2534 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6