TeselaGen / openVectorEditor

DEPRECATED - Teselagen's Open Source Vector/Plasmid Editor Component
https://teselagen.github.io/tg-oss/ove/#/Editor
MIT License
199 stars 72 forks source link

Export or copy feature as a GenBank #450

Closed tiffanydai closed 5 years ago

tiffanydai commented 5 years ago

In the context menu of a feature, allow the user either to export the feature as a GenBank file, or to copy the feature to clipboard in the GenBank format (JBEI said either option would be fine)

For example, if we wanted to export/copy the CDS from this sequence...

LOCUS pj5_00001 420 bp DNA circular 04-MAR-2019 COMMENT teselagen_unique_id: 5adf735aa1811801e17d8aac FEATURES Location/Qualifiers misc_feature 5..10 /label="misc1" CDS 61..120 /label="signal_peptide" misc_feature 165..275 /label="misc2" misc_feature 290..309 /label="misc3" ORIGIN
1 gacgtcttat gacaacttga cggctacatc attcactttt tcttcacaac cggcacggaa 61 ctcgctcggg ctggccccgg tgcatttttt aaatacccgc gagaaataga gttgatcgtc 121 aaaaccaaca ttgcgaccga cggtggcgat aggcatccgg gtggtgctca aaagcagctt 181 cgcctggctg atacgttggt cctcgcgcca gcttaagacg ctaatcccta actgctggcg 241 gaaaagatgt gacagacgcg acggcgacaa gcaaacatgc tgtgcgacgc tggcgatatc 301 aaaattgctg tctgccaggt gatcgctgat gtactgacaa gcctcgcgta cccgattatc 361 catcggtgga tggagcgact cgttaatcgc ttccatgcgc cgcagtaaca attgctcaag //

It would look like...

LOCUS signal_peptide 60 bp DNA linear 04-MAR-2019 FEATURES Location/Qualifiers CDS 1..60 /label="signal_peptide" ORIGIN
1 ctcgctcggg ctggccccgg tgcatttttt aaatacccgc gagaaataga gttgatcgtc //

@tnrich

tnrich commented 5 years ago

I've added this first pass: image

Right now it is just copying the selected bps and their underlying features.

@hplahar can you cc your colleague who wanted this feature.

He can try it out here: http://teselagen.github.io/openVectorEditor/#/Editor

tnrich commented 5 years ago

@tiffanydai if you'd give me your 2 cents I'd appreciate that too!

tiffanydai commented 5 years ago
Screen Shot 2019-03-11 at 10 40 08 AM

Screen Shot 2019-03-11 at 10 49 57 AM

@tnrich hmm i don't really have a strong opinion on whether or not the copied genbank should include partial features (@hplahar, what do you think?). i think any copied segment should be 'linear' instead of 'circular' though. and i feel like the name shouldn't remain the name of the whole plasmid...if we were just including one feature, i'd suggest that it should be the name of the feature, but if we're including all annotations in the highlighted range, maybe we should at least note that it's only a part of the plasmid? like 'pj5_00001_partial'?

tnrich commented 5 years ago

@tiffanydai I think the copied genbank should follow the user's copy option preferences for partial features/parts. I agree with your other suggestions:

tnrich commented 5 years ago

Okay I implemented all these!