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

fix bug (when summit in merged peaks is None) #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leepc12
Copy link

@leepc12 leepc12 commented Apr 18, 2017

I got errors when running pipelines for some samples from Butcher's lab. This PR is a fix for it.

                Traceback (most recent call last):
                  File "/software/miniconda3/envs/bds_atac_py3/bin/idr", line 4, in <module>
                    __import__('pkg_resources').run_script('idr==2.0.3', 'idr')
                  File "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 744, in run_script
                  File "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 1499, in run_script
                  File "/software/miniconda3/envs/bds_atac_py3/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 "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 899, in main
                    useBackwardsCompatibleOutput=args.use_old_output_format)
                  File "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 486, in write_results_to_file
                    merged_peak, IDR, localIDR, output_file_type, signal_type)
                  File "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 352, in build_idr_output_line_with_bed6
                    mean(x.summit-x.start for x in m_pk.pks[key])
                  File "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 15, in mean
                    items = list(items)
                  File "/software/miniconda3/envs/bds_atac_py3/lib/python3.5/site-packages/idr-2.0.3-py3.5-linux-x86_64.egg/idr/idr.py", line 352, in <genexpr>
                    mean(x.summit-x.start for x in m_pk.pks[key])
                TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

@huanhuantai
Copy link

Hi, may I ask how the peak summit position is calculated in IDR pipeline? after IDR, I got chromosome start and end position per peak but the peak summit position looks like a relative position relative to the peak length. How can I get the absolute peak summit position relative to chromosome? The absolute peak summit position is important for me to perform the downstream analysis. Many thanks!

@YogiOnBioinformatics
Copy link

@leepc12 will you ever be merging this changes?
I ask since I am experiencing this issue currently.

@leepc12
Copy link
Author

leepc12 commented Jan 29, 2020

@YogiOnBioinformatics: This repo has been deprecated. This is already fixed in the new repo: https://github.com/kundajelab/idr

@YogiOnBioinformatics
Copy link

@leepc12 I really appreciate your quick response!
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

Successfully merging this pull request may close these issues.

3 participants