<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>
<div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Hi Andreas,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Thanks for the reply! In fact, the example page you provided is exactly what I was attempting to do, but I moved away from it.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
This example is so very nearly complete, but it’s missing one line in the for loop which prints the 6 frame results — I want to end up with ProteinSequence objects, wrapped from the individual Sequence<AminoAcid> objects. I can take the naïve approach and
create ProteinSequence objects from the String form of the Sequence object, but that doesn’t scale well.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
In my code, I abandoned the .multipleFrameTranslation call and simply did this:</div>
<div><font face="Calibri,sans-serif">for (Frame frame : Frame.getAllFrames()) {</font></div>
<div><font face="Calibri,sans-serif"> ProteinSequence seq = dna.getRNASequence(frame).getProteinSequence(te);</font></div>
<div><font face="Calibri,sans-serif"> //etc</font></div>
<div><font face="Calibri,sans-serif">}</font></div>
<div><font face="Calibri,sans-serif"><br>
</font></div>
<div><font face="Calibri,sans-serif"> Ultimately, it’s not obvious what the is ‘right’ way to go from Sequence<C> to the proper wrapper class (i.e. Sequence<AminoAcidCompound> -> ProteinSequence)</font></div>
<div><font face="Calibri,sans-serif"> Thanks!</font></div>
<div><font face="Calibri,sans-serif">John</font></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span><<a href="mailto:andreas.prlic@gmail.com">andreas.prlic@gmail.com</a>> on behalf of Andreas Prlic<br>
<span style="font-weight:bold">Date: </span>Tuesday, August 11, 2015 at 12:58 AM<br>
<span style="font-weight:bold">To: </span>John Stalker<br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:biojava-l@mailman.open-bio.org">biojava-l@mailman.open-bio.org</a>"<br>
<span style="font-weight:bold">Subject: </span>Re: [Biojava-l] Constructing (wrapping) DNASequence from a SequenceView<NucleotideCompound><br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi John,
<div><br>
</div>
<div>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</div>
<div><br>
</div>
<div><a href="https://github.com/biojava/biojava-tutorial/blob/master/core/translating.md">https://github.com/biojava/biojava-tutorial/blob/master/core/translating.md</a><br>
</div>
<div><br>
</div>
<div>Does that help? If not, perhaps provide some more info, what you want to do?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Andreas</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Aug 7, 2015 at 6:29 AM, John Stalker <span dir="ltr">
<<a href="mailto:jstalker@coreinformatics.com" target="_blank">jstalker@coreinformatics.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>Hi there,</div>
<div> I’m working on some code multi-frame translation code and I think I’m missing a fundamental property here.</div>
<div><br>
</div>
<div> 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?</div>
<div><br>
</div>
<div> 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?</div>
<div> 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.</div>
<div><br>
</div>
<div> I’m might just be dense here, but any help would be appreciated! Thanks!</div>
<span class="HOEnZb"><font color="#888888">
<div>John</div>
<div>
<div></div>
</div>
</font></span></div>
</div>
</div>
<br>
_______________________________________________<br>
Biojava-l mailing list - <a href="mailto:Biojava-l@mailman.open-bio.org">Biojava-l@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biojava-l" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biojava-l</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>