genomediff-python
genomediff-python parses files in the GenomeDiff format generated by the breseq variant caller for haploid microbial organisms.
Installation
python setup.py install
Only Python 3.x is tested.
Usage
GenomeDiff files are read using GenomeDiff.read(file). The GenomeDiff object contains a metadata dict with the metadata, as well as mutations, evidence and validation lists—each containing records of that type. Records can be accessed through this list or by id. GenomeDiff is iterable and iterating will return all records of all types.
>>> from genomediff import *
>>> document = GenomeDiff.read(open('MyDiff.gd', 'r', encoding='utf-8'))
>>> document.metadata
{'GENOME_DIFF': '1.0', 'AUTHOR': ''}
>>> document.mutations[0]
Record('SNP', 1, [191], new_seq='A', seq_id='NC_000913', snp_type='intergenic', position=12346)
>>> document.mutations[0].parent_ids
[191]
>>> document[191]
Record('RA', 191, None, tot_cov='46/42', new_base='A', insert_position=0, ref_base='G', seq_id='NC_000913', quality=252.9, position=12345)
>>> document.mutations[0].parents
[Record('RA', 191, None, tot_cov='46/42', new_base='A', insert_position=0, ref_base='G', seq_id='NC_000913', quality=252.9, position=12345)]
>>> document.write(open('NewDiff.gd', 'w', encoding='utf-8'))
Metadata
Release files for genomediff 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| genomediff-0.4.1.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| genomediff-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / genomediff-0.4.1.tar.gz
| Download URL | genomediff-0.4.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61027cf473797944cafefef810877056af7fee1c242d887d025591d3ecc97df6
|
|
BLAKE2b-256 checksum How to use checksums |
d40d93f420a1a503f55f8133b0c681e75311c832ea49ba2c37ad6a50512c80a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / genomediff-0.4.1-py3-none-any.whl
| Download URL | genomediff-0.4.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9c43661e558dca08a1332c8d8334e5ca68783206ff9b802bc6b7ff9bf4125bf
|
|
BLAKE2b-256 checksum How to use checksums |
870879dd25becefe1de41e93c7f53bc6e3594692a5cc0507db8511c9c521f5ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|