[Biojava-l] Introducing a mutation in a DNA sequence

Andreas Prlic andreas at sdsc.edu
Mon Mar 30 14:42:09 UTC 2015


Hi Jonas,

In BioJava "string is king". You can easily get a String representation of
a sequence object and do the manipulations there.

DNASequence dnaSequence = new DNASequence("GATC");
String seq = dnaSequence.getSequenceAsString();

Having said that, it would be nice to have a convenience method for
get/setCompoundAt. I'll file it on Github.

Andreas


On Mon, Mar 30, 2015 at 2:01 AM, LAW Andy <andy.law at roslin.ed.ac.uk> wrote:

> I think the philosophical view on this is that the mutated sequence is a
> *new* and *different* sequence.
>
> On 30 Mar 2015, at 09:30, Jose Manuel Duarte <jose.duarte at psi.ch> wrote:
>
> > Hi Jonas
> >
> > 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.
> >
> > Anyway sorry I can't be of more help, perhaps someone else has some more
> background info on this.
> >
> > Jose
> >
> >
> >
> > On 28.03.2015 17:13, Jonas Dehairs wrote:
> >> I want to introduce a mutation to a DNA sequence at a particular
> location.
> >> 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?
> >>
> >>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
> _______________________________________________
> 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/20150330/ed97e235/attachment.html>


More information about the Biojava-l mailing list