SARTools
SARTools copied to clipboard
add column
--Hi,
is it possible to add a log2(CPM) column (for each condition) in the complete table ?
thank you --
Hi,
thanks for the suggestion. There are already many columns in the complete table so I would prefer not adding to much information. However, you can get the log CPM of each condition as a R object using the following code:
t(apply(cpm(counts, log=TRUE), 1, function(x) tapply(x, target[, varInt], mean)))
Best regards,
Hugo
Hi,
it seems in your complete table there are 2 columns (just after "baseMean" column) that represent the mean of normalised counts of each replicat. It's computed by this piece of code (from exportResults.DESeq2.R):
for (cond in levels(group)){ base[,cond] <- round(apply(as.data.frame(tmp[,group==cond]),1,mean),0) }
i think i can use these 2 columns to make heatmap.
Thanks.
Yes you can use these columns which are the means of the normalized counts per condition. You just have to be careful when doing heatmaps with these columns because you will lose the between-sample variability which is often meaningful.
Yes, I understand. Thank you.