[Biojava-dev] ViewSequence
Warth,Rainer,LAUSANNE,NRC/BAS
rainer.warth at rdls.nestle.com
Tue Feb 24 02:40:15 EST 2004
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
More information about the biojava-dev
mailing list