This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Find top genes that correlate with my gene of interest using TCGA RNA-Seq data.

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!

rna-seq gene-expression r correlation

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:

Error in FUN(newX[, i], ...) :
  unused argument (list(TCGA.04.1348.01 = 9656, TCGA.04.1357.01 = 6417, ...........

Maybe try using the as.numeric() function around the gene. Also, try this apply function:

# expression data frame
expr
# gene expression values of interest
gene<-as.numeric(expr["gene_name",])
# correlate gene with all others genes in the expression set
correlations<-apply(expr,1,function(x){cor(gene,x)})

hi can you help me ?I want exactly what you want to do .

0 answers

No answers yet.

Log in to answer this question.