[BioC] ComBat_ Error in solve.default(t(design) %*% design): Lapack routine dgesv: system is exactly singular: U[4, 4] = 0

Johnson, William Evan wej at bu.edu
Mon Aug 19 14:20:54 CEST 2013


Amit, 

The "singularity" error you are getting occurs when your covariates are confounded with batch (or with each other). In the example you are trying is there a batch that contains only one covariate level and is that covariate level exclusive to the batch? If this does not make sense, post your 'pheno' variable in a reply and I will be happy to help you figure out the problem.

Evan


On Aug 19, 2013, at 6:00 AM, <bioconductor-request at r-project.org>
 <bioconductor-request at r-project.org> wrote:

> Date: Sun, 18 Aug 2013 19:58:35 +0530
> From: amit kumar subudhi <amit4help at gmail.com>
> To: bioconductor at r-project.org
> Subject: [BioC] ComBat_ Error in solve.default(t(design) %*% design) :
> 	Lapack routine dgesv: system is exactly singular: U[4, 4] = 0
> Message-ID:
> 	<CADxjrxWKyC3prOvL3RnmYc03qPyvh_VdVxvzymu-WkVmW+nKiw at mail.gmail.com>
> Content-Type: text/plain
> 
> Hello to all ComBat users,
> 
> I am trying to remove the batch effects from some of my microarray data but
> at last I am getting an error message which read as
> 
> Found 3 batches
> Found 1  categorical covariate(s)
> Standardizing Data across genes
> Error in solve.default(t(design) %*% design) :
>  Lapack routine dgesv: system is exactly singular: U[4,4] = 0
> 
> The head(edata) looks like this
>                                 AL        AO        AP        AQ        CF
> GT_pfalci_specific_0000001 16.053898 16.080540 16.101114 16.046898 16.087206
> GT_pfalci_specific_0000002 10.051407 10.477143  8.369233 10.657850 13.312936
> GT_pfalci_specific_0000003  8.910620  8.683393  7.812817  8.496099 10.920685
> GT_pfalci_specific_0000004  6.603195  8.993232  6.476777  6.792369  3.319346
> GT_pfalci_specific_0000005  9.813562 11.084574  9.055613 11.568550 12.977261
> GT_pfalci_specific_0000006 15.989252 15.993513 15.963054 16.000675 15.983985
>                                  CL        CU        CV     GA_UC     GB_UC
> GT_pfalci_specific_0000001 16.082037 16.071299 16.090370 15.971335 15.994304
> GT_pfalci_specific_0000002 12.653076  9.703247  8.827624  5.697412  8.060719
> GT_pfalci_specific_0000003 11.470758 10.548943 10.718349  6.132614  8.007271
> GT_pfalci_specific_0000004  5.328515  8.398546  6.351136  3.045112  3.891578
> GT_pfalci_specific_0000005  8.520699 11.791610 11.535907  6.791468  9.930246
> GT_pfalci_specific_0000006 15.980660 15.984256 15.970124 13.353012 13.740395
>                               GC_UC     GE_UC     GR_UC
> GT_pfalci_specific_0000001 15.855644 16.090246 16.086956
> GT_pfalci_specific_0000002  9.026398  8.015609  7.814614
> GT_pfalci_specific_0000003  5.341252  8.658231  5.788790
> GT_pfalci_specific_0000004  4.191565  3.040515  3.517175
> GT_pfalci_specific_0000005  5.446910 11.982848  5.477334
> GT_pfalci_specific_0000006 11.872469 13.675290 13.117105
> 
> GT_pfalci_specific_0000006 15.983985 15.970124
> 
> and the head(pheno) looks like this
>  sample batch malaria
> AL      1     1  severe
> AO      2     1  severe
> AP      3     1  severe
> AQ      4     1  severe
> CF      5     2  severe
> CL      6     2  severe
> 
> 
> the commands that I have used for ComBat is
> mod = model.matrix(~as.factor(malaria), data=pheno)
> combat_edata = ComBat(dat=edata, batch=batch, mod=mod, numCovs=NULL,
> par.prior=TRUE, prior.plots=FALSE)
> 
> head(mod) looks like this
>   (Intercept) as.factor(malaria)uncomplicated
> AL           1                               0
> AO           1                               0
> AP           1                               0
> AQ           1                               0
> CF           1                               0
> CL           1                               0
> 
> Why I am getting this error meassage? Please help me out. When I am taking
> the larger sample size (n=33) I could able to remove the batch effects but
> a subset of those samples giving me the above problem.
> 
> 
> -- 
> Amit Kumar Subudhi
> Research Scholar,
> CSIR-Senior Research Fellow,
> Molecular Parasitology and Systems Biology Lab,
> Department of Biological Sciences ,
> FD III, BITS, Pilani,
> Rajasthan- 333031
> e mail-
> amit4help at gmail.com
> amit.subudhi at pilani.bits-pilani.ac.in
> Mob No- 919983525845



More information about the Bioconductor mailing list