Question: Heatmap for ebseq2 output
gravatar for drkousi31
4 months ago by
drkousi310 wrote:

EBseq manual recommends heatmap for DE visualisation.

heatmap.2(NormalizedMatrix[GenesOfInterest,], scale="row", trace="none", Colv=F)

The normalized matrix may be obtained from GetNormalizedMat() function.

Can someone explain, what is the "[GenesOfInterest]" here.. Is it a file containing list of differentially expressed genes?

ebseq • 120 views
ADD COMMENTlink modified 3 months ago • written 4 months ago by drkousi310
Answer: Heatmap for ebseq2 output
gravatar for thokall
3 months ago by
Swedish Museum of Natural History
thokall160 wrote:

Given how it is written I would think that it is subsetting the matrix to keep only genes that are of interested. Subsetting matrices in R is done with the syntax matrix[rows, columns], if 'rows' or 'columns' are left empty all rows/columns are returned. It could hence be a vector with True/False values or a numeric vector with the row numbers corresponding to the genes of interested. If your 'NormalizedMatrix' has row names it could also be a vector with names that you would like to generate a heatmap for.

ADD COMMENTlink written 3 months ago by thokall160
Answer: Heatmap for ebseq2 output
gravatar for drkousi31
3 months ago by
drkousi310 wrote:

Yes, my 'NormalizedMatrix' has row names.
These are my files:
The count matrix from RSEM is "Rsemcount"

"671H.genes.results" "86302H.genes.results" "11015D.genes.results""671D.genes.results" "86302D.genes.results"
"GFHJ01000001.1" 0.00 0.00 0.00 0.00 0.00
"GFHJ01000002.1" 2.00 4.00 1.00 9.00 1.00
"GFHJ01000003.1" 0.00 0.00 0.00 0.00 1.00
"GFHJ01000004.1" 1.00 19.00 2.00 17.00 0.00
"GFHJ01000005.1" 0.00 0.00 0.00 0.00 0.00
"GFHJ01000006.1" 1.00 7.00 0.00 3.00 0.00

I did the following in R:

In=read.table("Rsemcount", stringsAsFactors = F, row.names= 1, header = T) Data=data.matrix(In)
sizes=MedianNorm(Data) NormData=GetNormalizedMat(Data,sizes)

X671H.genes.results X86302H.genes.results X11015D.genes.results X671D.genes.results GFHJ01000001.1 0.000000 0.000000 0.000000 0.0000000
GFHJ01000002.1 3.462638 1.574628 2.914371 2.2445692
GFHJ01000003.1 0.000000 0.000000 0.000000 0.0000000
GFHJ01000004.1 1.731319 7.479485 5.828742 4.2397418
GFHJ01000005.1 0.000000 0.000000 0.000000 0.0000000
GFHJ01000006.1 1.731319 2.755600 0.000000 0.7481897
GFHJ01000001.1 0.000000
GFHJ01000002.1 1.736781
GFHJ01000003.1 1.736781

I have combined the list of DE genes for 3 treatments in file combineddelist
head combineddelist

GenesOfInterest=read.table("combineddelist", stringsAsFactors = F, header = F)

1 GFHJ01002875.1
2 GFHJ01004450.1
3 GFHJ01004863.1
4 GFHJ01004888.1
5 GFHJ01004990.1
6 GFHJ01005067.1
7 GFHJ01005131.1

heatmap.2(NormData[GenesOfInterest,], scale="row", trace="none", Colv=F)
Error in NormData[GenesOfInterest, ] : invalid subscript type 'list'

I tried read.list to read the DE genes list but the function is not found. I am new to RNASeq and R. Please, help me how to use row names as vectors for my DE gene list.

ADD COMMENTlink modified 3 months ago • written 3 months ago by drkousi310

Your GenesOfInterest is not a vector, it is a data.frame that you created with the read.table function. You have to supply a vector to subset your matrix. In this case the data.frame is only one column wide, which means that it consists of a single vector.

So your last command should be

heatmap.2(NormData[GenesOfInterest[,1],], scale = "row, trace = "none", Colv = F)

This forum is mainly to support the packages distributed via bioconductor and answer question related to them. Since your questions is more about general R usage and not actually about any package that is part of bioconductor you have to try to read up on R on your own or find other fora that are better suited for those type of questions.

Good luck!

ADD REPLYlink written 3 months ago by thokall160
Please log in to add an answer.


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