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?
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?
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).
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
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
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
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
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, onceR
has started, you type:I acquired it from NCBI: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE132355
And which file is it from the NCBI page?
"GSE132355_E10-P45_umap_data.rds.gz"
Same error. Already tried this.
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
?