Creating custom tables
I would like to add a (different) SNP table view to annotation menu (Sequence Names X positions). And just like the annoation table it should be able to respond to the sequence view when I click on a annotation. In which way can I add such a table?
-
You should use the ExampleDocumentViewerPlugin from the dev kit as a starting point. From there you can return a JTable as the viewer component and use DocumentViewer.getIncomingMessageHandler and getOutgoingMessageHandler to synchronize selection with the other viewers.
0 -
DU eto the DocumentViewerFactory I was forced to use createViewer(AnnotatedPluginDocument[] arg0). But I defined valid documents as SequenceAlignmetnDocuments. How can I convert AnnotatedPluginDocument to SequenceAlignmentDocuments again?
0 -
SequenceAlignmentDocument alignment = (SequenceAlignmentDocument) annotatedDocuments[0].getDocumentOrCrash();
0 -
As far as I notices it is not the tracks (with SNPs) I wanted to have. But I want all bases which are different from the consensus, i.e. the colored bases.
Furthermore I do not understand where to put the message handlers.
I've got:
public DocumentViewer createViewer(AnnotatedPluginDocument[] annotatedDocuments) {
MyTable myViewer = new MyTable(...);
// myViewer.getIncomingMessageHandler does not contain any information. Because it is only called once
}
0 -
The highlighted bases are calculated by the alignment view and not accessible via the API unfortunately, your viewer will have to determine where the mismatches are independently.
Please refer to the Javadoc for DocumentViewerMessageHandler. Your DocumentViewer must override the getIncomingMessageHandler method and return a message handler to receive events.
0
Please sign in to leave a comment.
Comments
5 comments