├── bioalerts ├── __init__.py ├── Alerts.pyc ├── __init__.pyc ├── FPCalculator.pyc ├── LoadMolecules.pyc ├── build │ ├── objects.inv │ ├── _static │ │ ├── up.png │ │ ├── down.png │ │ ├── file.png │ │ ├── plus.png │ │ ├── comment.png │ │ ├── minus.png │ │ ├── ajax-loader.gif │ │ ├── down-pressed.png │ │ ├── up-pressed.png │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── pygments.css │ │ ├── default.css │ │ ├── sidebar.js │ │ ├── doctools.js │ │ ├── basic.css │ │ └── underscore.js │ ├── .doctrees │ │ ├── Alerts.doctree │ │ ├── index.doctree │ │ ├── BioAlerts.doctree │ │ ├── environment.pickle │ │ ├── FPCalculator.doctree │ │ └── LoadMolecules.doctree │ ├── .buildinfo │ ├── _sources │ │ ├── index.txt │ │ ├── Alerts.txt │ │ ├── BioAlerts.txt │ │ ├── LoadMolecules.txt │ │ └── FPCalculator.txt │ ├── search.html │ ├── searchindex.js │ ├── scripts-2.7 │ │ ├── LoadMolecules.py │ │ └── FPCalculator.py │ ├── index.html │ ├── genindex.html │ ├── FPCalculator.html │ ├── BioAlerts.html │ └── Alerts.html ├── MANIFEST ├── PKG-INFO ├── source │ ├── index.rst │ ├── Alerts.rst │ ├── LoadMolecules.rst │ ├── FPCalculator.rst │ └── conf.py ├── setup.py ├── LoadMolecules.py ├── FPCalculator.py ├── Makefile └── make.bat ├── tutorial ├── bioalerts_tutorial.pdf ├── bioalerts_tutorial_files │ ├── bioalerts_tutorial_40_0.png │ └── bioalerts_tutorial_59_0.png └── datasets │ ├── BBB.bio │ ├── BBB.smi │ └── test_Ahlberg_activities.txt └── README.md /bioalerts/__init__.py: -------------------------------------------------------------------------------- 1 | # yes, this is package.. 2 | -------------------------------------------------------------------------------- /bioalerts/Alerts.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/Alerts.pyc -------------------------------------------------------------------------------- /bioalerts/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/__init__.pyc -------------------------------------------------------------------------------- /bioalerts/FPCalculator.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/FPCalculator.pyc -------------------------------------------------------------------------------- /bioalerts/LoadMolecules.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/LoadMolecules.pyc -------------------------------------------------------------------------------- /bioalerts/build/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/objects.inv -------------------------------------------------------------------------------- /bioalerts/build/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/up.png -------------------------------------------------------------------------------- /bioalerts/build/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/down.png -------------------------------------------------------------------------------- /bioalerts/build/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/file.png -------------------------------------------------------------------------------- /bioalerts/build/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/plus.png -------------------------------------------------------------------------------- /tutorial/bioalerts_tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/tutorial/bioalerts_tutorial.pdf -------------------------------------------------------------------------------- /bioalerts/build/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/comment.png -------------------------------------------------------------------------------- /bioalerts/build/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/minus.png -------------------------------------------------------------------------------- /bioalerts/MANIFEST: -------------------------------------------------------------------------------- 1 | # file GENERATED by distutils, do NOT edit 2 | Alerts.py 3 | FPCalculator.py 4 | LoadMolecules.py 5 | setup.py 6 | -------------------------------------------------------------------------------- /bioalerts/build/.doctrees/Alerts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/.doctrees/Alerts.doctree -------------------------------------------------------------------------------- /bioalerts/build/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/.doctrees/index.doctree -------------------------------------------------------------------------------- /bioalerts/build/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/ajax-loader.gif -------------------------------------------------------------------------------- /bioalerts/build/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/down-pressed.png -------------------------------------------------------------------------------- /bioalerts/build/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/up-pressed.png -------------------------------------------------------------------------------- /bioalerts/build/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/comment-bright.png -------------------------------------------------------------------------------- /bioalerts/build/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/_static/comment-close.png -------------------------------------------------------------------------------- /bioalerts/build/.doctrees/BioAlerts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/.doctrees/BioAlerts.doctree -------------------------------------------------------------------------------- /bioalerts/build/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/.doctrees/environment.pickle -------------------------------------------------------------------------------- /bioalerts/build/.doctrees/FPCalculator.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/.doctrees/FPCalculator.doctree -------------------------------------------------------------------------------- /bioalerts/build/.doctrees/LoadMolecules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/bioalerts/build/.doctrees/LoadMolecules.doctree -------------------------------------------------------------------------------- /tutorial/bioalerts_tutorial_files/bioalerts_tutorial_40_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/tutorial/bioalerts_tutorial_files/bioalerts_tutorial_40_0.png -------------------------------------------------------------------------------- /tutorial/bioalerts_tutorial_files/bioalerts_tutorial_59_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isidroc/bioalerts/HEAD/tutorial/bioalerts_tutorial_files/bioalerts_tutorial_59_0.png -------------------------------------------------------------------------------- /bioalerts/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: bioalerts 3 | Version: 1.0 4 | Summary: sdf 5 | Author: Isidro Cortes-Ciriano 6 | Author-email: isidrolauscher@gmail.com 7 | License: GPL 8 | Description: UNKNOWN 9 | Platform: UNKNOWN 10 | -------------------------------------------------------------------------------- /bioalerts/build/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: b7223d57ede978825487d649cf4cf6db 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /bioalerts/source/index.rst: -------------------------------------------------------------------------------- 1 | .. bioalerts documentation master file, created by 2 | sphinx-quickstart on Tue Mar 3 16:13:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to bioalerts's documentation! 7 | ===================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | LoadMolecules.rst 15 | Alerts.rst 16 | FPCalculator.rst 17 | 18 | 19 | Indices and tables 20 | ================== 21 | 22 | * :ref:`genindex` 23 | * :ref:`modindex` 24 | * :ref:`search` 25 | 26 | -------------------------------------------------------------------------------- /bioalerts/build/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. bioalerts documentation master file, created by 2 | sphinx-quickstart on Tue Mar 3 16:13:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to bioalerts's documentation! 7 | ===================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | LoadMolecules.rst 15 | Alerts.rst 16 | FPCalculator.rst 17 | 18 | 19 | Indices and tables 20 | ================== 21 | 22 | * :ref:`genindex` 23 | * :ref:`modindex` 24 | * :ref:`search` 25 | 26 | -------------------------------------------------------------------------------- /bioalerts/setup.py: -------------------------------------------------------------------------------- 1 | """ 2 | Set up the bioalerts package 3 | Authors: Isidro Cortes-Ciriano 4 | Date: 27.10.14 5 | """ 6 | 7 | from distutils.core import setup 8 | 9 | #packagedata={'bioalerts': ['FP_Calculator.py','BioAlerts.py']} 10 | #packagedata={'propy': ['aaindex1','aaindex2','aaindex3','html/*','instruction/*','data/*','aaindex/*']} 11 | 12 | 13 | setup(name = 'bioalerts', 14 | version = '0.1.0', 15 | description =" ", 16 | author = "Isidro Cortes-Ciriano", 17 | author_email = "isidrolauscher@gmail.com", 18 | license = "GPL", 19 | #packages = ['bioalerts'], 20 | #package_data=packagedata, 21 | # data_files = datafiles, 22 | #package_dir={''}, 23 | scripts = ['Alerts.py','FPCalculator.py','LoadMolecules.py'], 24 | # py_modules = [], 25 | # setup_requires=["numpy"], 26 | install_requires = ['numpy','scipy','operator','pandas'] 27 | ) 28 | 29 | -------------------------------------------------------------------------------- /tutorial/datasets/BBB.bio: -------------------------------------------------------------------------------- 1 | -1.17 2 | -2.15 3 | -1.54 4 | 1 5 | 1.64 6 | 0.16 7 | 0 8 | -1.82 9 | -0.25 10 | -0.18 11 | -1.15 12 | -0.46 13 | -0.3 14 | 0.89 15 | -0.43 16 | 0.82 17 | 1.03 18 | 0.52 19 | 0.39 20 | -0.67 21 | -0.67 22 | -0.66 23 | -1.57 24 | -1.12 25 | -0.73 26 | -0.27 27 | -0.28 28 | -0.24 29 | -0.02 30 | 0.69 31 | 0.44 32 | 0.22 33 | 1.37 34 | 0.176 35 | -0.0457 36 | -0.605 37 | -0.687 38 | -0.886 39 | 0.924 40 | 1.06 41 | -0.52 42 | 1.2 43 | 0.83 44 | 0.24 45 | 1.06 46 | -0.5 47 | -0.7 48 | 1.34 49 | -1.26 50 | 0.1 51 | -0.46 52 | -0.04 53 | 0.04 54 | -0.055 55 | 0 56 | 1.23 57 | -0.29 58 | 0 59 | -0.097 60 | -0.16 61 | -0.15 62 | -0.15 63 | 0.29 64 | 0.39 65 | 1.51 66 | -1.1 67 | -0.16 68 | 0.37 69 | -0.6 70 | 1.04 71 | -0.92 72 | 0.12 73 | -0.14 74 | -0.17 75 | -0.08 76 | -0.28 77 | 0.49 78 | 1.01 79 | 0.93 80 | -0.22 81 | -0.31 82 | 0.97 83 | 0.37 84 | 0.76 85 | 0.8 86 | 0.81 87 | 0.35 88 | -0.06 89 | -0.52 90 | 0 91 | -1.7 92 | 0.13 93 | 0.27 94 | 0.52 95 | -0.44 96 | 0.64 97 | 0.9 98 | 0.61 99 | 0.06 100 | 0.5 101 | 0.55 102 | 0.06 103 | 0.97 104 | 0.59 105 | -0.36 106 | 0.4 107 | -0.3 108 | -0.06 109 | -0.04 110 | 1.38 111 | 0.75 112 | 0.18 113 | -0.18 114 | 0.35 115 | 0.99 116 | 0.42 117 | 0.74 118 | -1.42 119 | -0.35 120 | -1.4 121 | -1.42 122 | -0.78 123 | 0.36 124 | -0.3 125 | -0.07 126 | -1.23 127 | -0.82 128 | -1.3 129 | -1.3 130 | -2 131 | -0.29 132 | -1.06 133 | -0.09 134 | -1.88 135 | 0.25 136 | 1 137 | 0.14 138 | -0.161 139 | -0.02 140 | -1.34 141 | -0.74 142 | 0.3 143 | -0.081 144 | -0.16 145 | 0.079 146 | 0.25 147 | 0.34 148 | 1.44 149 | 0.11 150 | 0.24 151 | -0.42 152 | 0.36 153 | 0.044 154 | 0.53 155 | -1.3 156 | 0 157 | -1.3 158 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Bioalerts: a python library for the derivation of structural alerts from bioactivity and toxicity data sets 2 | ========= 3 | 4 | Isidro Cortes-Ciriano 5 | 6 | Journal of Cheminformatics 2016 8:13 7 | 8 | DOI: 10.1186/s13321-016-0125-7© Cortes-Ciriano. 2016 9 | 10 | 11 | ![alt text](https://cdn.rawgit.com/isidroc/bioalerts/master/scheme.svg "Bioalerts scheme") 12 | 13 | Abstract 14 | ========= 15 | Background 16 | ------ 17 | Assessing compound toxicity at early stages of the drug discovery process is a crucial task to dismiss drug candidates likely to fail in clinical trials. Screening drug candidates against structural alerts, i.e. chemical fragments associated to a toxicological response prior or after being metabolized (bioactivation), has proved a valuable approach for this task. During the last decades, diverse algorithms have been proposed for the automatic derivation of structural alerts from categorical toxicity data sets. 18 | 19 | Results and conclusions 20 | ------ 21 | Here, the python library bioalerts is presented, which comprises functionalities for the automatic derivation of structural alerts from categorical (dichotomous), e.g. toxic/non-toxic, and continuous bioactivity data sets, e.g. KiKi or pIC50pIC50 values. The library bioalerts relies on the RDKit implementation of the circular Morgan fingerprint algorithm to compute chemical substructures, which are derived by considering radial atom neighbourhoods of increasing bond radius. In addition to the derivation of structural alerts, bioalerts provides functionalities for the calculation of unhashed (keyed) Morgan fingerprints, which can be used in predictive bioactivity modelling with the advantage of allowing for a chemically meaningful deconvolution of the chemical space. Finally, bioalerts provides functionalities for the easy visualization of the derived structural alerts. 22 | 23 | Contents 24 | ------ 25 | Bioalerts library and documentation. The folder build contains an HyperText Markup Language (HTML) tree which documents the library bioalerts using reStructuredText (.rst) as markdown language and processed with sphinx (www.http://sphinx-doc.org/). The documentation can be browsed by opening the file index.html file in any HTML browser. The documentation of the python library RDKit can be accessed at www.rdkit.org. 26 | 27 | Bioalerts Tutorial. The tutorial is provided in three file formats: (i) file bioalerts_tutorial.html, which can be browsed in any HTML browser, (ii) file bioalerts_tutorial, and (iii) file bioalerts_tutorial.ipynb, which can be opened with ipython notebook. This tutorial illustrates the functionalities of bioalerts on three real world data sets available at http://​github.​com/​isidroc/​bioalerts. 28 | 29 | Details 30 | ------ 31 | Operating system(s): Platform independent 32 | 33 | Programming language: Python 34 | 35 | License: GNU GPL version 3 36 | 37 | Any restrictions to use by non-academics: none 38 | -------------------------------------------------------------------------------- /bioalerts/build/search.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search — bioalerts 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 47 | 48 |
49 |
50 |
51 |
52 | 53 |

Search

54 |
55 | 56 |

57 | Please activate JavaScript to enable the search 58 | functionality. 59 |

60 |
61 |

62 | From here you can search these documents. Enter your search 63 | words into the box below and click "search". Note that the search 64 | function will automatically search for all of the words. Pages 65 | containing fewer words won't appear in the result list. 66 |

