Skip to content
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

IndexError: index 8132 is out of bounds axis 0 with size 8132. #223

Open
tokiboggle opened this issue Jul 8, 2024 · 3 comments
Open

IndexError: index 8132 is out of bounds axis 0 with size 8132. #223

tokiboggle opened this issue Jul 8, 2024 · 3 comments

Comments

@tokiboggle
Copy link

I am trying to make manhattan plots of yeast genomes. To reduce noise I have attempted to create a strict mask for the Cerevisiae Saccharomyces genome. However, when I try to calculate histograms with the mask file specified in the configuration file, I get an error saying:
File "/home/tokiboggle/.local/lib/python3.10/site-packages/cnvpytor/root.py", line 962, in calculate_histograms
his_p[p // bin_ratio] += rd_p[p]
IndexError: index 8132 is out of bounds for axis 0 with size 8132.

Only the first chromosome is displayed in the manhattan plot, and emptiness in the others.

When I do it without the mask file being specified in the configuration file. All the chromosomes are displayed but with lots of noise.

@arpanda
Copy link
Member

arpanda commented Jul 8, 2024

Could you please share the output of the '-ls' command? This will help us determine whether the reference genome is set up correctly.
Additionally, could you provide details on how the mask file was created? Please note that the input to the create mask should be in the 1000 Genomes strict mask format.

Thanks
Arijit

@tokiboggle
Copy link
Author

I used dustmasker to create the mask file. The mask file is set up, so that passed nucleotides are written as P and not passed as N. This is what I understood to be the strict mask format, however it is probably incorrect.

I'm not sure what you mean by output of -ls command. Can you explain?

Sorry for the delayed answer
Tóki

@arpanda
Copy link
Member

arpanda commented Aug 30, 2024

The error appears to be related to an incorrect setup of the reference genome. Since you were able to visualize the Manhattan plot without the mask file, it suggests that your setup is correct up to that point. Therefore, the issue is likely due to an incorrect mask file, possibly originating starting from the second chromosome. I recommend comparing the chromosome lengths in the mask file with those in the reference configuration.

ls command usage: cnvpytor -root <pytor_file> -ls. it show the content of the pytor file.

-Arijit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants