__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 Idac_number: Accession numberorg_species: Organism speciesgene_name: Gene namepeptide_seq: Amino acid sequencego_id: List of associated Gene Ontology Ids
-
Methods:
fasta_dump(): Exports the protein sequence in FASTA formatmolecular_weight(): Calculates the molecular weight of the proteinaverage_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 ofUniprotobjects
-
Methods:
add_uniprot(contenu_uniprot): Adds proteins to the collectiondel_uniprot(uniprot_id): Deletes a protein from the collection by Idsort_by_length(): Sorts proteins by sequence lengthfilter_for_hydrophobic(min_hydro): Filters proteins by average hydrophobicityfilter(): Filters proteins based on specific criteriago_view(): Counts occurrences of GO Ids across all proteinsdraw_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab50eb88c5565a9f353c35cd5ff15bb784249129fdb0de126807a67fe4f2794
|
|
| MD5 |
89ba140ff48e4d1ae6d2d5570638407c
|
|
| BLAKE2b-256 |
13d1e2db64350402c864592ac4b531bb991463bc395806cb1038b448a84648ac
|
File details
Details for the file uniprot_xplorer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: uniprot_xplorer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c28989c8c23be3dc60941f574ccc80affecab00297d0980dfdca076b2d487453
|
|
| MD5 |
f8d56ae631d3747f85cf23000b370cc8
|
|
| BLAKE2b-256 |
9b56dacd9c75eeef6e4678eef2b1b17ed75f3a93d7ca5b35f3213b462a30b443
|