67 |
68 | 69 | 70 | 71 |
72 | 73 |
74 | 75 |
76 | 77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 95 | 99 | 100 | -------------------------------------------------------------------------------- /bioalerts/build/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #333333 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 44 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 45 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 46 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 47 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 48 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 49 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 50 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 51 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 52 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 53 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 54 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 55 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 56 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 57 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 58 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 59 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 60 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 61 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 62 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 63 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /bioalerts/source/Alerts.rst: -------------------------------------------------------------------------------- 1 | Alerts: Derivation of structural alerts 2 | ***************************** 3 | 4 | This module is composed of the following three classes: 5 | 6 | * GetSubstructuresFromReferenceDataset 7 | * CalculatePvaluesCategorical 8 | * CalculatePvaluesContinuous 9 | 10 | GetSubstructuresFromReferenceDataset 11 | ==================================== 12 | .. py:class:: GetSubstructuresFromReferenceDataset(name_field=None) 13 | 14 | Similar to GetDataSetInfo from the module LoadMolecules. 15 | 16 | This class can be used to load molecules in smiles, sdf and mol2 format. 17 | 18 | :var name_field: name of the data field containing the name of the molecules. Although the default value is None (*bool*), the name of the field if set when instantiating the class would be a string (*str*). 19 | :vartype name_field: str 20 | :var nb_substructures: total number of substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, from the molecules specified in the argument *mols* of the method *GetDataSetInfo.extract_substructure_information()* (see below). 21 | :vartype nb_substructures: int 22 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument *radii* of *GetDataSetInfo.extract_substructure_information()*. 23 | :vartype max_radius: int 24 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 25 | :vartype substructure_dictionary: dict 26 | 27 | *GetDataSetInfo* contains the following methods: 28 | 29 | .. py:method:: extract_substructure_information(radii,mols) 30 | 31 | This method extracts the substructures from the molecules (argument *mols*) 32 | whose radius is comprised in the argument *radii*. 33 | Each substructure in the molecule set (*mols*) is assigned an unambiguous integer identifier, 34 | which are kept in *GetDataSetInfo.substructure_dictionary*. 35 | The information about the substructures is kept in the fields indicated above. 36 | 37 | :param radii: substructure radii to be considered 38 | :param mols: molecules from which the substructures are to be extracted. 39 | :type radii: list 40 | :type mols: list 41 | 42 | 43 | CalculatePvaluesCategorical 44 | =========================== 45 | .. py:class:: CalculatePvaluesCategorical(max_radius) 46 | 47 | :var max_radius: maximum substructure radius considered. 48 | :vartype max_radius: int 49 | :var output: pandas dataframe containing the following columns: (i) 'Compound ID', (ii) 'p_value', (iii) 'Compounds with substr.', (iv) 'activity label', (v) 'Substructure', (vi) 'Substructure in Molecule', (vii) 'Comp. with substr. active', and (viii) 'Comp. with substr. inactive'. 50 | :vartype output: pandas.core.frame.DataFrame 51 | 52 | 53 | .. py:method:: calculate_p_values(mols,substructure_dictionary,bioactivities,mols_ids,threshold_nb_substructures,threshold_pvalue,threshold_frequency,active_label=1,inactive_label=0) 54 | .. py:method:: HTMLOutputWriter(self,output_filename) 55 | .. py:method:: XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300)) 56 | 57 | 58 | 59 | CalculatePvaluesContinuous 60 | ========================== 61 | .. py:class:: CalculatePvaluesContinuous(radii_ext) 62 | 63 | :var radii_ext: substructure radii to be considered 64 | :vartype radii_ext: list 65 | :var output: pandas dataframe containing the following columns: (i) 'Compound ID', (ii) 'Number compounds', (iii) 'statistic', (iv) 'p_value', (v) 'Diff. distribution means (w - wo)', (vi) 'Compounds with substr.', (vii) 'Substructure', and (viii) 'Substructure in Molecule'. 66 | :vartype output: pandas.core.frame.DataFrame 67 | 68 | 69 | .. py:method:: calculate_p_values(mols,substructure_dictionary,bioactivities,mols_ids,threshold_nb_substructures,threshold_pvalue,threshold_ratio_w_wo,Bonferroni=True) 70 | .. py:method:: HTMLOutputWriter(self,output_filename) 71 | .. py:method:: XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300)) 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /bioalerts/build/_sources/Alerts.txt: -------------------------------------------------------------------------------- 1 | Alerts: Derivation of structural alerts 2 | ***************************** 3 | 4 | This module is composed of the following three classes: 5 | 6 | * GetSubstructuresFromReferenceDataset 7 | * CalculatePvaluesCategorical 8 | * CalculatePvaluesContinuous 9 | 10 | GetSubstructuresFromReferenceDataset 11 | ==================================== 12 | .. py:class:: GetSubstructuresFromReferenceDataset(name_field=None) 13 | 14 | Similar to GetDataSetInfo from the module LoadMolecules. 15 | 16 | This class can be used to load molecules in smiles, sdf and mol2 format. 17 | 18 | :var name_field: name of the data field containing the name of the molecules. Although the default value is None (*bool*), the name of the field if set when instantiating the class would be a string (*str*). 19 | :vartype name_field: str 20 | :var nb_substructures: total number of substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, from the molecules specified in the argument *mols* of the method *GetDataSetInfo.extract_substructure_information()* (see below). 21 | :vartype nb_substructures: int 22 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument *radii* of *GetDataSetInfo.extract_substructure_information()*. 23 | :vartype max_radius: int 24 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 25 | :vartype substructure_dictionary: dict 26 | 27 | *GetDataSetInfo* contains the following methods: 28 | 29 | .. py:method:: extract_substructure_information(radii,mols) 30 | 31 | This method extracts the substructures from the molecules (argument *mols*) 32 | whose radius is comprised in the argument *radii*. 33 | Each substructure in the molecule set (*mols*) is assigned an unambiguous integer identifier, 34 | which are kept in *GetDataSetInfo.substructure_dictionary*. 35 | The information about the substructures is kept in the fields indicated above. 36 | 37 | :param radii: substructure radii to be considered 38 | :param mols: molecules from which the substructures are to be extracted. 39 | :type radii: list 40 | :type mols: list 41 | 42 | 43 | CalculatePvaluesCategorical 44 | =========================== 45 | .. py:class:: CalculatePvaluesCategorical(max_radius) 46 | 47 | :var max_radius: maximum substructure radius considered. 48 | :vartype max_radius: int 49 | :var output: pandas dataframe containing the following columns: (i) 'Compound ID', (ii) 'p_value', (iii) 'Compounds with substr.', (iv) 'activity label', (v) 'Substructure', (vi) 'Substructure in Molecule', (vii) 'Comp. with substr. active', and (viii) 'Comp. with substr. inactive'. 50 | :vartype output: pandas.core.frame.DataFrame 51 | 52 | 53 | .. py:method:: calculate_p_values(mols,substructure_dictionary,bioactivities,mols_ids,threshold_nb_substructures,threshold_pvalue,threshold_frequency,active_label=1,inactive_label=0) 54 | .. py:method:: HTMLOutputWriter(self,output_filename) 55 | .. py:method:: XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300)) 56 | 57 | 58 | 59 | CalculatePvaluesContinuous 60 | ========================== 61 | .. py:class:: CalculatePvaluesContinuous(radii_ext) 62 | 63 | :var radii_ext: substructure radii to be considered 64 | :vartype radii_ext: list 65 | :var output: pandas dataframe containing the following columns: (i) 'Compound ID', (ii) 'Number compounds', (iii) 'statistic', (iv) 'p_value', (v) 'Diff. distribution means (w - wo)', (vi) 'Compounds with substr.', (vii) 'Substructure', and (viii) 'Substructure in Molecule'. 66 | :vartype output: pandas.core.frame.DataFrame 67 | 68 | 69 | .. py:method:: calculate_p_values(mols,substructure_dictionary,bioactivities,mols_ids,threshold_nb_substructures,threshold_pvalue,threshold_ratio_w_wo,Bonferroni=True) 70 | .. py:method:: HTMLOutputWriter(self,output_filename) 71 | .. py:method:: XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300)) 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /bioalerts/build/_sources/BioAlerts.txt: -------------------------------------------------------------------------------- 1 | Biological Alerts (BioAlerts) 2 | ***************************** 3 | 4 | This module can be used to 5 | 6 | The module is composed of the following three classes: 7 | 8 | * GetSubstructuresFromReferenceDataset 9 | * CalculatePvaluesCategorical 10 | * CalculatePvaluesContinuous 11 | 12 | GetSubstructuresFromReferenceDataset 13 | ==================================== 14 | .. py:class:: GetSubstructuresFromReferenceDataset(name_field=None) 15 | 16 | Similar to GetDataSetInfo from FPcalculator XX 17 | 18 | This class can be used to load molecules in smiles sdf and mol2 format. 19 | 20 | :var name_field: name of the data field containing the name of the molecules. Although the default value is None (*bool*), the name of the field if set when instantiating the class would be a string (*str*). 21 | :vartype name_field: str 22 | :var nb_substructures: total number of substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, from the molecules specified in the argument *mols* of the method *GetDataSetInfo.extract_substructure_information()* (see below). 23 | :vartype nb_substructures: int 24 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument *radii* of *GetDataSetInfo.extract_substructure_information()*. 25 | :vartype max_radius: int 26 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 27 | :vartype substructure_dictionary: dict 28 | 29 | *GetDataSetInfo* contains the following methods: 30 | 31 | .. py:method:: extract_substructure_information(radii,mols) 32 | 33 | This method extracts the substructures from the molecules (argument *mols*) 34 | whose radius is comprised in the argument *radii*. 35 | Each substructure in the molecule set (*mols*) is assigned an unambiguous integer identifier, 36 | which are kept in *GetDataSetInfo.substructure_dictionary*. 37 | The information about the substructures is kept in the fields indicated above. 38 | 39 | :param radii: substructure radii to be considered 40 | :param mols: molecules from which the substructures are to be extracted. 41 | :type radii: list 42 | :type mols: list 43 | 44 | 45 | CalculatePvaluesCategorical 46 | =========================== 47 | .. py:class:: CalculatePvaluesCategorical(max_radius) 48 | 49 | :var max_radius: maximum substructure radius considered. 50 | :vartype max_radius: int 51 | :var output: pandas dataframe containing the following columns: (i) 'Compound ID', (ii) 'p_value', (iii) 'Compounds with substr.', (iv) 'activity label', (v) 'Substructure', (vi) 'Substructure in Molecule', (vii) 'Comp. with substr. active', and (viii) 'Comp. with substr. inactive'. 52 | :vartype output: pandas.core.frame.DataFrame 53 | 54 | 55 | .. py:method:: calculate_p_values(mols,substructure_dictionary,bioactivities,mols_ids,threshold_nb_substructures,threshold_pvalue,threshold_frequency,active_label=1,inactive_label=0) 56 | .. py:method:: HTMLOutputWriter(self,output_filename) 57 | .. py:method:: XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300)) 58 | 59 | 60 | 61 | CalculatePvaluesContinuous 62 | ========================== 63 | .. py:class:: CalculatePvaluesContinuous(radii_ext) 64 | 65 | :var radii_ext: substructure radii to be considered 66 | :vartype radii_ext: list 67 | :var output: pandas dataframe containing the following columns: (i) 'Compound ID', (ii) 'Number compounds', (iii) 'statistic', (iv) 'p_value', (v) 'Diff. distribution means (w - wo)', (vi) 'Compounds with substr.', (vii) 'Substructure', and (viii) 'Substructure in Molecule'. 68 | :vartype output: pandas.core.frame.DataFrame 69 | 70 | 71 | .. py:method:: calculate_p_values(mols,substructure_dictionary,bioactivities,mols_ids,threshold_nb_substructures,threshold_pvalue,threshold_ratio_w_wo,Bonferroni=True) 72 | .. py:method:: HTMLOutputWriter(self,output_filename) 73 | .. py:method:: XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300)) 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /bioalerts/build/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({envversion:42,terms:{all:2,identifi:[1,2,3],when:[1,2,3],verbos:3,radiu:[1,2,3],radii:[1,2,3],through:2,follow:[1,2,3],paramet:[1,2],xlsxoutputwrit:1,whose:[1,2,3],onli:[2,3],refernc:2,also:3,iii:1,explain:2,activ:1,param:3,should:2,whether:2,divis:2,dict:[1,2,3],present:2,fps_unhashed_count:2,smile:[1,2,3],save:[2,3],arrai:2,serv:[2,3],output_filenam:1,"return":[],string:[1,3],incorrect_molecul:3,format:[1,2,3],read:3,calculate_unhashed_fp:2,molecul:[],account:2,sdfd:[],mol:[1,2,3],bonferroni:1,bit:2,dataset:2,mols_id:[1,3],csv:3,name:[1,3],substructure_dictionari:[1,2,3],list:[1,2,3],calculate_hashed_fps_binary_quick:2,yield:[],file_extens:3,irrespect:2,item:[],either:2,compris:[1,3],each:[1,2,3],output:1,file_nam:3,where:[1,2,3],page:0,bond:2,www:3,set:[1,2,3],modulo:2,threshold_nb_substructur:1,extract_substructure_inform:[1,2,3],seper:3,maxim:2,"var":[1,3],zero:3,threshold_frequ:1,iter:[],diff:1,run:2,inact:1,extract:[1,2,3],panda:1,librari:3,distribut:1,variabl:[1,2],index:0,appear:[1,3],enumer:[],label:1,content:0,"case":2,written:3,version:2,between:3,print:3,progress:3,size:[1,2],occurr:2,method:[1,2,3],attribut:[2,3],core:1,molserr:3,hash:2,str:[1,2,3],kei:[1,2,3],comp:1,compound:[1,2],fps_hashed_count:2,given:2,here:3,extens:3,molcul:3,although:[1,3],org:3,refer:2,valu:[1,2,3],both:2,search:0,delimit:3,aforesaid:2,column:[1,2,3],rdkit:[2,3],equal:2,isdf:[],"_name":3,length:2,instanc:[2,3],context:2,gener:2,pdf:2,mean:1,assign:[1,2,3],first:3,load:[],substructures_smil:2,dictionari:[1,2,3],active_label:1,instanti:[1,3],appli:2,modul:[0,1,2,3],vii:1,encod:2,number:[1,2,3],fps_unhashed_binari:2,substr:1,fps_hashed_binari:2,respect:[2,3],total:[1,3],assum:3,inactive_label:1,nb_mol:3,differ:2,three:1,from:[1,2,3],would:[1,2,3],draw_substructur:2,distinct:2,associ:2,numpi:2,two:[],fast:2,input_fil:3,call:3,compos:[1,2,3],fingerpint:2,time:2,unambigu:[1,2,3],type:[2,3],frame:1,store:2,fals:[2,3],sdfsdfsdfsdfdsf:[],titlelin:3,viii:1,fps_hashed_binary_quick:2,p_valu:1,python:3,tupl:[],about:[1,3],specifi:[1,2,3],smilescolumn:3,sdf:[1,3],train:2,vartyp:[1,3],radii_ext:1,atom:2,line:3,"true":[1,2,3],integ:[1,2,3],those:2,statist:1,count:2,none:[1,3],readmolecul:3,input:[2,3],"default":[1,3],molcol:1,properti:3,maximum:[1,2,3],calculate_p_valu:1,defin:2,below:[1,2,3],can:[1,2,3],morgan:2,were:3,posit:[2,3],similar:1,max_radiu:[1,2,3],nbit:2,comput:2,abov:[1,3],stdout:3,process:3,argument:[1,2,3],indic:[],image_directori:2,properli:3,file:3,chemic:2,substructur:[1,2,3],bioactiv:[1,2],threshold_ratio_w_wo:1,calculate_hashed_fps_count:2,depict:2,thei:[1,3],want:2,incorrectli:3,"int":[1,2,3],self:1,pepe:[],same:2,member:[],field:[1,3],bool:[1,2,3],neighbourhood:2,which:[1,2,3],reference_substructure_kei:2,"new":2,columns_unhash:2,start:3,map:2,substructure_id:2,structur:[],see:[1,3],sequenc:[],mol2:[1,3],object:3,wherea:[1,2,3],ndarrai:2,htmloutputwrit:1,user:2,consid:[1,2,3],extern:2,contain:[1,2,3],data:[1,2,3],"class":[1,2,3],name_field:[1,3],kept:[1,3],binari:2,images_substructur:2,directori:2,threshold_pvalu:1,thu:[2,3],unhash:2,correspond:[1,2,3],produc:2,inform:[1,3],mols_reference_for_unhash:2,nb_substructur:[1,3],allow:2,thi:[1,2,3],namecolumn:3,model:2,order:3,datafram:1},objtypes:{"0":"py:method","1":"py:class"},objnames:{"0":["py","method","Python method"],"1":["py","class","Python class"]},filenames:["index","Alerts","FPCalculator","LoadMolecules"],titles:["Welcome to bioalerts’s documentation!","Alerts: Derivation of structural alerts","FPCalculator: Fingerprint Calculator","LoadMolecules: Load Molecules"],objects:{"":{GetSubstructuresFromReferenceDataset:[1,1,1,""],ReadMolecules:[3,0,1,""],extract_substructure_information:[3,0,1,""],CalculatePvaluesContinuous:[1,1,1,""],GetDataSetInfo:[3,1,1,""],CalculatePvaluesCategorical:[1,1,1,""],CalculateFPs:[2,1,1,""],LoadMolecules:[3,1,1,""]},CalculatePvaluesCategorical:{HTMLOutputWriter:[1,0,1,""],calculate_p_values:[1,0,1,""],XlSXOutputWriter:[1,0,1,""]},GetSubstructuresFromReferenceDataset:{extract_substructure_information:[1,0,1,""]},CalculatePvaluesContinuous:{HTMLOutputWriter:[1,0,1,""],calculate_p_values:[1,0,1,""],XlSXOutputWriter:[1,0,1,""]},CalculateFPs:{calculate_hashed_fps_counts:[2,0,1,""],calculate_hashed_fps_binary_quick:[2,0,1,""],calculate_unhashed_fps:[2,0,1,""]}},titleterms:{load:3,getsubstructuresfromreferencedataset:1,calculatepvaluescontinu:1,welcom:0,tabl:0,molecul:3,calcul:2,getdatasetinfo:3,alert:1,structur:1,biolog:[],bioalert:0,indic:0,fpcalcul:2,fingerprint:2,calculatepvaluescategor:1,document:0,loadmolecul:3,calculatefp:2,deriv:1}}) -------------------------------------------------------------------------------- /bioalerts/source/LoadMolecules.rst: -------------------------------------------------------------------------------- 1 | LoadMolecules: Load Molecules 2 | ****************************** 3 | 4 | This module serves to load molecules from smiles, sdf or mol2 files. 5 | 6 | The module is composed of the classes: 7 | 8 | * LoadMolecules 9 | * GetDataSetInfo 10 | 11 | LoadMolecules 12 | ============= 13 | 14 | 15 | .. py:class:: LoadMolecules (input_file,verbose=True,delimiter="\t",name_field="_Name") 16 | 17 | This class can be used to load molecules to python from files in smiles, sdf and mol2 format 18 | using the rdkit library (www.rdkit.org). 19 | Molecules are thus saved as RDkit Mol class objects. 20 | It contains the following instance attributes: 21 | 22 | :var input_file: input file containing the molecules. 23 | :vartype input_file: str 24 | :var verbose: print to stdout the information about the progress of the calculations if set to True (default). 25 | :vartype input_file: bool 26 | :var delimiter: delimiter between fields in the input molecule file. Used with smiles files. 27 | :vartype input_file: str 28 | :var name_field: field in sdf files containing that will be used to get the molecule names. 29 | :vartype name_field: str 30 | 31 | The value for the following attributes are set when calling the method LoadMolecules.ReadMolecules(): 32 | 33 | :var mols: molecules that were properly processed. 34 | :vartype mols: list 35 | :var molserr: indices for the input molecules (starting at zero) that were incorrectly processed. This indices are also written to the file "incorrect_molecules.csv". 36 | :vartype molserr: list 37 | :var nb_mols: number of molecules properly processed. 38 | :vartype nb_mols: int 39 | :var mols_ids: indices of the molcules properly processed with respect to their position in the input file. 40 | :vartype mols_ids: list 41 | :var name_field: name of the field corresponding to the molecule names in the input file. 42 | :vartype name_field: str 43 | 44 | 45 | .. py:method:: ReadMolecules(titleLine=False,smilesColumn=0,nameColumn=1) 46 | 47 | Method to read the molecules contained in the input file (LoadMolecules.input_file). 48 | The arguments of this method are only used when reading molecules from smiles files. 49 | 50 | :param titleLine: From the RDkit documentation: "If true, the first line is assumed to list the names of properties in order seperated by 'delimiter'". Here, 'delimiter' corresponds to LoadMolecules.delimiter. 51 | :type titleLine: bool 52 | :param smilesColumn: column (starting at zero) containing the smiles in the input file. 53 | :type smilesColumn: int 54 | :param nameColumn: column (starting at zero) containing the molecule names in the input file. 55 | :type nameColumn: int 56 | 57 | GetDataSetInfo 58 | ============== 59 | 60 | .. py:class:: GetDataSetInfo(name_field=None) 61 | 62 | This class can be used to load molecules in smiles sdf and mol2 format. 63 | 64 | :var name_field: name of the data field containing the name of the molecules. Although the default value is None (*bool*), the name of the field if set when instantiating the class would be a string (*str*). 65 | :vartype name_field: str 66 | :var nb_substructures: total number of substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, from the molecules specified in the argument *mols* of the method *GetDataSetInfo.extract_substructure_information()* (see below). 67 | :vartype nb_substructures: int 68 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument *radii* of *GetDataSetInfo.extract_substructure_information()*. 69 | :vartype max_radius: int 70 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 71 | :vartype substructure_dictionary: dict 72 | 73 | *GetDataSetInfo* contains the following methods: 74 | 75 | .. py:method:: extract_substructure_information(radii,mols) 76 | 77 | This method extracts the substructures from the molecules (argument *mols*) 78 | whose radius is comprised in the argument *radii*. 79 | Each substructure in the molecule set (*mols*) is assigned an unambiguous integer identifier, 80 | which are kept in *GetDataSetInfo.substructure_dictionary*. 81 | The information about the substructures is kept in the fields indicated above. 82 | 83 | :param radii: substructure radii to be considered 84 | :param mols: molecules from which the substructures are to be extracted. 85 | :type radii: list 86 | :type mols: list 87 | 88 | 89 | -------------------------------------------------------------------------------- /bioalerts/build/_sources/LoadMolecules.txt: -------------------------------------------------------------------------------- 1 | LoadMolecules: Load Molecules 2 | ****************************** 3 | 4 | This module serves to load molecules from smiles, sdf or mol2 files. 5 | 6 | The module is composed of the classes: 7 | 8 | * LoadMolecules 9 | * GetDataSetInfo 10 | 11 | LoadMolecules 12 | ============= 13 | 14 | 15 | .. py:class:: LoadMolecules (input_file,verbose=True,delimiter="\t",name_field="_Name") 16 | 17 | This class can be used to load molecules to python from files in smiles, sdf and mol2 format 18 | using the rdkit library (www.rdkit.org). 19 | Molecules are thus saved as RDkit Mol class objects. 20 | It contains the following instance attributes: 21 | 22 | :var input_file: input file containing the molecules. 23 | :vartype input_file: str 24 | :var verbose: print to stdout the information about the progress of the calculations if set to True (default). 25 | :vartype input_file: bool 26 | :var delimiter: delimiter between fields in the input molecule file. Used with smiles files. 27 | :vartype input_file: str 28 | :var file_name: name of the file containing the molecules. 29 | :vartype file_name: str 30 | :var file_extension: file extension of the file containing the molecules. 31 | :vartype file_extension: str 32 | 33 | The value for the following attributes are set when calling the method LoadMolecules.ReadMolecules(): 34 | 35 | :var mols: molecules that were properly processed. 36 | :vartype mols: list 37 | :var molserr: indices for the input molecules (starting at zero) that were incorrectly processed. This indices are also written to the file "incorrect_molecules.csv". 38 | :vartype molserr: list 39 | :var nb_mols: number of molecules properly processed. 40 | :vartype nb_mols: int 41 | :var mols_ids: indices of the molcules properly processed with respect to their position in the input file. 42 | :vartype mols_ids: list 43 | :var name_field: name of the field corresponding to the molecule names in the input file. 44 | :vartype name_field: str 45 | 46 | 47 | .. py:method:: ReadMolecules(titleLine=False,smilesColumn=0,nameColumn=1) 48 | 49 | Method to read the molecules contained in the input file (LoadMolecules.input_file). 50 | The arguments of this method are only used when reading molecules from smiles files. 51 | 52 | :param titleLine: From the RDkit documentation: "If true, the first line is assumed to list the names of properties in order seperated by 'delimiter'". Here, 'delimiter' corresponds to LoadMolecules.delimiter. 53 | :type titleLine: bool 54 | :param smilesColumn: column (starting at zero) containing the smiles in the input file. 55 | :type smilesColumn: int 56 | :param nameColumn: column (starting at zero) containing the molecule names in the input file. 57 | :type nameColumn: int 58 | 59 | GetDataSetInfo 60 | ============== 61 | 62 | .. py:class:: GetDataSetInfo(name_field=None) 63 | 64 | This class can be used to load molecules in smiles sdf and mol2 format. 65 | 66 | :var name_field: name of the data field containing the name of the molecules. Although the default value is None (*bool*), the name of the field if set when instantiating the class would be a string (*str*). 67 | :vartype name_field: str 68 | :var nb_substructures: total number of substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, from the molecules specified in the argument *mols* of the method *GetDataSetInfo.extract_substructure_information()* (see below). 69 | :vartype nb_substructures: int 70 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument *radii* of *GetDataSetInfo.extract_substructure_information()*. 71 | :vartype max_radius: int 72 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument *radii* of *GetDataSetInfo.extract_substructure_information()*, and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 73 | :vartype substructure_dictionary: dict 74 | 75 | *GetDataSetInfo* contains the following methods: 76 | 77 | .. py:method:: extract_substructure_information(radii,mols) 78 | 79 | This method extracts the substructures from the molecules (argument *mols*) 80 | whose radius is comprised in the argument *radii*. 81 | Each substructure in the molecule set (*mols*) is assigned an unambiguous integer identifier, 82 | which are kept in *GetDataSetInfo.substructure_dictionary*. 83 | The information about the substructures is kept in the fields indicated above. 84 | 85 | :param radii: substructure radii to be considered 86 | :param mols: molecules from which the substructures are to be extracted. 87 | :type radii: list 88 | :type mols: list 89 | 90 | 91 | -------------------------------------------------------------------------------- /bioalerts/build/_static/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | * default.css_t 3 | * ~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- default theme. 6 | * 7 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | @import url("basic.css"); 13 | 14 | /* -- page layout ----------------------------------------------------------- */ 15 | 16 | body { 17 | font-family: sans-serif; 18 | font-size: 100%; 19 | background-color: #11303d; 20 | color: #000; 21 | margin: 0; 22 | padding: 0; 23 | } 24 | 25 | div.document { 26 | background-color: #1c4e63; 27 | } 28 | 29 | div.documentwrapper { 30 | float: left; 31 | width: 100%; 32 | } 33 | 34 | div.bodywrapper { 35 | margin: 0 0 0 230px; 36 | } 37 | 38 | div.body { 39 | background-color: #ffffff; 40 | color: #000000; 41 | padding: 0 20px 30px 20px; 42 | } 43 | 44 | div.footer { 45 | color: #ffffff; 46 | width: 100%; 47 | padding: 9px 0 9px 0; 48 | text-align: center; 49 | font-size: 75%; 50 | } 51 | 52 | div.footer a { 53 | color: #ffffff; 54 | text-decoration: underline; 55 | } 56 | 57 | div.related { 58 | background-color: #133f52; 59 | line-height: 30px; 60 | color: #ffffff; 61 | } 62 | 63 | div.related a { 64 | color: #ffffff; 65 | } 66 | 67 | div.sphinxsidebar { 68 | } 69 | 70 | div.sphinxsidebar h3 { 71 | font-family: 'Trebuchet MS', sans-serif; 72 | color: #ffffff; 73 | font-size: 1.4em; 74 | font-weight: normal; 75 | margin: 0; 76 | padding: 0; 77 | } 78 | 79 | div.sphinxsidebar h3 a { 80 | color: #ffffff; 81 | } 82 | 83 | div.sphinxsidebar h4 { 84 | font-family: 'Trebuchet MS', sans-serif; 85 | color: #ffffff; 86 | font-size: 1.3em; 87 | font-weight: normal; 88 | margin: 5px 0 0 0; 89 | padding: 0; 90 | } 91 | 92 | div.sphinxsidebar p { 93 | color: #ffffff; 94 | } 95 | 96 | div.sphinxsidebar p.topless { 97 | margin: 5px 10px 10px 10px; 98 | } 99 | 100 | div.sphinxsidebar ul { 101 | margin: 10px; 102 | padding: 0; 103 | color: #ffffff; 104 | } 105 | 106 | div.sphinxsidebar a { 107 | color: #98dbcc; 108 | } 109 | 110 | div.sphinxsidebar input { 111 | border: 1px solid #98dbcc; 112 | font-family: sans-serif; 113 | font-size: 1em; 114 | } 115 | 116 | 117 | 118 | /* -- hyperlink styles ------------------------------------------------------ */ 119 | 120 | a { 121 | color: #355f7c; 122 | text-decoration: none; 123 | } 124 | 125 | a:visited { 126 | color: #355f7c; 127 | text-decoration: none; 128 | } 129 | 130 | a:hover { 131 | text-decoration: underline; 132 | } 133 | 134 | 135 | 136 | /* -- body styles ----------------------------------------------------------- */ 137 | 138 | div.body h1, 139 | div.body h2, 140 | div.body h3, 141 | div.body h4, 142 | div.body h5, 143 | div.body h6 { 144 | font-family: 'Trebuchet MS', sans-serif; 145 | background-color: #f2f2f2; 146 | font-weight: normal; 147 | color: #20435c; 148 | border-bottom: 1px solid #ccc; 149 | margin: 20px -20px 10px -20px; 150 | padding: 3px 0 3px 10px; 151 | } 152 | 153 | div.body h1 { margin-top: 0; font-size: 200%; } 154 | div.body h2 { font-size: 160%; } 155 | div.body h3 { font-size: 140%; } 156 | div.body h4 { font-size: 120%; } 157 | div.body h5 { font-size: 110%; } 158 | div.body h6 { font-size: 100%; } 159 | 160 | a.headerlink { 161 | color: #c60f0f; 162 | font-size: 0.8em; 163 | padding: 0 4px 0 4px; 164 | text-decoration: none; 165 | } 166 | 167 | a.headerlink:hover { 168 | background-color: #c60f0f; 169 | color: white; 170 | } 171 | 172 | div.body p, div.body dd, div.body li { 173 | text-align: justify; 174 | line-height: 130%; 175 | } 176 | 177 | div.admonition p.admonition-title + p { 178 | display: inline; 179 | } 180 | 181 | div.admonition p { 182 | margin-bottom: 5px; 183 | } 184 | 185 | div.admonition pre { 186 | margin-bottom: 5px; 187 | } 188 | 189 | div.admonition ul, div.admonition ol { 190 | margin-bottom: 5px; 191 | } 192 | 193 | div.note { 194 | background-color: #eee; 195 | border: 1px solid #ccc; 196 | } 197 | 198 | div.seealso { 199 | background-color: #ffc; 200 | border: 1px solid #ff6; 201 | } 202 | 203 | div.topic { 204 | background-color: #eee; 205 | } 206 | 207 | div.warning { 208 | background-color: #ffe4e4; 209 | border: 1px solid #f66; 210 | } 211 | 212 | p.admonition-title { 213 | display: inline; 214 | } 215 | 216 | p.admonition-title:after { 217 | content: ":"; 218 | } 219 | 220 | pre { 221 | padding: 5px; 222 | background-color: #eeffcc; 223 | color: #333333; 224 | line-height: 120%; 225 | border: 1px solid #ac9; 226 | border-left: none; 227 | border-right: none; 228 | } 229 | 230 | tt { 231 | background-color: #ecf0f3; 232 | padding: 0 1px 0 1px; 233 | font-size: 0.95em; 234 | } 235 | 236 | th { 237 | background-color: #ede; 238 | } 239 | 240 | .warning tt { 241 | background: #efc2c2; 242 | } 243 | 244 | .note tt { 245 | background: #d6d6d6; 246 | } 247 | 248 | .viewcode-back { 249 | font-family: sans-serif; 250 | } 251 | 252 | div.viewcode-block:target { 253 | background-color: #f4debf; 254 | border-top: 1px solid #ac9; 255 | border-bottom: 1px solid #ac9; 256 | } -------------------------------------------------------------------------------- /bioalerts/build/_static/sidebar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * sidebar.js 3 | * ~~~~~~~~~~ 4 | * 5 | * This script makes the Sphinx sidebar collapsible. 6 | * 7 | * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds 8 | * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton 9 | * used to collapse and expand the sidebar. 10 | * 11 | * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden 12 | * and the width of the sidebar and the margin-left of the document 13 | * are decreased. When the sidebar is expanded the opposite happens. 14 | * This script saves a per-browser/per-session cookie used to 15 | * remember the position of the sidebar among the pages. 16 | * Once the browser is closed the cookie is deleted and the position 17 | * reset to the default (expanded). 18 | * 19 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 20 | * :license: BSD, see LICENSE for details. 21 | * 22 | */ 23 | 24 | $(function() { 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | // global elements used by the functions. 34 | // the 'sidebarbutton' element is defined as global after its 35 | // creation, in the add_sidebar_button function 36 | var bodywrapper = $('.bodywrapper'); 37 | var sidebar = $('.sphinxsidebar'); 38 | var sidebarwrapper = $('.sphinxsidebarwrapper'); 39 | 40 | // for some reason, the document has no sidebar; do not run into errors 41 | if (!sidebar.length) return; 42 | 43 | // original margin-left of the bodywrapper and width of the sidebar 44 | // with the sidebar expanded 45 | var bw_margin_expanded = bodywrapper.css('margin-left'); 46 | var ssb_width_expanded = sidebar.width(); 47 | 48 | // margin-left of the bodywrapper and width of the sidebar 49 | // with the sidebar collapsed 50 | var bw_margin_collapsed = '.8em'; 51 | var ssb_width_collapsed = '.8em'; 52 | 53 | // colors used by the current theme 54 | var dark_color = $('.related').css('background-color'); 55 | var light_color = $('.document').css('background-color'); 56 | 57 | function sidebar_is_collapsed() { 58 | return sidebarwrapper.is(':not(:visible)'); 59 | } 60 | 61 | function toggle_sidebar() { 62 | if (sidebar_is_collapsed()) 63 | expand_sidebar(); 64 | else 65 | collapse_sidebar(); 66 | } 67 | 68 | function collapse_sidebar() { 69 | sidebarwrapper.hide(); 70 | sidebar.css('width', ssb_width_collapsed); 71 | bodywrapper.css('margin-left', bw_margin_collapsed); 72 | sidebarbutton.css({ 73 | 'margin-left': '0', 74 | 'height': bodywrapper.height() 75 | }); 76 | sidebarbutton.find('span').text('»'); 77 | sidebarbutton.attr('title', _('Expand sidebar')); 78 | document.cookie = 'sidebar=collapsed'; 79 | } 80 | 81 | function expand_sidebar() { 82 | bodywrapper.css('margin-left', bw_margin_expanded); 83 | sidebar.css('width', ssb_width_expanded); 84 | sidebarwrapper.show(); 85 | sidebarbutton.css({ 86 | 'margin-left': ssb_width_expanded-12, 87 | 'height': bodywrapper.height() 88 | }); 89 | sidebarbutton.find('span').text('«'); 90 | sidebarbutton.attr('title', _('Collapse sidebar')); 91 | document.cookie = 'sidebar=expanded'; 92 | } 93 | 94 | function add_sidebar_button() { 95 | sidebarwrapper.css({ 96 | 'float': 'left', 97 | 'margin-right': '0', 98 | 'width': ssb_width_expanded - 28 99 | }); 100 | // create the button 101 | sidebar.append( 102 | '
«
' 103 | ); 104 | var sidebarbutton = $('#sidebarbutton'); 105 | light_color = sidebarbutton.css('background-color'); 106 | // find the height of the viewport to center the '<<' in the page 107 | var viewport_height; 108 | if (window.innerHeight) 109 | viewport_height = window.innerHeight; 110 | else 111 | viewport_height = $(window).height(); 112 | sidebarbutton.find('span').css({ 113 | 'display': 'block', 114 | 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 115 | }); 116 | 117 | sidebarbutton.click(toggle_sidebar); 118 | sidebarbutton.attr('title', _('Collapse sidebar')); 119 | sidebarbutton.css({ 120 | 'color': '#FFFFFF', 121 | 'border-left': '1px solid ' + dark_color, 122 | 'font-size': '1.2em', 123 | 'cursor': 'pointer', 124 | 'height': bodywrapper.height(), 125 | 'padding-top': '1px', 126 | 'margin-left': ssb_width_expanded - 12 127 | }); 128 | 129 | sidebarbutton.hover( 130 | function () { 131 | $(this).css('background-color', dark_color); 132 | }, 133 | function () { 134 | $(this).css('background-color', light_color); 135 | } 136 | ); 137 | } 138 | 139 | function set_position_from_cookie() { 140 | if (!document.cookie) 141 | return; 142 | var items = document.cookie.split(';'); 143 | for(var k=0; k 3 | 4 | 5 | 6 | 7 | 8 | 9 | Welcome to bioalerts’s documentation! — bioalerts 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 43 | 44 |
45 |
46 |
47 |
48 | 49 |
50 |

Welcome to bioalerts’s documentation!

51 |

Contents:

52 | 71 |
72 |
73 |

Indices and tables

74 | 79 |
80 | 81 | 82 |
83 |
84 |
85 |
86 |
87 |

Table Of Contents

88 | 92 | 93 |

Next topic

94 |

LoadMolecules: Load Molecules

96 |

This Page

97 | 101 | 113 | 114 |
115 |
116 |
117 |
118 | 130 | 134 | 135 | -------------------------------------------------------------------------------- /bioalerts/FPCalculator.py: -------------------------------------------------------------------------------- 1 | from numpy import arange as _arange, asarray as _asarray, array as _array, sort as _sort, ones as _ones, zeros as _zeros 2 | from rdkit.Chem import SmilesMolSupplier as _SmilesMolSupplier, MolFromMol2Block as _MolFromMol2Block, SDMolSupplier as _SDMolSupplier, MolToSmiles as _MolToSmiles, PathToSubmol as _PathToSubmol, FindAtomEnvironmentOfRadiusN as _FindAtomEnvironmentOfRadiusN 3 | from operator import add as _add 4 | from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect as _GetMorganFingerprintAsBitVect, GetMorganFingerprint as _GetMorganFingerprint 5 | from os.path import splitext as _splitext, exists as _exists 6 | from os import makedirs as _makedirs 7 | from rdkit.Chem.Draw import MolToFile as _MolToFile 8 | 9 | class CalculateFPs: 10 | ''' 11 | Calculate fps for a set of molecules 12 | Required input: substructure dictionary, radii to be considered 13 | ''' 14 | def __init__(self,radii,mols,reference_substructure_keys={}): 15 | self.radii = radii 16 | self.max_radius = max(radii) 17 | if type(mols) != list: mols = [ext.mols[i] for i in _arange(0,len(mols))] 18 | self.mols = mols 19 | self.reference_substructure_keys = reference_substructure_keys 20 | self.substructure_dictionary = {} 21 | self.mols_reference_for_unhashed = None 22 | self.columns_unhashed = None 23 | self.substructure_ids = None 24 | # output 25 | self.fps_hashed_binary_quick = None 26 | self.fps_hashed_binary = None 27 | self.fps_hashed_counts = None 28 | self.fps_unhashed_binary = None 29 | self.fps_unhashed_counts = None 30 | self.substructures_smiles = {} 31 | 32 | def _combine_dicts(self,a, b, op=_add): 33 | return dict(a.items() + b.items() + [(k, op(a[k], b[k])) for k in set(b) & set(a)]) 34 | 35 | def calculate_hashed_fps_binary_quick(self,nBits): 36 | # bit format 37 | self.fps_hashed_binary_quick = _asarray([_GetMorganFingerprintAsBitVect(x,radius=self.max_radius,nBits=nBits) for x in self.mols]) 38 | 39 | def calculate_hashed_fps(self,nBits): 40 | # count format 41 | fps_hashed_binary = _zeros((len(self.mols),nBits), dtype=int) 42 | fps_hashed_counts = _zeros((len(self.mols),nBits), dtype=int) 43 | for mol_index,mol in enumerate(self.mols): 44 | info={} 45 | fp = _GetMorganFingerprint(mol,radius=self.max_radius,bitInfo=info) 46 | for key,val in info.iteritems(): 47 | if val[0][1] in self.radii: #check if the radius is in the selection 48 | fps_hashed_binary[mol_index,key%nBits] = 1 49 | fps_hashed_counts[mol_index,key%nBits] += len(val) 50 | self.fps_hashed_binary = fps_hashed_binary 51 | self.fps_hashed_counts = fps_hashed_counts 52 | 53 | 54 | def calculate_unhashed_fps(self,draw_substructures=False,image_directory='./images_substructures'): 55 | # get the dictionary for the substructures 56 | idxs = [] 57 | substr_ids = [] 58 | counts = [] 59 | for mol_index,mol in enumerate(self.mols): 60 | info={} 61 | fp = _GetMorganFingerprint(mol,radius=self.max_radius,bitInfo=info) 62 | substructure_dictionary = {k:[mol_index] for k,v in info.iteritems() if v[0][1] in self.radii} 63 | substr_ids.append(substructure_dictionary.keys()) 64 | idxs.append([mol_index]*len(substructure_dictionary.keys())) 65 | counts.append([ len(info.values()[x]) for x in _arange(0,len(info)) if info.values()[x][0][1] in self.radii]) 66 | 67 | # get the smiles for the substructures 68 | amap = {} 69 | substructures_smiles = {k:[_MolToSmiles(_PathToSubmol(mol,_FindAtomEnvironmentOfRadiusN(mol,v[0][1],v[0][0]),atomMap=amap))] for k,v in info.iteritems() if v[0][1] in self.radii} 70 | self.substructures_smiles.update(substructures_smiles) 71 | 72 | # generate the images for the substructures if required.. 73 | if draw_substructures: 74 | if not _exists(image_directory): 75 | _makedirs(image_directory) 76 | for k,v in info.iteritems(): 77 | if k not in self.substructure_dictionary.keys() and v[0][1] in self.radii: 78 | image_name="%s/Molecule_%d_substr_%d.pdf"%(image_directory,mol_index,k) 79 | env=_FindAtomEnvironmentOfRadiusN(mol,v[0][1],v[0][0]) 80 | amap={} 81 | submol=_PathToSubmol(mol,env,atomMap=amap) 82 | _MolToFile(mol,image_name,size=(300,300),wedgeBonds=True,kekulize=True,highlightAtoms=amap.keys()) 83 | 84 | self.substructure_dictionary = self._combine_dicts(substructure_dictionary,self.substructure_dictionary) 85 | 86 | 87 | idxs = _array([val for sublist in idxs for val in sublist]) 88 | counts = _array([val for sublist in counts for val in sublist]) 89 | substr_ids_flattened = [val for sublist in substr_ids for val in sublist] 90 | substr_ids = _array(substr_ids_flattened) 91 | self.substructure_ids = substr_ids 92 | if len(self.reference_substructure_keys)==0: 93 | print "No input set of keys for the substructures. \nThus, the substructures present in the input molecules will be considered for the calculation of unhashed fingerprints." 94 | columns = _array(list(set(self.substructure_dictionary.keys()))) 95 | columns = _sort(columns) 96 | self.columns_unhashed = columns 97 | dimensionality_unhashed = len(columns) 98 | else: 99 | columns = _array(list(set(self.reference_substructure_keys))) 100 | columns = _sort(columns) 101 | self.columns_unhashed = columns 102 | dimensionality_unhashed = len(columns) 103 | 104 | fps_unhashed_binary = _zeros((len(self.mols),dimensionality_unhashed), dtype=int) 105 | fps_unhashed_counts = _zeros((len(self.mols),dimensionality_unhashed), dtype=int) 106 | 107 | 108 | # removing the indices corresponding to the substructures in the test molecules not present in the references set of substructures.. 109 | idxs = _array([idxs[x] for x in _arange(0,len(substr_ids)) if substr_ids[x] in self.columns_unhashed]) 110 | counts = _array([counts[x] for x in _arange(0,len(substr_ids)) if substr_ids[x] in self.columns_unhashed]) 111 | substr_ids = _array([substr_ids[x] for x in _arange(0,len(substr_ids)) if substr_ids[x] in self.columns_unhashed]) 112 | mapping = _array([(substr_ids[x]==columns).nonzero() for x in _arange(0,len(substr_ids))]) 113 | mapping = mapping.flatten() 114 | if len(mapping) ==0: 115 | print "There is no intersection between the substructures \n(i)provided in the reference key set, and\n(ii) the substructures found in the input molecules." 116 | return 117 | 118 | fps_unhashed_binary[idxs,mapping] = _ones(len(counts)) 119 | fps_unhashed_counts[idxs,mapping] = counts 120 | self.fps_unhashed_binary = fps_unhashed_binary 121 | self.fps_unhashed_counts = fps_unhashed_counts 122 | -------------------------------------------------------------------------------- /bioalerts/build/scripts-2.7/FPCalculator.py: -------------------------------------------------------------------------------- 1 | from numpy import arange as _arange, asarray as _asarray, array as _array, sort as _sort, ones as _ones, zeros as _zeros 2 | from rdkit.Chem import SmilesMolSupplier as _SmilesMolSupplier, MolFromMol2Block as _MolFromMol2Block, SDMolSupplier as _SDMolSupplier, MolToSmiles as _MolToSmiles, PathToSubmol as _PathToSubmol, FindAtomEnvironmentOfRadiusN as _FindAtomEnvironmentOfRadiusN 3 | from operator import add as _add 4 | from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect as _GetMorganFingerprintAsBitVect, GetMorganFingerprint as _GetMorganFingerprint 5 | from os.path import splitext as _splitext, exists as _exists 6 | from os import makedirs as _makedirs 7 | from rdkit.Chem.Draw import MolToFile as _MolToFile 8 | 9 | class CalculateFPs: 10 | ''' 11 | Calculate fps for a set of molecules 12 | Required input: substructure dictionary, radii to be considered 13 | ''' 14 | def __init__(self,radii,mols,reference_substructure_keys={}): 15 | self.radii = radii 16 | self.max_radius = max(radii) 17 | if type(mols) != list: mols = [ext.mols[i] for i in _arange(0,len(mols))] 18 | self.mols = mols 19 | self.reference_substructure_keys = reference_substructure_keys 20 | self.substructure_dictionary = {} 21 | self.mols_reference_for_unhashed = None 22 | self.columns_unhashed = None 23 | self.substructure_ids = None 24 | # output 25 | self.fps_hashed_binary_quick = None 26 | self.fps_hashed_binary = None 27 | self.fps_hashed_counts = None 28 | self.fps_unhashed_binary = None 29 | self.fps_unhashed_counts = None 30 | self.substructures_smiles = {} 31 | 32 | def _combine_dicts(self,a, b, op=_add): 33 | return dict(a.items() + b.items() + [(k, op(a[k], b[k])) for k in set(b) & set(a)]) 34 | 35 | def calculate_hashed_fps_binary_quick(self,nBits): 36 | # bit format 37 | self.fps_hashed_binary_quick = _asarray([_GetMorganFingerprintAsBitVect(x,radius=self.max_radius,nBits=nBits) for x in self.mols]) 38 | 39 | def calculate_hashed_fps(self,nBits): 40 | # count format 41 | fps_hashed_binary = _zeros((len(self.mols),nBits), dtype=int) 42 | fps_hashed_counts = _zeros((len(self.mols),nBits), dtype=int) 43 | for mol_index,mol in enumerate(self.mols): 44 | info={} 45 | fp = _GetMorganFingerprint(mol,radius=self.max_radius,bitInfo=info) 46 | for key,val in info.iteritems(): 47 | if val[0][1] in self.radii: #check if the radius is in the selection 48 | fps_hashed_binary[mol_index,key%nBits] = 1 49 | fps_hashed_counts[mol_index,key%nBits] += len(val) 50 | self.fps_hashed_binary = fps_hashed_binary 51 | self.fps_hashed_counts = fps_hashed_counts 52 | 53 | 54 | def calculate_unhashed_fps(self,draw_substructures=False,image_directory='./images_substructures'): 55 | # get the dictionary for the substructures 56 | idxs = [] 57 | substr_ids = [] 58 | counts = [] 59 | for mol_index,mol in enumerate(self.mols): 60 | info={} 61 | fp = _GetMorganFingerprint(mol,radius=self.max_radius,bitInfo=info) 62 | substructure_dictionary = {k:[mol_index] for k,v in info.iteritems() if v[0][1] in self.radii} 63 | substr_ids.append(substructure_dictionary.keys()) 64 | idxs.append([mol_index]*len(substructure_dictionary.keys())) 65 | counts.append([ len(info.values()[x]) for x in _arange(0,len(info)) if info.values()[x][0][1] in self.radii]) 66 | 67 | # get the smiles for the substructures 68 | amap = {} 69 | substructures_smiles = {k:[_MolToSmiles(_PathToSubmol(mol,_FindAtomEnvironmentOfRadiusN(mol,v[0][1],v[0][0]),atomMap=amap))] for k,v in info.iteritems() if v[0][1] in self.radii} 70 | self.substructures_smiles.update(substructures_smiles) 71 | 72 | # generate the images for the substructures if required.. 73 | if draw_substructures: 74 | if not _exists(image_directory): 75 | _makedirs(image_directory) 76 | for k,v in info.iteritems(): 77 | if k not in self.substructure_dictionary.keys() and v[0][1] in self.radii: 78 | image_name="%s/Molecule_%d_substr_%d.pdf"%(image_directory,mol_index,k) 79 | env=_FindAtomEnvironmentOfRadiusN(mol,v[0][1],v[0][0]) 80 | amap={} 81 | submol=_PathToSubmol(mol,env,atomMap=amap) 82 | _MolToFile(mol,image_name,size=(300,300),wedgeBonds=True,kekulize=True,highlightAtoms=amap.keys()) 83 | 84 | self.substructure_dictionary = self._combine_dicts(substructure_dictionary,self.substructure_dictionary) 85 | 86 | 87 | idxs = _array([val for sublist in idxs for val in sublist]) 88 | counts = _array([val for sublist in counts for val in sublist]) 89 | substr_ids_flattened = [val for sublist in substr_ids for val in sublist] 90 | substr_ids = _array(substr_ids_flattened) 91 | self.substructure_ids = substr_ids 92 | if len(self.reference_substructure_keys)==0: 93 | print "No input set of keys for the substructures. \nThus, the substructures present in the input molecules will be considered for the calculation of unhashed fingerprints." 94 | columns = _array(list(set(self.substructure_dictionary.keys()))) 95 | columns = _sort(columns) 96 | self.columns_unhashed = columns 97 | dimensionality_unhashed = len(columns) 98 | else: 99 | columns = _array(list(set(self.reference_substructure_keys))) 100 | columns = _sort(columns) 101 | self.columns_unhashed = columns 102 | dimensionality_unhashed = len(columns) 103 | 104 | fps_unhashed_binary = _zeros((len(self.mols),dimensionality_unhashed), dtype=int) 105 | fps_unhashed_counts = _zeros((len(self.mols),dimensionality_unhashed), dtype=int) 106 | 107 | 108 | # removing the indices corresponding to the substructures in the test molecules not present in the references set of substructures.. 109 | idxs = _array([idxs[x] for x in _arange(0,len(substr_ids)) if substr_ids[x] in self.columns_unhashed]) 110 | counts = _array([counts[x] for x in _arange(0,len(substr_ids)) if substr_ids[x] in self.columns_unhashed]) 111 | substr_ids = _array([substr_ids[x] for x in _arange(0,len(substr_ids)) if substr_ids[x] in self.columns_unhashed]) 112 | mapping = _array([(substr_ids[x]==columns).nonzero() for x in _arange(0,len(substr_ids))]) 113 | mapping = mapping.flatten() 114 | if len(mapping) ==0: 115 | print "There is no intersection between the substructures \n(i)provided in the reference key set, and\n(ii) the substructures found in the input molecules." 116 | return 117 | 118 | fps_unhashed_binary[idxs,mapping] = _ones(len(counts)) 119 | fps_unhashed_counts[idxs,mapping] = counts 120 | self.fps_unhashed_binary = fps_unhashed_binary 121 | self.fps_unhashed_counts = fps_unhashed_counts 122 | -------------------------------------------------------------------------------- /bioalerts/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/BioAlerts.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/BioAlerts.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/BioAlerts" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/BioAlerts" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /bioalerts/build/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s == 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node) { 70 | if (node.nodeType == 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { 74 | var span = document.createElement("span"); 75 | span.className = className; 76 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 77 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 78 | document.createTextNode(val.substr(pos + text.length)), 79 | node.nextSibling)); 80 | node.nodeValue = val.substr(0, pos); 81 | } 82 | } 83 | else if (!jQuery(node).is("button, select, textarea")) { 84 | jQuery.each(node.childNodes, function() { 85 | highlight(this); 86 | }); 87 | } 88 | } 89 | return this.each(function() { 90 | highlight(this); 91 | }); 92 | }; 93 | 94 | /** 95 | * Small JavaScript module for the documentation. 96 | */ 97 | var Documentation = { 98 | 99 | init : function() { 100 | this.fixFirefoxAnchorBug(); 101 | this.highlightSearchWords(); 102 | this.initIndexTable(); 103 | }, 104 | 105 | /** 106 | * i18n support 107 | */ 108 | TRANSLATIONS : {}, 109 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, 110 | LOCALE : 'unknown', 111 | 112 | // gettext and ngettext don't access this so that the functions 113 | // can safely bound to a different name (_ = Documentation.gettext) 114 | gettext : function(string) { 115 | var translated = Documentation.TRANSLATIONS[string]; 116 | if (typeof translated == 'undefined') 117 | return string; 118 | return (typeof translated == 'string') ? translated : translated[0]; 119 | }, 120 | 121 | ngettext : function(singular, plural, n) { 122 | var translated = Documentation.TRANSLATIONS[singular]; 123 | if (typeof translated == 'undefined') 124 | return (n == 1) ? singular : plural; 125 | return translated[Documentation.PLURALEXPR(n)]; 126 | }, 127 | 128 | addTranslations : function(catalog) { 129 | for (var key in catalog.messages) 130 | this.TRANSLATIONS[key] = catalog.messages[key]; 131 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 132 | this.LOCALE = catalog.locale; 133 | }, 134 | 135 | /** 136 | * add context elements like header anchor links 137 | */ 138 | addContextElements : function() { 139 | $('div[id] > :header:first').each(function() { 140 | $('\u00B6'). 141 | attr('href', '#' + this.id). 142 | attr('title', _('Permalink to this headline')). 143 | appendTo(this); 144 | }); 145 | $('dt[id]').each(function() { 146 | $('\u00B6'). 147 | attr('href', '#' + this.id). 148 | attr('title', _('Permalink to this definition')). 149 | appendTo(this); 150 | }); 151 | }, 152 | 153 | /** 154 | * workaround a firefox stupidity 155 | */ 156 | fixFirefoxAnchorBug : function() { 157 | if (document.location.hash && $.browser.mozilla) 158 | window.setTimeout(function() { 159 | document.location.href += ''; 160 | }, 10); 161 | }, 162 | 163 | /** 164 | * highlight the search words provided in the url in the text 165 | */ 166 | highlightSearchWords : function() { 167 | var params = $.getQueryParameters(); 168 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 169 | if (terms.length) { 170 | var body = $('div.body'); 171 | if (!body.length) { 172 | body = $('body'); 173 | } 174 | window.setTimeout(function() { 175 | $.each(terms, function() { 176 | body.highlightText(this.toLowerCase(), 'highlighted'); 177 | }); 178 | }, 10); 179 | $('') 181 | .appendTo($('#searchbox')); 182 | } 183 | }, 184 | 185 | /** 186 | * init the domain index toggle buttons 187 | */ 188 | initIndexTable : function() { 189 | var togglers = $('img.toggler').click(function() { 190 | var src = $(this).attr('src'); 191 | var idnum = $(this).attr('id').substr(7); 192 | $('tr.cg-' + idnum).toggle(); 193 | if (src.substr(-9) == 'minus.png') 194 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 195 | else 196 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 197 | }).css('display', ''); 198 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 199 | togglers.click(); 200 | } 201 | }, 202 | 203 | /** 204 | * helper function to hide the search marks again 205 | */ 206 | hideSearchWords : function() { 207 | $('#searchbox .highlight-link').fadeOut(300); 208 | $('span.highlighted').removeClass('highlighted'); 209 | }, 210 | 211 | /** 212 | * make the url absolute 213 | */ 214 | makeURL : function(relativeURL) { 215 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 216 | }, 217 | 218 | /** 219 | * get the current relative url 220 | */ 221 | getCurrentURL : function() { 222 | var path = document.location.pathname; 223 | var parts = path.split(/\//); 224 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 225 | if (this == '..') 226 | parts.pop(); 227 | }); 228 | var url = parts.join('/'); 229 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 230 | } 231 | }; 232 | 233 | // quick alias for translations 234 | _ = Documentation.gettext; 235 | 236 | $(document).ready(function() { 237 | Documentation.init(); 238 | }); 239 | -------------------------------------------------------------------------------- /bioalerts/build/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — bioalerts 1.0 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 40 | 41 |
42 |
43 |
44 |
45 | 46 | 47 |

Index

48 | 49 |
50 | C 51 | | E 52 | | G 53 | | H 54 | | L 55 | | R 56 | | X 57 | 58 |
59 |

C

60 | 61 | 85 | 99 |
62 | 63 |
calculate_hashed_fps_binary_quick() (CalculateFPs method) 64 |
65 | 66 | 67 |
calculate_hashed_fps_counts() (CalculateFPs method) 68 |
69 | 70 | 71 |
calculate_p_values() (CalculatePvaluesCategorical method) 72 |
73 | 74 |
75 | 76 |
(CalculatePvaluesContinuous method) 77 |
78 | 79 |
80 | 81 |
calculate_unhashed_fps() (CalculateFPs method) 82 |
83 | 84 |
86 | 87 |
CalculateFPs (built-in class) 88 |
89 | 90 | 91 |
CalculatePvaluesCategorical (built-in class) 92 |
93 | 94 | 95 |
CalculatePvaluesContinuous (built-in class) 96 |
97 | 98 |
100 | 101 |

E

102 | 103 | 115 |
104 | 105 |
extract_substructure_information() 106 |
107 | 108 |
109 | 110 |
(GetSubstructuresFromReferenceDataset method) 111 |
112 | 113 |
114 |
116 | 117 |

G

118 | 119 | 125 | 131 |
120 | 121 |
GetDataSetInfo (built-in class) 122 |
123 | 124 |
126 | 127 |
GetSubstructuresFromReferenceDataset (built-in class) 128 |
129 | 130 |
132 | 133 |

H

134 | 135 | 147 |
136 | 137 |
HTMLOutputWriter() (CalculatePvaluesCategorical method) 138 |
139 | 140 |
141 | 142 |
(CalculatePvaluesContinuous method) 143 |
144 | 145 |
146 |
148 | 149 |

L

150 | 151 | 157 |
152 | 153 |
LoadMolecules (built-in class) 154 |
155 | 156 |
158 | 159 |

R

160 | 161 | 167 |
162 | 163 |
ReadMolecules() 164 |
165 | 166 |
168 | 169 |

X

170 | 171 | 183 |
172 | 173 |
XlSXOutputWriter() (CalculatePvaluesCategorical method) 174 |
175 | 176 |
177 | 178 |
(CalculatePvaluesContinuous method) 179 |
180 | 181 |
182 |
184 | 185 | 186 | 187 |
188 |
189 |
190 |
191 |
192 | 193 | 194 | 195 | 207 | 208 |
209 |
210 |
211 |
212 | 221 | 225 | 226 | -------------------------------------------------------------------------------- /bioalerts/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source 10 | set I18NSPHINXOPTS=%SPHINXOPTS% source 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | goto end 41 | ) 42 | 43 | if "%1" == "clean" ( 44 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 45 | del /q /s %BUILDDIR%\* 46 | goto end 47 | ) 48 | 49 | 50 | %SPHINXBUILD% 2> nul 51 | if errorlevel 9009 ( 52 | echo. 53 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 54 | echo.installed, then set the SPHINXBUILD environment variable to point 55 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 56 | echo.may add the Sphinx directory to PATH. 57 | echo. 58 | echo.If you don't have Sphinx installed, grab it from 59 | echo.http://sphinx-doc.org/ 60 | exit /b 1 61 | ) 62 | 63 | if "%1" == "html" ( 64 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 68 | goto end 69 | ) 70 | 71 | if "%1" == "dirhtml" ( 72 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 76 | goto end 77 | ) 78 | 79 | if "%1" == "singlehtml" ( 80 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 84 | goto end 85 | ) 86 | 87 | if "%1" == "pickle" ( 88 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can process the pickle files. 92 | goto end 93 | ) 94 | 95 | if "%1" == "json" ( 96 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 97 | if errorlevel 1 exit /b 1 98 | echo. 99 | echo.Build finished; now you can process the JSON files. 100 | goto end 101 | ) 102 | 103 | if "%1" == "htmlhelp" ( 104 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 105 | if errorlevel 1 exit /b 1 106 | echo. 107 | echo.Build finished; now you can run HTML Help Workshop with the ^ 108 | .hhp project file in %BUILDDIR%/htmlhelp. 109 | goto end 110 | ) 111 | 112 | if "%1" == "qthelp" ( 113 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 117 | .qhcp project file in %BUILDDIR%/qthelp, like this: 118 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\BioAlerts.qhcp 119 | echo.To view the help file: 120 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\BioAlerts.ghc 121 | goto end 122 | ) 123 | 124 | if "%1" == "devhelp" ( 125 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished. 129 | goto end 130 | ) 131 | 132 | if "%1" == "epub" ( 133 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 137 | goto end 138 | ) 139 | 140 | if "%1" == "latex" ( 141 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 145 | goto end 146 | ) 147 | 148 | if "%1" == "latexpdf" ( 149 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 150 | cd %BUILDDIR%/latex 151 | make all-pdf 152 | cd %BUILDDIR%/.. 153 | echo. 154 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 155 | goto end 156 | ) 157 | 158 | if "%1" == "latexpdfja" ( 159 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 160 | cd %BUILDDIR%/latex 161 | make all-pdf-ja 162 | cd %BUILDDIR%/.. 163 | echo. 164 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 165 | goto end 166 | ) 167 | 168 | if "%1" == "text" ( 169 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 170 | if errorlevel 1 exit /b 1 171 | echo. 172 | echo.Build finished. The text files are in %BUILDDIR%/text. 173 | goto end 174 | ) 175 | 176 | if "%1" == "man" ( 177 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 178 | if errorlevel 1 exit /b 1 179 | echo. 180 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 181 | goto end 182 | ) 183 | 184 | if "%1" == "texinfo" ( 185 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 186 | if errorlevel 1 exit /b 1 187 | echo. 188 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 189 | goto end 190 | ) 191 | 192 | if "%1" == "gettext" ( 193 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 194 | if errorlevel 1 exit /b 1 195 | echo. 196 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 197 | goto end 198 | ) 199 | 200 | if "%1" == "changes" ( 201 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 202 | if errorlevel 1 exit /b 1 203 | echo. 204 | echo.The overview file is in %BUILDDIR%/changes. 205 | goto end 206 | ) 207 | 208 | if "%1" == "linkcheck" ( 209 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 210 | if errorlevel 1 exit /b 1 211 | echo. 212 | echo.Link check complete; look for any errors in the above output ^ 213 | or in %BUILDDIR%/linkcheck/output.txt. 214 | goto end 215 | ) 216 | 217 | if "%1" == "doctest" ( 218 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 219 | if errorlevel 1 exit /b 1 220 | echo. 221 | echo.Testing of doctests in the sources finished, look at the ^ 222 | results in %BUILDDIR%/doctest/output.txt. 223 | goto end 224 | ) 225 | 226 | if "%1" == "xml" ( 227 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 228 | if errorlevel 1 exit /b 1 229 | echo. 230 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 231 | goto end 232 | ) 233 | 234 | if "%1" == "pseudoxml" ( 235 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 236 | if errorlevel 1 exit /b 1 237 | echo. 238 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 239 | goto end 240 | ) 241 | 242 | :end 243 | -------------------------------------------------------------------------------- /tutorial/datasets/test_Ahlberg_activities.txt: -------------------------------------------------------------------------------- 1 | NEG 2 | NEG 3 | NEG 4 | NEG 5 | NEG 6 | NEG 7 | NEG 8 | NEG 9 | POS 10 | NEG 11 | NEG 12 | POS 13 | POS 14 | NEG 15 | NEG 16 | NEG 17 | NEG 18 | POS 19 | POS 20 | NEG 21 | NEG 22 | NEG 23 | POS 24 | NEG 25 | NEG 26 | NEG 27 | NEG 28 | POS 29 | POS 30 | NEG 31 | NEG 32 | POS 33 | POS 34 | NEG 35 | POS 36 | POS 37 | POS 38 | NEG 39 | POS 40 | POS 41 | POS 42 | NEG 43 | NEG 44 | NEG 45 | NEG 46 | POS 47 | NEG 48 | NEG 49 | NEG 50 | POS 51 | NEG 52 | NEG 53 | POS 54 | POS 55 | POS 56 | NEG 57 | NEG 58 | POS 59 | POS 60 | POS 61 | POS 62 | NEG 63 | NEG 64 | POS 65 | NEG 66 | POS 67 | POS 68 | NEG 69 | POS 70 | NEG 71 | NEG 72 | NEG 73 | NEG 74 | NEG 75 | POS 76 | POS 77 | NEG 78 | NEG 79 | POS 80 | POS 81 | NEG 82 | NEG 83 | NEG 84 | NEG 85 | POS 86 | NEG 87 | NEG 88 | NEG 89 | NEG 90 | POS 91 | NEG 92 | POS 93 | POS 94 | NEG 95 | POS 96 | POS 97 | NEG 98 | POS 99 | POS 100 | NEG 101 | POS 102 | NEG 103 | NEG 104 | NEG 105 | POS 106 | NEG 107 | POS 108 | NEG 109 | NEG 110 | NEG 111 | NEG 112 | NEG 113 | NEG 114 | POS 115 | NEG 116 | NEG 117 | NEG 118 | NEG 119 | NEG 120 | NEG 121 | POS 122 | POS 123 | POS 124 | POS 125 | POS 126 | POS 127 | NEG 128 | NEG 129 | NEG 130 | NEG 131 | POS 132 | NEG 133 | NEG 134 | POS 135 | NEG 136 | NEG 137 | NEG 138 | NEG 139 | NEG 140 | NEG 141 | NEG 142 | POS 143 | NEG 144 | NEG 145 | POS 146 | POS 147 | NEG 148 | NEG 149 | NEG 150 | POS 151 | NEG 152 | POS 153 | POS 154 | NEG 155 | POS 156 | POS 157 | POS 158 | POS 159 | NEG 160 | NEG 161 | NEG 162 | POS 163 | POS 164 | POS 165 | POS 166 | NEG 167 | POS 168 | POS 169 | POS 170 | POS 171 | NEG 172 | NEG 173 | NEG 174 | NEG 175 | POS 176 | POS 177 | POS 178 | POS 179 | NEG 180 | NEG 181 | POS 182 | POS 183 | POS 184 | NEG 185 | POS 186 | POS 187 | POS 188 | NEG 189 | NEG 190 | NEG 191 | NEG 192 | NEG 193 | POS 194 | NEG 195 | NEG 196 | NEG 197 | NEG 198 | POS 199 | NEG 200 | NEG 201 | NEG 202 | POS 203 | POS 204 | POS 205 | POS 206 | POS 207 | NEG 208 | NEG 209 | POS 210 | NEG 211 | NEG 212 | POS 213 | POS 214 | NEG 215 | POS 216 | NEG 217 | POS 218 | NEG 219 | NEG 220 | POS 221 | NEG 222 | NEG 223 | NEG 224 | POS 225 | NEG 226 | NEG 227 | POS 228 | POS 229 | POS 230 | NEG 231 | NEG 232 | POS 233 | POS 234 | POS 235 | NEG 236 | NEG 237 | NEG 238 | POS 239 | POS 240 | NEG 241 | NEG 242 | POS 243 | POS 244 | NEG 245 | NEG 246 | POS 247 | POS 248 | POS 249 | NEG 250 | NEG 251 | POS 252 | NEG 253 | POS 254 | POS 255 | POS 256 | NEG 257 | POS 258 | POS 259 | NEG 260 | NEG 261 | NEG 262 | NEG 263 | POS 264 | NEG 265 | NEG 266 | NEG 267 | NEG 268 | POS 269 | POS 270 | NEG 271 | NEG 272 | NEG 273 | NEG 274 | POS 275 | NEG 276 | POS 277 | NEG 278 | POS 279 | POS 280 | NEG 281 | NEG 282 | NEG 283 | POS 284 | NEG 285 | NEG 286 | POS 287 | POS 288 | POS 289 | NEG 290 | NEG 291 | POS 292 | NEG 293 | POS 294 | POS 295 | NEG 296 | POS 297 | POS 298 | NEG 299 | NEG 300 | NEG 301 | NEG 302 | NEG 303 | POS 304 | NEG 305 | NEG 306 | POS 307 | NEG 308 | POS 309 | POS 310 | NEG 311 | NEG 312 | POS 313 | NEG 314 | POS 315 | POS 316 | NEG 317 | NEG 318 | NEG 319 | NEG 320 | POS 321 | POS 322 | NEG 323 | NEG 324 | POS 325 | POS 326 | POS 327 | NEG 328 | NEG 329 | POS 330 | POS 331 | NEG 332 | NEG 333 | NEG 334 | NEG 335 | NEG 336 | NEG 337 | NEG 338 | NEG 339 | NEG 340 | NEG 341 | POS 342 | POS 343 | POS 344 | NEG 345 | NEG 346 | POS 347 | NEG 348 | NEG 349 | NEG 350 | NEG 351 | POS 352 | POS 353 | POS 354 | NEG 355 | POS 356 | NEG 357 | NEG 358 | POS 359 | NEG 360 | POS 361 | POS 362 | NEG 363 | NEG 364 | NEG 365 | NEG 366 | NEG 367 | POS 368 | NEG 369 | NEG 370 | POS 371 | NEG 372 | POS 373 | NEG 374 | NEG 375 | POS 376 | POS 377 | NEG 378 | POS 379 | NEG 380 | NEG 381 | POS 382 | POS 383 | NEG 384 | NEG 385 | NEG 386 | NEG 387 | POS 388 | NEG 389 | NEG 390 | POS 391 | POS 392 | POS 393 | NEG 394 | POS 395 | POS 396 | NEG 397 | NEG 398 | POS 399 | POS 400 | NEG 401 | NEG 402 | NEG 403 | NEG 404 | POS 405 | NEG 406 | POS 407 | NEG 408 | NEG 409 | POS 410 | NEG 411 | POS 412 | NEG 413 | NEG 414 | NEG 415 | POS 416 | NEG 417 | POS 418 | NEG 419 | NEG 420 | NEG 421 | NEG 422 | NEG 423 | POS 424 | POS 425 | NEG 426 | NEG 427 | POS 428 | NEG 429 | POS 430 | NEG 431 | POS 432 | NEG 433 | POS 434 | NEG 435 | POS 436 | NEG 437 | POS 438 | POS 439 | POS 440 | POS 441 | NEG 442 | NEG 443 | NEG 444 | NEG 445 | NEG 446 | NEG 447 | POS 448 | NEG 449 | POS 450 | POS 451 | POS 452 | NEG 453 | POS 454 | POS 455 | NEG 456 | NEG 457 | NEG 458 | POS 459 | NEG 460 | NEG 461 | POS 462 | POS 463 | POS 464 | NEG 465 | POS 466 | NEG 467 | NEG 468 | NEG 469 | POS 470 | NEG 471 | POS 472 | NEG 473 | POS 474 | NEG 475 | NEG 476 | POS 477 | NEG 478 | NEG 479 | NEG 480 | NEG 481 | NEG 482 | NEG 483 | NEG 484 | NEG 485 | NEG 486 | NEG 487 | POS 488 | POS 489 | POS 490 | POS 491 | NEG 492 | POS 493 | NEG 494 | NEG 495 | POS 496 | POS 497 | POS 498 | POS 499 | POS 500 | NEG 501 | POS 502 | POS 503 | NEG 504 | POS 505 | POS 506 | POS 507 | NEG 508 | NEG 509 | NEG 510 | NEG 511 | NEG 512 | NEG 513 | NEG 514 | NEG 515 | NEG 516 | NEG 517 | POS 518 | NEG 519 | NEG 520 | NEG 521 | POS 522 | NEG 523 | POS 524 | NEG 525 | POS 526 | NEG 527 | POS 528 | NEG 529 | NEG 530 | NEG 531 | NEG 532 | POS 533 | POS 534 | NEG 535 | POS 536 | NEG 537 | POS 538 | NEG 539 | NEG 540 | POS 541 | NEG 542 | NEG 543 | POS 544 | NEG 545 | NEG 546 | NEG 547 | NEG 548 | NEG 549 | NEG 550 | NEG 551 | NEG 552 | NEG 553 | POS 554 | POS 555 | NEG 556 | NEG 557 | NEG 558 | POS 559 | NEG 560 | NEG 561 | NEG 562 | NEG 563 | POS 564 | NEG 565 | NEG 566 | NEG 567 | NEG 568 | NEG 569 | POS 570 | NEG 571 | POS 572 | NEG 573 | NEG 574 | POS 575 | POS 576 | NEG 577 | NEG 578 | POS 579 | NEG 580 | NEG 581 | POS 582 | NEG 583 | POS 584 | NEG 585 | POS 586 | NEG 587 | NEG 588 | POS 589 | NEG 590 | NEG 591 | POS 592 | POS 593 | NEG 594 | POS 595 | POS 596 | POS 597 | NEG 598 | NEG 599 | NEG 600 | POS 601 | POS 602 | NEG 603 | NEG 604 | NEG 605 | NEG 606 | NEG 607 | NEG 608 | POS 609 | POS 610 | POS 611 | POS 612 | NEG 613 | NEG 614 | POS 615 | NEG 616 | POS 617 | NEG 618 | POS 619 | NEG 620 | NEG 621 | POS 622 | NEG 623 | POS 624 | POS 625 | POS 626 | NEG 627 | POS 628 | NEG 629 | NEG 630 | POS 631 | POS 632 | NEG 633 | POS 634 | NEG 635 | POS 636 | POS 637 | POS 638 | POS 639 | NEG 640 | NEG 641 | POS 642 | POS 643 | NEG 644 | POS 645 | POS 646 | NEG 647 | NEG 648 | NEG 649 | POS 650 | NEG 651 | POS 652 | NEG 653 | NEG 654 | POS 655 | NEG 656 | POS 657 | NEG 658 | NEG 659 | NEG 660 | NEG 661 | NEG 662 | NEG 663 | NEG 664 | POS 665 | NEG 666 | POS 667 | POS 668 | POS 669 | NEG 670 | POS 671 | POS 672 | NEG 673 | NEG 674 | POS 675 | NEG 676 | POS 677 | POS 678 | POS 679 | POS 680 | POS 681 | NEG 682 | NEG 683 | POS 684 | NEG 685 | POS 686 | POS 687 | POS 688 | NEG 689 | POS 690 | POS 691 | POS 692 | NEG 693 | NEG 694 | NEG 695 | NEG 696 | NEG 697 | POS 698 | NEG 699 | POS 700 | NEG 701 | NEG 702 | POS 703 | POS 704 | NEG 705 | NEG 706 | NEG 707 | NEG 708 | POS 709 | NEG 710 | POS 711 | NEG 712 | NEG 713 | POS 714 | POS 715 | NEG 716 | NEG 717 | NEG 718 | NEG 719 | NEG 720 | NEG 721 | POS 722 | POS 723 | NEG 724 | NEG 725 | NEG 726 | NEG 727 | POS 728 | NEG 729 | NEG 730 | POS 731 | NEG 732 | NEG 733 | NEG 734 | NEG 735 | POS 736 | NEG 737 | POS 738 | NEG 739 | NEG 740 | POS 741 | NEG 742 | NEG 743 | NEG 744 | NEG 745 | POS 746 | POS 747 | NEG 748 | NEG 749 | POS 750 | NEG 751 | NEG 752 | NEG 753 | NEG 754 | NEG 755 | POS 756 | NEG 757 | POS 758 | NEG 759 | NEG 760 | POS 761 | POS 762 | NEG 763 | NEG 764 | POS 765 | POS 766 | NEG 767 | NEG 768 | NEG 769 | POS 770 | NEG 771 | POS 772 | NEG 773 | POS 774 | NEG 775 | NEG 776 | POS 777 | NEG 778 | POS 779 | NEG 780 | NEG 781 | POS 782 | POS 783 | POS 784 | NEG 785 | POS 786 | NEG 787 | NEG 788 | POS 789 | NEG 790 | POS 791 | NEG 792 | NEG 793 | POS 794 | POS 795 | NEG 796 | POS 797 | POS 798 | NEG 799 | POS 800 | NEG 801 | POS 802 | POS 803 | POS 804 | NEG 805 | NEG 806 | NEG 807 | POS 808 | NEG 809 | NEG 810 | NEG 811 | NEG 812 | POS 813 | POS 814 | POS 815 | NEG 816 | NEG 817 | POS 818 | POS 819 | NEG 820 | NEG 821 | POS 822 | POS 823 | POS 824 | POS 825 | NEG 826 | POS 827 | POS 828 | POS 829 | NEG 830 | POS 831 | NEG 832 | NEG 833 | -------------------------------------------------------------------------------- /bioalerts/build/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | /* -- relbar ---------------------------------------------------------------- */ 19 | 20 | div.related { 21 | width: 100%; 22 | font-size: 90%; 23 | } 24 | 25 | div.related h3 { 26 | display: none; 27 | } 28 | 29 | div.related ul { 30 | margin: 0; 31 | padding: 0 0 0 10px; 32 | list-style: none; 33 | } 34 | 35 | div.related li { 36 | display: inline; 37 | } 38 | 39 | div.related li.right { 40 | float: right; 41 | margin-right: 5px; 42 | } 43 | 44 | /* -- sidebar --------------------------------------------------------------- */ 45 | 46 | div.sphinxsidebarwrapper { 47 | padding: 10px 5px 0 10px; 48 | } 49 | 50 | div.sphinxsidebar { 51 | float: left; 52 | width: 230px; 53 | margin-left: -100%; 54 | font-size: 90%; 55 | } 56 | 57 | div.sphinxsidebar ul { 58 | list-style: none; 59 | } 60 | 61 | div.sphinxsidebar ul ul, 62 | div.sphinxsidebar ul.want-points { 63 | margin-left: 20px; 64 | list-style: square; 65 | } 66 | 67 | div.sphinxsidebar ul ul { 68 | margin-top: 0; 69 | margin-bottom: 0; 70 | } 71 | 72 | div.sphinxsidebar form { 73 | margin-top: 10px; 74 | } 75 | 76 | div.sphinxsidebar input { 77 | border: 1px solid #98dbcc; 78 | font-family: sans-serif; 79 | font-size: 1em; 80 | } 81 | 82 | div.sphinxsidebar #searchbox input[type="text"] { 83 | width: 170px; 84 | } 85 | 86 | div.sphinxsidebar #searchbox input[type="submit"] { 87 | width: 30px; 88 | } 89 | 90 | img { 91 | border: 0; 92 | max-width: 100%; 93 | } 94 | 95 | /* -- search page ----------------------------------------------------------- */ 96 | 97 | ul.search { 98 | margin: 10px 0 0 20px; 99 | padding: 0; 100 | } 101 | 102 | ul.search li { 103 | padding: 5px 0 5px 20px; 104 | background-image: url(file.png); 105 | background-repeat: no-repeat; 106 | background-position: 0 7px; 107 | } 108 | 109 | ul.search li a { 110 | font-weight: bold; 111 | } 112 | 113 | ul.search li div.context { 114 | color: #888; 115 | margin: 2px 0 0 30px; 116 | text-align: left; 117 | } 118 | 119 | ul.keywordmatches li.goodmatch a { 120 | font-weight: bold; 121 | } 122 | 123 | /* -- index page ------------------------------------------------------------ */ 124 | 125 | table.contentstable { 126 | width: 90%; 127 | } 128 | 129 | table.contentstable p.biglink { 130 | line-height: 150%; 131 | } 132 | 133 | a.biglink { 134 | font-size: 1.3em; 135 | } 136 | 137 | span.linkdescr { 138 | font-style: italic; 139 | padding-top: 5px; 140 | font-size: 90%; 141 | } 142 | 143 | /* -- general index --------------------------------------------------------- */ 144 | 145 | table.indextable { 146 | width: 100%; 147 | } 148 | 149 | table.indextable td { 150 | text-align: left; 151 | vertical-align: top; 152 | } 153 | 154 | table.indextable dl, table.indextable dd { 155 | margin-top: 0; 156 | margin-bottom: 0; 157 | } 158 | 159 | table.indextable tr.pcap { 160 | height: 10px; 161 | } 162 | 163 | table.indextable tr.cap { 164 | margin-top: 10px; 165 | background-color: #f2f2f2; 166 | } 167 | 168 | img.toggler { 169 | margin-right: 3px; 170 | margin-top: 3px; 171 | cursor: pointer; 172 | } 173 | 174 | div.modindex-jumpbox { 175 | border-top: 1px solid #ddd; 176 | border-bottom: 1px solid #ddd; 177 | margin: 1em 0 1em 0; 178 | padding: 0.4em; 179 | } 180 | 181 | div.genindex-jumpbox { 182 | border-top: 1px solid #ddd; 183 | border-bottom: 1px solid #ddd; 184 | margin: 1em 0 1em 0; 185 | padding: 0.4em; 186 | } 187 | 188 | /* -- general body styles --------------------------------------------------- */ 189 | 190 | a.headerlink { 191 | visibility: hidden; 192 | } 193 | 194 | h1:hover > a.headerlink, 195 | h2:hover > a.headerlink, 196 | h3:hover > a.headerlink, 197 | h4:hover > a.headerlink, 198 | h5:hover > a.headerlink, 199 | h6:hover > a.headerlink, 200 | dt:hover > a.headerlink { 201 | visibility: visible; 202 | } 203 | 204 | div.body p.caption { 205 | text-align: inherit; 206 | } 207 | 208 | div.body td { 209 | text-align: left; 210 | } 211 | 212 | .field-list ul { 213 | padding-left: 1em; 214 | } 215 | 216 | .first { 217 | margin-top: 0 !important; 218 | } 219 | 220 | p.rubric { 221 | margin-top: 30px; 222 | font-weight: bold; 223 | } 224 | 225 | img.align-left, .figure.align-left, object.align-left { 226 | clear: left; 227 | float: left; 228 | margin-right: 1em; 229 | } 230 | 231 | img.align-right, .figure.align-right, object.align-right { 232 | clear: right; 233 | float: right; 234 | margin-left: 1em; 235 | } 236 | 237 | img.align-center, .figure.align-center, object.align-center { 238 | display: block; 239 | margin-left: auto; 240 | margin-right: auto; 241 | } 242 | 243 | .align-left { 244 | text-align: left; 245 | } 246 | 247 | .align-center { 248 | text-align: center; 249 | } 250 | 251 | .align-right { 252 | text-align: right; 253 | } 254 | 255 | /* -- sidebars -------------------------------------------------------------- */ 256 | 257 | div.sidebar { 258 | margin: 0 0 0.5em 1em; 259 | border: 1px solid #ddb; 260 | padding: 7px 7px 0 7px; 261 | background-color: #ffe; 262 | width: 40%; 263 | float: right; 264 | } 265 | 266 | p.sidebar-title { 267 | font-weight: bold; 268 | } 269 | 270 | /* -- topics ---------------------------------------------------------------- */ 271 | 272 | div.topic { 273 | border: 1px solid #ccc; 274 | padding: 7px 7px 0 7px; 275 | margin: 10px 0 10px 0; 276 | } 277 | 278 | p.topic-title { 279 | font-size: 1.1em; 280 | font-weight: bold; 281 | margin-top: 10px; 282 | } 283 | 284 | /* -- admonitions ----------------------------------------------------------- */ 285 | 286 | div.admonition { 287 | margin-top: 10px; 288 | margin-bottom: 10px; 289 | padding: 7px; 290 | } 291 | 292 | div.admonition dt { 293 | font-weight: bold; 294 | } 295 | 296 | div.admonition dl { 297 | margin-bottom: 0; 298 | } 299 | 300 | p.admonition-title { 301 | margin: 0px 10px 5px 0px; 302 | font-weight: bold; 303 | } 304 | 305 | div.body p.centered { 306 | text-align: center; 307 | margin-top: 25px; 308 | } 309 | 310 | /* -- tables ---------------------------------------------------------------- */ 311 | 312 | table.docutils { 313 | border: 0; 314 | border-collapse: collapse; 315 | } 316 | 317 | table.docutils td, table.docutils th { 318 | padding: 1px 8px 1px 5px; 319 | border-top: 0; 320 | border-left: 0; 321 | border-right: 0; 322 | border-bottom: 1px solid #aaa; 323 | } 324 | 325 | table.field-list td, table.field-list th { 326 | border: 0 !important; 327 | } 328 | 329 | table.footnote td, table.footnote th { 330 | border: 0 !important; 331 | } 332 | 333 | th { 334 | text-align: left; 335 | padding-right: 5px; 336 | } 337 | 338 | table.citation { 339 | border-left: solid 1px gray; 340 | margin-left: 1px; 341 | } 342 | 343 | table.citation td { 344 | border-bottom: none; 345 | } 346 | 347 | /* -- other body styles ----------------------------------------------------- */ 348 | 349 | ol.arabic { 350 | list-style: decimal; 351 | } 352 | 353 | ol.loweralpha { 354 | list-style: lower-alpha; 355 | } 356 | 357 | ol.upperalpha { 358 | list-style: upper-alpha; 359 | } 360 | 361 | ol.lowerroman { 362 | list-style: lower-roman; 363 | } 364 | 365 | ol.upperroman { 366 | list-style: upper-roman; 367 | } 368 | 369 | dl { 370 | margin-bottom: 15px; 371 | } 372 | 373 | dd p { 374 | margin-top: 0px; 375 | } 376 | 377 | dd ul, dd table { 378 | margin-bottom: 10px; 379 | } 380 | 381 | dd { 382 | margin-top: 3px; 383 | margin-bottom: 10px; 384 | margin-left: 30px; 385 | } 386 | 387 | dt:target, .highlighted { 388 | background-color: #fbe54e; 389 | } 390 | 391 | dl.glossary dt { 392 | font-weight: bold; 393 | font-size: 1.1em; 394 | } 395 | 396 | .field-list ul { 397 | margin: 0; 398 | padding-left: 1em; 399 | } 400 | 401 | .field-list p { 402 | margin: 0; 403 | } 404 | 405 | .optional { 406 | font-size: 1.3em; 407 | } 408 | 409 | .versionmodified { 410 | font-style: italic; 411 | } 412 | 413 | .system-message { 414 | background-color: #fda; 415 | padding: 5px; 416 | border: 3px solid red; 417 | } 418 | 419 | .footnote:target { 420 | background-color: #ffa; 421 | } 422 | 423 | .line-block { 424 | display: block; 425 | margin-top: 1em; 426 | margin-bottom: 1em; 427 | } 428 | 429 | .line-block .line-block { 430 | margin-top: 0; 431 | margin-bottom: 0; 432 | margin-left: 1.5em; 433 | } 434 | 435 | .guilabel, .menuselection { 436 | font-family: sans-serif; 437 | } 438 | 439 | .accelerator { 440 | text-decoration: underline; 441 | } 442 | 443 | .classifier { 444 | font-style: oblique; 445 | } 446 | 447 | abbr, acronym { 448 | border-bottom: dotted 1px; 449 | cursor: help; 450 | } 451 | 452 | /* -- code displays --------------------------------------------------------- */ 453 | 454 | pre { 455 | overflow: auto; 456 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 457 | } 458 | 459 | td.linenos pre { 460 | padding: 5px 0px; 461 | border: 0; 462 | background-color: transparent; 463 | color: #aaa; 464 | } 465 | 466 | table.highlighttable { 467 | margin-left: 0.5em; 468 | } 469 | 470 | table.highlighttable td { 471 | padding: 0 0.5em 0 0.5em; 472 | } 473 | 474 | tt.descname { 475 | background-color: transparent; 476 | font-weight: bold; 477 | font-size: 1.2em; 478 | } 479 | 480 | tt.descclassname { 481 | background-color: transparent; 482 | } 483 | 484 | tt.xref, a tt { 485 | background-color: transparent; 486 | font-weight: bold; 487 | } 488 | 489 | h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { 490 | background-color: transparent; 491 | } 492 | 493 | .viewcode-link { 494 | float: right; 495 | } 496 | 497 | .viewcode-back { 498 | float: right; 499 | font-family: sans-serif; 500 | } 501 | 502 | div.viewcode-block:target { 503 | margin: -1px -10px; 504 | padding: 0 10px; 505 | } 506 | 507 | /* -- math display ---------------------------------------------------------- */ 508 | 509 | img.math { 510 | vertical-align: middle; 511 | } 512 | 513 | div.body div.math p { 514 | text-align: center; 515 | } 516 | 517 | span.eqno { 518 | float: right; 519 | } 520 | 521 | /* -- printout stylesheet --------------------------------------------------- */ 522 | 523 | @media print { 524 | div.document, 525 | div.documentwrapper, 526 | div.bodywrapper { 527 | margin: 0 !important; 528 | width: 100%; 529 | } 530 | 531 | div.sphinxsidebar, 532 | div.related, 533 | div.footer, 534 | #top-link { 535 | display: none; 536 | } 537 | } -------------------------------------------------------------------------------- /bioalerts/build/_static/underscore.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.3.1 2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== 9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, 10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= 11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /bioalerts/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # bioalerts documentation build configuration file, created by 4 | # sphinx-quickstart on Tue Mar 3 16:13:59 2015. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | 18 | # If extensions (or modules to document with autodoc) are in another directory, 19 | # add these directories to sys.path here. If the directory is relative to the 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. 21 | #sys.path.insert(0, os.path.abspath('.')) 22 | 23 | # -- General configuration ------------------------------------------------ 24 | 25 | # If your documentation needs a minimal Sphinx version, state it here. 26 | #needs_sphinx = '1.0' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = [ 32 | 'sphinx.ext.autodoc', 33 | 'sphinx.ext.doctest', 34 | 'sphinx.ext.coverage', 35 | 'sphinx.ext.mathjax', 36 | 'sphinx.ext.ifconfig', 37 | 'sphinx.ext.viewcode', 38 | ] 39 | 40 | # Add any paths that contain templates here, relative to this directory. 41 | templates_path = ['bioalertstemplates'] 42 | 43 | # The suffix of source filenames. 44 | source_suffix = '.rst' 45 | 46 | # The encoding of source files. 47 | #source_encoding = 'utf-8-sig' 48 | 49 | # The master toctree document. 50 | master_doc = 'index' 51 | 52 | # General information about the project. 53 | project = u'bioalerts' 54 | copyright = u'2015, Isidro Cortes Ciriano' 55 | 56 | # The version info for the project you're documenting, acts as replacement for 57 | # |version| and |release|, also used in various other places throughout the 58 | # built documents. 59 | # 60 | # The short X.Y version. 61 | version = '1.0' 62 | # The full version, including alpha/beta/rc tags. 63 | release = '1.0' 64 | 65 | # The language for content autogenerated by Sphinx. Refer to documentation 66 | # for a list of supported languages. 67 | #language = None 68 | 69 | # There are two options for replacing |today|: either, you set today to some 70 | # non-false value, then it is used: 71 | #today = '' 72 | # Else, today_fmt is used as the format for a strftime call. 73 | #today_fmt = '%B %d, %Y' 74 | 75 | # List of patterns, relative to source directory, that match files and 76 | # directories to ignore when looking for source files. 77 | exclude_patterns = [] 78 | 79 | # The reST default role (used for this markup: `text`) to use for all 80 | # documents. 81 | #default_role = None 82 | 83 | # If true, '()' will be appended to :func: etc. cross-reference text. 84 | #add_function_parentheses = True 85 | 86 | # If true, the current module name will be prepended to all description 87 | # unit titles (such as .. function::). 88 | #add_module_names = True 89 | 90 | # If true, sectionauthor and moduleauthor directives will be shown in the 91 | # output. They are ignored by default. 92 | #show_authors = False 93 | 94 | # The name of the Pygments (syntax highlighting) style to use. 95 | pygments_style = 'sphinx' 96 | 97 | # A list of ignored prefixes for module index sorting. 98 | #modindex_common_prefix = [] 99 | 100 | # If true, keep warnings as "system message" paragraphs in the built documents. 101 | #keep_warnings = False 102 | 103 | 104 | # -- Options for HTML output ---------------------------------------------- 105 | 106 | # The theme to use for HTML and HTML Help pages. See the documentation for 107 | # a list of builtin themes. 108 | html_theme = 'default' 109 | 110 | # Theme options are theme-specific and customize the look and feel of a theme 111 | # further. For a list of options available for each theme, see the 112 | # documentation. 113 | #html_theme_options = {} 114 | 115 | # Add any paths that contain custom themes here, relative to this directory. 116 | #html_theme_path = [] 117 | 118 | # The name for this set of Sphinx documents. If None, it defaults to 119 | # " v documentation". 120 | #html_title = None 121 | 122 | # A shorter title for the navigation bar. Default is the same as html_title. 123 | #html_short_title = None 124 | 125 | # The name of an image file (relative to this directory) to place at the top 126 | # of the sidebar. 127 | #html_logo = None 128 | 129 | # The name of an image file (within the static path) to use as favicon of the 130 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 131 | # pixels large. 132 | #html_favicon = None 133 | 134 | # Add any paths that contain custom static files (such as style sheets) here, 135 | # relative to this directory. They are copied after the builtin static files, 136 | # so a file named "default.css" will overwrite the builtin "default.css". 137 | html_static_path = ['bioalertsstatic'] 138 | 139 | # Add any extra paths that contain custom files (such as robots.txt or 140 | # .htaccess) here, relative to this directory. These files are copied 141 | # directly to the root of the documentation. 142 | #html_extra_path = [] 143 | 144 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 145 | # using the given strftime format. 146 | #html_last_updated_fmt = '%b %d, %Y' 147 | 148 | # If true, SmartyPants will be used to convert quotes and dashes to 149 | # typographically correct entities. 150 | #html_use_smartypants = True 151 | 152 | # Custom sidebar templates, maps document names to template names. 153 | #html_sidebars = {} 154 | 155 | # Additional templates that should be rendered to pages, maps page names to 156 | # template names. 157 | #html_additional_pages = {} 158 | 159 | # If false, no module index is generated. 160 | #html_domain_indices = True 161 | 162 | # If false, no index is generated. 163 | #html_use_index = True 164 | 165 | # If true, the index is split into individual pages for each letter. 166 | #html_split_index = False 167 | 168 | # If true, links to the reST sources are added to the pages. 169 | #html_show_sourcelink = True 170 | 171 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 172 | #html_show_sphinx = True 173 | 174 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 175 | #html_show_copyright = True 176 | 177 | # If true, an OpenSearch description file will be output, and all pages will 178 | # contain a tag referring to it. The value of this option must be the 179 | # base URL from which the finished HTML is served. 180 | #html_use_opensearch = '' 181 | 182 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 183 | #html_file_suffix = None 184 | 185 | # Output file base name for HTML help builder. 186 | htmlhelp_basename = 'bioalertsdoc' 187 | 188 | 189 | # -- Options for LaTeX output --------------------------------------------- 190 | 191 | latex_elements = { 192 | # The paper size ('letterpaper' or 'a4paper'). 193 | #'papersize': 'letterpaper', 194 | 195 | # The font size ('10pt', '11pt' or '12pt'). 196 | #'pointsize': '10pt', 197 | 198 | # Additional stuff for the LaTeX preamble. 199 | #'preamble': '', 200 | } 201 | 202 | # Grouping the document tree into LaTeX files. List of tuples 203 | # (source start file, target name, title, 204 | # author, documentclass [howto, manual, or own class]). 205 | latex_documents = [ 206 | ('index', 'bioalerts.tex', u'bioalerts Documentation', 207 | u'Isidro Cortes Ciriano', 'manual'), 208 | ] 209 | 210 | # The name of an image file (relative to this directory) to place at the top of 211 | # the title page. 212 | #latex_logo = None 213 | 214 | # For "manual" documents, if this is true, then toplevel headings are parts, 215 | # not chapters. 216 | #latex_use_parts = False 217 | 218 | # If true, show page references after internal links. 219 | #latex_show_pagerefs = False 220 | 221 | # If true, show URL addresses after external links. 222 | #latex_show_urls = False 223 | 224 | # Documents to append as an appendix to all manuals. 225 | #latex_appendices = [] 226 | 227 | # If false, no module index is generated. 228 | #latex_domain_indices = True 229 | 230 | 231 | # -- Options for manual page output --------------------------------------- 232 | 233 | # One entry per manual page. List of tuples 234 | # (source start file, name, description, authors, manual section). 235 | man_pages = [ 236 | ('index', 'bioalerts', u'bioalerts Documentation', 237 | [u'Isidro Cortes Ciriano'], 1) 238 | ] 239 | 240 | # If true, show URL addresses after external links. 241 | #man_show_urls = False 242 | 243 | 244 | # -- Options for Texinfo output ------------------------------------------- 245 | 246 | # Grouping the document tree into Texinfo files. List of tuples 247 | # (source start file, target name, title, author, 248 | # dir menu entry, description, category) 249 | texinfo_documents = [ 250 | ('index', 'bioalerts', u'bioalerts Documentation', 251 | u'Isidro Cortes Ciriano', 'bioalerts', 'One line description of project.', 252 | 'Miscellaneous'), 253 | ] 254 | 255 | # Documents to append as an appendix to all manuals. 256 | #texinfo_appendices = [] 257 | 258 | # If false, no module index is generated. 259 | #texinfo_domain_indices = True 260 | 261 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 262 | #texinfo_show_urls = 'footnote' 263 | 264 | # If true, do not generate a @detailmenu in the "Top" node's menu. 265 | #texinfo_no_detailmenu = False 266 | 267 | 268 | # -- Options for Epub output ---------------------------------------------- 269 | 270 | # Bibliographic Dublin Core info. 271 | epub_title = u'bioalerts' 272 | epub_author = u'Isidro Cortes Ciriano' 273 | epub_publisher = u'Isidro Cortes Ciriano' 274 | epub_copyright = u'2015, Isidro Cortes Ciriano' 275 | 276 | # The basename for the epub file. It defaults to the project name. 277 | #epub_basename = u'bioalerts' 278 | 279 | # The HTML theme for the epub output. Since the default themes are not optimized 280 | # for small screen space, using the same theme for HTML and epub output is 281 | # usually not wise. This defaults to 'epub', a theme designed to save visual 282 | # space. 283 | #epub_theme = 'epub' 284 | 285 | # The language of the text. It defaults to the language option 286 | # or en if the language is not set. 287 | #epub_language = '' 288 | 289 | # The scheme of the identifier. Typical schemes are ISBN or URL. 290 | #epub_scheme = '' 291 | 292 | # The unique identifier of the text. This can be a ISBN number 293 | # or the project homepage. 294 | #epub_identifier = '' 295 | 296 | # A unique identification for the text. 297 | #epub_uid = '' 298 | 299 | # A tuple containing the cover image and cover page html template filenames. 300 | #epub_cover = () 301 | 302 | # A sequence of (type, uri, title) tuples for the guide element of content.opf. 303 | #epub_guide = () 304 | 305 | # HTML files that should be inserted before the pages created by sphinx. 306 | # The format is a list of tuples containing the path and title. 307 | #epub_pre_files = [] 308 | 309 | # HTML files shat should be inserted after the pages created by sphinx. 310 | # The format is a list of tuples containing the path and title. 311 | #epub_post_files = [] 312 | 313 | # A list of files that should not be packed into the epub file. 314 | epub_exclude_files = ['search.html'] 315 | 316 | # The depth of the table of contents in toc.ncx. 317 | #epub_tocdepth = 3 318 | 319 | # Allow duplicate toc entries. 320 | #epub_tocdup = True 321 | 322 | # Choose between 'default' and 'includehidden'. 323 | #epub_tocscope = 'default' 324 | 325 | # Fix unsupported image types using the PIL. 326 | #epub_fix_images = False 327 | 328 | # Scale large images. 329 | #epub_max_image_width = 0 330 | 331 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 332 | #epub_show_urls = 'inline' 333 | 334 | # If false, no index is generated. 335 | #epub_use_index = True 336 | -------------------------------------------------------------------------------- /bioalerts/build/FPCalculator.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | FPCalculator: Fingerprint Calculator — bioalerts 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 43 | 44 |
45 |
46 |
47 |
48 | 49 |
50 |

FPCalculator: Fingerprint Calculator

51 |

This module can be used to extract the substructures, of a user-defined radius, 52 | from a list of molecules in rdkit Mol class format.

53 |

The module is composed of the following class:

54 |
    55 |
  • CalculateFPs
  • 56 |
57 |
58 |

CalculateFPs

59 |
60 |
61 | class CalculateFPs(radii, mols, reference_substructure_keys={})
62 |

CalculateFPs serve to calculate the following types of Morgan fingerpints:

63 |
    64 |
  1. Hashed fingerprints in binary format
  2. 65 |
  3. Hashed fingerprints in count format
  4. 66 |
  5. Unhashed fingerprints in binary format
  6. 67 |
  7. Unhashed fingerprints in count format
  8. 68 |
69 |

Morgan fingerprints encode chemical structures by considering atom neighbourhoods. 70 | Each substructure in the molecule set, with a maximal user-defined bond radius, is assigned an unambiguous integer identifier. 71 | These identifiers are mapped either into an unhashed or hashed array. 72 | For the hashed array, the position in the array where the substructures will be mapped is given by the modulo of the division 73 | of the substructure identifier by the fingerprint size. 74 | In the case of unhashed (keyed) fingerprints, each bit in the fingerprint is associated to only one substructure, 75 | producing a length of the unhashed fingerprints equal to the number of distinct substructures present in the dataset. 76 | Both hashed and unhashed fingerprints can be stored in binary and count format. 77 | In count format, each bit in the fingerprint accounts for the number of times each substructure is present in a given compound, 78 | whereas in binary format each bit encodes whether a substructure is present in a compound (1), irrespective of the number of occurrences, or not (0).

79 | 80 | 81 | 82 | 83 | 92 | 93 | 94 |
Variables:
    84 |
  • radii – radii of the substructures that will be used to generate the fingerprints for the molecules specified in the argument mols.
  • 85 |
  • max_radius – maximum substructure radius considered.
  • 86 |
  • mols – input molecules for which fingerprints will be calculated.
  • 87 |
  • reference_substructure_keys – dictionary of substructure identifiers that will be used to calculate the unhashed version of the Morgan fingerprints. This dictionary is calculated with the method LoadMolecules.GetDataSetInfo.extract_substructure_information().
  • 88 |
  • substructure_dictionary – dictionary containing substructure for the molecules specified in the argument mols, and for which fingerprints will be calculated.
  • 89 |
  • mols_reference_for_unhashed – reference set of molecules whose substructures are to be considered when computing unhashed fingerprints. This molecule set can be the same set of molecules for which the user wants to compute the fingerprints, i.e. mols, or a different molecule set. For instance, if a bioactivity model trained on a given data set using unhashed fingerprints is to be applied on an external data set, the fingerprints for the new molecules should be the same as those used to train the model. Thus, the refernce set of molecules (mols_reference_for_unhashed) would correspond in this case to the molecules used to train the aforesaid model.
  • 90 |
91 |
95 |

The value for the following attributes is set when running the fingerprint calculation methods explained below.

96 | 97 | 98 | 99 | 100 | 111 | 112 | 113 |
Variables:
    101 |
  • columns_unhashed (numpy.ndarray) – fingerprint identifiers corresponding to the columns in the unhashed fingerprints.
  • 102 |
  • substructure_ids (numpy.ndarray) – identifiers for the substructures.
  • 103 |
  • fps_hashed_binary_quick (numpy.ndarray) – hashed fingerprints in binary format
  • 104 |
  • fps_hashed_binary (numpy.ndarray) – hashed fingerprints in binary format.
  • 105 |
  • fps_hashed_counts (numpy.ndarray) – unhashed fingerprints in count format.
  • 106 |
  • fps_unhashed_binary (numpy.ndarray) – unhashed fingerprints in binary format.
  • 107 |
  • fps_unhashed_counts (numpy.ndarray) – unhashed fingerprints in count format.
  • 108 |
  • substructures_smiles (dict) – dictionary containing the smiles for the substructures.
  • 109 |
110 |
114 |
115 |
116 | calculate_hashed_fps_binary_quick(nBits)
117 |

Fast class method to compute hashed fingerprints in binary format. The computed hashed fingerprints are stored in CalculateFPs.fps_hashed_binary_quick.

118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |
Parameters:nBits (int) – fingerprint size
126 |
127 | 128 |
129 |
130 | calculate_hashed_fps_counts(nBits)
131 |

Class method to compute hashed fingerprints in binary and count format. The computed fingerprints are stored in CalculateFPs.fps_hashed_binary and CalculateFPs.fps_hashed_counts, respectively.

132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 |
Parameters:nBits (int) – fingerprint size
140 |
141 | 142 |
143 |
144 | calculate_unhashed_fps(draw_substructures=False, image_directory='./images_substructures')
145 |

Class method to compute unhashed fingerprints in binary and count format. If draw_substructures is set to True, depictions of each substructure in .pdf format, in the context of a molecules from mols where the substructure is present, will be saved to the directory specified in the argument image_directory.

146 | 147 | 148 | 149 | 150 | 155 | 156 | 157 |
Parameters:
    151 |
  • draw_substructures (bool) – if set to True, depictions for all substructures (with a bond radius allowed by the user through the argument radii) present in the training set of molecules will be generated.
  • 152 |
  • image_directory (str) – directory to save the substructure depictions
  • 153 |
154 |
158 |
159 | 160 |
161 | 162 |
163 |
164 | 165 | 166 |
167 |
168 |
169 |
170 |
171 |

Table Of Contents

172 | 178 | 179 |

Previous topic

180 |

Alerts: Derivation of structural alerts

182 |

This Page

183 | 187 | 199 | 200 |
201 |
202 |
203 |
204 | 216 | 220 | 221 | -------------------------------------------------------------------------------- /bioalerts/build/BioAlerts.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Biological Alerts (BioAlerts) — bioalerts 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 |
52 | 53 |
54 |

Biological Alerts (BioAlerts)

55 |

This module can be used to

56 |

The module is composed of the following three classes:

57 |
    58 |
  • GetSubstructuresFromReferenceDataset
  • 59 |
  • CalculatePvaluesCategorical
  • 60 |
  • CalculatePvaluesContinuous
  • 61 |
62 |
63 |

GetSubstructuresFromReferenceDataset

64 |
65 |
66 | class GetSubstructuresFromReferenceDataset(name_field=None)
67 |

Similar to GetDataSetInfo from FPcalculator XX

68 |

This class can be used to load molecules in smiles sdf and mol2 format.

69 | 70 | 71 | 72 | 73 | 105 | 106 | 107 |
Variables:name_field

name of the data field containing the name of the molecules. Although the default value is None (bool), the name of the field if set when instantiating the class would be a string (str). 74 | :vartype name_field: str 75 | :var nb_substructures: total number of substructures, with a radius comprised in the argument radii of GetDataSetInfo.extract_substructure_information(), from the molecules specified in the argument mols of the method GetDataSetInfo.extract_substructure_information() (see below). 76 | :vartype nb_substructures: int 77 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument radii of GetDataSetInfo.extract_substructure_information(). 78 | :vartype max_radius: int 79 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument radii of GetDataSetInfo.extract_substructure_information(), and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 80 | :vartype substructure_dictionary: dict

81 |

GetDataSetInfo contains the following methods:

82 |
83 |
84 | extract_substructure_information(radii, mols)
85 |

This method extracts the substructures from the molecules (argument mols) 86 | whose radius is comprised in the argument radii. 87 | Each substructure in the molecule set (mols) is assigned an unambiguous integer identifier, 88 | which are kept in GetDataSetInfo.substructure_dictionary. 89 | The information about the substructures is kept in the fields indicated above.

90 | 91 | 92 | 93 | 94 | 99 | 100 | 101 |
Parameters:
    95 |
  • radii (list) – substructure radii to be considered
  • 96 |
  • mols (list) – molecules from which the substructures are to be extracted.
  • 97 |
98 |
102 |
103 | 104 |
108 |
109 | 110 |
111 |
112 |

CalculatePvaluesCategorical

113 |
114 |
115 | class CalculatePvaluesCategorical(max_radius)
116 |
117 | 118 | 119 | 120 | 126 | 127 | 128 |
Variables:
    121 |
  • max_radius (int) – maximum substructure radius considered.
  • 122 |
  • output – pandas dataframe containing the following columns: (i) ‘Compound ID’, (ii) ‘p_value’, (iii) ‘Compounds with substr.’, (iv) ‘activity label’, (v) ‘Substructure’, (vi) ‘Substructure in Molecule’, (vii) ‘Comp. with substr. active’, and (viii) ‘Comp. with substr. inactive’. 123 | :vartype output: pandas.core.frame.DataFrame
  • 124 |
125 |
129 |
130 |
131 | calculate_p_values(mols, substructure_dictionary, bioactivities, mols_ids, threshold_nb_substructures, threshold_pvalue, threshold_frequency, active_label=1, inactive_label=0)
132 |
133 | 134 |
135 |
136 | HTMLOutputWriter(self, output_filename)
137 |
138 | 139 |
140 |
141 | XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300))
142 |
143 | 144 |
145 | 146 |
147 |
148 |

CalculatePvaluesContinuous

149 |
150 |
151 | class CalculatePvaluesContinuous(radii_ext)
152 |
153 | 154 | 155 | 156 | 161 | 162 | 163 |
Variables:
    157 |
  • radii_ext (list) – substructure radii to be considered
  • 158 |
  • output (pandas.core.frame.DataFrame) – pandas dataframe containing the following columns: (i) ‘Compound ID’, (ii) ‘Number compounds’, (iii) ‘statistic’, (iv) ‘p_value’, (v) ‘Diff. distribution means (w - wo)’, (vi) ‘Compounds with substr.’, (vii) ‘Substructure’, and (viii) ‘Substructure in Molecule’.
  • 159 |
160 |
164 |
165 |
166 | calculate_p_values(mols, substructure_dictionary, bioactivities, mols_ids, threshold_nb_substructures, threshold_pvalue, threshold_ratio_w_wo, Bonferroni=True)
167 |
168 | 169 |
170 |
171 | HTMLOutputWriter(self, output_filename)
172 |
173 | 174 |
175 |
176 | XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300))
177 |
178 | 179 |
180 | 181 |
182 |
183 | 184 | 185 |
186 |
187 |
188 |
189 |
190 |

Table Of Contents

191 | 199 | 200 |

Previous topic

201 |

Load Molecules (LoadMolecules)

203 |

Next topic

204 |

Fingerprint Calculator (FPCalculator)

206 |

This Page

207 | 211 | 223 | 224 |
225 |
226 |
227 |
228 | 243 | 247 | 248 | -------------------------------------------------------------------------------- /bioalerts/build/Alerts.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Alerts: Derivation of structural alerts — bioalerts 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 |
52 | 53 |
54 |

Alerts: Derivation of structural alerts

55 |

This module is composed of the following three classes:

56 |
    57 |
  • GetSubstructuresFromReferenceDataset
  • 58 |
  • CalculatePvaluesCategorical
  • 59 |
  • CalculatePvaluesContinuous
  • 60 |
61 |
62 |

GetSubstructuresFromReferenceDataset

63 |
64 |
65 | class GetSubstructuresFromReferenceDataset(name_field=None)
66 |

Similar to GetDataSetInfo from the module LoadMolecules.

67 |

This class can be used to load molecules in smiles, sdf and mol2 format.

68 | 69 | 70 | 71 | 72 | 104 | 105 | 106 |
Variables:name_field

name of the data field containing the name of the molecules. Although the default value is None (bool), the name of the field if set when instantiating the class would be a string (str). 73 | :vartype name_field: str 74 | :var nb_substructures: total number of substructures, with a radius comprised in the argument radii of GetDataSetInfo.extract_substructure_information(), from the molecules specified in the argument mols of the method GetDataSetInfo.extract_substructure_information() (see below). 75 | :vartype nb_substructures: int 76 | :var max_radius: maximum substructure radius considered. This corresponds to the maximum value of the argument radii of GetDataSetInfo.extract_substructure_information(). 77 | :vartype max_radius: int 78 | :var substructure_dictionary: dictionary containing the substructures, with a radius comprised in the argument radii of GetDataSetInfo.extract_substructure_information(), and the molecules where they appear. Keys correspond to molecules names, whereas values correspond to 79 | :vartype substructure_dictionary: dict

