macs3-project / MACS

MACS -- Model-based Analysis of ChIP-Seq
https://macs3-project.github.io/MACS/
BSD 3-Clause "New" or "Revised" License
712 stars 268 forks source link

MACS2 IndexError: list index out of range #103

Closed Jondeen closed 1 month ago

Jondeen commented 8 years ago

I get the following error stack upon running callpeak on my two BAM-files (through Galaxy). Any way I can troubleshoot what is wrong here?

~$ (macs2 callpeak --verbose 9 --name "MACS2" -t "/home/ogaard/gits/galaxy2/database/files/000/dataset_140.dat" -c "/home/ogaard/gits/galaxy2/database/files/000/dataset_116.dat" --format='BED' --gsize "11000000" --bw='400' --ratio 1.0 --slocal 1000 --llocal 10000 --broad --broad-cutoff='0.1' --keep-dup "1" --bdg --qvalue "0.05" )
INFO  @ Tue, 08 Dec 2015 13:45:52:
# Command line: callpeak --verbose 9 --name MACS2 -t /home/ogaard/gits/galaxy2/database/files/000/dataset_140.dat -c /home/ogaard/gits/galaxy2/database/files/000/dataset_116.dat --format=BED --gsize 11000000 --bw=400 --ratio 1.0 --slocal 1000 --llocal 10000 --broad --broad-cutoff=0.1 --keep-dup 1 --bdg --qvalue 0.05
# ARGUMENTS LIST:
# name = MACS2
# format = BED
# ChIP-seq file = ['/home/ogaard/gits/galaxy2/database/files/000/dataset_140.dat']
# control file = ['/home/ogaard/gits/galaxy2/database/files/000/dataset_116.dat']
# effective genome size = 1.10e+07
# band width = 400
# model fold = [5, 50]
# qvalue cutoff for narrow/strong regions = 5.00e-02
# qvalue cutoff for broad/weak regions = 1.00e-01
# Larger dataset will be scaled towards smaller dataset.
# Range for calculating regional lambda is: 1000 bps and 10000 bps
# Broad region calling is on

INFO  @ Tue, 08 Dec 2015 13:45:52: #1 read tag files...
INFO  @ Tue, 08 Dec 2015 13:45:52: #1 read treatment tags...
INFO  @ Tue, 08 Dec 2015 13:45:53: #1.2 read input tags...
Traceback (most recent call last):
  File "/usr/local/bin/macs2", line 614, in <module>
    main()
  File "/usr/local/bin/macs2", line 56, in main
    run( args )
  File "/usr/local/lib/python2.7/dist-packages/MACS2/callpeak_cmd.py", line 70, in run
    else:       (treat, control) = load_tag_files_options  (options)
  File "/usr/local/lib/python2.7/dist-packages/MACS2/callpeak_cmd.py", line 408, in load_tag_files_options
    control = options.parser(options.cfile[0], buffer_size=options.buffer_size).build_fwtrack()
  File "MACS2/IO/Parser.pyx", line 200, in MACS2.IO.Parser.GenericParser.build_fwtrack (MACS2/IO/Parser.c:4271)
  File "MACS2/IO/Parser.pyx", line 215, in MACS2.IO.Parser.GenericParser.build_fwtrack (MACS2/IO/Parser.c:3958)
  File "MACS2/IO/Parser.pyx", line 351, in MACS2.IO.Parser.BEDParser.__fw_parse_line (MACS2/IO/Parser.c:5869)
IndexError: list index out of range
noncodo commented 8 years ago

Similar error. Could it be a BED formatted output problem?

format = BED

...

effective genome size = 4.90e+08

band width = 250

model fold = [5, 50]

qvalue cutoff = 5.00e-02

Larger dataset will be scaled towards smaller dataset.

Range for calculating regional lambda is: 1000 bps and 10000 bps

Broad region calling is off

INFO @ Fri, 15 Jan 2016 14:47:53: #1 read tag files... INFO @ Fri, 15 Jan 2016 14:47:53: #1 read treatment tags... Traceback (most recent call last): File "/share/ClusterShare/software/contrib/fabbus/python/2.7.3/bin/macs2", line 559, in main() File "/share/ClusterShare/software/contrib/fabbus/python/2.7.3/bin/macs2", line 56, in main run( args ) File "/share/ClusterShare/software/contrib/fabbus/python/2.7.3/lib/python2.7/site-packages/MACS2/callpeak.py", line 70, in run else: (treat, control) = load_tag_files_options (options) File "/share/ClusterShare/software/contrib/fabbus/python/2.7.3/lib/python2.7/site-packages/MACS2/callpeak.py", line 389, in load_tag_files_options ttsize = tp.tsize() File "cParser.pyx", line 181, in MACS2.IO.cParser.GenericParser.tsize (MACS2/IO/cParser.c:3368) File "cParser.pyx", line 314, in MACS2.IO.cParser.BEDParser.__tlen_parse_line (MACS2/IO/cParser.c:4980) IndexError: list index out of range

taoliu commented 8 years ago

Possible. The BED file input must contain at least 6 columns including chromosome, start, end, name, score, and strand, and the delimiter should be 'tab' or '\t'. 'White spaces' don't work. Perhaps you have to use galaxy tool to first convert the delimiter.