You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In applying gset_import_table I received the error that object 'set' is not found.
I had a closer look at the function definition here and I think there is a typo here:
#' Import gene set for a text table
#
#' @param fn file name to read from
#' @param desc tetual description of the gset, if null the desc will be the file name
#' @export
gset_import_table = function(fn, desc=NULL)
{
sets = read.table(fn, h=T, sep="\t")
if(is.null(desc)) {
desc = fn
}
if("gene" %in% colnames(sets) & "set" %in% colnames(sets)) {
gs = sets$set
names(gs) = set$gene #### <<<< Here set$gene should be sets$gene
return(tgGeneSets(gs, desc))
} else {
stop("cannot initialize gset from ", fn, " file must be a tab delim table with a header including the fields gene and set\n")
}
}
As indicated in the code above I think in line names(gs) = set$gene, set$gene should be sets$gene.
I added this slightly amended function definition to my code and the problem was resolved. Is this the correct fix for the problem?
The text was updated successfully, but these errors were encountered:
Hi,
In applying gset_import_table I received the error that object 'set' is not found.
I had a closer look at the function definition here and I think there is a typo here:
As indicated in the code above I think in line
names(gs) = set$gene
,set$gene
should besets$gene
.I added this slightly amended function definition to my code and the problem was resolved. Is this the correct fix for the problem?
The text was updated successfully, but these errors were encountered: