i2bc / SURFMAP

Other
20 stars 3 forks source link

Error during spherical coord computation #11

Closed shaharsu closed 8 months ago

shaharsu commented 8 months ago

Hi,

I've been looking for an algorithm to do these surfaces for a while - thanks so much for writing this! I'm super excited to use it, but have been running into this issues (run locally, without docker). command: surfmap -pdb 1UBQ.pdb -tomap stickiness -verbose 2

output:

SURFMAP: Projection of protein surface features on 2D map
Copyright (C) 2021  H. Schweke
Version: 2.0.0

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------------------------------------------------------------
SURFMAP relies on the use of MSMS (version 2.6.1) - Copyright (c) M. F. Sanner, 1994.

As a corollary of MSMS's license terms and conditions, by using SURFMAP,
you agree to acknowledge the use of the MSMS software that results in any
published work, including scientific papers, films and videotapes by
citing the following reference:

    Sanner, M.F., Spehner, J.-C., and Olson, A.J. (1996) Reduced surface:
    an efficient way to compute molecular surfaces. Biopolymers, Vol. 38.,
    (3), 305-320.

MSMS is free for academic use. For commercial use please contact
M. F. Sanner at sanner@scripps.edu.
--------------------------------------------------------------------------------
If you use SURFMAP for your research, please cite the following
papers:
    - Hugo Schweke, Marie-Hélène Mucchielli, Nicolas Chevrollier,
      Simon Gosset, Anne Lopes (2021) SURFMAP: a software for mapping
      in two dimensions protein surface features. bioRxiv
      2021.10.15.464543; doi: https://doi.org/10.1101/2021.10.15.464543

    - Sanner, M.F., Spehner, J.-C., and Olson, A.J. (1996) Reduced
      surface: an efficient way to compute molecular surfaces.
      Biopolymers, Vol. 38., (3), 305-320.
--------------------------------------------------------------------------------

2023-10-30 16:30:13 — INFO — surfmap.lib.core.surfmap_from_pdb ........................ SURFACE MAPPING OF THE STICKINESS PROPERTY
2023-10-30 16:30:13 — INFO — surfmap.lib.core.surfmap_from_pdb ........................ Step 1: computing a shell around the protein surface
2023-10-30 16:30:13 — DEBUG — surfmap.tools.compute_shell.run ........................... Convert pdb to xyzr format (expected MSMS input)
2023-10-30 16:30:13 — DEBUG — surfmap.tools.compute_shell.run ........................... Running MSMS command: /home/ssukenik/src/surfmap/surfmap/utils/MSMS/msms -if output_SURFMAP_1UBQ_stickiness/shells/1UBQ.xyzr -of output_SURFMAP_1UBQ_stickiness/shells/1UBQ
2023-10-30 16:30:13 — DEBUG — surfmap.tools.compute_shell.run ........................... Convert MSMS .vert file into CSV format
2023-10-30 16:30:13 — DEBUG — surfmap.tools.compute_shell.run ........................... Convert CSV into PDB format
2023-10-30 16:30:13 — INFO — surfmap.lib.core.surfmap_from_pdb ........................ Step 2: computing the property values and/or assign it to the shell particles
2023-10-30 16:30:13 — DEBUG — surfmap.tools.SurfmapTools.run_particles_mapping ........................... Get dictionary of the PDB structure from 1UBQ.pdb
2023-10-30 16:30:13 — DEBUG — surfmap.tools.SurfmapTools.run_particles_mapping ........................... Get dictionary of the shell structure from output_SURFMAP_1UBQ_stickiness/shells/1UBQ_shell.pdb
2023-10-30 16:30:13 — DEBUG — surfmap.tools.SurfmapTools.run_particles_mapping ........................... Retrieving the center of mass of the pdb structure
2023-10-30 16:30:13 — INFO — surfmap.lib.core.surfmap_from_pdb ........................ Step 3: computing the 2D sinusoidal projection coordinates of each shell particle
2023-10-30 16:30:13 — DEBUG — surfmap.lib.core.compute_coords_list ........................... Running the command: Rscript /home/ssukenik/src/surfmap/surfmap/scripts/computeCoordList.R -f output_SURFMAP_1UBQ_stickiness/1UBQ_stickiness_partlist.out -s 5 -P sinusoidal -o output_SURFMAP_1UBQ_stickiness
Installing packages into ‘/home/ssukenik/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Error in contrib.url(repos, type) :
  trying to use CRAN without setting a mirror
Calls: install.packages -> startsWith -> contrib.url
Execution halted
2023-10-30 16:30:13 — ERROR — surfmap.lib.core.compute_coords_list ........................... Error occured during the computation of spherical coordinates of particles, the process will stop.
nchenche commented 8 months ago

Dear shaharsu,

Thanks a lot for your interest in using SURFMAP.

Your issue seems related to the default CRAN mirror in R that is used by R internally to fetch R packages from CRAN when using install.packages(). How did you install R on your machine?

In order to fix it, you could try the following:

  1. Open (or edit if it exists) your personal .Rprofile with your favorite editor:
    gedit ~/.Rprofile
  2. Add the following lines (or uncomment and edit if they are commented):
local({
  r <- getOption("repos")
  r["CRAN"] <- "https://cloud.r-project.org/"
  options(repos = r)
})
  1. Then save and exit.

  2. Open an interactive R terminal and try to install the following packages:

    
    packages <- c("optparse", "data.table", "mapproj")

Install packages not yet installed

installed_packages <- packages %in% rownames(installed.packages()) if (any(installed_packages == FALSE)) { install.packages(packages[!installed_packages]) }



If the step 4 works, then it should be ok for using SURFMAP. 

Let me know if it helps. By the way, we really advise to use the docker image, especially if you later want to compute electrostatics potential.

Sincerely,

NC
shaharsu commented 8 months ago

It worked!! Thanks so much for the quick and thorough response.

Shahar.