Export only selected annotations to file
Hi,
I am developing a plugin that builds a new `DefaultNucleotideSequence` document with custom annotations and adds the document to the database. I would like to provide users with the capability to export selected annotations to a TSV file. Currently, they can export all annotations in the document via the "Annotations" tab. Is there a way to modify that behavior to export selected annotations only?
Thanks,
Pam
-
Official comment
Hi Pam,
Unfortunately you've hit a limitation with our dev kit. Any selections within a document are not currently supported by Document Exporters. :(
One possible workaround, would be to create a Document Operation and manually export all selected annotations from within the operation. Eg something like this:
@Override
public void performOperation(AnnotatedPluginDocument[] annotatedDocuments, ProgressListener progressListener, Options options, SequenceSelection sequenceSelection, OperationCallback callback) throws DocumentOperationException {
List<SequenceSelection.SelectedAnnotation> selectedAnnotations = sequenceSelection.getAnnotations();
// ...
// Create a new file and write the selected annotations into it.
// ...
}Cheers,
Tom
Please sign in to leave a comment.
Comments
1 comment