[Biojava-l] removeGap problem with SimpleGappedSequence

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Thu Feb 12 04:20:49 EST 2004

Sounds like a pretty sensible suggestion. Can anyone think of why this 
might not be a 'good idea'?

If not, i'll add it to the list of things to fix :)

- Mark

daviddebeule at pandora.be
Sent by: biojava-l-bounces at portal.open-bio.org
02/12/2004 05:04 PM

        To:     biojava-l at biojava.org
        Subject:        Re:  [Biojava-l] removeGap problem with SimpleGappedSequence


'createGappedDNASequence' would solve the problem in this example but in 
fact it was just an example, in the real application the sequences are not 
always created with DNATools and a lot of time we create a 
SimpleGappedSequence from a Sequence.
I was wondering if it would be possible to let 
SimpleGappedSequence(sequence) create a view that immediately contains the 
gaps available in the original sequence.  With that view it would be 
possible to remove the gaps in the original sequence and add/remove new 


>----- Oorspronkelijk bericht -----
: mark.schreiber at group.novartis.com 
[mailto:mark.schreiber at group.novartis.com]
: donderdag
, februari
 12, 2004 01:07 AM
: 'david de beule'
: biojava-l at biojava.org
: Re: [Biojava-l] removeGap problem with SimpleGappedSequence
>Hi -
>The problem seems to be that
>   DNATools.createDNASequence("ACT--GGACCTAAGG", "test");
>Creates a SimpleSequence and not a gapped sequence. Then when you call 
>  SimpleGappedSequence s = new SimpleGappedSequence(sequence);
>You get back a view onto sequence. The view can only remove gaps that are 

>introduced in that view. I guess that DNATools.createDNASequence and 
>createDNA methods may need modification. There is a method in DNATools 
>called createGappedDNASequence which will do what you want but it would 
>nice if the other two could call it as appropriate.
>Probably need to add a createGappedDNA as well.
>If no one gets to this in the next few days I'll have a hack at it.
>- Mark
>Mark Schreiber
>Principal Scientist (Bioinformatics)
>Novartis Institute for Tropical Diseases (NITD)
>1 Science Park Road
>#04-14 The Capricorn
>Singapore 117528
>phone +65 6722 2973
>fax  +65 6722 2910
>"david de beule" <daviddebeule at pandora.be>
>Sent by: biojava-l-bounces at portal.open-bio.org
>02/12/2004 03:57 AM
>        To:     <biojava-l at biojava.org>
>        cc: 
>        Subject:        [Biojava-l] removeGap problem with 
>I have got another small problem with SimpleGappedSequence.
>This code:
>Sequence sequence = DNATools.createDNASequence("ACT--GGACCTAAGG", 
>SimpleGappedSequence s = new SimpleGappedSequence(sequence);
>results in:
>org.biojava.bio.symbol.IllegalSymbolException: Attempted to remove a gap 
>a non-gap index: 4 -> []
> at
>Is this intented or a bug ?
>Thanks in advance,
>David De Beule
>----- Original Message -----
>From: "David Huen" <david.huen at ntlworld.com>
>To: <biojava-l at biojava.org>
>Sent: Tuesday, January 06, 2004 2:56 PM
>Subject: Re: [Biojava-l] biojava doubts and problems
>> On Tuesday 06 Jan 2004 11:33 am, nandakumar sridharan wrote:
>> > any reference books available for the biojava docs and tutorials.
>> Please look at www.biojava.org for some material.  Follow the link 
>> "Biojava In Anger" for further useful cookbook style materials.
>> > GCContent .java gives exception "usage: java GCContent filename.fa" 
>> > to solve it
>> >
>> The above is not an exception but a Unix-style way of telling you that 
>> command line format for invoking the code.
>> In this case, it appears to be saying you need to provide it a file in
>> format:-
>> java GCContent <name of some file in FASTA format goes here!>
>> Regards,
>> David Huen
>> _______________________________________________
>> Biojava-l mailing list  -  Biojava-l at biojava.org
>> http://biojava.org/mailman/listinfo/biojava-l
>Biojava-l mailing list  -  Biojava-l at biojava.org

Biojava-l mailing list  -  Biojava-l at biojava.org

More information about the Biojava-l mailing list