-
Notifications
You must be signed in to change notification settings - Fork 41
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
"index 0 is out of bounds" ERROR in newref "train_gender_model" #24
Comments
Hi @rgiannico, This function fits a Gaussian mixture model with two components to the Y-read-fraction, which is used to separate male from female feti. I'm not quite sure what's going on yet, but we could try two things: you could share your .npz files, and I'll push an update to make WisecondorX robust against it, or if that's not a possibility, would you mind uncommenting the 'plotting code', and re-run the software locally? It should yield an image like this: (could you share this image?) |
Thank you @leraman ,
I suppose it could it be related to the fact I only have 12 male fetuses over the total 88 NIPT samples. Thank you :) |
Hi @rgiannico Indeed, you probably have to add more male cases. The problem is, WisecondorX looks for a local minimum in the bimodel, and there is none. I didn't release this was possible. I'll look into it. In the meantime, maybe these parameters will work, at line 28: Anyway, as the manual states, it's always a good idea to try to include more or less the same amount of males as females. Nevertheless, manual gender assignment during reference creation could indeed be a solution, I'll think about it. |
Ok thank you @leraman ,
Thank you |
Good luck! |
Hi, I do have a same error as you Thanks in advance :) |
Hi @chantisakee Which version are you using? How much samples are in your reference? Did you include both male and female feti? |
Hi @chantisakee , I had this error because my training samples had unbalaced fetal sex (too many female feti compared to the male feti or vice-versa). ( p.s: nice dog though :P ^^ ) |
|
Hi @chantisakee I believe 10 samples might be too small for the gaussian mixture model to work reliably. I'll implement a workaround so you can make a reference anyway. |
Yeah, i found that the version that i already downloaded were modified ;w; but i still got an error. i'm quite not sure that is it from my input data or not. Unfortunately, I have only 10 healthy samples for reference creation and the gender of my input is also missing. My goal using this software is finding CNV from human WGS. |
Thank you very much for your help :) |
Hi @chantisakee I've updated WisecondorX. You can download the latest version using
During reference creation, you can now manually set the chromosome Y fraction cutoff using |
Hi @leraman, [INFO - 2019-09-11 21:48:50]: Starting CNA prediction what should do? Thanks, Ps. Do i have to create a new topic? |
Can you take a look at your .npz files? Are you sure they are not empty? Which reference genome did you use during mapping? |
Hi leraman, sorry for late answering. Anyway, I just wondering that what is the minimum bin size for copy number variation prediction by wisecondorX?? can i down to 2000 bp? |
It depends on your sequencing depth. WisecondorX is developped for 15 kb and up, but if your coverage is >1x you might get good results for 2000 bp. Running time will increase though. |
Thanks for your suggestion @leraman so i've tried setting the bin size via reference set creation process as 2000 bp. After that I did CNA prediction process and it turned out that [INFO - 2019-09-23 10:46:59]: Starting CNA prediction |
Hi leraman,
I'm getting this weird error while using 'newref' on my 88 training samples:
$ WisecondorX newref *.npz myref.npz --nipt --binsize 50000 --cpus 12
For debugging purposes I also added this line
logging.info('function train_gender_model sorted_gmm_y: {} local_min_i: {} gmm_x: {}' .format(sorted_gmm_y, local_min_i, gmm_x))
to the newref.tools.py and it also printed out this:Do you have any idea on what is going on?
If you need more debugging prints just tell me :)
The text was updated successfully, but these errors were encountered: