[BioC] info on vennCounts function
James W. MacDonald
jmacdon at med.umich.edu
Tue Jun 21 22:04:32 CEST 2011
Hi Alberto,
On 6/21/2011 12:53 PM, Alberto Goldoni wrote:
> Dear all,
> i have a question on the "vennCounts" function.
>
> Using this function on "results" value:
>
>> vennCounts(results)
> [hda+str]-[ref] [ref+str]-[ref] [hda+str]-[ref+str] Counts
> [1,] 0 0 0 21496
> [2,] 0 0 1 0
> [3,] 0 1 0 12
> [4,] 0 1 1 0
> [5,] 1 0 0 32
> [6,] 1 0 1 1
> [7,] 1 1 0 34
> [8,] 1 1 1 0
> attr(,"class")
> [1] "VennCounts"
>
> what i shoul need is a way to understand which genes are in the [7,]
> line from the "[hda+str]-[ref] vs [ref+str]-[ref]".
>
> The only think i know is the number that should be 34, but i would
> like to obtain a list of the 34 genes.
You will need to use the results object to do that. The results object
will be a matrix with three columns and as many rows as genes in your
comparison. So e.g., the first column will represent the [hda+str]-[ref]
comparison, and will consist of 1's, 0's and -1's.
If you do something like
sum(abs(results[,1]) == 1 & abs(results([,2]) == 1)
you should get 34. Given that information, I leave it to you to figure
out how to subset your genes.
Best,
Jim
>
> best regards.
>
>> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> 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 methods base
>
> other attached packages:
> [1] AnnotationDbi_1.14.1 Biobase_2.12.1 GenomicFeatures_1.4.2
> [4] GenomicRanges_1.4.1 IRanges_1.10.0 limma_3.8.1
> [7] biomaRt_2.8.0
>
> loaded via a namespace (and not attached):
> [1] Biostrings_2.20.0 BSgenome_1.20.0 DBI_0.2-5 RCurl_1.5-0
> [5] RSQLite_0.9-4 rtracklayer_1.12.3 tools_2.13.0 XML_3.2-0
>
--
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
More information about the Bioconductor
mailing list