extracting VennDiagram data for sequence information
0
1
Entering edit mode
9.7 years ago

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 • 2.0k views
ADD COMMENT
0
Entering edit mode

can you format the code part properly with line breaks ?

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 4535 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6