<div dir="ltr">Hi Jonas,<div><br></div><div>In BioJava &quot;string is king&quot;. 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">&quot;GATC&quot;</span>);<br>String seq = dnaSequence.getSequenceAsString();<br></pre>Having said that, it would be nice to have a convenience method for get/setCompoundAt. I&#39;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">&lt;<a href="mailto:andy.law@roslin.ed.ac.uk" target="_blank">andy.law@roslin.ed.ac.uk</a>&gt;</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 &lt;<a href="mailto:jose.duarte@psi.ch">jose.duarte@psi.ch</a>&gt; wrote:<br>
<br>
&gt; Hi Jonas<br>
&gt;<br>
&gt; I&#39;m not very familiar with the sequence part of Biojava, but after looking around a bit it seems that indeed there&#39;s no available way to mutate sequences. It looks like people using Biojava before had &quot;read-only&quot; 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>
&gt;<br>
&gt; Anyway sorry I can&#39;t be of more help, perhaps someone else has some more background info on this.<br>
&gt;<br>
&gt; Jose<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 28.03.2015 17:13, Jonas Dehairs wrote:<br>
&gt;&gt; I want to introduce a mutation to a DNA sequence at a particular location.<br>
&gt;&gt; I can&#39;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&#39;t seem to exist. And the mutator class seems to be for proteins only. How can I do this?<br>
&gt;&gt;<br>
&gt;&gt;<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>