quasinet


Namequasinet JSON
Version 0.1.68 PyPI version JSON
download
home_pagehttps://github.com/zeroknowledgediscovery/
SummaryUtitilies for constructing and manipulating models for non-local structural dependencies in genomic sequences
upload_time2024-05-02 03:26:16
maintainerNone
docs_urlNone
authorzed.uchicago.edu
requires_python>=3.3
licenseLICENSE.txt
keywords decision trees machine learning computational biology
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Quasinet

![quasinet PyPI Downloads](https://img.shields.io/pypi/dm/quasinet.svg)

![PyPI version](https://badge.fury.io/py/quasinet.svg)


<p align="center">
    <img src="http://zed.uchicago.edu/logo/logozed1.png">
</p>


## Description

Infer non-local structural dependencies in genomic sequences. Genomic sequences are esentially compressed encodings of phenotypic information. This package provides a novel set of tools to extract long-range structural dependencies in genotypic data that define the phenotypic outcomes. The key capabilities implemented here are as follows: 

1. Compute the Quasinet (Q-net) given a database of nucleic acid sequences. The Q-net is a family of conditional inference trees that capture the predictability of each nucleotide position given the rest of the genome. The constructed Q-net for COVID-19 and Influenza A H1N1 HA 2008-9 is shown below.

COVID-19                   |  INFLUENZA
:-------------------------:|:-------------------------:
![](https://raw.githubusercontent.com/zeroknowledgediscovery/quasinet/master/images/covid19.png)  | ![](https://raw.githubusercontent.com/zeroknowledgediscovery/quasinet/master/images/influenza.png)



2. Compute a structure-aware evolution-adaptive notion of distance between genomes, which is demonstrably more biologically relevant compared to the standard edit distance. 

3. Draw samples in-silico that have a high probability of being biologically correct. For example, given a database of Influenza sequences, we can generate a new genomic sequence that has a high probability of being a valid influenza sequence.

<!-- ![Sampling](images/sampling.png){ width=25% } -->

<p align="center">
    <img src="https://raw.githubusercontent.com/zeroknowledgediscovery/quasinet/master/images/sampling.png" width="50%" height="50%">
</p>

## Installation

To install with pip:

```
pip install quasinet
```

To fix error with Mac or Windows:

```
from quasinet.osfix import osfix
# for windows
osfix('win')
# for max x86_64 (macbook pro)
osfix('macx86')
# mac arm (macbook air)
osfix('macarm')

```



NOTE: If trying to reproduce the paper below, please use `pip install quasinet==0.0.58`

### Dependencies

* scikit-learn 
* scipy 
* numpy 
* numba 
* pandas 
* joblib 
* biopython

## Usage

```
from quasinet import qnet

# initialize qnet
myqnet = qnet.Qnet()

# train the qnet
myqnet.fit(X)

# compute qdistance
qdist = qnet.qdistance(seq1, seq2, myqnet, myqnet) 
```
 
### Examples

Examples are located [here](https://github.com/zeroknowledgediscovery/quasinet/tree/master/examples).

## Documentation

For more documentation, see [here](https://zeroknowledgediscovery.github.io/quasinet/build/html/index.html).

## Papers

For reference, please check out our paper: 

[Preparing For the Next Pandemic: Learning Wild Mutational Patterns At Scale For Analyzing Sequence Divergence In Novel Pathogens](https://www.medrxiv.org/content/10.1101/2020.07.17.20156364v3)

## Authors

You can reach the ZED lab at: zed.uchicago.edu

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zeroknowledgediscovery/",
    "name": "quasinet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.3",
    "maintainer_email": null,
    "keywords": "decision trees, machine learning, computational biology",
    "author": "zed.uchicago.edu",
    "author_email": "ishanu@uchicago.edu",
    "download_url": "https://files.pythonhosted.org/packages/ee/3b/62dc82bf394ad046e64f0d4461727fe5892fbaa9dce7b543a5015e43f048/quasinet-0.1.68.tar.gz",
    "platform": null,
    "description": "# Quasinet\n\n![quasinet PyPI Downloads](https://img.shields.io/pypi/dm/quasinet.svg)\n\n![PyPI version](https://badge.fury.io/py/quasinet.svg)\n\n\n<p align=\"center\">\n    <img src=\"http://zed.uchicago.edu/logo/logozed1.png\">\n</p>\n\n\n## Description\n\nInfer non-local structural dependencies in genomic sequences. Genomic sequences are esentially compressed encodings of phenotypic information. This package provides a novel set of tools to extract long-range structural dependencies in genotypic data that define the phenotypic outcomes. The key capabilities implemented here are as follows: \n\n1. Compute the Quasinet (Q-net) given a database of nucleic acid sequences. The Q-net is a family of conditional inference trees that capture the predictability of each nucleotide position given the rest of the genome. The constructed Q-net for COVID-19 and Influenza A H1N1 HA 2008-9 is shown below.\n\nCOVID-19                   |  INFLUENZA\n:-------------------------:|:-------------------------:\n![](https://raw.githubusercontent.com/zeroknowledgediscovery/quasinet/master/images/covid19.png)  | ![](https://raw.githubusercontent.com/zeroknowledgediscovery/quasinet/master/images/influenza.png)\n\n\n\n2. Compute a structure-aware evolution-adaptive notion of distance between genomes, which is demonstrably more biologically relevant compared to the standard edit distance. \n\n3. Draw samples in-silico that have a high probability of being biologically correct. For example, given a database of Influenza sequences, we can generate a new genomic sequence that has a high probability of being a valid influenza sequence.\n\n<!-- ![Sampling](images/sampling.png){ width=25% } -->\n\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/zeroknowledgediscovery/quasinet/master/images/sampling.png\" width=\"50%\" height=\"50%\">\n</p>\n\n## Installation\n\nTo install with pip:\n\n```\npip install quasinet\n```\n\nTo fix error with Mac or Windows:\n\n```\nfrom quasinet.osfix import osfix\n# for windows\nosfix('win')\n# for max x86_64 (macbook pro)\nosfix('macx86')\n# mac arm (macbook air)\nosfix('macarm')\n\n```\n\n\n\nNOTE: If trying to reproduce the paper below, please use `pip install quasinet==0.0.58`\n\n### Dependencies\n\n* scikit-learn \n* scipy \n* numpy \n* numba \n* pandas \n* joblib \n* biopython\n\n## Usage\n\n```\nfrom quasinet import qnet\n\n# initialize qnet\nmyqnet = qnet.Qnet()\n\n# train the qnet\nmyqnet.fit(X)\n\n# compute qdistance\nqdist = qnet.qdistance(seq1, seq2, myqnet, myqnet) \n```\n \n### Examples\n\nExamples are located [here](https://github.com/zeroknowledgediscovery/quasinet/tree/master/examples).\n\n## Documentation\n\nFor more documentation, see [here](https://zeroknowledgediscovery.github.io/quasinet/build/html/index.html).\n\n## Papers\n\nFor reference, please check out our paper: \n\n[Preparing For the Next Pandemic: Learning Wild Mutational Patterns At Scale For Analyzing Sequence Divergence In Novel Pathogens](https://www.medrxiv.org/content/10.1101/2020.07.17.20156364v3)\n\n## Authors\n\nYou can reach the ZED lab at: zed.uchicago.edu\n",
    "bugtrack_url": null,
    "license": "LICENSE.txt",
    "summary": "Utitilies for constructing and manipulating models for non-local structural dependencies in genomic sequences",
    "version": "0.1.68",
    "project_urls": {
        "Download": "https://github.com/zeroknowledgediscovery/quasinet/archive/0.1.68.tar.gz",
        "Homepage": "https://github.com/zeroknowledgediscovery/"
    },
    "split_keywords": [
        "decision trees",
        " machine learning",
        " computational biology"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0755133f63b6c030c6b32b183d939995aa1cdf1d294f70eb3e58a93fb5be8af7",
                "md5": "ef1fc2599b2039311581be14dd25237d",
                "sha256": "17c80ca70143973d0f180b20edc5971aad7b4d7808613f0b16104c543ffb7c1c"
            },
            "downloads": -1,
            "filename": "quasinet-0.1.68-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef1fc2599b2039311581be14dd25237d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.3",
            "size": 15233608,
            "upload_time": "2024-05-02T03:26:11",
            "upload_time_iso_8601": "2024-05-02T03:26:11.670605Z",
            "url": "https://files.pythonhosted.org/packages/07/55/133f63b6c030c6b32b183d939995aa1cdf1d294f70eb3e58a93fb5be8af7/quasinet-0.1.68-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee3b62dc82bf394ad046e64f0d4461727fe5892fbaa9dce7b543a5015e43f048",
                "md5": "4295fc1deac3db183c946ab7d983650b",
                "sha256": "f35c63c19037e716255ed02c60d26c5cf701bb696deceffea88f6a54d907d91b"
            },
            "downloads": -1,
            "filename": "quasinet-0.1.68.tar.gz",
            "has_sig": false,
            "md5_digest": "4295fc1deac3db183c946ab7d983650b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.3",
            "size": 14482479,
            "upload_time": "2024-05-02T03:26:16",
            "upload_time_iso_8601": "2024-05-02T03:26:16.706346Z",
            "url": "https://files.pythonhosted.org/packages/ee/3b/62dc82bf394ad046e64f0d4461727fe5892fbaa9dce7b543a5015e43f048/quasinet-0.1.68.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-02 03:26:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zeroknowledgediscovery",
    "github_project": "quasinet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "quasinet"
}
        
Elapsed time: 0.80875s