[BioC] venn diagrams

Steffen Möller steffen_moeller at gmx.de
Sat Jun 5 21:42:22 CEST 2010


Hi Thomas, the "as.matrix" did the trick. The challenge
is to lose the "data.frame", which I find somewhat
counter-intuitive at times:


# creating some data frome
> a<-data.frame(1:3,4:6)
> a
  X1.3 X4.6
1    1    4
2    2    5
3    3    6
> dim(a)
[1] 3 2

# Instruction to lose the dimension
> dim(a)<-NULL
# no warning no nothing, the data.format is kept
> dim(a)
[1] 3 2

# The same as a matrix just works
> a<-as.matrix(a)
> dim(a)
[1] 3 2
> dim(a)<-NULL
> a
[1] 1 2 3 4 5 6

This is all understandable, I nonetheless hope
to find where getVennCounts is affected by this
or something else data.frame-specific. It should
at least stop() if it does not work with data.frames.

Best,

Steffen



On 06/05/2010 09:15 PM, Thomas Girke wrote:
> Your have to turn your sets into vectors objects first. You 
> could do this in one step with readLines 
> 
> A <- readLines("A.file")
> 
> or after read.delim() you would convert the resulting data frames to
> vectors like this:
> 
> A <- read.delim ("A.file")
> A <- as.character(as.matrix(A))
> 
> Thomas
> 
> On Sat, Jun 05, 2010 at 11:50:34AM -0700, David Lyon wrote:
>> Thanks for your efforts Steffen.
>>
>> If anyone knows exactly how to get this working I would be appreciative:
>>
>>
>>
>>
>> eg:
>> library(gplots)
>> A <- read.delim ("A.file")
>> B <- read.delim ("B.file")
>> C <- read.delim ("C.file")
>> input<-list(A,B,C)
>> venn(input)
>>
>> its returns the venn 
>> diagram from only the first row from each file , how do I change the 
>> code so it uses every data point in each column.
>>
>>
>> Thanks
>>
>>
>>
>> contents 
>> of A.file
>> 1
>> 2
>> 3
>> 4
>>
>> contents of B.file
>> 1
>> 2
>> 3
>> 4
>>
>> contents of C.file
>> 1
>> 2
>> 3
>> 4
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>



More information about the Bioconductor mailing list