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

Error when calling callpeak function #13

Closed
philyang07 opened this issue Jan 20, 2021 · 21 comments
Closed

Error when calling callpeak function #13

philyang07 opened this issue Jan 20, 2021 · 21 comments

Comments

@philyang07
Copy link

Hi,

I tried calling callpeak on a BAM file:

callpeak("demux_testfastq_S1_L001_R1_001_aligned.bam")
Error in system2(python.cmd, c("-E", "-c", shQuote("print(1)")), stdout = TRUE, :
'"C:\Users\phily\AppData\Local\basilisk\1.3.6/0/python.exe"' not found

I'm using the R development version (4.1.0) and on Windows 10.

@philyang07
Copy link
Author

I think may have been due to issues with Conda so I tried this again on a virtual machine running Windows 10:

callpeak("C:\repos\scPipe\data\demux_testfastq_S1_L001_R1_001_aligned.bam")
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

Package Plan

environment location: C:\Users\yang.p\AppData\Local\basilisk\1.3.6\MACSr-0.99.9\env_macs

added / updated specs:
- python=3.7.7

The following NEW packages will be INSTALLED:

ca-certificates conda-forge/win-64::ca-certificates-2020.12.5-h5b45459_0
certifi conda-forge/win-64::certifi-2020.12.5-py37h03978a9_1
openssl conda-forge/win-64::openssl-1.1.1i-h8ffe710_0
pip conda-forge/noarch::pip-20.3.3-pyhd8ed1ab_0
python pkgs/main/win-64::python-3.7.7-h81c818b_4
python_abi conda-forge/win-64::python_abi-3.7-1_cp37m
setuptools conda-forge/win-64::setuptools-49.6.0-py37h03978a9_3
sqlite conda-forge/win-64::sqlite-3.34.0-h8ffe710_0
vc conda-forge/win-64::vc-14.2-hb210afc_2
vs2015_runtime conda-forge/win-64::vs2015_runtime-14.28.29325-h5e1d092_0
wheel conda-forge/noarch::wheel-0.36.2-pyhd3deb0d_0
wincertstore conda-forge/win-64::wincertstore-0.2-py37h03978a9_1006

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

==> WARNING: A newer version of conda exists. <==
current version: 4.8.3
latest version: 4.9.2

Please update conda by running

$ conda update -n base -c defaults conda

To activate this environment, use

$ conda activate C:\Users\yang.p\AppData\Local\basilisk\1.3.6\MACSr-0.99.9\env_macs

To deactivate an active environment, use

$ conda deactivate

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

Package Plan

environment location: C:\Users\yang.p\AppData\Local\basilisk\1.3.6\MACSr-0.99.9\env_macs

added / updated specs:
- python=3.7.7

The following packages will be UPDATED:

ca-certificates conda-forge::ca-certificates-2020.12.~ --> pkgs/main::ca-certificates-2021.1.19-haa95532_0

The following packages will be SUPERSEDED by a higher-priority channel:

certifi conda-forge::certifi-2020.12.5-py37h0~ --> pkgs/main::certifi-2020.12.5-py37haa95532_0
openssl conda-forge::openssl-1.1.1i-h8ffe710_0 --> pkgs/main::openssl-1.1.1i-h2bbff1b_0

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

==> WARNING: A newer version of conda exists. <==
current version: 4.8.3
latest version: 4.9.2

Please update conda by running

$ conda update -n base -c defaults conda

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

Package Plan

environment location: C:\Users\yang.p\AppData\Local\basilisk\1.3.6\MACSr-0.99.9\env_macs

added / updated specs:
- numpy[version='>=1.17']
- python=3.7.7

The following NEW packages will be INSTALLED:

intel-openmp conda-forge/win-64::intel-openmp-2020.3-h57928b3_311
libblas conda-forge/win-64::libblas-3.9.0-7_mkl
libcblas conda-forge/win-64::libcblas-3.9.0-7_mkl
liblapack conda-forge/win-64::liblapack-3.9.0-7_mkl
mkl conda-forge/win-64::mkl-2020.4-hb70f87d_311
numpy conda-forge/win-64::numpy-1.19.5-py37hd20adf4_1

The following packages will be UPDATED:

certifi pkgs/main::certifi-2020.12.5-py37haa9~ --> conda-forge::certifi-2020.12.5-py37h03978a9_1

The following packages will be SUPERSEDED by a higher-priority channel:

ca-certificates pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-h5b45459_0
openssl pkgs/main::openssl-1.1.1i-h2bbff1b_0 --> conda-forge::openssl-1.1.1i-h8ffe710_0

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

==> WARNING: A newer version of conda exists. <==
current version: 4.8.3
latest version: 4.9.2

Please update conda by running

$ conda update -n base -c defaults conda

Collecting macs3==3.0.0a5
Using cached MACS3-3.0.0a5.tar.gz (588 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\yang.p\AppData\Local\basilisk\13C0E0~1.6\MACSR-1.9\env_macs\python.exe' 'C:\Users\yang.p\AppData\Local\basilisk\13C0E01.6\MACSR-1.9\env_macs\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\yang.p\AppData\Local\Temp\tmp9elg8_x2'
cwd: C:\Users\yang.p\AppData\Local\Temp\pip-install-o__ps3v3\macs3_1ffa8712b533490d9b9dff5335923622
Complete output (28 lines):
Traceback (most recent call last):
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-1.9\env_macs\lib\site-packages\pip_vendor\pep517_in_process.py", line 280, in
main()
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-1.9\env_macs\lib\site-packages\pip_vendor\pep517_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-1.9\env_macs\lib\site-packages\pip_vendor\pep517_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\yang.p\AppData\Local\Temp\pip-build-env-5sm3g9ux\overlay\Lib\site-packages\setuptools\build_meta.py", line 150, in get_requires_for_build_wheel
config_settings, requirements=['wheel'])
File "C:\Users\yang.p\AppData\Local\Temp\pip-build-env-5sm3g9ux\overlay\Lib\site-packages\setuptools\build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "C:\Users\yang.p\AppData\Local\Temp\pip-build-env-5sm3g9ux\overlay\Lib\site-packages\setuptools\build_meta.py", line 254, in run_setup
self).run_setup(setup_script=setup_script)
File "C:\Users\yang.p\AppData\Local\Temp\pip-build-env-5sm3g9ux\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 148, in
main()
File "setup.py", line 70, in main
gcc_version_check = subprocess.check_output( ["gcc", "--version"], universal_newlines=True)
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-1.9\env_macs\lib\subprocess.py", line 411, in check_output
**kwargs).stdout
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-1.9\env_macs\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-1.9\env_macs\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\yang.p\AppData\Local\basilisk\13C0E0
1.6\MACSR-~1.9\env_macs\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

