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

Ben Stöver benstoever at uni-muenster.de
Mon Mar 30 14:36:18 UTC 2015


Hi Jonas,

I have been proposing to inherit a subinterface "EditableSequence" (with
according implementations) from the existing Sequence interface on this list
last November. Some people liked this idea, some did not, mainly because there
seemed to be concerns that existing code (using BioJava) relies on the
assumption of atomic sequences and allowing their modification might break
some of this code (at least this was my interpretation of the concerns). (You
can have a look at these mails in some archive or I can forward them to you,
if you want to have a closer look at that discussion.)

To my knowledge it is indeed difficult to modify sequences in the current
architecture. The only way I'm aware of, is creating a new SequenceView on
your sequence which provides a modified view on the underlying sequence
modeling you mutation. I think there are even some implementations out there
based on this interface
https://github.com/biojava/biojava/blob/master/biojava-core/src/main/java/org/biojava/nbio/core/sequence/edits/Edit.java
but I never tried them. In my opinion, it is mainly a question of performance,
if this approach makes sense for you. (If you e.g. perform many mutations you
would not want to create a copy of your whole sequence for each operation and
have a chain of 1000 sequence views in the end.)

Of course you are always free to create or modify an existing implementation
of "Sequence" that offer additional methods for modification, but keep in mind
that this would break the assumption of "atomic sequence objects", which seems
to be intended in the current BioJava sequence model.

Anyway, if anyone knows about any other ways to do that in BioJava or could
think about a good way of integrating this functionality in the existing
architecture (without building up an alternative sequence framework), I would
be very interested to know.

Best
Ben

Dipl. Biologe Ben Stöver
Evolution und Biodiversity of Plants Group
Institute for Evolution and Biodiversity
University of Münster
Germany
http://www2.ieb.uni-muenster.de/EvolBiodivPlants/en/People/Stoever
BenStoever at uni-muenster.de



LAW Andy schrieb am 2015-03-30:
> 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



More information about the Biojava-l mailing list