80 |

GetDataSetInfo contains the following methods:

81 |
82 |
83 | extract_substructure_information(radii, mols)
84 |

This method extracts the substructures from the molecules (argument mols) 85 | whose radius is comprised in the argument radii. 86 | Each substructure in the molecule set (mols) is assigned an unambiguous integer identifier, 87 | which are kept in GetDataSetInfo.substructure_dictionary. 88 | The information about the substructures is kept in the fields indicated above.

89 | 90 | 91 | 92 | 93 | 98 | 99 | 100 |
Parameters:
    94 |
  • radii (list) – substructure radii to be considered
  • 95 |
  • mols (list) – molecules from which the substructures are to be extracted.
  • 96 |
97 |
101 |
102 | 103 |
107 |
108 | 109 |
110 |
111 |

CalculatePvaluesCategorical

112 |
113 |
114 | class CalculatePvaluesCategorical(max_radius)
115 |
116 | 117 | 118 | 119 | 125 | 126 | 127 |
Variables:
    120 |
  • max_radius (int) – maximum substructure radius considered.
  • 121 |
  • output – pandas dataframe containing the following columns: (i) ‘Compound ID’, (ii) ‘p_value’, (iii) ‘Compounds with substr.’, (iv) ‘activity label’, (v) ‘Substructure’, (vi) ‘Substructure in Molecule’, (vii) ‘Comp. with substr. active’, and (viii) ‘Comp. with substr. inactive’. 122 | :vartype output: pandas.core.frame.DataFrame
  • 123 |
124 |
128 |
129 |
130 | calculate_p_values(mols, substructure_dictionary, bioactivities, mols_ids, threshold_nb_substructures, threshold_pvalue, threshold_frequency, active_label=1, inactive_label=0)
131 |
132 | 133 |
134 |
135 | HTMLOutputWriter(self, output_filename)
136 |
137 | 138 |
139 |
140 | XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300))
141 |
142 | 143 |
144 | 145 |
146 |
147 |

CalculatePvaluesContinuous

148 |
149 |
150 | class CalculatePvaluesContinuous(radii_ext)
151 |
152 | 153 | 154 | 155 | 160 | 161 | 162 |
Variables:
    156 |
  • radii_ext (list) – substructure radii to be considered
  • 157 |
  • output (pandas.core.frame.DataFrame) – pandas dataframe containing the following columns: (i) ‘Compound ID’, (ii) ‘Number compounds’, (iii) ‘statistic’, (iv) ‘p_value’, (v) ‘Diff. distribution means (w - wo)’, (vi) ‘Compounds with substr.’, (vii) ‘Substructure’, and (viii) ‘Substructure in Molecule’.
  • 158 |
159 |
163 |
164 |
165 | calculate_p_values(mols, substructure_dictionary, bioactivities, mols_ids, threshold_nb_substructures, threshold_pvalue, threshold_ratio_w_wo, Bonferroni=True)
166 |
167 | 168 |
169 |
170 | HTMLOutputWriter(self, output_filename)
171 |
172 | 173 |
174 |
175 | XlSXOutputWriter(self,frame, output_filename, molCol=['Substructure',"Substructure in Molecule"], size=(300,300))
176 |
177 | 178 |
179 | 180 |
181 |
182 | 183 | 184 |
185 |
186 |
187 |
188 |
189 |

Table Of Contents

190 | 198 | 199 |

Previous topic

200 |

LoadMolecules: Load Molecules

202 |

Next topic

203 |

FPCalculator: Fingerprint Calculator

205 |

This Page

206 | 210 | 222 | 223 |
224 |
225 |
226 |
227 | 242 | 246 | 247 | --------------------------------------------------------------------------------