[BioC] PR, topGene and 'gene.names should have the same length as the gene vector'
Martin Morgan
mtmorgan at fhcrc.org
Thu May 13 14:55:57 CEST 2010
Hi John --
On 05/13/2010 02:09 AM, John Coulthard wrote:
>
> Dear list
>
> I'm trying to do a rank porducts analysis on an expression set and I cannot get the gene names onto the results table. The error is 'gene.names should have the same length as the gene vector' but I'm giving topGene column 0 of the data matrix I gave RP so how can they have different lengths? What exactly is the 'gene vector' mentioned in the error?
>
> My working below.
> Many thanks for you time.
>
> John
>
>> class(lumidataB.bgt)
> [1] "LumiBatch"
> attr(,"package")
> [1] "lumi"
>> e <- exprs(lumidataB.bgt)
>> head(e)
> 17 18 19 20 21 22 23 24
> Ku8QhfS0n_hIOABXuE 7.2 7.2 7.1 7.2 7.2 7.3 7.1 7.2
> fqPEquJRRlSVSfL.8A 7.3 7.3 7.3 7.5 7.3 7.4 7.4 7.4
> ckiehnugOno9d7vf1Q 7.3 7.2 7.2 7.3 7.3 7.2 7.3 7.3
> x57Vw5B5Fbt5JUnQkI 7.2 7.4 7.2 7.3 7.3 7.3 7.1 7.3
> ritxUH.kuHlYqjozpE 7.3 7.3 7.3 7.1 7.1 7.4 7.3 7.3
> QpE5UiUgmJOJEkPXpc 7.2 7.2 7.2 7.2 7.4 7.2 7.2 7.2
>
>> design <- c(0,0,0,0,1,1,1,1)
>> rp.out<-RP(e,design,logged=TRUE,plot=TRUE, num.perm = 100)
> Rank Product analysis for two-class case
>
> Starting 100 permutations...
> Computing pfp ..
> Outputing the results ..
>> topGene(rp.out, cutoff=0.005, method="pfp",gene.names=e[,0])
e[,0] returns a matrix of length 0
> library(Biobase)
> data(sample.ExpressionSet)
> length(exprs(sample.ExpressionSet)[,0])
[1] 0
whereas I think what you want is a character vector of length nrow(e)
> length(rownames(exprs(sample.ExpressionSet)))
[1] 500
> length(featureNames(sample.ExpressionSet))
[1] 500
Martin
> Warning: gene.names should have the same length as the gene vector.
> No gene.names are assigned
>
>
>
>
>> sessionInfo()
> R version 2.10.1 (2009-12-14)
> i386-redhat-linux-gnu
>
> locale:
> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
> [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets
> [6] methods base
>
> other attached packages:
> [1] RankProd_2.18.0 lumiHumanAll.db_1.8.1
> [3] org.Hs.eg.db_2.3.6 beadarray_1.14.0
> [5] lumiHumanIDMapping_1.4.0 lumi_1.12.4
> [7] MASS_7.3-4 RSQLite_0.8-4
> [9] DBI_0.2-5 preprocessCore_1.8.0
> [11] mgcv_1.6-1 annotate_1.24.1
> [13] AnnotationDbi_1.8.2 affy_1.24.2
> [15] Biobase_2.6.1 limma_3.2.3
>
> loaded via a namespace (and not attached):
> [1] affyio_1.14.0 grid_2.10.1 hwriter_1.2
> [4] KernSmooth_2.23-3 lattice_0.17-26 Matrix_0.999375-33
> [7] nlme_3.1-96 tools_2.10.1 xtable_1.5-6
>
>
>
>
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
>
> [[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
More information about the Bioconductor
mailing list