Skip to main content

__init__.py and README.md files updated

Project description

README

Overview

The module uniprot_xplorer contains two Python files: uniprot_collection.py and uniprot.py, which provide tools for analyzing UniProt protein data.


uniprot.py

The uniprot.py file defines the Uniprot class, which represents a protein object with the following features:

  • Attributes:

    • identification: Protein Id
    • ac_number: Accession number
    • org_species: Organism species
    • gene_name: Gene name
    • peptide_seq: Amino acid sequence
    • go_id: List of associated Gene Ontology Ids
  • Methods:

    • fasta_dump(): Exports the protein sequence in FASTA format
    • molecular_weight(): Calculates the molecular weight of the protein
    • average_hydrophobicity(): Computes the average hydrophobicity of the protein

uniprot_collection.py

The uniprot_collection.py file defines the Collection class, which manages multiple Uniprot objects. It includes:

  • Attributes:

    • uniprot_list: A list of Uniprot objects
  • Methods:

    • add_uniprot(contenu_uniprot): Adds proteins to the collection
    • del_uniprot(uniprot_id): Deletes a protein from the collection by Id
    • sort_by_length(): Sorts proteins by sequence length
    • filter_for_hydrophobic(min_hydro): Filters proteins by average hydrophobicity
    • filter(): Filters proteins based on specific criteria
    • go_view(): Counts occurrences of GO Ids across all proteins
    • draw_ABRL(uniprot_id): Generates a histogram of ABRL for a specific protein

Examples of use

This demonstration allows you to test the "fasta_dump" method of the Uniprot class.

import uniprot_xplorer.uniprot
from uniprot_xplorer import *
import sys 

data =  sys.argv[1]
uniprot_data = uniprot_xplorer.uniprot.Uniprot(open_uniprot_file(data))

# you have created an output folder with the fasta file of the protein inside 
uniprot_data.fasta_dump()

This demonstration allows you to test the "add_uniprot" method of the Collection class.

import uniprot_xplorer.uniprot_collection
from uniprot_xplorer import *
import sys 

data =  sys.argv[1]
uniprot_data = open_uniprot_file(data)

collection = uniprot_xplorer.uniprot_collection.Collection()

# you added protein(s) in the collection object
collection.add_uniprot(uniprot_data)

print(collection)

Authors

  • Salma El AOUDATI
  • Elsa BALIGAND

Date : 2024-11-27

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

uniprot_xplorer-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uniprot_xplorer-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file uniprot_xplorer-0.1.1.tar.gz.

File metadata

  • Download URL: uniprot_xplorer-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for uniprot_xplorer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5ab50eb88c5565a9f353c35cd5ff15bb784249129fdb0de126807a67fe4f2794
MD5 89ba140ff48e4d1ae6d2d5570638407c
BLAKE2b-256 13d1e2db64350402c864592ac4b531bb991463bc395806cb1038b448a84648ac

See more details on using hashes here.

File details

Details for the file uniprot_xplorer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for uniprot_xplorer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c28989c8c23be3dc60941f574ccc80affecab00297d0980dfdca076b2d487453
MD5 f8d56ae631d3747f85cf23000b370cc8
BLAKE2b-256 9b56dacd9c75eeef6e4678eef2b1b17ed75f3a93d7ca5b35f3213b462a30b443

See more details on using hashes here.

Supported by

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