Update recommended primers in Sequence View
Hi,
I'm trying to write a plugin that gets the recommended primers on a sequence and adjusts those recommendations based on certain criteria, then displays those updated recommendations. I'm attaching the view I'm talking about
Is there a way I can do this and the primers displayed are the adjusted ones?
Thanks
-
Official comment
Hi,
yes, that should be possible. You can get all the primers from a SequenceDocument by calling
SequenceUtilities.getAnnotationsOfType(
document,
SequenceAnnotation.TYPE_PRIMER_BIND,
returnAnnotationsInTracks
)You can then check the criteria of each individual annotation via their qualifier value and set the recommendation as a qualifier, e.g. to check the Tm, call:
String tm = annotation.getQualifierValue("Tm");
if (updateRecommendation(tm)) {
annotation.setQualifier("Recommendation", "You can safely use this primer")
}In order to save the annotation on the document, you will have to save the annotations back onto the document, which is possible if the sequence document is an instance of EditableSequenceDocument or SequenceDocumentWithEditableAnnotations (most of the default document types in Geneious are, but best to check with an instanceOf call).
Hope that helps!
Please sign in to leave a comment.
Comments
1 comment