[Biojava-l] Constructing (wrapping) DNASequence from a SequenceView<NucleotideCompound>

Andreas Prlic andreas at sdsc.edu
Tue Aug 11 04:58:46 UTC 2015


Hi John,

It would help if you would explain a bit more detailed, what you are tyring
to do. Have you seen the new BioJava tutorial on github? For example there
is a page that explains how to translate various sequence types

https://github.com/biojava/biojava-tutorial/blob/master/core/translating.md

Does that help? If not, perhaps provide some more info, what you want to do?

Thanks,

Andreas





On Fri, Aug 7, 2015 at 6:29 AM, John Stalker <jstalker at coreinformatics.com>
wrote:

> Hi there,
>   I’m working on some code multi-frame translation code and I think I’m
> missing a fundamental property here.
>
>   I want to be using DNASequence, RNASequence, and ProteinSequence
> classes, but operations I’m using end up returning Sequence<C> or
> SequenceView<C>.  What is the conversion / wrapper path from the latter to
> the former?
>
>   So for example, if I get a subSequence from DNASequence, I have a
> SequenceView<NucleotideCompound>.  How do I wrap that in a new
> DNASequence?  Similarly, when I have instances of
> Sequence<AminoAcidCompound> (the result of
> TranscriptionEngine.multipleFrameTranslation), how do I wrap that with
> ProteinSequence?
>   Looking a the constructors for the main *Sequence classes, there’s
> nothing (save String) that stands out.  The implementations of
> SequenceReader (for DNASequence) and ProxySequenceReader (for RNASequence
> and ProteinSequence…why are these not all the same interface is another
> question) don’t stand out as being appropriate.
>
>   I’m might just be dense here, but any help would be appreciated!  Thanks!
> John
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biojava-l
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biojava-l/attachments/20150810/f0dee355/attachment.html>


More information about the Biojava-l mailing list