jcompoundmapper-pywrapper


Namejcompoundmapper-pywrapper JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/OlivierBeq/jcompoundmapper_pywrapper
SummaryPython wrapper for jCompoundMapper molecular fingerprints
upload_time2023-08-23 12:52:15
maintainerOlivier J. M. Béquignon
docs_urlNone
authorOlivier J. M. Béquignon
requires_python
license
keywords jcompoundmapper molecular fingerprints cheminformatics toxicoinformatics qsar
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Python wrapper for jCompoundMapper molecular fingerprints

Python wrapper to ease the calculation of jCompoundMApper molecular fingerprints.

## Installation

From source:

    git clone https://github.com/OlivierBeq/jcompoundmapper_pywrapper.git
    pip install ./jcompoundmapper_pywrapper

with pip:

```bash
pip install jcompoundmapper-pywrapper
```

### Get started

```python
from jcompoundmapper_pywrapper import JCompoundMapper
from rdkit import Chem

smiles_list = [
  # erlotinib
  "n1cnc(c2cc(c(cc12)OCCOC)OCCOC)Nc1cc(ccc1)C#C",
  # midecamycin
  "CCC(=O)O[C@@H]1CC(=O)O[C@@H](C/C=C/C=C/[C@@H]([C@@H](C[C@@H]([C@@H]([C@H]1OC)O[C@H]2[C@@H]([C@H]([C@@H]([C@H](O2)C)O[C@H]3C[C@@]([C@H]([C@@H](O3)C)OC(=O)CC)(C)O)N(C)C)O)CC=O)C)O)C",
  # selenofolate
  "C1=CC(=CC=C1C(=O)NC(CCC(=O)OCC[Se]C#N)C(=O)O)NCC2=CN=C3C(=N2)C(=O)NC(=N3)N",
  # cisplatin
  "N.N.Cl[Pt]Cl"
]
mols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list]

jcm = JCompoundMapper()
print(jcm.calculate(mols))
```

One can use any of the following fingerprints: DFS, ASP, AP2D, AT2D, AP3D, AT3D, CATS2D, CATS3D, PHAP2POINT2D, PHAP3POINT2D, PHAP2POINT3D, PHAP3POINT3D,
ECFP, ECFPVariant, LSTAR, SHED, RAD2D, RAD3D or MACCS.

By default, 1024 bits fingerprints are generated, except for the 166 bits MACCS.

```python
jcm = JCompoundMapper('ECFP')
print(jcm.calculate(mols, 2048))

# or

from jCompoundMapper_pywrapper import Fingerprint

jcm = JCompoundMapper(Fingerprint.DFS)
print(jcm.calculate(mols, 2048))
```

:warning: Molecules with 3D conformers must be provided to calculate 3D fingerprints (i.e. CATS3D, PHAP2POINT3D, PHAP3POINT3D and RAD3D).

One can specify advanced parameters to the fingerprinter:

```python
from jCompoundMapper_pywrapper import DEFAULT_FP_PARAMETERS

custom_ecfp_params = DEFAULT_FP_PARAMETERS['ECFP']
custom_ecfp_params.depth = 6

jcm = JCompoundMapper('ECFP', custom_ecfp_params)
print(jcm.calculate(mols))
```
## Documentation

```python
def calculate(mols, nbits=1024, show_banner=True, njobs=1, chunksize=1000):
```

Default method to calculate jCompoundMapper fingerprints.

Parameters:

- ***mols  : Iterable[Chem.Mol]***  
  RDKit molecule objects for which to obtain jCompoundMapper fingerprints.
- ***nbits  : Union[int, List[int]]***  
  Size of the fingerprints.
- ***show_banner  : bool***  
  Displays default notice about jCompoundMapper.
- ***njobs  : int***  
  Maximum number of simultaneous processes.
- ***chunksize  : int***  
  Maximum number of molecules each process is in charge of.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OlivierBeq/jcompoundmapper_pywrapper",
    "name": "jcompoundmapper-pywrapper",
    "maintainer": "Olivier J. M. B\u00e9quignon",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "\"olivier.bequignon.maintainer@gmail.com\"",
    "keywords": "jCompoundMapper,molecular fingerprints,cheminformatics,toxicoinformatics,QSAR",
    "author": "Olivier J. M. B\u00e9quignon",
    "author_email": "\"olivier.bequignon.maintainer@gmail.com\"",
    "download_url": "https://files.pythonhosted.org/packages/02/b2/741b6bd52a6fd2c36d2a991cd99ba62196c9f1fba0e3b078597cd0972f33/jcompoundmapper_pywrapper-0.0.2.tar.gz",
    "platform": null,
    "description": "[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n# Python wrapper for jCompoundMapper molecular fingerprints\r\n\r\nPython wrapper to ease the calculation of jCompoundMApper molecular fingerprints.\r\n\r\n## Installation\r\n\r\nFrom source:\r\n\r\n    git clone https://github.com/OlivierBeq/jcompoundmapper_pywrapper.git\r\n    pip install ./jcompoundmapper_pywrapper\r\n\r\nwith pip:\r\n\r\n```bash\r\npip install jcompoundmapper-pywrapper\r\n```\r\n\r\n### Get started\r\n\r\n```python\r\nfrom jcompoundmapper_pywrapper import JCompoundMapper\r\nfrom rdkit import Chem\r\n\r\nsmiles_list = [\r\n  # erlotinib\r\n  \"n1cnc(c2cc(c(cc12)OCCOC)OCCOC)Nc1cc(ccc1)C#C\",\r\n  # midecamycin\r\n  \"CCC(=O)O[C@@H]1CC(=O)O[C@@H](C/C=C/C=C/[C@@H]([C@@H](C[C@@H]([C@@H]([C@H]1OC)O[C@H]2[C@@H]([C@H]([C@@H]([C@H](O2)C)O[C@H]3C[C@@]([C@H]([C@@H](O3)C)OC(=O)CC)(C)O)N(C)C)O)CC=O)C)O)C\",\r\n  # selenofolate\r\n  \"C1=CC(=CC=C1C(=O)NC(CCC(=O)OCC[Se]C#N)C(=O)O)NCC2=CN=C3C(=N2)C(=O)NC(=N3)N\",\r\n  # cisplatin\r\n  \"N.N.Cl[Pt]Cl\"\r\n]\r\nmols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list]\r\n\r\njcm = JCompoundMapper()\r\nprint(jcm.calculate(mols))\r\n```\r\n\r\nOne can use any of the following fingerprints: DFS, ASP, AP2D, AT2D, AP3D, AT3D, CATS2D, CATS3D, PHAP2POINT2D, PHAP3POINT2D, PHAP2POINT3D, PHAP3POINT3D,\r\nECFP, ECFPVariant, LSTAR, SHED, RAD2D, RAD3D or MACCS.\r\n\r\nBy default, 1024 bits fingerprints are generated, except for the 166 bits MACCS.\r\n\r\n```python\r\njcm = JCompoundMapper('ECFP')\r\nprint(jcm.calculate(mols, 2048))\r\n\r\n# or\r\n\r\nfrom jCompoundMapper_pywrapper import Fingerprint\r\n\r\njcm = JCompoundMapper(Fingerprint.DFS)\r\nprint(jcm.calculate(mols, 2048))\r\n```\r\n\r\n:warning: Molecules with 3D conformers must be provided to calculate 3D fingerprints (i.e. CATS3D, PHAP2POINT3D, PHAP3POINT3D and RAD3D).\r\n\r\nOne can specify advanced parameters to the fingerprinter:\r\n\r\n```python\r\nfrom jCompoundMapper_pywrapper import DEFAULT_FP_PARAMETERS\r\n\r\ncustom_ecfp_params = DEFAULT_FP_PARAMETERS['ECFP']\r\ncustom_ecfp_params.depth = 6\r\n\r\njcm = JCompoundMapper('ECFP', custom_ecfp_params)\r\nprint(jcm.calculate(mols))\r\n```\r\n## Documentation\r\n\r\n```python\r\ndef calculate(mols, nbits=1024, show_banner=True, njobs=1, chunksize=1000):\r\n```\r\n\r\nDefault method to calculate jCompoundMapper fingerprints.\r\n\r\nParameters:\r\n\r\n- ***mols  : Iterable[Chem.Mol]***  \r\n  RDKit molecule objects for which to obtain jCompoundMapper fingerprints.\r\n- ***nbits  : Union[int, List[int]]***  \r\n  Size of the fingerprints.\r\n- ***show_banner  : bool***  \r\n  Displays default notice about jCompoundMapper.\r\n- ***njobs  : int***  \r\n  Maximum number of simultaneous processes.\r\n- ***chunksize  : int***  \r\n  Maximum number of molecules each process is in charge of.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python wrapper for jCompoundMapper molecular fingerprints",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/OlivierBeq/jcompoundmapper_pywrapper"
    },
    "split_keywords": [
        "jcompoundmapper",
        "molecular fingerprints",
        "cheminformatics",
        "toxicoinformatics",
        "qsar"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d2683003c9069e478bd413e693862945433acf3c887be094c9b58336b773c04",
                "md5": "732373226e84fcb26260a0b7c804bc01",
                "sha256": "979279ca0d6fb324aa993cbc1f2a8d13145370308b0eb41106eb9645ac72448d"
            },
            "downloads": -1,
            "filename": "jcompoundmapper_pywrapper-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "732373226e84fcb26260a0b7c804bc01",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16835448,
            "upload_time": "2023-08-23T12:52:09",
            "upload_time_iso_8601": "2023-08-23T12:52:09.355651Z",
            "url": "https://files.pythonhosted.org/packages/3d/26/83003c9069e478bd413e693862945433acf3c887be094c9b58336b773c04/jcompoundmapper_pywrapper-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02b2741b6bd52a6fd2c36d2a991cd99ba62196c9f1fba0e3b078597cd0972f33",
                "md5": "b1f630b3e07f054091b2b4e357d1a93d",
                "sha256": "6c2e9593753ee1aad2e51bf7bbc7c11e6ebc265d5e6d05362bbe6b49310abd74"
            },
            "downloads": -1,
            "filename": "jcompoundmapper_pywrapper-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b1f630b3e07f054091b2b4e357d1a93d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16835178,
            "upload_time": "2023-08-23T12:52:15",
            "upload_time_iso_8601": "2023-08-23T12:52:15.620690Z",
            "url": "https://files.pythonhosted.org/packages/02/b2/741b6bd52a6fd2c36d2a991cd99ba62196c9f1fba0e3b078597cd0972f33/jcompoundmapper_pywrapper-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-23 12:52:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OlivierBeq",
    "github_project": "jcompoundmapper_pywrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "jcompoundmapper-pywrapper"
}
        
Elapsed time: 0.12654s