0

Thanks for your attention to my question.
Here is my question.

I usually use RUVg normalization for normalize unwanted variations like batch effect and etc. and I use plotRLE and plotPCA functions for QC of my count-table.
But, when I normalize my data using RUVg, there are some negative values after normalization (I guess they are usually from zero counts of raw count table).

So, here is the point. When I use plotRLE function with RUVg-normalized data, it doesn't work because of the negative values (I already know there can't be negative in log" ")

How can I manage it? Or is there any codes to solve this problem?
I appreciate your help.

runRUVg <- function(dds, symbol=TRUE, k, dirn='.', ...) {
  dds <- data.matrix(dds)
  seq <- newSeqExpressionSet(dds)
  a <- rownames(seq)
  if (symbol) {
    UsedHKG <- intersect(a,hkg_symbols)  # Genes included both data and hkg list
    UnusedHKG <- setdiff(a,hkg_symbols)  # Genes are not included in data
  } else { 
    UsedHKG <- intersect(a,hkg_ids) # Genes included both data and hkg list
    UnusedHKG <- setdiff(a,hkg_ids)  # Genes are not included in data
  }
  seqRUVg <- RUVg(seq,UsedHKG,k <- k,round=T)
  counts <- counts(seqRUVg)
  
  #plot export
  png(filename="unnorm.png",width=2000,height=1600)
  plotRLE(seq,outline=F,main='Unnormalized',ylim=c(-2.5,2.5))
  dev.off()
  png(filename="RUVgnorm.png",width=2000,height=1600)
  plotRLE(seqRUVg,outline=F,main='Normalized by RUVg',ylim=c(-2.5,2.5))
  dev.off
}

Of course, in plot export code, unnorm plot has no problem.

  • Here's the data. I mined this data from TCGA-LUAD-RNA-sequencing database using FireBrowse.

enter image description here

enter image description here

  • Please, could you share your `dds` data set or a part of it (using `dput(dds)` )? It would be easier to help you. Thanks. – Marco Sandri Aug 26 '21 at 09:18
  • Thank you for your comment! I uploaded them – Kiwook Lee Aug 27 '21 at 11:32
  • Please read the section "Providing a minimal dataset" at the following link https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example . The use of images with data is discouraged. Thank you. – Marco Sandri Aug 27 '21 at 17:06
  • Oh I didn't know there is the specific format of data. thank you for your comment! – Kiwook Lee Aug 30 '21 at 05:43

0 Answers0