[Biojava-dev] ViewSequence

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Thu Mar 4 23:04:41 EST 2004


If anyone wants to contribute pages, programs or corrections to biojava in 
anger then I would be more than pleased to put them on the site and give 
appropriate credit. Simple examples are fine, you don't need to make a 
killer app or anything. Unfortunately I am often too busy to keep these 
pages as up to date or as complete as I would like.

International fame awaits :)

- Mark






Matthew Berryman <mattjb at eleceng.adelaide.edu.au>
Sent by: biojava-dev-bounces at portal.open-bio.org
03/05/2004 11:44 AM

 
        To:     "Warth,Rainer,LAUSANNE,NRC/BAS" <rainer.warth at rdls.nestle.com>
        cc:     "'biojava-dev at biojava.org'" <biojava-dev at biojava.org>
        Subject:        Re: [Biojava-dev] ViewSequence


BioJava in Anger pages are out of date...
ViewSequence has moved to org.biojava.bio.seq.impl, and thus the import 
line
import org.biojava.bio.seq.impl.*;

should be added or equivalent changes made to reflect the shift. I can 
only guess that this then causes the problem with writeFasta, which 
should be able to take a PrintStream and a ViewSequence according to 
the 1.3 API, it works fine in 1.4...

Matthew Berryman
BSc (Maths & Comp. Sc.)
BE (Comp. Sys.) Honours I
PhD student @ Centre for Biomedical Engineering
The University of Adelaide


On 24/02/2004, at 18:10, Warth,Rainer,LAUSANNE,NRC/BAS wrote:

> Hi,
>                I wanted to try this program from the bioJAVA in ANGER 
page
> (http://www.biojava.org/docs/bj_in_anger/NameChange.htm
> ). I just pasted the text in the NameChange.java file which is part of 
> the
> seq package. My biojava classpath must be okay since I have other 
> classes in
> this package, which work fine (e.g. TestEmbl). However, I get the 
> message
> that ViewSequence(seq, "ABC123") is not a valid constructor. In 
> addition,
> the method writeFasta does not seem to have the right arguments ( line
> SeqIOTools.writeFasta(System.out, seq2).
> This is confirmed when I try to run it.
>
> java.lang.Error: Unresolved compilation problems:
>                The constructor ViewSequence(Sequence, String) is 
undefined
>                The method writeFasta(OutputStream, SequenceDB) in the 
type
> SeqIOTools is not applicable for the arguments (PrintStream, 
> ViewSequence)
>
>                at seq.NameChange.main(NameChange.java:28)
>
>
> Does anybody see, what is wrong ?
> biojava-1.3.1.jar and bytecode-0.92.jar are on my classpath.
>
>
> Best, Rainer
>
> --------
>
> package seq;
> import java.io.*;
> import org.biojava.bio.seq.*;
> import org.biojava.bio.seq.io.*;
> import org.biojava.bio.symbol.*;
>
>                public class NameChange {
>                  public static void main(String[] args) {
>                                try {
>                                  Sequence seq =
> 
> DNATools.createDNASequence("atgcgctaggctag","gi|12356|ABC123");
>
>                                  //create a veiw on the sequence and 
change its name
>                                  ViewSequence seq2 = new 
ViewSequence(seq, "ABC123");
>
>                                  //print to FASTA to prove the name has 
changed
>                                  SeqIOTools.writeFasta(System.out, 
seq2);
>                                }
>                                catch (IllegalSymbolException ex) {
>                                  //tried to make seq with non DNA symbol
>                                  ex.printStackTrace();
>                                }catch (IOException ex) {
>                                  //couldn't print seq2 to System out??
>                                  ex.printStackTrace();
>                                }
>                  }
>                }
>
> ---
> Dr. Rainer Warth
> Research Scientist Bioinformatics
>
> BioAnalytical Science Department
> Nestlé Research Center
> Vers-Chez-LES-BLANC            phone:  +41/21 785 8713
> 1000 LAUSANNE 26                               FAX:              +41/21 
785 9486
> SWITZERLAND                                            e-mail: 
rainer.warth at rdls.nestle.com
>
> Dr. Rainer Warth
> Research Scientist Bioinformatics
>
> BioAnalytical Science Department
> Nestlé Research Center
> Vers-Chez-LES-BLANC            phone:  +41/21 785 8713
> 1000 LAUSANNE 26                               FAX:              +41/21 
785 9486
> SWITZERLAND                                            e-mail: 
rainer.warth at rdls.nestle.com
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>


_______________________________________________
biojava-dev mailing list
biojava-dev at biojava.org
http://biojava.org/mailman/listinfo/biojava-dev






More information about the biojava-dev mailing list