GBcrawler
GBcrawler is a complete GenBank parser in Python 3 meant to be used by other applications.
Generates a Python object of GBcrawler class that stores all relevant information within a GenBank file.
Table of Contents
Features
This script was made using the information from:
Installation
Python 3 is requiered.
Copy GBcrawler.py to the folder of your project and import it as explained in Usage
Usage
To get the GenBank data, create an object with the GenBank filename as a parameter:
import GBcrawler from GB crawler
GBobject = GBcrawler("tth1.gb")
The following data can be adquired using: attributes or methods
Attribute references:
sequenceIDreturns sequence identificationsequenceLengthreturns length of sequencestrandreturns the strand typemoleculeTypereturns molecule typedivisionreturns divison codemodDatereturns datedefinitionreturns definitionaccessionreturns accesionversionreturns versionreferenceListreturns a list, each element is a referencecommentreturns all the comments as a stringfeatureListreturns a list of GBfeatues objectsequenceListreturns the sequence as a list, (see methods to get the sequence as a string)baseCountreturns dictionary with nucleotide counts
Methods:
getSequence()returns sequence as a string
The featureList is composed of GBfeature objects and data can be adquired using the following attribute references:
beginreturns sequence identificationendreturns length of sequencetypereturns the type of the feauture (gene, CDS, ...)qualifierDictreturns a Dictionary with keys and values for each qualifier
Discrepancies
The last Flat File release 220.0 has a set of features that is different from the feature table in INSDC. The release indicates "Any discrepancy between the abbreviated feature table description of these release notes and the complete documentation on the Web should be resolved in favor of the version at the above URL."
At the moment, both sets of features will be used to parse the GenBank files, until a large batch of GenBank files can be tested and check how many files uses the "non-standard" features
Future features
- export to FASTA
- check features for mandatory qualifiers
- faster performance
- tag features by its locus_tag
- use additional info for the features (beyond, between bases, etc)
- create a Reference class to better reference data management
- improve ACCESION to return a list
- improve SOURCE parsing
Metadata
Release files for gbcrawler 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gbcrawler-0.3.0.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gbcrawler-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / gbcrawler-0.3.0.tar.gz
| Download URL | gbcrawler-0.3.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2f06b4451b25ad891aeaf40e91777603140f289771a6306b1e6b61f37ad2805
|
|
BLAKE2b-256 checksum How to use checksums |
51b128e36961e435bf5e5652c1305b7c118834dc270970eced5a83ad62d9f1d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0
|
Release files / gbcrawler-0.3.0-py3-none-any.whl
| Download URL | gbcrawler-0.3.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14d07a4949ed1c78a6938ce2d4cc6aa593b939411c96955510543485686eaf6b
|
|
BLAKE2b-256 checksum How to use checksums |
c8b8a7621192ecf7034a98e610eeb8d0bce6f85bc453bf1bc7e4dfebefc66fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0
|