Bug when using --use-nonoverlapping-peaks option

42 views
Skip to first unread message

Toni Paternina

unread,
Feb 7, 2018, 12:40:55 PM2/7/18
to idr-discuss
Hello all,

idr (v 2.0.3 from git repo) keeps crashing when I use the --use-nonoverlapping-peaks:

/users/eame/paternin/virtualenv/python35/bin/idr --samples peak1.bed peak2.bed --input-file-type bed --output-file ouput.idr.bed --rank score --use-nonoverlapping-peaks --random-seed 105

When the script is about to write the output:

Traceback (most recent call last):
 
File "/users/eame/paternin/virtualenv/python35/bin/idr", line 4, in <module>
    __import__
('pkg_resources').run_script('idr==2.0.3', 'idr')
 
File "/users/eame/paternin/virtualenv/python35/lib/python3.5/site-packages/pkg_resources/__init__.py", line 719, in run_script
   
self.require(requires)[0].run_script(script_name, ns)
 
File "/users/eame/paternin/virtualenv/python35/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1504, in run_script
   
exec(code, namespace, namespace)
 
File "/import/bc_users/eame/paternin/virtualenv/python35/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/EGG-INFO/scripts/idr", line 10, in <module>
    idr
.idr.main()
 
File "/import/bc_users/eame/paternin/virtualenv/python35/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 900, in main
    useBackwardsCompatibleOutput
=args.use_old_output_format)
 
File "/import/bc_users/eame/paternin/virtualenv/python35/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 487, in write_results_to_file
    merged_peak
, IDR, localIDR, output_file_type, signal_type)
 
File "/import/bc_users/eame/paternin/virtualenv/python35/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 348, in build_idr_output_line_with_bed6
    rv
.append( "%i" % min(x.start for x in m_pk.pks[key]))
ValueError: min() arg is an empty sequence

After cheking what m_pk.pks[key] was returning, I found it was an empty list ([]) that maybe was overlooked by the if statement at line 341 of idr.py...

Do you think you can integrate a correction to the version in the repo?

Thanks!

Jin

unread,
Feb 7, 2018, 10:13:18 PM2/7/18
to idr-d...@googlegroups.com
Can you try again with a new repo at https://github.com/kundajelab/idr

Thanks,

Jin

--
You received this message because you are subscribed to the Google Groups "idr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idr-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Toni Paternina

unread,
Feb 8, 2018, 4:19:45 AM2/8/18
to idr-discuss
Hello,

I uninstalled idr, re-cloned the repo and re-installed. I still get the bug reporting the same error at line 348. Did I do something wrong?

Toni.
To unsubscribe from this group and stop receiving emails from it, send an email to idr-discuss...@googlegroups.com.

Jin

unread,
Feb 8, 2018, 10:11:11 AM2/8/18
to idr-d...@googlegroups.com
Can you use more relaxed idr threshold and try again? Use --idr-threshold.

Thanks,

Jin

To unsubscribe from this group and stop receiving emails from it, send an email to idr-discuss+unsubscribe@googlegroups.com.

Toni Paternina

unread,
Feb 12, 2018, 9:00:03 AM2/12/18
to idr-discuss
Thank you for your reply.

I actually circumvented the problem by replacing
if m_pk.pks[key] is None:
in line 341 by
if m_pk.pks[key] == []:

to evaluate whether there were overlapping peaks in both replicates.

I can try changing the thresholds to see if it influences how the peaks are being reported in the output.

Thank you !

Jin

unread,
Feb 12, 2018, 1:55:20 PM2/12/18
to idr-d...@googlegroups.com
Thanks! Please let us know the result then I will make a hot fix for it based on your implementation.

Jin

To unsubscribe from this group and stop receiving emails from it, send an email to idr-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages