0

I am trying to install the WACS algorithm which is an extension of macs2 callpeak (available on software page of Perkinslab). In the process, I created a new conda environment with python 2.7.9 (conda create -n py279_2 -c free python=2.7.9), then installed numpy, scipy, pandas through pip and installed samtools and bedtools through bioconda as mentioned in the readme file.

I installed the macs2 using python setup.py install (available in the downloaded file). After completing the installation I performed peak calling with the WACS extension (callpeak_wacs). I am attaching the lines that I used to perform peak calling here.

macs2 \
callpeak_wacs \
-t IP_B5_R1_sorted_unique.bam \
-c MOCK_B5_R1_sorted_unique.bam MOCK_B6_R1_sorted_unique.bam \
-w 0.13866679257704465 0.42968144125181074 \
-g 3.73e+08 \
-f BAM \
-n B5 \
--outdir B5_Out 

It returned the following error.

  File "/home/anaconda3/envs/py279/bin/macs2", line 4, in <module>
    __import__('pkg_resources').run_script('MACS2==2.1.3', 'macs2')
  File "/home/anaconda3/envs/py279/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/anaconda3/envs/py279/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1462, in run_script
    exec(code, namespace, namespace)
  File "/home/anaconda3/envs/py279/lib/python2.7/site-packages/MACS2-2.1.3-py2.7-linux-x86_64.egg/EGG-INFO/scripts/macs2", line 754, in <module>
    main()
  File "/home/anaconda3/envs/py279/lib/python2.7/site-packages/MACS2-2.1.3-py2.7-linux-x86_64.egg/EGG-INFO/scripts/macs2", line 61, in main
    from MACS2.callpeakw_cmd import run
  File "/home/anaconda3/envs/py279/lib/python2.7/site-packages/MACS2-2.1.3-py2.7-linux-x86_64.egg/MACS2/callpeakw_cmd.py", line 34, in <module>
    from MACS2.OptValidator import opt_validate_wacs
  File "/home/anaconda3/envs/py279/lib/python2.7/site-packages/MACS2-2.1.3-py2.7-linux-x86_64.egg/MACS2/OptValidator.py", line 27, in <module>
    from MACS2.IO.Parser import BEDParser, ELANDResultParser, ELANDMultiParser, \
  File "MACS2/IO/Parser.pyx", line 27, in init MACS2.IO.Parser
  File "MACS2/IO/FixWidthTrack.pyx", line 31, in init MACS2.IO.FixWidthTrack
  File "MACS2/Pileup.pyx", line 23, in init MACS2.Pileup
  File "MACS2/IO/PairedEndTrack.pyx", line 25, in init MACS2.IO.PairedEndTrack
ImportError: cannot import name quick_pileup

Please help me to understand the error and provide suggestions to fix it.

Thank you in advance

1 Answers1

0

I had the same error and after doing some investigations and trying lots of solutions such as uninstalling numpy, then reinstall it --> nothing worked!

What I did is that I installed macs3 pip install MACS3 then everything worked!

  • Thanks for the reply. I want to install macs2 (with 2.7.9 python version) which is available in the downloaded WACS package. – Raghavaram P Apr 30 '22 at 18:33