Skip to main content

CD-HIT cluster parser

Project description

cdhit-parser

CD-HIT file reader.

Examples

Basic usage

input = "cluster.fa.clstr"
for cluster in read_cdhit(input):
    print(f"{cluster.name} refSequence={cluster.refname} size={len(cluster)}")

    for member in cluster.sequences:
        print(f" {member.name} ({member.length}) identity={member.identity}% {'(Reference sequence)' if member.is_ref else ''}")

Load all clusters in to a list:

# Load all clusters to a list
clusters = read_cdhit(input).read_items()

Install

pip install cdhit-reader

Author

License

This project is licensed under the MIT License.

Acknowledgments

This module was based on fasta_reader by Danilo Horta

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdhit-reader-0.0.5.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

cdhit_reader-0.0.5-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page