seqshannon


Nameseqshannon JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/WojDob/SeqShannon
SummaryCalculate shannon entropy of biological sequences
upload_time2023-07-25 13:17:52
maintainer
docs_urlNone
authorWojciech Dobrychłop
requires_python
license
keywords python bioinformatics shannon entropy sequence analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SeqShannon

SeqShannon is a Python package that calculates the Shannon entropy of biological sequences. It works for both nucleotide and amino acid sequences.

## Description

SeqShannon is a Python package that reads a FASTA file and calculates the Shannon entropy for each biological sequence in the file. It utilizes the BioPython library for parsing FASTA files. The results can be easily written to an output file or printed in the console.

The Shannon entropy is a measure of the uncertainty or randomness of a set of data. In the context of biological sequences, such as DNA or protein sequences, the Shannon entropy can provide insights into the variability and complexity of the sequence.

## Installation

You can install SeqShannon using `pip`:

```bash
pip install seqshannon
```

## Usage
SeqShannon can be used as a command-line tool or as a Python library.

### Command-line usage

Use a fasta file as input. By default, the package prints out the identifier and calculated Shannon entropy for each sequence in the input file.

```bash
seqshannon -i example.fasta
```

You can also specify a file to save the output.

```bash
seqshannon -i example.fasta -o output.txt
```

#### Example

Here are the contents of an example FASTA file:

```fasta
>example_1
VLSISYSRSESSLE
>example_2
TIGQRKPSTFSWSS
>example_3
RAASRSSWERGP
```

Running SeqShannon on this file will yield the following output:

```bash
example_1 2.4137995646056805
example_2 3.09306920777189
example_3 2.6258145836939115
```


### Python library usage
You can calculate the Shannon entropy of the given sequence by importing `shannon_entropy`.

```python
>>> from seqshannon import shannon_entropy
>>> from Bio.Seq import Seq
>>> sequence = Seq("ATGCATGC")
>>> entropy = shannon_entropy(sequence)
>>> print(entropy)
2.0
```

## Contact

For any issues or suggestions, please contact [Wojciech Dobrychłop](mailto:wojciech.dobrychlop@gmail.com).

## License

SeqShannon is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/WojDob/SeqShannon",
    "name": "seqshannon",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,bioinformatics,shannon entropy,sequence analysis",
    "author": "Wojciech Dobrych\u0142op",
    "author_email": "wojciech.dobrychlop@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1b/80/b0510bcd222a8ddea03cb0e6e9df225c151f469442c6e1b7d800d0e63a7c/seqshannon-1.0.0.tar.gz",
    "platform": null,
    "description": "# SeqShannon\n\nSeqShannon is a Python package that calculates the Shannon entropy of biological sequences. It works for both nucleotide and amino acid sequences.\n\n## Description\n\nSeqShannon is a Python package that reads a FASTA file and calculates the Shannon entropy for each biological sequence in the file. It utilizes the BioPython library for parsing FASTA files. The results can be easily written to an output file or printed in the console.\n\nThe Shannon entropy is a measure of the uncertainty or randomness of a set of data. In the context of biological sequences, such as DNA or protein sequences, the Shannon entropy can provide insights into the variability and complexity of the sequence.\n\n## Installation\n\nYou can install SeqShannon using `pip`:\n\n```bash\npip install seqshannon\n```\n\n## Usage\nSeqShannon can be used as a command-line tool or as a Python library.\n\n### Command-line usage\n\nUse a fasta file as input. By default, the package prints out the identifier and calculated Shannon entropy for each sequence in the input file.\n\n```bash\nseqshannon -i example.fasta\n```\n\nYou can also specify a file to save the output.\n\n```bash\nseqshannon -i example.fasta -o output.txt\n```\n\n#### Example\n\nHere are the contents of an example FASTA file:\n\n```fasta\n>example_1\nVLSISYSRSESSLE\n>example_2\nTIGQRKPSTFSWSS\n>example_3\nRAASRSSWERGP\n```\n\nRunning SeqShannon on this file will yield the following output:\n\n```bash\nexample_1 2.4137995646056805\nexample_2 3.09306920777189\nexample_3 2.6258145836939115\n```\n\n\n### Python library usage\nYou can calculate the Shannon entropy of the given sequence by importing `shannon_entropy`.\n\n```python\n>>> from seqshannon import shannon_entropy\n>>> from Bio.Seq import Seq\n>>> sequence = Seq(\"ATGCATGC\")\n>>> entropy = shannon_entropy(sequence)\n>>> print(entropy)\n2.0\n```\n\n## Contact\n\nFor any issues or suggestions, please contact [Wojciech Dobrych\u0142op](mailto:wojciech.dobrychlop@gmail.com).\n\n## License\n\nSeqShannon is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Calculate shannon entropy of biological sequences",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/WojDob/SeqShannon"
    },
    "split_keywords": [
        "python",
        "bioinformatics",
        "shannon entropy",
        "sequence analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18963d549837a565b71448d817cb191a6a4fff5af1953f761111dff869ae3bb9",
                "md5": "ef70f5cc07b45bbcd28a8b4e5884e4f8",
                "sha256": "14cd7a380b8e5c82ac80794f739ec9988370e0aea4c6259da629db94e5f0b311"
            },
            "downloads": -1,
            "filename": "seqshannon-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef70f5cc07b45bbcd28a8b4e5884e4f8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4708,
            "upload_time": "2023-07-25T13:17:50",
            "upload_time_iso_8601": "2023-07-25T13:17:50.695833Z",
            "url": "https://files.pythonhosted.org/packages/18/96/3d549837a565b71448d817cb191a6a4fff5af1953f761111dff869ae3bb9/seqshannon-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b80b0510bcd222a8ddea03cb0e6e9df225c151f469442c6e1b7d800d0e63a7c",
                "md5": "66f1d9f553f77b5f4d0b4940ab555db9",
                "sha256": "ace4fa1d6280be64ce0d4448150faecb680f1e336d5383bf51e9e99d4912ecb8"
            },
            "downloads": -1,
            "filename": "seqshannon-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "66f1d9f553f77b5f4d0b4940ab555db9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4702,
            "upload_time": "2023-07-25T13:17:52",
            "upload_time_iso_8601": "2023-07-25T13:17:52.314531Z",
            "url": "https://files.pythonhosted.org/packages/1b/80/b0510bcd222a8ddea03cb0e6e9df225c151f469442c6e1b7d800d0e63a7c/seqshannon-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-25 13:17:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "WojDob",
    "github_project": "SeqShannon",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "seqshannon"
}
        
Elapsed time: 0.18363s