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 0 is out of bounds for axis 0 with size 0 #6

Open
Mingdi-W opened this issue Sep 11, 2024 · 3 comments
Open

IndexError: index 0 is out of bounds for axis 0 with size 0 #6

Mingdi-W opened this issue Sep 11, 2024 · 3 comments

Comments

@Mingdi-W
Copy link

Hi, sir!
When I run the example in the PEM-Q/data, I met this issue. Also, when I run my sample, I also met this problem.
python 3.7.12
######## 06 substitutions... ########
define_substitution.py CC055c 61986726 10 +
[PEM-Q] basename: CC055c
[PEM-Q] cutsite: 61986726
[PEM-Q] cutoff: 10
[PEM-Q] primer_strand: +
Substitutions in cutsite +- cutoff: 0
0
Processing statistics...
Traceback (most recent call last):
File "/mnt/ZuoStorage3/wumingdi/soft/PEM-Q/main/define_substitution.py", line 181, in
main()
File "/mnt/ZuoStorage3/wumingdi/soft/PEM-Q/main/define_substitution.py", line 176, in main
define_substitution(**kwargs)
File "/mnt/ZuoStorage3/wumingdi/soft/PEM-Q/main/define_substitution.py", line 126, in define_substitution
chrom = data["Bait_rname"][0]
File "/mnt/ZuoStorage3/wumingdi/soft/miniconda/envs/PEM-Q/lib/python3.7/site-packages/pandas/core/series.py", line 939, in getitem
return self._values[key]
IndexError: index 0 is out of bounds for axis 0 with size 0

@Mingdi-W
Copy link
Author

Also, nothing got in the results folder.

@liumz93
Copy link
Owner

liumz93 commented Sep 11, 2024

Hi Mingdi-W, if there’s nothing in the results folder, the error likely occurred in the earlier steps. The error you showed me is from step 06, but I believe that’s not the root cause. The IndexError may be due to an improperly generated file. Please check your log file for more details.

@aprilW0829
Copy link

Hi, sir! When I run the example in the PEM-Q/data, I met this issue. Also, when I run my sample, I also met this problem. python 3.7.12 ######## 06 substitutions... ######## define_substitution.py CC055c 61986726 10 + [PEM-Q] basename: CC055c [PEM-Q] cutsite: 61986726 [PEM-Q] cutoff: 10 [PEM-Q] primer_strand: + Substitutions in cutsite +- cutoff: 0 0 Processing statistics... Traceback (most recent call last): File "/mnt/ZuoStorage3/wumingdi/soft/PEM-Q/main/define_substitution.py", line 181, in main() File "/mnt/ZuoStorage3/wumingdi/soft/PEM-Q/main/define_substitution.py", line 176, in main define_substitution(**kwargs) File "/mnt/ZuoStorage3/wumingdi/soft/PEM-Q/main/define_substitution.py", line 126, in define_substitution chrom = data["Bait_rname"][0] File "/mnt/ZuoStorage3/wumingdi/soft/miniconda/envs/PEM-Q/lib/python3.7/site-packages/pandas/core/series.py", line 939, in getitem return self._values[key] IndexError: index 0 is out of bounds for axis 0 with size 0

I'm having the same issue, but before that I ran the first step I ran the error,[ValueError: file has no sequences defined (mode='rb') - is it SAM/BAM format? Consider opening with check_sq=False]
Then I changed the codes in the first few steps of calling AlignmentFile( ) function refer to the post DRL/blobtools#91. I have added check_sq=False, so that the first few steps can run normally, but here encountered the same error, have you solved this problem now, and what is the reason? Thanks.

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

3 participants