SomaticSignatures: negative entries after ComBat adjustment
1
0
Entering edit mode
kw10 • 0
@kw10-9279
Last seen 9.1 years ago

I am running SomaticSignatures 2.6.0 using somatic calls from 2 sources (~40 samples, internal; ~200 samples external source). I am not using a 'group' to generate the motif matrix, eg:

>sca_mm = motifMatrix(sca_motifs, normalize = TRUE)

I am trying to correct for batch effect, but this produces some negative numbers in sca_mm which causes problems for nmf decomposition:

>meta<-read.table("meta.test", header=TRUE, sep="\t")
>model_null = model.matrix(~ 1, meta)
>sca_mm_batch = ComBat(sca_mm, batch = meta$study, mod = model_null)
>gof_nmf= assessNumberSignatures(sca_mm_batch, n_sigs, nReplicates = 5, nmfDecomposition)
Error: NMF::nmf - Input matrix x contains some negative entries.

My 'meta' dataframe is columns of 'sampleNames' and 'study' and other metadata; each sample is classified as either coming from the internal or external data source.

Are negative entries expected or am I not applying the batch effect correction appropriately? Is this telling me something about my data?

Thanks

 

 

sva somaticsignatures batch effect nmf • 1.8k views
ADD COMMENT
0
Entering edit mode
Jeff Leek ▴ 650
@jeff-leek-5015
Last seen 3.8 years ago
United States

ComBat cleans genomic data by fitting a shrunken regression model and returning a carefully formulated set of residuals. But since they are residuals from a regression model some of the values can be negative. This isn't something you can fix with ComBat unless you do something like log transform your raw values (if that transformation is appropriate), apply ComBat, and then exponentiate the values again. This will lead to all positive values, but may have major unintended consequences (for example, you are now modeling batch effects on a multiplicative scale which may or may not be appropriate). 

If there is a way to include covariates like batch int he assessNumberSignatures function that would be the more appropriate way to proceed. 

Best

 

Jeff

ADD COMMENT

Login before adding your answer.

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