How to open up a zip file?
2
0
Entering edit mode
ksci ▴ 20
@72e6b5a3
Last seen 2.7 years ago
United States

unzip("fasta.gz") Warning message: In unzip("fasta.gz") : error 1 in extracting from zip file

I am trying to unzip a zip file but it is not working what am I doing wrong? ```

zip gzip • 1.9k views
ADD COMMENT
1
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 7 weeks ago
Republic of Ireland

This forum is for addressing technical issues pertaining to Bioconductor packages. Your question would be more suited to a general forum.

Irrespective, I think that you need R.utils::gunzip(), not utils::unzip().

Package functions like data.table's data.table::fread() --and even, these days, read.table()-- can automatically detect if a file is compressed and uncompress this for you while inporting the file contents into your R session.

If you still have issues, please paste here the output of sessionInfo()

The other methodological question pertains to why you want to read an assumed FASTA file into your R session.

Kevin

ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 6 hours ago
EMBL Heidelberg

This isn't a Bioconductor question, so it would be more appropriate to ask this on a general R help platform.

To answer the question, a .zip file is not the same as a .gz file. That latter is often called a "gzip" file. You can try the gunzip() function in R to read or decompress the file.

ADD COMMENT
0
Entering edit mode

Thank you everyone

ADD REPLY

Login before adding your answer.

Traffic: 445 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