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: list index out of range #41

Open
aparnasing opened this issue Oct 5, 2018 · 7 comments
Open

IndexError: list index out of range #41

aparnasing opened this issue Oct 5, 2018 · 7 comments

Comments

@aparnasing
Copy link

Hi, I am using idr to process 2 replicate bed files but getting an index error. copying command and bash response
idr --samples dyadvscolrep1_c3.0_common.bed dyadvscolrep2_c3.0_common.bed
/usr/local/bin/idr --samples dyadvscolrep1_c3.0_common.bed dyadvscolrep2_c3.0_common.bed
Traceback (most recent call last):
File "/usr/local/bin/idr", line 4, in
import('pkg_resources').run_script('idr==2.0.3', 'idr')
File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 743, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 1498, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.6/site-packages/idr-2.0.3-py3.6-linux-x86_64.egg/EGG-INFO/scripts/idr", line 10, in
idr.idr.main()
File "/usr/local/lib/python3.6/site-packages/idr-2.0.3-py3.6-linux-x86_64.egg/idr/idr.py", line 839, in main
merged_peaks, signal_type = load_samples(args)
File "/usr/local/lib/python3.6/site-packages/idr-2.0.3-py3.6-linux-x86_64.egg/idr/idr.py", line 703, in load_samples
for fp in args.samples]
File "/usr/local/lib/python3.6/site-packages/idr-2.0.3-py3.6-linux-x86_64.egg/idr/idr.py", line 703, in
for fp in args.samples]
File "/usr/local/lib/python3.6/site-packages/idr-2.0.3-py3.6-linux-x86_64.egg/idr/idr.py", line 53, in load_bed
signal = float(data[signal_index])
IndexError: list index out of range

@melnuesch
Copy link

I got a similar error. Any thoughts?

Traceback (most recent call last):
File "/Users/nueschm/miniconda3/bin/idr", line 4, in
import('pkg_resources').run_script('idr==2.0.2', 'idr')
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 1453, in run_script
exec(code, namespace, namespace)
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/idr-2.0.2-py3.7-macosx-10.7-x86_64.egg/EGG-INFO/scripts/idr", line 10, in
idr.idr.main()
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/idr-2.0.2-py3.7-macosx-10.7-x86_64.egg/idr/idr.py", line 733, in main
merged_peaks, signal_type = load_samples(args)
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/idr-2.0.2-py3.7-macosx-10.7-x86_64.egg/idr/idr.py", line 620, in load_samples
for fp in args.samples]
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/idr-2.0.2-py3.7-macosx-10.7-x86_64.egg/idr/idr.py", line 620, in
for fp in args.samples]
File "/Users/nueschm/miniconda3/lib/python3.7/site-packages/idr-2.0.2-py3.7-macosx-10.7-x86_64.egg/idr/idr.py", line 39, in load_bed
if peak_summit_index == None or int(data[peak_summit_index]) == -1:
IndexError: list index out of range

@hjames1
Copy link

hjames1 commented Apr 16, 2020

I got a similar error,too.

Traceback (most recent call last):
File "/home/u100395/workdir/miniconda3/envs/chipseq/bin/idr", line 10, in
idr.idr.main()
File "/home/u100395/workdir/miniconda3/envs/chipseq/lib/python3.7/site-packages/idr/idr.py", line 840, in main
merged_peaks, signal_type = load_samples(args)
File "/home/u100395/workdir/miniconda3/envs/chipseq/lib/python3.7/site-packages/idr/idr.py", line 732, in load_samples
f1, f2 = [load_bed(fp, signal_index) for fp in args.samples]
File "/home/u100395/workdir/miniconda3/envs/chipseq/lib/python3.7/site-packages/idr/idr.py", line 732, in
f1, f2 = [load_bed(fp, signal_index) for fp in args.samples]
File "/home/u100395/workdir/miniconda3/envs/chipseq/lib/python3.7/site-packages/idr/idr.py", line 65, in load_bed
float(data[6]), float(data[7]), float(data[8])
IndexError: list index out of range

@yx-xu
Copy link

yx-xu commented Aug 13, 2020

Hello!
I got an error same to this, but I couldn't resolve it. Have you solved the problem? Could you help me about this? Thank you very much!
Looking forward to your reply!

@karl1926
Copy link

I had a similar issue. Any news?

@Suger0917
Copy link

I had a similar error.
File "/storage/xx/software/miniconda3/lib/python3.9/site-packages/idr-2.0.2-py3.9-linux-x86_64.egg/idr/idr.py", line 45, in load_bed
peak = Peak(data[0], data[5],
IndexError: list index out of range
File "/storage/xx/software/miniconda3/lib/python3.9/site-packages/idr-2.0.2-py3.9-linux-x86_64.egg/idr/idr.py", line 45, in load_bed
peak = Peak(data[0], data[5],
IndexError: list index out of range

Peak score is in the column 5th. In python, actual index is equal to py_index+1. So I set peak = Peak(data[0], data[4] in line 45 of idr.py. This error disappeared.

@brottodb
Copy link

I am having a similar problem. Anyone was able to solve this issue? Thanks!

@luorongxin-yuan
Copy link

had similar problem at line 65 when my input bed file is 8 columns, but 9 is expected. So I just kept the original 6 columns, and filled column 7-9 with 0s. Seemed to solve the problem, hopefully not interfering with statistics
File "/home/u100395/workdir/miniconda3/envs/chipseq/lib/python3.7/site-packages/idr/idr.py", line 65, in load_bed
float(data[6]), float(data[7]), float(data[8])
IndexError: list index out of range

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

8 participants