Comments (5)
EDIT: now compatible with getGEOSuppFiles (fixing same error)
I think the issue is with getDirListing
. When processing HTML content, there can be links other than the series_matrix.txt.gz that seem to be related to determining the file size. In ronammar's case, the implicated link is '/geo/series/GSE94nnn/GSE94802/'. As a result, a download of https://ftp.ncbi.nlm.nih.gov/geo/series/GSE94nnn/GSE94802/matrix//geo/series/GSE94nnn/GSE94802/ is attempted and fails because it doesn't exist. To fix, just make sure the only links returned don't end with a forward slash (this approach also fixes the same download errors for getGEOSuppFiles
). The following fixed it for me (added line ending with # !!!):
getDirListing <- function(url) {
message(url)
# Takes a URL and returns a character vector of filenames
a <- RCurl::getURL(url)
if( grepl("<HTML", a, ignore.case=T) ){ # process HTML content
doc <- XML::htmlParse(a)
links <- XML::xpathSApply(doc, "//a/@href")
links <- links[!grepl('/$', links)] # !!!
XML::free(doc)
b <- as.matrix(links)
message('OK')
} else { # standard processing of txt content
tmpcon <- textConnection(a, "r")
b <- read.table(tmpcon)
close(tmpcon)
}
b <- as.character(b[,ncol(b)])
return(b)
}
from geoquery.
from geoquery.
Thanks @seandavi. I'm not well versed enough in tryCatch()
in R
but am finding it challenging because even when a call to getGEO
is successful, I still get warnings that not all columns named in 'colClasses' exist
. So essentially, I can never get getGEO
to run completely error or warning free. Also, the warnings are not consistent in their result: not all columns named in 'colClasses' exist
results in a usable object (which has been an issue for a while https://support.bioconductor.org/p/82800/), whereas the warning status was '404 Not Found'
results in nothing. Perhaps a 404 should be an error and the colClasses warning needs to be removed somehow?
from geoquery.
@alexvpickering
I also had this issue.
It seems that while accessing the matrix
directory, you can get a different server (due to load balancing) and some of them have a Parent Directory
link which getDirListing
also tries to download.
e.g:
from geoquery.
@seandavi can you integrate @alexvpickering 's fix please?
Thank you both very much!
from geoquery.
Related Issues (20)
- File '/var/folders/_0/7mxf7f790995tf1k4gb52sj00000gn/T//Rtmp9RHdGd/GSE181063_series_matrix.txt.gz' does not exist or is non-readable. getwd() HOT 1
- GEOquery HOT 1
- GEOquery returning NAs as probe names HOT 1
- getGEO: Error in downloadFile(myurl, destfile, mode) : HOT 1
- BiocCheck ERROR: Maintainer must register at the support site
- BiocCheck ERROR: No 'VignetteEngine' specified in vignette or DESCRIPTION
- BiocCheck: adopt Authors@R
- Move to `fs::path` rather than `file.path`
- getGEO HOT 5
- Error when using `getGEO` HOT 1
- Error while using getGEOSuppFiles on macbook Air HOT 1
- help with getGEO
- Function getGEO HOT 1
- issue in designing a dataset matrix HOT 1
- GSE51373 Analysis
- I ran into a bug when I downloaded the dataset GSE225759
- GEOquery not respecting timeout option HOT 1
- Bug Report: Encoding Parameter Issue and Error Handling in getGEO Function of GEOquery Package
- getGEO: Error in open.connection(x, "rb") : HTTP error 403. HOT 1
- GSElimits not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoquery.