question regarding custom normalizationFactors in DESeq2
1
0
Entering edit mode
@waltereckalbar-11470
Last seen 2.2 years ago
United States

I am trying to create a custom made normalization index to implement MAnorm's normalization process with a DESeq2 pipeline for ChIP-seq/ATAC-seq analysis, as it appears the signal/noise ratio is really far off on a couple of samples and its mucking this up. Its a kind of complicated process to paste in here, but basically I'm building this normalizationFactors matrix one column at a time, as I compare it to the average of all samples using the MA method. I have named this matrix "normMatrix" below.

> ColData <- read.table("conds.v2.txt", header=T)
> CountData <-read.table("All.merged.ChIP.head.noUn.txt", header=T, row.names=1)
> Dds <- DESeqDataSetFromMatrix(countData = CountData, colData = ColData, design = ~ GFP + rep + Lep + Food + GFP*Lep + GFP*Food)

> Dds
class: DESeqDataSet 
dim: 60180 16 
metadata(1): version
assays(1): counts
rownames(60180): K27ac_merged_1 K27ac_merged_10 ... K27ac_merged_9998 K27ac_merged_9999
rowData names(0):
colnames(16): FasLLL.GFPn.K27ac.rep1 FasLLL.GFPn.K27ac.rep2 ... FedSSS.GFPp.K27ac.rep1
  FedSSS.GFPp.K27ac.rep2
colData names(4): Lep GFP rep Food

> ncol(normMatrix)
[1] 16
> nrow(normMatrix)
[1] 60180

> normalizationFactors(Dds) <- normMatrix
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘normalizationFactors<-’ for signature ‘"DESeqDataSet", "data.frame"’


I have made sure things are in the appropriate size ranges (both using the mean centering method in the manual and MA alone, which is around 1s anyway), and have replaced zeros with 1s (by inspection they all seem to come from cells with zero read counts, so I'm assuming this won't hurt me). However, I can't see to shake this error. I can run the example code in the ?normalizationFactors man page, so it doesn't seem to a software conflict of some kind. Anyway, I'm a bit baffled, so any help would be greatly appreciated. Thanks.

 

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] MASS_7.3-45                DESeq2_1.12.4              SummarizedExperiment_1.2.3 Biobase_2.32.0            
[5] GenomicRanges_1.24.3       GenomeInfoDb_1.8.7         IRanges_2.6.1              S4Vectors_0.10.3          
[9] BiocGenerics_0.18.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.7          RColorBrewer_1.1-2   plyr_1.8.4           XVector_0.12.1       tools_3.3.1         
 [6] zlibbioc_1.18.0      rpart_4.1-10         annotate_1.50.0      RSQLite_1.0.0        gtable_0.2.0        
[11] lattice_0.20-33      Matrix_1.2-6         DBI_0.5-1            gridExtra_2.2.1      genefilter_1.54.2   
[16] cluster_2.0.4        locfit_1.5-9.1       grid_3.3.1           nnet_7.3-12          data.table_1.9.6    
[21] AnnotationDbi_1.34.4 XML_3.98-1.4         survival_2.39-4      BiocParallel_1.6.6   foreign_0.8-66      
[26] latticeExtra_0.6-28  Formula_1.2-1        geneplotter_1.50.0   ggplot2_2.1.0        Hmisc_3.17-4        
[31] scales_0.4.0         splines_3.3.1        colorspace_1.2-6     xtable_1.8-2         acepack_1.3-3.3     
[36] munsell_0.4.3        chron_2.3-47        
deseq2 R chipseq normalization • 1.3k views
ADD COMMENT
1
Entering edit mode
Simon Anders ★ 3.7k
@simon-anders-3855
Last seen 3.7 years ago
Zentrum für Molekularbiologie, Universi…

Try

normalizationFactors(Dds) <- as.matrix( normMatrix )
ADD COMMENT
0
Entering edit mode

That did it. Thanks.

ADD REPLY

Login before adding your answer.

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