wilkelab / Opfi

A Python package for discovery, annotation, and analysis of gene clusters in genomics or metagenomics data sets.
https://opfi.readthedocs.io/
MIT License
21 stars 5 forks source link

Serialize operons #166

Closed jimrybarski closed 3 years ago

jimrybarski commented 3 years ago

This commit makes it possible to pipe together several sets of rules, by taking Operon objects and reserializing them in the gene_finder CSV format. The way my pipeline was structured before there was a lot of redundant parsing of operons that really was only being done because I wanted to have the output of operon_analyzer as a way of documenting the rules I had applied - but the pipeline itself documents this so it was completely unnecessary.

This doesn't always produce identical CSV text, since floats with trailing zeros and other degenerate things like that aren't perfectly maintained, but it's effectively identical.