i2bc / SURFMAP

Other
20 stars 3 forks source link

getting residue position over the 2d map #7

Open Yogesh1-11 opened 1 year ago

Yogesh1-11 commented 1 year ago

how can one mark the position or contribution of a particular residues or get the residues responsible for a surface property from surfmap 2d plot

nchenche commented 1 year ago

Dear Yogesh, hello to you too,

I think the command you are looking for is the following:

surfmap -pdb foo.pdb -tomap stickiness -res residues_to_map.txt

residues_to_map.txt is a 3 columns text file containing information about the list of residues to be mapped. This file must respect the following format:

Here is an example of such a file:

A  10  ASP
A  11  GLN
A  14  GLU

Please also note that:

Hope I answered your question, let me know if you are facing any issue or have other related questions.

Yogesh1-11 commented 1 year ago

hi nchenche thank you for your timely response.

actually i want to find differential regions in two hydrophobicity plots. so i will have to visually inspect the 2d plot and shortlist the residues which can differentiate two structures(for example two conformations of a protein). so i am doing exactly opposite.

also during electrostatics run i am getting error SURFACE MAPPING OF THE ELECTROSTATICS PROPERTY Step 1: computing a shell around the protein surface Step 2: computing electrostatics potential Error occured during the inputgen command, the process will stop. Status: 2

nchenche commented 1 year ago

Hi Yogesh,

Ok I better understand your purpose now.

So if you need to compare 2 maps (or more) quantitatively, you can do it with the file found in the smoothed_matrices/ directory whose name is suffixed with _smoothed_matrices.txt. This file contains all numeric data used to plot the projection: the coordinates of each cell, their associated property value and amino acid(s). An example below:

absc    ord     svalue  residues
5       5       Inf     NA
5       10      Inf     NA
5       15      Inf     NA
5       20      Inf     NA
5       25      Inf     NA
5       30      Inf     NA
5       35      Inf     NA
5       40      Inf     NA
5       45      Inf     NA
5       50      Inf     NA
5       55      Inf     NA
5       60      Inf     NA
5       65      Inf     NA
5       70      Inf     NA
5       75      Inf     NA
5       80      Inf     GLU_120_A
5       85      Inf     GLU_120_A, GLN_301_A
5       90      Inf     GLN_301_A
...
10      85      -0.565  GLN_301_A, GLU_120_A, ASP_124_A
10      90      -0.446  GLN_301_A
10      95      -0.39   GLN_301_A
10      100     -0.411  GLN_301_A
...

You will have to consider cells for which there is an associated svalue. Unfortunately we don't provide (yet) scripts to do such computations so you will have to build you own in-house tool with your favorite programmatic language. I understand that this is not a really simple solution but this is the only one I am able to provide right now :/

I am going to take a look and try to retrieve a version in which an interactive map could be visualized through a local server. You could for example hover over a cell and it will show you its associated property value and amino acid(s). But I can't guarantee i am gonna find it...

nchenche commented 1 year ago

hi nchenche thank you for your timely response.

actually i want to find differential regions in two hydrophobicity plots. so i will have to visually inspect the 2d plot and shortlist the residues which can differentiate two structures(for example two conformations of a protein). so i am doing exactly opposite.

also during electrostatics run i am getting error SURFACE MAPPING OF THE ELECTROSTATICS PROPERTY Step 1: computing a shell around the protein surface Step 2: computing electrostatics potential Error occured during the inputgen command, the process will stop. Status: 2

APBS can be really tricky to install, that is one of the reason we also provide a docker image to prevent the user falling into cumbersome process installation. So I recommend using the docker image for this.

For using the docker image of surfmap, you will have to install docker and that's all. Then, since you have already installed the surfmap package, you should be able to use the image by simply adding the --docker to any usual surfmap command.

surfmap -pdb foo.pdb -tomap stickiness --docker
Yogesh1-11 commented 1 year ago

hi again, apologies it might be naive i am a conda user

i dont know why --docker option as you specified is not working. alternatively i am trying docker run -v /home/administrator/b/25.pdb:/input/25.pdb -v /home/administrator/output:/output lopesi2bc/surfmap:2.0.0 surfmap -pdb /input/25.pdb -tomap stickiness but not getting any output files.

nchenche commented 1 year ago

Hi again,

I at least understand that you have correctly pulled the docker image. But I have absolutely no idea why --docker is not working, it may be a consequence of using conda which can sometimes lead to unexpected behaviour.

If you are comfortable with docker command line, you can do without --docker. Alternatively, you could try to reinstall surfmap in a virtual environment independant of conda (venv, virtualenv...).

By the way, I think I get why you don't have any output files. You need to add -d /output in your command:

docker run -v /home/administrator/b/25.pdb:/input/25.pdb -v /home/administrator/output:/output lopesi2bc/surfmap:2.0.0 surfmap -pdb /input/25.pdb -tomap stickiness -d /output
Yogesh1-11 commented 1 year ago

hi nchenche. thank you for the time. I tried surfmap. but couldnot get get local surface differences in the narrow cavity or binding sitw. may be there should be some kind of probe size to be adjusted. also i could not get how to do sasa normalization of electrostatics. These properties are detectable from pymol though: please suggest

nchenche commented 1 year ago

Hello Yogesh,

The only thing I can tell is that surfmap has the -s and -rad options you can play with:

  -rad RAD          Radius in Angstrom added to usual atomic radius (used for
                    calculation solvent excluded surface). The higher the
                    radius the smoother the surface. Defaults to 3.0
  -s S              Value defining the size of a grid cell. The value must be
                    a multiple of 180 and can not exceed 20. Defaults to 5

Besides that I can't really help. I would advise you though to analyse your binding site residues and their associated electrostatics value computed with surfmap and pymol in order to check if the fact that surfmap map display no major differences in the binding site region is totally inconsistent with what you would expect (in terms of residue composition for instance)

Deus-Lex commented 7 months ago

Hello, in response to APBS issue in this topic, also raised here https://github.com/i2bc/SURFMAP/issues/6 we solved this as follows if running in a local machine. We have ubuntu 22.04 lts with all updates to the date. python version is 3.10.12 and we did not use isolated environment as recommended in documentation.

(1) If after install SURFMAP and APBS (from apt or any other source) we had something like:

TypeError: expected str, bytes or os.PathLike object, not NoneType with PATH_APBS = Path(os.getenv("APBS"))

we took the latest APBS release 3.4.1 of pre-compiled binaries (https://github.com/Electrostatics/apbs/releases), downloaded, unpacked and placed its content into /home/USERNAME/apbs (folder after will contain "bin, include, lib and share" sub-folders) and then did path export (export APBS='/home/USERNAME/apbs') using terminal for current session or added this line into .bashrc using vim to open it for all sessions.

(2) after we tried to run the standard command surfmap -pdb xyz.pdb -tomap electrostatics. If in this case we had an error like this:

SURFACE MAPPING OF THE ELECTROSTATICS PROPERTY Step 1: computing a shell around the protein surface Step 2: computing electrostatics potential Error occured during the inputgen command, the process will stop. Status: 2

so we had to fix a pdb itself, since it may contain something that pdb2pqr/apbs cannot parcel (like doubling chains residues/rotamers). Also adding hydrogens in pymol/chimera and saving in another pdb may solve the problem.

(3) if after we run a normal/fixed pdb file and we got something like this:

SURFACE MAPPING OF THE ELECTROSTATICS PROPERTY Step 1: computing a shell around the protein surface Step 2: computing electrostatics potential Error occured during the inputgen command, the process will stop. Status: 1

so in this case we went to this file: /home/USERNAME/apbs/share/apbs/tools/manip/psize.py located to the line 173 and in this code fragment nsmall[i] = 32 * ((nsmall[i] - 1) / 32 - 1) + 1 if nsmall <= 0: sys.stdout.write( "You picked a memory ceiling that is too small\n"

we added [i] in nsmall variable in a line 174: nsmall[i] = 32 * ((nsmall[i] - 1) / 32 - 1) + 1 if nsmall[i] <= 0: sys.stdout.write( "You picked a memory ceiling that is too small\n"

After we run everything successfully.

Also during installation do not forget to install freesasa dependencies from here (https://freesasa.github.io/doxygen/md__Users_n642254_code_proteins_freesasa_README.html)

apt-get update apt-get install git build-essential autoconf libc++-dev libc++abi-dev apt-get install check libjson-c-dev libxml2-dev libxml2-utils

otherwise it may "unable to build wheels for freesasa". Thanks to the Authors for the really good software! It is really helpful!

PS. In addition to the error SURFACE MAPPING OF THE ELECTROSTATICS PROPERTY Step 1: computing a shell around the protein surface Step 2: computing electrostatics potential Error occured during the inputgen command, the process will stop. Status: 1

If pdb file contains charged atoms SPECIFICALLY O1- you may get this error, so you need to clarify the protein structure. N1+pdb2pqr "eats" well. If the pdb file contains specific section prior atoms' coordinates you may get the same error and this section should be removed.

JonathanLV123 commented 3 months ago

I have a question regarding the comparison of multiple proteins, you mention that: '_if you need to compare 2 maps (or more) quantitatively, you can do it with the file found in the smoothed_matrices/ directory whose name is suffixed with _smoothedmatrices.txt. This file contains all numeric data used to plot the projection: the coordinates of each cell, their associated property value and amino acid(s). ' . In the publication it says that to compare surfaces, proteins need to be structurally aligned prior to running surfmap. Do you have a recommended tool or method you use to align the structures where the output provides separate aligned pdb files?

Yogesh1-11 commented 3 months ago

You can align protein directly in pymol cealign command.

On Tue, 19 Mar, 2024, 3:15 pm JonathanLV123, @.***> wrote:

I have a question regarding the comparison of multiple proteins, you mention that: '_if you need to compare 2 maps (or more) quantitatively, you can do it with the file found in the smoothed_matrices/ directory whose name is suffixed with smoothed_matrices.txt. This file contains all numeric data used to plot the projection: the coordinates of each cell, their associated property value and amino acid(s). ' . In the publication it says that to compare surfaces, proteins need to be structurally aligned prior to running surfmap. Do you have a recommended tool or method you use to align the structures where the output provides separate aligned pdb files?

— Reply to this email directly, view it on GitHub https://github.com/i2bc/SURFMAP/issues/7#issuecomment-2006549630, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZNDTOQUZGIJXBRCXH73GDLYZACMFAVCNFSM6AAAAAAZEWSJ26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBWGU2DSNRTGA . You are receiving this because you authored the thread.Message ID: @.***>

JonathanLV123 commented 3 months ago

Thank you for the quick response, that is very helpful!