Removal of outliers after library size correction, can I save this to my dds object?
1
0
Entering edit mode
Moose123 • 0
@moose123-13761
Last seen 6.8 years ago

Hi,

I looked for an answer but could not find it.. My supervisor replaced values of outliers in our expression data set to "NA", using the count data that is corrected for library size (means median-of-ratios). As we want to use the same processing steps, we want to assign these outliers also in my work (network analysis). 

Is it possible to insert the identified outliers also in the dds object at the same step in DESeq2 (so after dds = estimateSizeFactors(dds))?  In other words, could I assign these outlying values as NA in the count matrix and save this to the dds, so I could work further with it when I transform my data for network analysis? Or should I assign the NAs to the count matrix before creating the dds object? (I plan to use the k-nearest neighbour method after to replace the NAs.)

Thanks a lot,

 

deseq2 outliers • 1.0k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

You can't have NAs in the DESeqDataSet. So you'll have to keep track of them somehow yourself. You can add arbitrary matrices to the dataset though:

assays(dds)[["outlier"]] <- mat

Where mat could be a logical matrix. DESeq2 won't pay attention to this matrix, but you can use it for your own purposes. Another direction is that if you want to remove outliers on your own, you can downweight them. DESeq2 does pay attention to assays(dds)[["weights"]]. You can put in 0's here and this will downweight these counts so they don't contribute to the fitting procedures.

ADD COMMENT

Login before adding your answer.

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