SequenceAlignmentDocument.getReferencedDocuments() returns NULL
Hi Team,
I am developing a plugin using the Geneious Public API. I've used SequenceAlignmentDocument.getReferencedDocuments() method to get the referenced documents.
In my testing, there are 3 Nuleotide Sequence Documents, but the getReferencedDocuments() method returns only one valid document and NULL for other 2 documents.
Could you please assist me in getting the issue fixed?
Thanks,
Charles
-
Hi Charles,
If getReferencedDocuments() is returning NULL for some indexes it means that the alignment does reference any original document for that index. This might be due to a number of reasons. The two most common ones are:
- The user made a change to the alignment and discarded the reference to the original.
- Whatever created the alignment didn't reference any original documents in Geneious
This is still a valid alignment.
If you're creating these alignments yourself then if you tell me how you're creating them or share a code snippet I can provide some advice for including referenced documents if it's applicable.
If you're getting these from elsewhere then it is most likely a valid case that you need to deal with. What are you using the referenced documents for?
0 -
Hi Matthew,
Thanks for your response.
I use the Geneious' 'Map to Reference' functionality to generate the Sequence Alignment Contig. Basically, this is what I do:
- Users create sequences OR import Sequences from other systems through 'Search' options.
- Users align sequences using 'Map to Reference'.
- Once the sequence alignment contigs are generated, the plugin reads the Contigs. This is where I've used getReferencedDocuments() and this API returns NULL
Please let me know if you need more details on this.
Thanks,
Charles
0 -
Hi Charles,
If you're using the Geneious Mapper to do this then by default the aligned sequences should reference back to the original documents. However if you are mapping a large number of sequences we do not create these references so that may be what you're seeing.
How many sequences are you mapping and what do you are you need the reference documents for?
Cheers,
Matthew0 -
Hi Matthew,
I am aligning 96 Sequences against 53(reference) sequences. Could you please let me know if there is any limits set to reference sequences' usage?
Thanks,
Charles
0 -
Hi Matthew,
So to verify if the problem I face is related to large number of sequences, I aligned only 2 sequences and it worked fine. It worked i.e. references were NOT NULL up to 48 reference sequences. When I try with more that 48 reference sequences, the getReferencedDocuments() returns NULL.
It seems clear that the problem is with number of reference sequences used in an alignment.
Please confirm if there is any such limits?
Thanks for your help!
Regards,
Charles
0 -
Hi Charles,
I can confirm there is a limit. We do this for performance reasons. It depends on a number of factors including the number of sequences being mapped and the length of the reference sequence.
I can confirm if you should be hitting this limit if you tell me the length of:
- your reference sequence
- the longest sequence being mapped
- the shortest sequence being mapped
However your plugin should still be able to handle situations where the referenced documents are null. What do you need the referenced documents for? If you just need to know which documents were used as input, you can probably use DocumentHistory or Lineage to get it.
See OperationRecordDocument: https://assets.geneious.com/developer/geneious/javadoc/latest/com/biomatters/geneious/publicapi/documents/OperationRecordDocument.html or
DocumentHistory: https://assets.geneious.com/developer/geneious/javadoc/latest/com/biomatters/geneious/publicapi/documents/AnnotatedPluginDocument.html#getDocumentHistory--Cheers,
Matthew0
Please sign in to leave a comment.
Comments
6 comments