<div dir="ltr">Hi Jonas,<div><br></div><div>In BioJava "string is king". You can easily get a String representation of a sequence object and do the manipulations there.</div><div><br></div><div><pre style="color:rgb(0,0,0);font-family:Menlo;font-size:12pt">DNASequence dnaSequence = <span style="color:rgb(0,0,128);font-weight:bold">new </span>DNASequence(<span style="color:rgb(0,128,0);font-weight:bold">"GATC"</span>);<br>String seq = dnaSequence.getSequenceAsString();<br></pre>Having said that, it would be nice to have a convenience method for get/setCompoundAt. I'll file it on Github.</div><div><br></div><div>Andreas</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 30, 2015 at 2:01 AM, LAW Andy <span dir="ltr"><<a href="mailto:andy.law@roslin.ed.ac.uk" target="_blank">andy.law@roslin.ed.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the philosophical view on this is that the mutated sequence is a *new* and *different* sequence.<br>
<span class="im HOEnZb"><br>
On 30 Mar 2015, at 09:30, Jose Manuel Duarte <<a href="mailto:jose.duarte@psi.ch">jose.duarte@psi.ch</a>> wrote:<br>
<br>
> Hi Jonas<br>
><br>
> I'm not very familiar with the sequence part of Biojava, but after looking around a bit it seems that indeed there's no available way to mutate sequences. It looks like people using Biojava before had "read-only" applications in mind. I agree a setCompoundAt(int position) would be needed, it should actually be part of the Sequence interface. It would be a nice addition for 4.1.<br>
><br>
> Anyway sorry I can't be of more help, perhaps someone else has some more background info on this.<br>
><br>
> Jose<br>
><br>
><br>
><br>
> On 28.03.2015 17:13, Jonas Dehairs wrote:<br>
>> I want to introduce a mutation to a DNA sequence at a particular location.<br>
>> I can't seem to find a suitable method for this in the 4.0 API. What would make most sense to me is a setCompoundAt (int position, c compound) method in the AbstractSequence class, similar to the getCompoundAt(int position) method, but this doesn't seem to exist. And the mutator class seems to be for proteins only. How can I do this?<br>
>><br>
>><br>
<br>
<br>
</span><span class="HOEnZb"><font color="#888888">--<br>
The University of Edinburgh is a charitable body, registered in<br>
Scotland, with registration number SC005336.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<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" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biojava-l</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>
</div></div>