Skip to main content

Consensus sequence in Alignment document.

Comments

5 comments

  • Geneious Team

    Hi Adrian,

    The consensus displayed at the top of the alignment is a dynamic consensus so you are unable to assign it to have a fixed sequence. I recommend you instead try one of the following options

    1) It feels wrong to me to be generating an alignment containing a mixture of original and optimized sequences. How about generating an alignment of only optimized sequences, but add annotations to each optimized nucleotide to indicate that it has changed. Use for example annotations of type SequenceAnnotation.TYPE_EDITING_HISTORY_REPLACEMENT.

    2) If you really want a mixture of optimized and unoptimized sequences in the alignment, you could add the "Unoptimized Consensus" as yet another sequence in your alignment and tell the user to turn off the automatically generated consensus.

    3) You could call SequenceDocument.setFiedValue(DocumentField.NUMBER_OF_MAPPED_LOCATIONS,2) on sequences that you don't want to contribute to the automatically generated consensus. The consensus options will then have a setting called 'Ignore reads mapped to multiple locations' which you can turn on.

    Best regards,
    Matt.

    0
  • Adrian

    Hi Matt,

     

     

    Thank you for your answer. I'll reply to the point directly for clarity.

    1. I did put the annotations as you could see in the picture (optimized_codon and TYPE_EDITING_HISTORY_REPLACEMENT is also a good choice) but the user wants to also see the original sequence. In addition to that, I need to add some calculated oligos underneath so clearly I need to scope what goes in the consensus.

     

    2. I did this but it would be so much better to be able to hook in my calculation method to be called in a dynamic way. Is there any way to do that?

     

    3.  I tried this and it seems to work but it also seems to be sensitive to the place I call it. Would it be possible to set 'Ignore reads mapped to multiple locations' programatically? One less thing to document and ask of the biologists in this sequence.

     

     

    Best regards,

    Adrian

    0
  • Geneious Team

    Hi Adrian,

    2. Sorry, but I can't think of a way to have the two dynamically generated consensus sequences in one alignment.

    3. This should do it:
    Preferences.userRoot().node("com/biomatters/geneious/publicapi/plugin/Options/com/biomatters/geneious/common/consensusSequence/ConsensusOptions").putBoolean("ignoreReadsMappedToMultipleLocations",true);

    Best regards,
    Matt.

    0
  • Adrian

    Hi Matt,

     

     

    Thank you for the info in setting the preferences. It worked and it might be good for some other settings.

     

    For the dynamic Consensus sequencem I am not looking to have 2 in the same time but rather to override the default one with an custom calculation that returns a sequence.

     

    Cheers,

    Adrian

    0
  • Geneious Team

    Hi Adrian,

     

    Sorry, but unfortunately you can't override the dynamic consensus calculation.

     

    Best regards,

    Matt.

    0

Please sign in to leave a comment.