error when using ViSEAGO package
0
0
Entering edit mode
3.7 years ago
peter.berry5 ▴ 60

I get the following error when I run the ViSEAGO package

Error in .local(.Object, ...) : allGenes must be a factor with 2 levels

I have a list of differentially expressed genes (from a DE proteomics experiment) and wanted to use the ViSEAGO package to visualise the GO profile. If I understand correctly I need to supply my DE genes as a vector and a list of background genes as a separate vector. Where I am struggling is, what needs to be in these files? Obviously, gene ids need to be present and that's all I supplied. My code is as follows:

str(Downreg_gene_id_v4)

data.frame': 286 obs. of 1 variable:

$ Entrez_Gene_ID: int 2288 5898 7384 3028 11345 5704 7414 1659 84844 10291 ...

#set up gene list to be analysed and background list
write.table(Downreg_gene_id_v4, sep="\t", file="selection.txt")
selection <- read.table("selection.txt")
background=keys(org.Hs.eg.db, keytype ='ENTREZID')
write.table(background, sep="\t", file="background.txt")
background <- read.table("background.txt")
names(background)[1] <- "Entrez_Gene_ID"

from the package vingette

# connect to Entrezgene to get GO annotations
EntrezGene<-ViSEAGO::EntrezGene2GO()

# load GO annotations from EntrezGene
#id = "9606" = homo sapiens
myGENE2GO<-ViSEAGO::annotate(id="9606", EntrezGene)

# create topGOdata for BP
BP<-ViSEAGO::create_topGOdata(
geneSel=selection,
allGenes=background,
gene2GO=myGENE2GO, 
ont="BP",
nodeSize=5
)

It's at this point I get the error message

Error in .local(.Object, ...) : allGenes must be a factor with 2 levels

Any advice is gratefully recieved.

geneontology ViSEAGO • 948 views
ADD COMMENT

Login before adding your answer.

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