ERROR: Command errored out with exit status 1: 'C:\Users\yang.p\AppData\Local\basilisk\13C0E0~1.6\MACSR-1.9\env_macs\python.exe' 'C:\Users\yang.p\AppData\Local\basilisk\13C0E01.6\MACSR-~1.9\env_macs\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\yang.p\AppData\Local\Temp\tmp9elg8_x2' Check the logs for full command output.
Error in setupBasiliskEnv(envpath, packages = .getPackages(env), channels = .getChannels(env), :
failed to install additional packages via pip

As you can, see another error occurred.

@hubentu
Copy link
Contributor

hubentu commented Jan 20, 2021

Hi @philyang07 , the MACSr is currently not compatible with the Windows system, because the MACS3 can't be installed in Windows. Please try to use it with the WSL in windows.

@philyang07
Copy link
Author

Hi @hubentu, R version 4.1.0 is required, but I can't seem to find it for Linux. It's a new development version?

@hubentu
Copy link
Contributor

hubentu commented Jan 21, 2021

Hi @philyang07 , yes, the tool is built base on the R development version.
You can download it here.
https://cloud.r-project.org/src/base-prerelease/R-devel.tar.gz
Or you can simply change the version in the DESCRIPTION file (Depends: R (>= 4.1.0)) to 4.0, so you can use it in the current version of R.

@philyang07
Copy link
Author

philyang07 commented Jan 22, 2021

Hi,

I've now downloaded MACSr successfully in Linux, but now another error occurs:

image

@hubentu
Copy link
Contributor

hubentu commented Jan 22, 2021

Hi @philyang07 , can you try the example in the manual first?

eh <- ExperimentHub::ExperimentHub()
CHIP <- eh[["EH4558"]]
CTRL <- eh[["EH4563"]]
callpeak(CHIP, CTRL, gsize = 5.2e7, cutoff_analysis = TRUE,
     outdir = tempdir(), name = "callpeak_narrow0")

Also, you can try to run macs2 to call you bam directly first. You might need to adjust some parameter, especially gsize.

@philyang07
Copy link
Author

Hi @hubentu,

When I try it with R version 4.0.3, the following error occurs:
image

When I try it with the R development version, the following error occurs:
image

Yeah, MACS2 works fine.

@hubentu
Copy link
Contributor

hubentu commented Jan 24, 2021

Hi @philyang07 , you don't need to install the meta package. The bed file (CHIP) has been downloaded from ExperimentHub to your local cache (file.exists(CHIP)).

The same test datasets from MACS/test were used to run tests in the R package. The bed file can also be downloaded from the original repository CTCF_SE_ChIP_chr22_50k.bed.gz.

@philyang07
Copy link
Author

Hi @hubentu, yep it works. I realised I just needed to specify gsize when calling it on the bam file that I provided.

@philyang07
Copy link
Author

Hi @hubentu,

When adjusting the effective genome size, it seems like the error below occurs for larger values e.g. 2.7e9 (the default value of gsize for MACS3).

Hi,

I've now downloaded MACSr successfully in Linux, but now another error occurs:

image

However, the error doesn't occur when using callpeaks from MACS2 directly (which uses 2.7e9 as the default value).

@hubentu
Copy link
Contributor

hubentu commented Jan 28, 2021

Hi @philyang07 , I couldn't reproduce your error since I don't have your bam file. Could you share your data?Thx.

@philyang07
Copy link
Author

Hi @hubentu,

Yep, I'll attach it right here.

demux_testfastq_S1_L001_R1_001_aligned.zip

@krovi137
Copy link

krovi137 commented Feb 3, 2021

Hi @hubentu,

I'm facing the same problem that @philyang07 was previously facing regarding the development version of R. I currently have R v4.0.3 and do not want to upgrade to the development version. How would I change the version in the DESCRIPTION file? I tried looking this up online but was not able to find a solution. Please let me know thanks!

@hubentu
Copy link
Contributor

hubentu commented Feb 3, 2021

Hi @krovi137 , you can clone the repo to local, then modify the line in the DESCRIPTION.
Depends: R (>= 4.1.0)
to
Depends: R (>= 4.0.0)
Then install R CMD INSTALL it.

@krovi137
Copy link

krovi137 commented Feb 3, 2021

Thank you this worked!

@philyang07
Copy link
Author

Hi @hubentu,

I raised the issue with @taoliu and he figured out the problem (it was with MACS3): macs3-project/MACS#442

@hubentu
Copy link
Contributor

hubentu commented Feb 6, 2021

@philyang07 I will update the dependency when the new version release.

@taoliu
Copy link
Contributor

taoliu commented Feb 9, 2021

@hubentu v3.0.0a6 with fixes for this issue has been released to PyPI: https://pypi.org/project/MACS3/

@taoliu
Copy link
Contributor

taoliu commented Feb 9, 2021

@philyang07 Regarding the paired-peak model, I will explain more in the page macs3-project/MACS#442

@hubentu
Copy link
Contributor

hubentu commented Feb 10, 2021

@philyang07 , MACS has been updated to 3.0.0a6. Please have a try. Thanks.

res <- callpeak("demux_testfastq_S1_L001_R1_001_aligned.bam", gsize=48000000, outdir="/tmp")
> res
macsList class
$outputs:
 /tmp/NA_model.r
 /tmp/NA_peaks.narrowPeak
 /tmp/NA_peaks.xls
 /tmp/NA_summits.bed 
$arguments: tfile, gsize, outdir 
$log:
 INFO  @ Wed, 10 Feb 2021 10:29:48: 
 # Command line: 
 # ARGUMENTS LIST:
 # name = NA
 # format = AUTO
...

@philyang07
Copy link
Author

Hi @hubentu, thanks for updating, it works fine now.

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

No branches or pull requests

4 participants