With biofkit you can deal with pdb file (extract sequence, atom information and so on) very easily.
Project description
biofkit
Biofkit is now containing only one module with one package which can deal with pdb file (extract sequence, atom information and so on) very easily.
How to Install
Conda
conda install -c chou_uken biofkit
Mamba
mamba install -c chou_uken biofkit
Pip
pip install biofkit
How to Use
ProteinKit
from biofkit.proteinKit import pdbKit
# if argument fasta is True, a fasta file will be created in the same path as the pdb file.
pdbKit.pdb2Seq(pdbFilePath: str, fasta: bool = False, fastaLineLen: int = 80) -> dict[str, str]
# pdfFilePath: the file path of the pdb you want to transfer.
# fasta: Whether to transfer into fasta file. If false, pdb will only be transferred to a dictionary.{chainId: Seq}
# fastaLineLen: How many residues are contained in a single line of the fasta, only work when `fasta` is true.
# load the information of all amino-acid-residue atoms into a list. output[idx] shows the information of an atom.
pdb2List(pdbFilePath: str, csvPath: str = None, colName: bool = False) -> list[list[int, str, str, int, str, float, float, float]]:
# pdbFilePath: the file path of the pdb you want to load.
# csvPath: if given, then write a csv file for your atom information.
# colName: a prepared colname list for the output. If colName is true, the output[0] will be such a list shown below. May help when column names are needed.
pdbInfoColumns: [str] = ['Serial', 'Atom', 'ResName', 'ResSeq', 'ChainId', 'X', 'Y', 'Z']
# load the information of all amimo-acid-residue atoms into a dictionary, which can be converted into a dataframe with famous `pandas`.
pdb2Dict(pdbFilePath: str) -> dict[str, list]:
# pdbFilePath: the file path of the pdb you want to load.
SeqKit
from biofkit.seqKit import convKit
# transcription
def dna2Rna(dnaSeq: str) -> str:
# dnaSeq: the sequence of DNA, a string containing 'A', 'C', 'G', 'T' but without 'U'.
# reverse transcription
def rna2Dna(rnaSeq: str) -> str:
# rnaSeq: the sequence of RNA, a string containing 'A', 'C', 'G', 'U' but without 'T'.
# DNA translation
def dna2Pro(dnaSeq: str, start: int = 0, end: int = -1) -> str:
# dnaSeq: the sequence of DNA, a string containing 'A', 'C', 'G', 'T' but without 'U'.
# start: From where to tranlate into protein.
# end: To where to tranlate into protein.
# RNA tranlation
def rna2Pro(rnaSeq: str, start: int = 0, end: int = -1) -> str:
# dnaSeq: the sequence of DNA, a string containing 'A', 'C', 'G', 'U' but without 'T'.
# start: From where to tranlate into protein.
# end: To where to tranlate into protein.
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
biofkit-0.1.1.tar.gz
(10.9 kB
view details)
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
biofkit-0.1.1-py3-none-any.whl
(11.5 kB
view details)
File details
Details for the file biofkit-0.1.1.tar.gz.
File metadata
- Download URL: biofkit-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b59bbc5927c8220b03437cd89f0b148b624d5ec6b20e621dc8727e858a50bd02
|
|
| MD5 |
9294351517edd282ecdd8439a14dde89
|
|
| BLAKE2b-256 |
833cea19744f3a427b4817da3844d5c804fe6f650df173322d0a83bb04f7b911
|
File details
Details for the file biofkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: biofkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac14e7c7d8922c9cca4e62629700b35136bc1d23e18684ce837d432e2c63c09a
|
|
| MD5 |
9ef8313ba4b99527203d0d4baf01beb3
|
|
| BLAKE2b-256 |
8a1c2b4d5d0ec69b3739495319db93499f66b01581b6a6e3db7c8428f052f470
|