-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in density.default #27
Comments
I notice that you have 4 batches and 8 covariates. How many samples do you have in each group? Do you have missing treatment groups without samples? Try using fewer covariates and see if this helps.
Also, can you try and see if its failing for all genes, or just a few? Start with the first 10-100 genes in your dataset and if this works, add genes until you find the one(s) that are causing the failure. Let me know if there is anything unusual that is causing the failure.
… On May 25, 2017, at 1:32 PM, Roy Francis ***@***.***> wrote:
I get this error when I use mean.only=T.
> dfc <- ComBat(dat=df, batch=bt, mod=combmod, par.prior=TRUE, prior.plots=T, mean.only=T)
Using the 'mean only' version of ComBat
Found 4 batches
Adjusting for 8 covariate(s) or covariate level(s)
Standardizing Data across genes
Fitting L/S model and finding priors
Error in density.default(invgam) :
need at least 2 points to select a bandwidth automatically
It seems to work fine when mean.only=F. I was wondering if you could provide some insight into what might be wrong.
sessionInfo
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#27>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJgbPFSE1M0xCpebVqFgxjHtWZTShakRks5r9bs9gaJpZM4Nmqde>.
|
All covariate groups had samples, minimum 5. All levels in all factors have an equal number of samples. Decreasing covariates or changing covariates did not fix the issue. The issue persists with any number of genes. 10, 100, 1000 and different sets of genes etc. In all cases, setting |
Can you send me your code and data for the first 10 genes (you can change the gene and column names/conditions for anonymity). That will help us diagnose and fix the problem.
… On May 25, 2017, at 7:46 PM, Roy Francis ***@***.***> wrote:
All covariate groups had samples, minimum 5. All levels in all factors have an equal number of samples. Decreasing covariates or changing covariates did not fix the issue. The issue persists with any number of genes. 10, 100, 1000 and different sets of genes etc. In all cases, setting mean.only=F made it work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#27 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJgbPMYFQyWLQ7tJr3SApHApX0We_EUcks5r9hLzgaJpZM4Nmqde>.
|
Couldn't attach .rds or zipped rds. So I am attaching txt files of count data and metadata. All samples and metadata included. But only first 6 genes are included.
Let me know if this works for you. |
Ping? :) |
I looked at your example you sent me. The plots are failing due to a known bug, but the ComBat function does return adjusted data.
library(sva)
count_data=read.table("~/Downloads/count_data.txt",header=T,sep='\t')
metadata=read.table("~/Downloads/meta_data.txt",header=T,sep='\t')
combmod <- model.matrix(~family+lane+condition,data=metadata)
#These work:
ComBat(dat=count_data, batch=metadata$ext, mod=combmod, par.prior=TRUE, prior.plots=F,mean.only=T)
ComBat(dat=count_data, batch=metadata$ext, mod=combmod, par.prior=TRUE, prior.plots=F,mean.only=F)
#Error in the plot:
ComBat(dat=count_data, batch=metadata$ext, mod=combmod, par.prior=TRUE, prior.plots=T,mean.only=T)
… On Mar 31, 2021, at 12:56 AM, Roman Luštrik ***@***.***> wrote:
Ping? :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#27 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACMBWPFXJJBMWBIUJZZCYXDTGKTPLANCNFSM4DM2U5PA>.
|
I get this error when I use
mean.only=T
.It seems to work fine when
mean.only=F
. I was wondering if you could provide some insight into what might be wrong.sessionInfo
R version 3.3.3 (2017-03-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] parallel stats4 grid stats graphics grDevices
[7] utils datasets methods base
other attached packages:
[1] sva_3.22.0 genefilter_1.56.0
[3] mgcv_1.8-17 nlme_3.1-131
[5] pvca_1.14.0 IHW_1.2.0
[7] ellipse_0.3-8 viridis_0.4.0
[9] viridisLite_0.2.0 pheatmap_1.0.8
[11] Rtsne_0.13 extrafont_0.17
[13] tidyr_0.6.3 edgeR_3.16.5
[15] limma_3.30.13 DESeq2_1.14.1
[17] SummarizedExperiment_1.4.0 Biobase_2.34.0
[19] GenomicRanges_1.26.4 GenomeInfoDb_1.10.3
[21] IRanges_2.8.2 S4Vectors_0.12.2
[23] BiocGenerics_0.20.0 Cairo_1.5-9
[25] gplots_3.0.1 RColorBrewer_1.1-2
[27] ggplot2_2.2.1 dplyr_0.5.0
[29] stringr_1.2.0
The text was updated successfully, but these errors were encountered: