Skip to content

Commit

Permalink
added test_data
Browse files Browse the repository at this point in the history
  • Loading branch information
hypowergravity committed Aug 28, 2024
1 parent 671ecd4 commit a0468c3
Show file tree
Hide file tree
Showing 53 changed files with 1,281 additions and 371 deletions.
Binary file modified .DS_Store
Binary file not shown.
24 changes: 0 additions & 24 deletions docs/760ns_test.py

This file was deleted.

17 changes: 9 additions & 8 deletions docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
```

Installation of ResiDEM requires few dependency such as [Computational Crystallography Toolbox (CCTBX)](https://cctbx.github.io/).
Installation of ResiDEM requires few dependencies such as [Computational Crystallography Toolbox (CCTBX)](https://cctbx.github.io/).
It also some requires some basic python packages for data processing such as numpy, pandas, scipy etc...

## Installation

ResiDEM is a python tool written in python 3, and it is recommended that a new environment is created for better package
ResiDEM is a python tool written in python 3 version, and it is recommended that a new environment is created for better package
management and to avoid any dependency conflicts.

1. Creating a conda virtual environment and installation :
Expand Down Expand Up @@ -51,11 +51,10 @@ pip install dist/residem-0.1.0.tar.gz
The ResiDEM package might also need [CCP4 scaleit](https://www.ccp4.ac.uk/html/scaleit.html). It
will be used for scaling between reference and triggered state if that particular user option in given.
It also has inbuilt scaling method, but works well with
isomorphous data sets.
It also has inbuilt scaling method, which works well with isomorphous data sets.
```

To check if the CCP4 package or scaleit in the path the following command can used.
To check if the CCP4 package or scaleit in the path, the following command can used.

```bash
if command -v ccp4 &> /dev/null
Expand All @@ -68,11 +67,11 @@ fi

## Unit test

Testing the tool with Bacteriorhodopsin data.
Testing the tool with `Bacteriorhodopsin` data.
There are two python scripts which can be used to run, reproduce images as in the [published article](https://doi.org/10.1021/acs.jcim.4c00858)
.
The name of the scripts are `residem_unit_test.py` and `SVD_unit_test.py` which are available in tests directory.
The main script `residem_unit_test.py` can be used to test the tool and reproduce the certain figures as in [published article](https://doi.org/10.1021/acs.jcim.4c00858)
The name of the scripts are `residem_unit_test.py` and `SVD_unit_test.py` which are available in `test_data` directory in tests as zip file.
The main script `residem_unit_test.py` can be used to test the tool and reproduce certain figures as in [published article](https://doi.org/10.1021/acs.jcim.4c00858)
.
This script computes the isomorphous difference density for Bacteriorhodopsin(bR) for 13 time delays as published by [Nango et al.](https://www.science.org/doi/10.1126/science.aah3497)

Expand All @@ -84,6 +83,8 @@ The testing can be done using the following commands.
```bash
conda activate residem
cd tests
unzip test_data.zip
cd test_data
python residem_unit_test.py
# after completeion of the above the follwoing can be submitted.
python SVD_unit_test.py
Expand Down
33 changes: 17 additions & 16 deletions docs/Quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ Getting started with `ResiDEM`.

The main command line utility of the ResiDEM is ``residem``.
This utility generates isomorphous difference density map and identifies the residues associated with difference density.
The basic command line argument to run the calculation to generate isomorphous difference density (DED) map and identification is as follows:
The basic command line argument to run the calculation, generate isomorphous difference density (DED) map and residue identification is as follows:

~~~bash
residem -r 5b6v.pdb -m 5b6v.mtz -t 5b6x.mtz
residem -r 5b6v.pdb -m 5b6v.mtz -t 5b6x.mtz --scale aniso/iso/no -w ursby/ren/hekstra/default -sm cctbx/ccp4
# given the working directory is test_data
residem -r dark/5b6v.pdb -m dark/5b6v.mtz -t 05_760ns/5b6x.mtz
residem -r dark/5b6v.pdb -m dark/5b6v.mtz -t dark/5b6x.mtz --scale aniso/iso/no -w ursby/ren/hekstra/default -sm cctbx/ccp4
~~~
In the above example, DED map is calculated for 760ns triggered structure (pdb id: 5b6x) with respect to dark state structure (pdb id: 5b6v).


## Inputs

It requires a reference state pdb `-r`, an reference state `-m` and triggered state `-t` mtz file containing
It requires a reference state pdb `-r`, an reference state `-m` and triggered state `-t` mtz files containing
structure factor amplitudes or intensities. The reference state,triggered state
mtz should also have a column associated with structure factor amplitudes and its associated sigma "FP,SIGFP" or
intensities with column name "I,SIGI".
Expand All @@ -33,16 +34,16 @@ Isomorphous difference density map rely on proper scaling of the reference stat
and triggered state observed structure factor {math}`|F_{obs}^{t}|` .
This is done through resolution dependent scaling which can be either isotropic or anisotropic.
The tool has a few options to scale the reference and triggered state structure factor.
This consists of scaling using either cctbx scaling method or using ccp4 based scaleit method.
There are three options such as `--scale no` scaling, `--scale iso` isotropic scaling or `--scale aniso`.
This consists of scaling using either cctbx based scaling method or using ccp4 based scaleit method.
There are three options such as `--scale no` scaling, `--scale iso` isotropic scaling or `--scale aniso` which can be applied for scaling.
The scaling can be done either using inbuilt method using `-sm cctbx` library or using `-sm ccp4` scaleit.
After scaling, the time dependent intensities, Wilson Plots of {math}`|F_{obs}^{t}|^2` and
the {math}`|F_{obs}^{ref}|^2` have the approximately same slopes.
After scaling, the time dependent intensities and its Wilson Plots corresponding to {math}`|F_{obs}^{t}|^2` and
the {math}`|F_{obs}^{ref}|^2` should have approximately same slopes.

![Wilson plot scaling](images/Wilson_plot_comparison.jpg)
Figure 1: Wilson plot of 760ns bR Intensities before and after anisotropic scaling.

## Isomorphism idicators
## Isomorphism indicators
### Cross -R-Factor ( {math}`R_{iso}`) and Isomorphism indicating correlation coefficient ({math}`CC_{iso}`).

After scaling, an estimate can be obtained quantitatively to identify how similar the reference state data is
Expand Down Expand Up @@ -153,19 +154,19 @@ where the term {math}`\frac{ω_{hkl}}{\langle ω \rangle}` may correspond weight



[Nango et al.](https://www.science.org/doi/10.1126/science.aah3497) for Bacteriorhodopsin(bR) did not use any weights.
So, to discuss more about the weight, test case of Photoactive yellow protein (PYP) published by [Pandey et al.,](https://doi.org/10.1038/s41592-019-0628-z) is discussed below.
[Nango et al.](https://www.science.org/doi/10.1126/science.aah3497) for Bacteriorhodopsin(bR) dataset did not use any weights.
In order to discuss more about the weights, another test dataset of Photoactive yellow protein (PYP) published by [Pandey et al.,](https://doi.org/10.1038/s41592-019-0628-z) is discussed below.

![Distribution DSF](images/Distribution_DSF.png)

Figure 3: Plot showing distribution of amplitude of difference structure factor as a function of signal-to-noise ratio.
Figure 3: Plot showing distribution of amplitude of difference structure factor as a function of signal-to-noise ratio for various weights.
Clearer PDF file for the image can be found [here](images/Difference_structure_factor_distribution.pdf).

In Figure 3, we see the distribution of difference Fourier coefficients plotted with signal-to-noise ratios with and without weight.
We can see the distribution of the difference structure factor. In the first distribution we can see the {math}`|\Delta F|`
as a function of signal-to-noise ratio {math}`|\Delta F|/ σ_{| \Delta F|} `, in the inset of the plot is the distribution of
In Figure 3, we see the distribution of difference Fourier coefficients is plotted against signal-to-noise ratios with and without weight.
The image gives an overview about the distribution of the difference structure factor and experimental error(sigma) in inset plot. In the first distribution we can see the {math}`|\Delta F|`
as a function of signal-to-noise ratio {math}`|\Delta F|/ σ_{| \Delta F|} `, the inset of the plot is the distribution of
{math}`|\Delta F| ` vs {math}`σ_{| \Delta F|}`. It can be seen that by using modified Ren weight or `hekstra` weight with alpha=1 by [Schmidt et al.,](https://doi.org/10.1016/S0006-3495(03)75018-8)
is the one which satisfies the condition. This denotes that there are no large amplitudes with large experimental errors (sigma) values,
is the one which has the least errors, which satisfies the condition. This denotes that there are no large amplitudes with large experimental errors (sigma) values,
and hence is chosen as best weight for PYP.

The obtained isomorphous difference map (DED) without and with weight is shown in the following figure.
Expand Down
6 changes: 3 additions & 3 deletions docs/Result.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ more details of which can be found in [command line options](command.md).
~~~bash
mkdir bR
cd bR
# download the reference and 760ns triggered pdb
residem_pdb_mtz -r 5b6v; residem_pdb_mtz -r 5b6x # pdb code of dark and 760ns respectively

# copy the data associated with 760ns given the current working directory
# is test_data available in tests directory of the repository
cp ../dark/5b6v.* . ;cp ../05_760ns/5b6x.* .
~~~
```bash
tree # If you see the file in the folder we see the following
Expand Down
96 changes: 0 additions & 96 deletions docs/SVD_unit_test.py

This file was deleted.

Binary file modified docs/_build/doctrees/About.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Algorithm.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/DBSCAN.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Installation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Limitation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Quickstart.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Result.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Usage.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/command.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/distribution_dsf.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 89fb2952db4c7f8d2657d4dd9d7e3f08
config: e4838d10fffc4bb31f9edeb09d2dc302
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions docs/_build/html/About.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>About ResiDEM &mdash; Residem</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=e9b4edf4" />


<link rel="shortcut icon" href="_static/Resi-DEM_icon.png"/>
Expand All @@ -17,7 +17,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=a1637f0b"></script>
<script src="_static/documentation_options.js?v=01f34227"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand Down Expand Up @@ -72,7 +72,7 @@
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">About ResiDEM</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/About.md" rel="nofollow"> View page source</a>
<a href="_sources/About.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h1>About ResiDEM<a class="headerlink" href="#about-residem" title="Link to this
<p>For more information, kindly please see the <a class="reference external" href="https://doi.org/10.1021/acs.jcim.4c00858">published paper</a>.</p>
<p>If the tool was useful please cite us: Sriram Srinivasa Raghavan, Osamu Miyashita.ResiDEM: <a class="reference external" href="https://doi.org/10.1021/acs.jcim.4c00858">Analytical Tool for Isomorphous Difference Electron
Density Maps Utilizing Dynamic Residue Identification via Density Clustering</a>. Journal of chemical information and modelling, <strong>2024</strong>.</p>
<p>For any help or quires with respect to the tool contact <a class="reference external" href="mailto:hypowergravity&#37;&#52;&#48;gmail&#46;com">me</a>.</p>
<p>For any help or queries with respect to the tool, contact <a class="reference external" href="mailto:hypowergravity&#37;&#52;&#48;gmail&#46;com">me</a>.</p>
<script>
document.querySelectorAll('a[href^="http"]').forEach(link => {
link.setAttribute('target', '_blank');
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/Algorithm.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Algorithm &mdash; Residem</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=0db739f3" />


<link rel="shortcut icon" href="_static/Resi-DEM_icon.png"/>
Expand All @@ -17,7 +17,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=a1637f0b"></script>
<script src="_static/documentation_options.js?v=01f34227"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script>window.MathJax = {"options": {"processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
Expand Down Expand Up @@ -79,7 +79,7 @@
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Algorithm</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Algorithm.md" rel="nofollow"> View page source</a>
<a href="_sources/Algorithm.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/DBSCAN.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Work Flow of DBSCAN implemented in ResiDEM &mdash; Residem</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=0db739f3" />


<link rel="shortcut icon" href="_static/Resi-DEM_icon.png"/>
Expand All @@ -17,7 +17,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=a1637f0b"></script>
<script src="_static/documentation_options.js?v=01f34227"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down Expand Up @@ -73,7 +73,7 @@
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Work Flow of DBSCAN implemented in ResiDEM</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/DBSCAN.md" rel="nofollow"> View page source</a>
<a href="_sources/DBSCAN.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
Expand Down
Loading

0 comments on commit a0468c3

Please sign in to comment.