Metadata-Version: 2.1
Name: biofkit
Version: 0.1.0
Summary: With biofkit you can deal with pdb file (extract sequence, atom information and so on) very easily. 
Author-email: Zhang Yujian <Chouuken@outlook.com>, Wu Yuexin <wuyvexiaoxin@163.com>
Project-URL: Homepage, https://github.com/Chou-Uken/biofkit
Project-URL: Issues, https://github.com/Chou-Uken/biofkit/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# 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
```console
conda install -c chou_uken biofkit
```
### Mamba
``` 
mamba install -c chou_uken biofkit
```

### Pip
```console
pip install biofkit
```

## How to Use
### ProteinKit
```python
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
```python
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.
