Comments (1)
getGEO cannot use local GPL file directly when GPL is true so far due to a bug in function parseGSEMatrix. In this function, the parameter "destdir=tempdir()" should be "destdir=destdir", which should also be added into other related function parseGEO.
I suggest another parameter should be add. Two files will be reivsed (getGEO.R and parseGEO.R ) with a new parameter GPLfn.
It will look like
getGEO(filename="../GSE31747_series_matrix.txt.gz", GPLfn="../GPL8300.soft")
##################################################################
$git diff getGEO.R
diff --git a/R/getGEO.R b/R/getGEO.R
index 06bde57..912b23c 100644
--- a/R/getGEO.R
+++ b/R/getGEO.R
@@ -3,7 +3,8 @@ getGEO <- function(GEO=NULL,
destdir=tempdir(),
GSElimits=NULL,GSEMatrix=TRUE,
AnnotGPL=FALSE,
-
getGPL=TRUE) {
-
getGPL=TRUE,
-
con <- NULL
GPLfn=NULL) {
if(!is.null(GSElimits)) {
if(length(GSElimits)!=2) {
@@ -21,6 +22,6 @@ getGEO <- function(GEO=NULL,
}
filename <- getGEOfile(GEO,destdir=destdir,AnnotGPL=AnnotGPL)
} - ret <- parseGEO(filename,GSElimits)
- ret <- parseGEO(filename,GSElimits, GPLfn)
return(ret)
}
##################################################################
$git diff parseGEO.R
diff --git a/R/parseGEO.R b/R/parseGEO.R
index 813c996..c6b499f 100644
--- a/R/parseGEO.R
+++ b/R/parseGEO.R
@@ -1,4 +1,4 @@
-parseGEO <- function(fname,GSElimits) {
+parseGEO <- function(fname,GSElimits,GPLfn=NULL) {
con <- fileOpen(fname)
first.entity <- findFirstEntity(con)
close(con)
@@ -14,7 +14,7 @@ parseGEO <- function(fname,GSElimits) {
parseGPL(fname)
},
"0" = {
-
parseGSEMatrix(fname)$eset
-
parseGSEMatrix(fname, GPLfn=GPLfn)$eset }, )
return(ret)
@@ -368,7 +368,7 @@ getAndParseGSEMatrices <- function(GEO,destdir,AnnotGPL,getGPL=TRUE) {Function to parse a single GSEMatrix
file into an ExpressionSet
-parseGSEMatrix <- function(fname,AnnotGPL=FALSE,destdir=tempdir(),getGPL=TRUE) {
+parseGSEMatrix <- function(fname,AnnotGPL=FALSE,destdir=tempdir(),getGPL=TRUE, GPLfn=NULL) {
dat <- readLines(fname)get the number of !Series and !Sample lines
nseries <- sum(grepl("^!Series_", dat))
@@ -406,7 +406,12 @@ parseGSEMatrix <- function(fname,AnnotGPL=FALSE,destdir=tempdir(),getGPL=TRUE) {if getGPL is FALSE, skip this and featureData is then a data.frame with no columns
fd = new("AnnotatedDataFrame",data=data.frame(row.names=rownames(datamat)))
if(getGPL) { -
gpl <- getGEO(GPL,AnnotGPL=AnnotGPL,destdir=destdir)
-
if (!is.null(GPLfn)) {
-
gpl <- getGEO(filename=GPLfn, AnnotGPL=FALSE,destdir=destdir)
-
} else {
-
gpl <- getGEO(GEO=GPL,AnnotGPL=AnnotGPL,destdir=destdir)
-
}
-
vmd <- Columns(gpl) dat <- Table(gpl) ## GEO uses "TAG" instead of "ID" for SAGE GSE/GPL entries, but it is apparently
##################################################################
from geoquery.
Related Issues (20)
- getGEO broken on Windows (?) HOT 4
- 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
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.