[Biojava-l] Creating an alignment object

Nathan S. Haigh n.haigh at sheffield.ac.uk
Thu May 11 14:52:27 UTC 2006


Nope, I don't need to generate an alignment, I already have an alignment in
a file created by third party software (clustalw). In fact, the app I'd
eventually like to have written in Java would include some sort of wrapper
for clustalw in order to construct the alignments from a set of unaligned
sequences, but algorithms implemented in Biojava would also be a welcome
addition to the app.

But first things first.
If I didn't have any sequences or an alignment in any files. What is the
easiest way to get an alignment object in Java to have a play around with?
Is there a way to just "magically" create a default alignment of say 5
sequences with 20 positions?

Nath



> -----Original Message-----
> From: Richard Holland [mailto:richard.holland at ebi.ac.uk]
> Sent: 11 May 2006 15:43
> To: n.haigh at sheffield.ac.uk
> Cc: biojava-l at lists.open-bio.org
> Subject: RE: [Biojava-l] Creating an alignment object
> 
> Andreas Prlic just pointed out to me that... "Andreas Draeger provided
> the org.biojava.bio.alignment classes, where one can do e.g. swith
> waterman and needleman wunsch...".
> 
> Having just had a look at this it's very powerful and you should be able
> to implement SequenceAlignment with your own algorithm to construct a
> FlexibleAlignment object, if that's what you're ultimately intending to
> do.
> 
> Basically you add sequences to/from a FlexibleAlignment, then insert
> gaps and deletions as necessary, all from the SequenceAlignment
> implementation which is passed as input a set of Sequence objects to
> align.
> 
> cheers,
> Richard
> 
> On Thu, 2006-05-11 at 15:26 +0100, Nathan S. Haigh wrote:
> > Sorry, I think I may have been unclear.
> >
> > For example I have an alignment file in FASTA format which looks like:
> >
> > >seq1
> > ACGTTGCA
> > >seq2
> > ATGTTGCG
> > >seq3
> > AGGTTGCT
> > >seq4
> > AGGTTGCC
> >
> >
> > How do I get this into an alignment object? Or, better still, can I
> create
> > an alignment object without specifying an alignment file, but somehow
> > creating the alignment by hand? Maybe create, a sequence object for each
> of
> > the above sequences and add them to an alignment object?
> >
> > Something like that! :o)
> >
> > Nath
> >
> > > -----Original Message-----
> > > From: Richard Holland [mailto:richard.holland at ebi.ac.uk]
> > > Sent: 11 May 2006 14:56
> > > To: n.haigh at sheffield.ac.uk
> > > Cc: biojava-l at lists.open-bio.org
> > > Subject: Re: [Biojava-l] Creating an alignment object
> > >
> > > BioJava itself cannot align sequences. It can only create objects that
> > > are representations of alignments generated by third-party software.
> > >
> > > However, there is a third-party addon to BioJava called Strap, which
> can
> > > actually do the alignment work itself from within your Java program
> and
> > > return a BioJava alignment object that represents the results. It is
> > > available for download, along with an example of how to use it, from
> > > here:
> > >
> > >
> http://www.charite.de/bioinf/strap/biojavaInAnger_SequenceAligner.html
> > >
> > > cheers,
> > > Richard
> > >
> > > On Thu, 2006-05-11 at 14:27 +0100, Nathan S. Haigh wrote:
> > > > I'm new to Java and Biojava, but I've been having a play with
> writing
> > > and
> > > > interface and some classes for an app I'd like to write in Java.
> > > >
> > > > The part I'm playing around with at the moment deals with alignments
> and
> > > > groups of alignment positions. What is the easiest/best way to
> create an
> > > > alignment that I can then play around with and generate Locations
> from?
> > > A
> > > > self contained working example would be great because as I said, I'm
> > > really
> > > > new to java!
> > > >
> > > > Cheers
> > > > Nath
> > > >
> > > > --------------------------------------------------------------------
> ----
> > > ----
> > > > ------
> > > > Dr. Nathan S. Haigh
> > > > Bioinformatics PostDoctoral Research Associate
> > > >
> > > > Room B2 211                                            Tel: +44
> (0)114
> > > 22
> > > > 20112
> > > > Department of Animal and Plant Sciences                Mob: +44
> (0)7742
> > > 533
> > > > 569
> > > > University of Sheffield                                Fax: +44
> (0)114
> > > 22
> > > > 20002
> > > > Western Bank                                           Web:
> > > > www.bioinf.shef.ac.uk
> > > > Sheffield
> > > > www.petraea.shef.ac.uk
> > > > S10 2TN
> > > > --------------------------------------------------------------------
> ----
> > > ----
> > > > ------
> > > >
> > > > ---
> > > > avast! Antivirus: Outbound message clean.
> > > > Virus Database (VPS): 0619-2, 11/05/2006
> > > > Tested on: 11/05/2006 14:27:16
> > > > avast! - copyright (c) 1988-2006 ALWIL Software.
> > > > http://www.avast.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> > > > http://lists.open-bio.org/mailman/listinfo/biojava-l
> > > >
> > > --
> > > Richard Holland (BioMart Team)
> > > EMBL-EBI
> > > Wellcome Trust Genome Campus
> > > Hinxton
> > > Cambridge CB10 1SD
> > > UNITED KINGDOM
> > > Tel: +44-(0)1223-494416
> >
> > ---
> > avast! Antivirus: Outbound message clean.
> > Virus Database (VPS): 0619-2, 11/05/2006
> > Tested on: 11/05/2006 15:26:57
> > avast! - copyright (c) 1988-2006 ALWIL Software.
> > http://www.avast.com
> >
> >
> >
> >
> >
> --
> Richard Holland (BioMart Team)
> EMBL-EBI
> Wellcome Trust Genome Campus
> Hinxton
> Cambridge CB10 1SD
> UNITED KINGDOM
> Tel: +44-(0)1223-494416

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0619-2, 11/05/2006
Tested on: 11/05/2006 15:52:15
avast! - copyright (c) 1988-2006 ALWIL Software.
http://www.avast.com








More information about the Biojava-l mailing list