Entering edit mode
                    9.7 years ago
        jchristine.hillman
        
    
        ▴
    
    20
    Hello - This is my first post here.
I am a novice to R, I know some basics. I want to use R to find the top genes whose expression correlates with my gene of interest using TCGA RNA-Seq datasets and to generate a figure depicting the correlation.
Any ides on where to begin with this?
Thank you!
have you tried using the correlation function in R?
# expression data frame expr # gene expression values of interest gene<-expr["gene_name",] # correlate gene with all others genes in the expression set correlations<-apply(expr,1,function(x){cor(gene,x)}, gene)Then order the correlations and see which ones are at the top.
I would suggest using a scatter plot matrix for displaying the top correlated genes. I would suggest using this tutorial for making one
Thanks for the response. I was able to subset all the expression values for my gene of interest into the variable "gene", but when I tried to do the correlation I received an error message:
Maybe try using the
as.numeric()function around the gene. Also, try this apply function:hi can you help me ?I want exactly what you want to do .