[Biojava-l] removeGap problem with SimpleGappedSequence

daviddebeule at pandora.be daviddebeule at pandora.be
Thu Feb 12 04:04:27 EST 2004


Hi,

'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 gaps.

David

>----- Oorspronkelijk bericht -----
>Van
: mark.schreiber at group.novartis.com [mailto:mark.schreiber at group.novartis.com]
>Verzonden
: donderdag
, februari
 12, 2004 01:07 AM
>Aan
: 'david de beule'
>CC
: biojava-l at biojava.org
>Onderwerp
: 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 be 
>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 SimpleGappedSequence
>
>
>Hi,
>
>I have got another small problem with SimpleGappedSequence.
>
>This code:
>
>Sequence sequence = DNATools.createDNASequence("ACT--GGACCTAAGG", "test");
>SimpleGappedSequence s = new SimpleGappedSequence(sequence);
>s.removeGap(4);
>
>results in:
>
>org.biojava.bio.symbol.IllegalSymbolException: Attempted to remove a gap 
>at
>a non-gap index: 4 -> []
> at
>org.biojava.bio.symbol.SimpleGappedSymbolList.removeGap(SimpleGappedSymbolLi
>st.java:426)
>
>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 there
>to
>> "Biojava In Anger" for further useful cookbook style materials.
>>
>> > GCContent .java gives exception "usage: java GCContent filename.fa" 
>how
>> > to solve it
>> >
>> The above is not an exception but a Unix-style way of telling you that 
>the
>> command line format for invoking the code.
>>
>> In this case, it appears to be saying you need to provide it a file in
>FASTA
>> 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
>http://biojava.org/mailman/listinfo/biojava-l
>
>
>
>
>
>





More information about the Biojava-l mailing list