nboley / idr

IDR
GNU General Public License v2.0
164 stars 45 forks source link

Empty merged picks list #46

Open amitjavilaventura opened 4 years ago

amitjavilaventura commented 4 years ago

Hello,

I am having a weird issue with IDR.

I am running the command with 2 .narrowPeak files as input, p.value in --rank and --plot option on (code below). Another strange thing that is happening is that the option --output-file-type narrowPeak cannot be detected.

idr --samples 03_macs2/${rep1}/${rep1}_peaks.sort.narrowPeak 03_macs2/${rep2}/${rep2}_peaks.sort.narrowPeak \
--input-file-type narrowPeak \
--rank p.value \
--soft-idr-threshold 0.1 \
-o 05_IDR/${condition}/${condition}.idr \
--log-output-file 05_IDR/${condition}/log_${condition}.idr.log \
--plot 

The problem here is that the output file that IDR is returning is empty. The plot seems to be correct. Below there is the log file:

Initial parameter values: [0.10 1.00 0.20 0.50]
Final parameter values: [1.52 1.18 0.81 0.73]

When I activate the option --only-merge-peaks it returns a list with all the merged peaks. However, all those peaks in the list have a score of 0 and a -log10(local_IDR_value) of 0. I am giving the log file below:

Number of reported peaks - 20206/20206 (100.0%)

Number of peaks passing IDR cutoff of 0.1 - 0/20206 (0.0%)

I know it is not a problem from the samples, because I tried with other files that were already analyzed by another bioinformatician that had a correct output (and I also tried with the code used to analyze them) and the error seems to be the same.

This is the error that is printed in the terminal:

Traceback (most recent call last):
  File "/hpcnfs/home/ieo5089/miniconda3/envs/idr/bin/idr", line 4, in <module>
    __import__('pkg_resources').run_script('idr==2.0.2', 'idr')
  File "/hpcnfs/home/ieo5089/miniconda3/envs/idr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/hpcnfs/home/ieo5089/miniconda3/envs/idr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1462, in run_script
    exec(code, namespace, namespace)
  File "/hpcnfs/home/ieo5089/miniconda3/envs/idr/lib/python3.7/site-packages/idr-2.0.2-py3.7-linux-x86_64.egg/EGG-INFO/scripts/idr", line 10, in <module>
    idr.idr.main()
  File "/hpcnfs/home/ieo5089/miniconda3/envs/idr/lib/python3.7/site-packages/idr-2.0.2-py3.7-linux-x86_64.egg/idr/idr.py", line 774, in main
    useBackwardsCompatibleOutput=args.use_old_output_format)
  File "/hpcnfs/home/ieo5089/miniconda3/envs/idr/lib/python3.7/site-packages/idr-2.0.2-py3.7-linux-x86_64.egg/idr/idr.py", line 415, in write_results_to_file
    if localIDRs == None or IDRs == None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

If someone could help me solve the problem, it would be extremely useful for me. Thank you.

amitjavilaventura commented 4 years ago

Finally I solved the problem.

It was a version problem. I had the version 2.0.2 (specified in the IDR Documentation), but there is a 'hidden' version 2.0.3 which solves the problem I was having.

amitjavilaventura commented 4 years ago

You can reference to issue #44, which had the same problem.