Question: extracting VennDiagram data for sequence information
1
gravatar for tchakraborty83
3.9 years ago by
tchakraborty8310 wrote:

Can anyone guide me to extract venndiagram data? I am quite new to R and I am trying to extract the vennDiagram data to get the sequence ID or information. However, i am stuck. Some help will be appreciated. Following are my commands:

>data1 <- read.delim(RMAfiles[1], header=TRUE)
> #1 and 2, 1 and 3, 1 and 4, 1 and 5 and 1 and 6
> expressionMatrix <- matrix(data=NA, nrow=nrow(data1), ncol=6, dimnames=list(data1[,"PROBE_ID"], RMAfiles))
> for (i in 1:6){
+     dataI <- read.delim(RMAfiles[i], header=TRUE)
+     expressionMatrix[,i] <- log2(dataI[,"PM"])    
+ }
>head(expressionMatrix)
> write(expressionMatrix)
> ratio1 <- expressionMatrix[,5] - expressionMatrix[,6]
> ratio2 <- expressionMatrix[,5] - expressionMatrix[,1]
> ratio3 <- expressionMatrix[,5] - expressionMatrix[,2]
> ratio4 <- expressionMatrix[,5] - expressionMatrix[,3]
> ratio5 <- expressionMatrix[,5] - expressionMatrix[,4]
> XYD3 <- (ratio1 <= -11)
> ERab2D3 <- (ratio2 <= -11)
> ERaD3 <- (ratio3 <= -11)
> ERb2D3 <- (ratio4 <= -11)
> ERb2KDD3 <- (ratio5 <= -11)
> C52 <-cbind(XYD3, ERab2D3, ERaD3, ERb2D3, ERb2KDD3)
> c <-vennCounts(C52)
> vennDiagram(c)

Regards Tapas

R • 1000 views
ADD COMMENTlink modified 3.9 years ago by Michael Dondrup47k • written 3.9 years ago by tchakraborty8310

can you format the code part properly with line breaks ?

ADD REPLYlink written 3.9 years ago by geek_y10k

I believe this is expression matrix with row.names as genes right? . You should have one one matrix where you are trying to calculate the fold change between your columns for particular genes right? If so Then use row.names=1 while reading the files so that the genes are in the row. Take a look at this link to see if your expression matrix is properly created. Also try to put the output of head(expressionMatrix) so that we can see what is it.

ADD REPLYlink written 3.9 years ago by ivivek_ngs4.9k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1089 users visited in the last hour