-
Notifications
You must be signed in to change notification settings - Fork 36
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
maxiter #76
Comments
@Lauren-Blake Have you installed MOSEK on your computer? What OS do you have---Mac, Windows or Linux? |
@Lauren-Blake Here is the instruction for installing MOSEK on mac. Try it and see if you still get the same errors. https://github.com/stephens999/ashr/blob/master/inst/rmosek-mac.md |
@Lauren-Blake See also Issue #77 for updated instructions. It isn't completely straightforward to install, so feel free to email separately if you get stuck. |
default maxiter is 5000 |
I would like to re-open this issue because the warning message is vague and not really actionable as is. There is no |
I have been getting the same error code and have no idea what it means. What is Rmosek and why would this solve the problem (whatever the problem is exactly?)? |
some of the discussion above, including Rmosek, is now out of date and no longer relevant. @orangebromeliad What version of ashr are you using, and do you have mixsqp installed? |
Hey there, Just an FYI that I also had this error, leading me to find this page. I got the error running
|
I also got this error using |
Do you have latest version of mixsqp?
…On Sun, Feb 16, 2020, 15:45 Nicole Gay ***@***.***> wrote:
I also got this error using mash_1by1. Increasing maxiter.sqp to 10,000
still did not resolve the problem. Should I just keep increasing maxiter,
or is this some indication that there's something strange about my input
data? I updated the mashed data to allow for correlations.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#76?email_source=notifications&email_token=AANXRROYGRCS64A2J7WNDP3RDGXWZA5CNFSM4EHC6DI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL4TMSQ#issuecomment-586757706>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANXRRJQREJFIIC6HZGCNTDRDGXWZANCNFSM4EHC6DIQ>
.
|
Yes, I just removed and re-installed There are a lot of missing values in my input because of genes only expressed in one of the 5 tissues included in the merged input (I'm testing logFC and corresponding stderrs from DE analyses performed independently in multiple tissues). About 1/3 of the genes have at least one NA value (35 measurements per gene). I thought this could be causing the problem, but when I restrict the input to complete cases only, I still get the same message:
This is sort of a separate problem, but in case it sheds any more light on the issue, I am also getting a repeated
|
@nicolerg |
@stephens999 definitely! Here is my data and the code that was throwing the errors. Please let me know if anything is unclear. Thank you! |
@pcarbo so one of the problems here is that I did find mixIP works. I wonder if, in general, we should be suggesting using more em iterations rather than increasing here is my code: library("ashr") ash(x,s,mixcompdist = "normal") ash(x,s,mixcompdist = "normal",optmethod="mixIP") #converges |
@nicolerg if you try increasing number of em iterations in mixSQP this should fix the initial problem. ashres = ash(Bhat[,i],Shat[,i],mixcompdist="normal", alpha=alpha, control=list(numiter.em=200), optmethod='mixSQP') # get ash results for first condition |
@nicolerg can you also try replacing the missing values before running mash, as follows, to see if it fixes the other problem: this intuitiion is that missing values effectively correspond to very large standard error (s) |
@stephens999 replacing NAs with 0 effect/large stderr and increasing |
btw, @nicolerg why is so much of your data missing? |
@stephens999 Increasing the number of EM iterations would be one solution. I do also find that the choice of
probably because the likelihood surface can be very "flat" near this initial estimate (and explains why increasing the number of EM iterations is needed to "escape" this flat region); I have now seen several examples where convergence issues could be avoided if the default initialization (uniform) were used. In this particular example, the convergence problem goes away if the out <- mixsqp::mixsqp(A,w,control = control) So I would recommend not using |
@stephens999 Removing and reinstalling My input data are DESeq2 logFCs and LFCstderrs from differential analysis performed independently in each of 5 bulk tissues, with gene expression (RNA-seq) at 7 time points per tissue (so each "sample" is the effects in one timepoint in one tissue relative to baseline in that tissue). Within each tissue, we filter out genes that are lowly expressed across all time points before performing DE analysis. DESeq also returns some NA values if genes are still lowly expressed for a given contrast. So my missing values are just from merging across 5 tissues with quite different expression profiles (i.e. lowly expressed in one or more of the 5 tissues). |
@pcarbo so with the updated ash (using default mixsqp initialization and default number of em iterations i believe) the column 10 succeeds, but columns 11 and 12 seem to still fail. eg try: ash(x,s,mixcompdist = "normal") |
@nicolerg if you are comparing several measurements against a common baseline, just want to make sure you are aware of these |
@stephens999 thank you for pointing me to that. I think the correlation structure I have is more complex than the default behavior that the "common baseline" approach allows, but that probably means I have to think more about how to do this analysis. I understand how the common baseline approach would be used if you had, for example, gene expression data at one pre-perturbation time point and several post-perturbation time points and you wanted to estimate the effects between the pre-perturbation time point and each of the post-perturbation time points, where all samples were from the same tissue. My input data is this x5: each "sample" is a single post-perturbation time point in a single tissue, where effects are relative to a pre-perturbation control in the same tissue; I have 7 post-perturbation time points in each of 5 tissues. So I would have to indicate a separate reference sample for each set of conditions/time points from a given tissue. In my |
Yes, perhaps better to continue by email at this point?
Matthew
…On Tue, Feb 18, 2020, 18:02 Nicole Gay ***@***.***> wrote:
@stephens999 <https://github.com/stephens999> thank you for pointing me
to that. I think the correlation structure I have is more complex than the
default behavior that the "common baseline" approach allows, but that
probably means I have to think more about how to do this analysis.
I understand how the common baseline approach would be used if you had,
for example, gene expression data at one pre-perturbation time point and
several post-perturbation time points and you wanted to estimate the
effects between the pre-perturbation time point and each of the
post-perturbation time points, where all samples were from the same tissue.
My input data is this x5: each "sample" is a single post-perturbation time
point in a single tissue, where effects are relative to a pre-perturbation
control in the same tissue; I have 7 post-perturbation time points in each
of 5 tissues. So I would have to indicate a separate reference sample for
each set of conditions/time points from a given tissue.
In my mashr analysis, I updated the mashdata object to have a non-null
correlation matrix, but it sounds like this is not sufficient. My
motivation for using mashr is to find sharing or uniqueness of
differentially expressed genes across tissues with temporal resolution,
which is why I modeled time discretely and have effects at each time point.
For example, I want to be able to see if a gene is not only differentially
expressed in 2 or more tissues but also if they have similar magnitudes of
effects at the same or different time points. Does this make sense? Thank
you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#76?email_source=notifications&email_token=AANXRRP2HK2WOEMHZWJ54WDRDRZKLA5CNFSM4EHC6DI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMF2LQI#issuecomment-587965889>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANXRRNKGBFILE5QMDWHBBLRDRZKLANCNFSM4EHC6DIQ>
.
|
i added a ... to mash_1by1 to allow users to pass control to ash. |
@nicolerg @lukeholman We have made several updates to mixsqp that should help with some of the issues you have been reporting. |
Thank you very much for your responsiveness! |
Last night when running ash, I got the following message:
warning("Optimization failed to converge. Results may be unreliable. Try increasing maxiter and rerunning.")
Can you please tell me what the default maxiter is so that I can increase it? Do you have any guidelines or recommendations for what I should increase maxiter to?
The way that I was going to enter maxiter into ash is with the following command below (1000000 is arbitrary). Can you please confirm that you want to put it in the control argument? On the notes for ash.R, you may want to clarify which arguments can be included as part of the control. This was not clear in the current version.
result <- ash(betahat = x$coefficients[, coef], sebetahat = x$stdev.unscaled[, coef] * sqrt(x$s2.post), df = x$df.total[1], control = list(maxiter = 1000000))
The text was updated successfully, but these errors were encountered: