![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
loading custom annotation on topgo | tinguzman | Bioinformatics | 2 | 04-29-2015 04:45 AM |
K-means clustering and heatmap | crazyhottommy | Bioinformatics | 3 | 02-04-2014 10:12 PM |
first read in a pair means F3 or R3? | yhong | General | 1 | 08-24-2011 10:10 AM |
what does it means | Moodi | Genomic Resequencing | 2 | 01-24-2011 05:55 PM |
What does NS:i:1 means in the .sam format files? | Gangcai | Bioinformatics | 2 | 04-20-2010 11:51 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: Philippines Join Date: Aug 2014
Posts: 13
|
![]()
Hi,
I'm trying to do GO enrichment analysis using topgo, but i've encountered a problem, read below. what does factor w/ level 1 mean? it says that i should have 2 level factors. how can I fix this? > myInterestingGenes <- as.vector(AvsB$genes) > geneList <- factor(as.integer(geneNames %in% myInterestingGenes)) > names(geneList) <- geneNames > names function (x) .Primitive("names") > str(geneList) Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ... - attr(*, "names")= chr [1:18756] "Genes" "c10020_g1" "c10035_g1" "c10052_g1" ... Error in .local(.Object, ...) : allGenes must be a factor with 2 levels |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: Pathum Thani, Thailand Join Date: Nov 2009
Posts: 190
|
![]()
Your problem is probably from this line
geneList <- factor(as.integer(geneNames %in% myInterestingGenes)) geneNames %in% myInterestingGenes will return a vector of TRUE / FALSE of length length(geneNames) converting that to an interger will make it 1's and 0's. In this case it seems that every element of geneNames overlaps with an element in myInterestingGenes resulting a vector of 1's which you then change to a factor. If you are supposed to have a vector of only 1's then you can set the levels in the factor call to make sure that the factor has 2 levels, but then you still only one type which is probably not what you intend. |
![]() |
![]() |
![]() |
Tags |
enrichment, rnaseq data |
Thread Tools | |
|
|