How to normalize data for heat
1
0
Entering edit mode
8.9 years ago
Vanceed ▴ 30

I was given the task of generating a heatmap with a dataset but as I entered data into R, it told me I cannot have repeating rows (which would be in my case the genes that are expressed). Does anyone know how I can normalize that data? Thanks

expression-data dataset R heatmap • 3.1k views
ADD COMMENT
0
Entering edit mode
8.9 years ago

Reproducible example?
If it just the rownames, make them unique.

Ex: rownames(data)=paste(rep("Row",nrow(data))) or check make.unique function

ADD COMMENT
0
Entering edit mode

I tried that make.unique function:

make.unique("Gene.Symbol", sep=",")
[1] "Gene.Symbol"

Followed by:

 row.names(PDR) <- PDR$Gene.Symbol
Error in `row.names<-.data.frame`(`*tmp*`, value = c(1L, 1L, 1L, 1L, 1L,  : 
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': 'BCL11A', 'BCL2', 'CCL5', 'CCR2', 'EED', 'EZH2',

But this error came up. Trying to have the Gene Symbols appear on the Y axis of the heatmap instead of the numbers. Thanks.

ADD REPLY
1
Entering edit mode

Input to make.unique is a variable containing the names, not a single character value.

make.unique(PDR$Gene.Symbol, sep=",")
ADD REPLY

Login before adding your answer.

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