jorvis / biocode

Bioinformatics code libraries and scripts
MIT License
504 stars 247 forks source link

Add --lineage, --include_sequence, and --output_dir to convert_gff3_to_gbk.py #20

Closed jonathancrabtree closed 10 years ago

jonathancrabtree commented 10 years ago

A few improvements to convert_gff3_to_gbk.py as needed for compatibility with the Ergatis genbank2bsml parser (i.e., the BioPerl GenBank flat file parser.)

jorvis commented 10 years ago

Thanks for adding all this Jonathan. Currently the biocodegff.get_gff3_features() function populates the Assembly objects with sequence data if present/embedded in the GFF3 file, but currently those won't be written out to the GBK. Instead, it will only work with the new --include_sequence option you added, which requires a separate FASTA file. I need to resolve this later.

jonathancrabtree commented 10 years ago

Hi Joshua. I don't quite follow you here. The --include_sequence option is supposed to include the sequence in the target GenBank file if it is present in the input GFF3 file (embedded in the ##FASTA section, not in a separate file.) I did not make any attempt to add support for reading or writing the sequences from a separate FASTA-formatted file. I suppose you could argue over whether the default behavior of the converter should be to include the sequence or not (assuming it's present in the input). I went with maintaining backwards compatibility but you could make the argument either way.

On Sat, Jun 21, 2014 at 2:13 PM, Joshua Orvis notifications@github.com wrote:

Thanks for adding all this Jonathan. Currently the biocodegff.get_gff3_features() function populates the Assembly objects with sequence data if present/embedded in the GFF3 file, but currently those won't be written out to the GBK. Instead, it will only work with the new --include_sequence option you added, which requires a separate FASTA file. I need to resolve this later.

— Reply to this email directly or view it on GitHub https://github.com/jorvis/biocode/pull/20#issuecomment-46760705.

jorvis commented 10 years ago

Thanks for the clarification. I tried to quickly skim the code diffs while on my phone in the car on a (still) cross-country road trip with the kids. I'll use that as my excuse.

Thanks again for contributing code back to the project!