how to get a gene list for profilePlots in Repitools package
0
0
Entering edit mode
Dario Strbenac ★ 1.5k
@dario-strbenac-5916
Last seen 4 days ago
Australia
Hello, This question isn't about profilePlots in particular, but about subsetting a vector by a set of values. > Top25Expr[which(annoT[,"symbol"]==as.character(peak[1,]) | annoT[,"symbol"]==as.character(peak[2,]) |annoT[,"symbol"]==as.character(peak[3,]) | annoT[,"symbol"]==as.character(peak[4,]) | annoT[,"symbol"]==as.character(peak[5,]) | annoT[,"symbol"]==as.character(peak[6,]) | annoT[,"symbol"]==as.character(peak[7,]) | annoT[,"symbol"]==as.character(peak[8,]) ............ )]<-TRUE One problem in your code is that you are comparing the symbol column with each row of peaks. Assuming that your peak table has a column called overlapsGene, which is the symbol of the gene that the peak overlaps, to do what you want in one line is : annoT[, "symbol"] %in% peak [, "overlapsGene"] This gives you a logical vector, each element being one of the genes in annoT. -------------------------------------- Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia
• 723 views
ADD COMMENT

Login before adding your answer.

Traffic: 379 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