IndexError: list index out of range

75 views
Skip to first unread message

Alex Chen

unread,
Jul 9, 2022, 12:37:33 AM7/9/22
to DANPOS
Hello,
When I use DANPOS3 at the following :

python ~/software/DANPOS3/danpos.py dpos test.bed -m 1

It raises the following error:

Namespace(bg=None, clonalcut=0, command='dpos', count=None, distance=100, edge=0, exclude_high_percent=0, exclude_low_percent=0, extend=80, fdr=1, fs=None, gapfill=0, height=5, lmd=300, mafrsz=300, mifrsz=50, name='test', nonzero=0, nor='F', nor_region_file=None, paired=1, path='test.bed', pheight='0', position_reference=None, ratio=0.9, save=0, separator1=None, smooth_width=20, span=10, testcut='0', width=40)
rd 100 , step 10  fcut, 54.49770637375484

pooling group test. ...
Traceback (most recent call last):
  File "/home/User/bio/tools/DANPOS3/danpos.py", line 1365, in <module>
    if sys.argv[1]=='dpos':runDANPOS(command='dpos')
  File "/home/ User/bio/tools/DANPOS3/danpos.py", line 424, in runDANPOS
    pcfer=0)#args.pcfer)#0)
  File "/home/ User/bio/tools/DANPOS3/functions.py", line 261, in danpos
    pooledgroups[groupname]=groups[groupname].pop(filenames[0])
IndexError: list index out of range

For my input bed file:

$ head test.bed 

3       5586963 5587113 A01415:273:HYNF3DSX2:2:1101:1000:14184/1        42      -
3       5586964 5587114 A01415:273:HYNF3DSX2:2:1101:1000:14184/2        42      +
1       8666638 8666788 A01415:273:HYNF3DSX2:2:1101:10013:10034/1       42      +
1       8666643 8666793 A01415:273:HYNF3DSX2:2:1101:10013:10034/2       42      -
3       18706956        18707106        A01415:273:HYNF3DSX2:2:1101:10013:18897/1       40      +
3       18706963        18707113        A01415:273:HYNF3DSX2:2:1101:10013:18897/2       40      -
5       19834124        19834274        A01415:273:HYNF3DSX2:2:1101:10013:28510/1       42      +
5       19834136        19834286        A01415:273:HYNF3DSX2:2:1101:10013:28510/2       42      -
4       13310169        13310314        A01415:273:HYNF3DSX2:2:1101:10022:15593/1       42      -
4       13310170        13310315        A01415:273:HYNF3DSX2:2:1101:10022:15593/2       42      +


My Python environment:

Python version 3.7.6
numpy.version. 1.18.5
htslib version 1.9
R version 4.2.1
rpy2 version 3.3.3

NP

unread,
Sep 22, 2022, 5:07:02 PM9/22/22
to DANPOS
Same here, although my python env has all versions recommended at install and i'm starting from namesorted bams

simon holzinger

unread,
Sep 23, 2022, 8:00:09 AM9/23/22
to DANPOS
Hi,

I am having problems to reproduce the error... is this the whole output in your terminal?  is your `test.bed` file in the current working directory when starting DANPOS?

Usually DANPOS repeats the command, write namespace and then first parses the file(s) before pooling them (see below with the part of your provided input).

Best wishes
Simon

command:

python ~/software/DANPOS3/danpos.py dpos test.bed -m 1

Namespace(bg=None, clonalcut=0, command='dpos', count=None, distance=100, edge=0, exclude_high_percent=0, exclude_low_percent=0, extend=80, fdr=1, fs=None, gapfill=0, height=5, lmd=300, mafrsz=300, mifrsz=50, name='result', nonzero=0, nor='F', nor_region_file=None, paired=1, path='test.bed', pheight='0', position_reference=None, ratio=0.9, save=0, separator1=None, smooth_width=20, span=10, testcut='0', width=40)

rd 100 , step 10  fcut, 54.49770637375484

parsing from bed file test.bed ...

parsing finished, 10 reads parsed

100.0

---------------------------------------------------------------------------------------------------- -149 1

100.0

---------------------------------------------------------------------------------------------------- 155 1

100.0

---------------------------------------------------------------------------------------------------- 157 1

100.0

---------------------------------------------------------------------------------------------------- 162 1

average fragment size: 81.25

most enriched fragment size: [-149, 155, 157, 162]

1 pairs failed due to locations on same strands

0 reads have no mate reads

extend to 80

generating wig ...

time elapsed: 0.11017870903015137 seconds


pooling group test ...

smooth width: 20

completed

time elapsed: 1.713782787322998 seconds

time elapsed: 1.714017629623413 seconds 

NP

unread,
Sep 23, 2022, 10:23:06 AM9/23/22
to DANPOS
I removed the mitochondrion from bed input and it worked...
Reply all
Reply to author
Forward
0 new messages