[Biojava-dev] ViewSequence
mark.schreiber at group.novartis.com
mark.schreiber at group.novartis.com
Thu Mar 4 22:57:14 EST 2004
Hi Warth,
This page needs updateing. As of BioJava 1.3.1 ViewSequence was moved to
org.biojava.bio.seq.impl.
Actually the recommended way to create a ViewSequence as of BJ1.3.1 and
later is to use SequenceTools.view(sequence, newName);
My Bad :(
- Mark
"Warth,Rainer,LAUSANNE,NRC/BAS" <rainer.warth at rdls.nestle.com>
Sent by: biojava-dev-bounces at portal.open-bio.org
02/24/2004 03:40 PM
To: "'biojava-dev at biojava.org'" <biojava-dev at biojava.org>
cc:
Subject: [Biojava-dev] ViewSequence
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
More information about the biojava-dev
mailing list