MACS icon indicating copy to clipboard operation
MACS copied to clipboard

MACS wont install

Open decapicone opened this issue 4 years ago • 3 comments

git clone doesnt work:

git clone [email protected]:taoliu/MACS.git
Cloning into 'MACS'...
The authenticity of host 'github.com (140.82.114.3)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,140.82.114.3' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

install instruction on the website does not work:

pip install MACS2
Collecting MACS2
  Using cached MACS2-2.2.7.1.tar.gz (2.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=>=1.17 in c:\users\danie\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from MACS2) (1.20.0)
Building wheels for collected packages: MACS2
  Building wheel for MACS2 (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\danie\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' 'C:\Users\danie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\danie\AppData\Local\Temp\tmpfun47h13'
       cwd: C:\Users\danie\AppData\Local\Temp\pip-install-414hvz4o\macs2_e89766b7fac946bc8f3f6165c43fb583
  Complete output (44 lines):
  Requirement already satisfied: numpy>=1.17 in c:\users\danie\appdata\local\temp\pip-build-env-huutz002\overlay\lib\site-packages (1.20.0)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\MACS2
  copying MACS2\bdgbroadcall_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\bdgcmp_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\bdgdiff_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\bdgopt_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\bdgpeakcall_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\callpeak_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\cmbreps_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\Constants.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\diffpeak_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\filterdup_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\OptValidator.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\OutputWriter.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\pileup_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\predictd_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\randsample_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\refinepeak_cmd.py -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\__init__.py -> build\lib.win-amd64-3.9\MACS2
  creating build\lib.win-amd64-3.9\MACS2\IO
  copying MACS2\IO\__init__.py -> build\lib.win-amd64-3.9\MACS2\IO
  copying MACS2\cPosValCalculation.pxd -> build\lib.win-amd64-3.9\MACS2
  copying MACS2\khash.pxd -> build\lib.win-amd64-3.9\MACS2
  running build_ext
  skipping 'MACS2\Prob.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\Parser.c' Cython extension (up-to-date)
  skipping 'MACS2\Pileup.c' Cython extension (up-to-date)
  skipping 'MACS2\PeakModel.c' Cython extension (up-to-date)
  skipping 'MACS2\PeakDetect.c' Cython extension (up-to-date)
  skipping 'MACS2\Signal.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\PeakIO.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\BedGraphIO.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\FixWidthTrack.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\PairedEndTrack.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\BedGraph.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\ScoreTrack.c' Cython extension (up-to-date)
  skipping 'MACS2/IO\CallPeakUnit.c' Cython extension (up-to-date)
  building 'MACS2.Prob' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for MACS2
Failed to build MACS2
ERROR: Could not build wheels for MACS2 which use PEP 517 and cannot be installed directly

Please make an installer that works

decapicone avatar Jan 31 '21 04:01 decapicone

Installed python 3.8.6 and still wont work pip3.8 install macs2 same error

decapicone avatar Feb 01 '21 04:02 decapicone

Hi @decapicone , Windows OS is not supported. I recommend either MacOS or any Linux OS.

taoliu avatar Feb 04 '21 17:02 taoliu

i found macs2.2.7.1 could install in windows, after conda install libpython m2w64-toolchain -c msys2 . but when using callpeak ,it's have a trouble that OverflowError: Python int too large to convert to C long

> Traceback (most recent call last):
  File "C:/ProgramData/Miniconda3/envs/ngs/Scripts/macs2", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "D:\wgc_tools\MACS-2.2.7.1\bin\macs2", line 653, in <module>
    main()
  File "D:\wgc_tools\MACS-2.2.7.1\bin\macs2", line 51, in main
    run( args )
  File "d:\wgc_tools\macs-2.2.7.1\MACS2\callpeak_cmd.py", line 256, in run
    peakdetect.call_peaks()
  File "MACS2/PeakDetect.pyx", line 107, in MACS2.PeakDetect.PeakDetect.call_peaks
    self.peaks = self.__call_peaks_w_control ()
  File "MACS2/PeakDetect.pyx", line 153, in MACS2.PeakDetect.PeakDetect.__call_peaks_w_control
    treat_sum = self.treat.length
OverflowError: Python int too large to convert to C long

but i try to edit the PeakDetect.pyx

    cdef:
        int i
        float lambda_bg, effective_depth_in_million
        float treat_scale, d
        list ctrl_scale_s, ctrl_d_s
        long long treat_total, control_total
        long long treat_sum              # approx sum of treatment pileup values
        long long control_sum            # approx sum of control pileup values
        

callpeak can work. Although this problem is easy to solve, it is still a bit strange. @taoliu By the way, my os is cp38_win_amd64

Nuvolar avatar Oct 24 '21 09:10 Nuvolar