TinclG / PAS_analysis

Placenta Accreta Spectrum (PAS) disorders fall within the group of Placental Implantation Abnormalities. In this project we analysed differences in gene expression in the microenvironments of PAS and normal pregnancies.
1 stars 1 forks source link

For loop for GOdata #11

Closed TinclG closed 2 years ago

TinclG commented 2 years ago

I tried to get the GO term from BP, MF, CC with a loop.

Onto<- c("BP", "MF", "CC") All_genes<-lapply(Onto, annFUN.org, mapping="org.Hs.eg.db")

creating a list of all genes for each ontology

for loop--> not working

GO_list<-list() for (i in 1:length(Onto)){

GO_res <- new("topGOdata", ontology= i, # you can change this to #NF #CP allGenes=GeneList, annot=annFUN.GO2genes, GO2genes=All_genes[[i]], geneSel=selection, nodeSize=10) GO_list[[i]]<-GO_res }

Error in (function (cl, name, valueClass) : assignment of an object of class “integer” is not valid for @‘ontology’ in an object of class “topGOdata”; is(value, "character") is not TRUE