[Biojava-l] SequenceFormat.writeSequence with circularlocation

Yasumasa Shigemoto yshigemo at genes.nig.ac.jp
Sun Mar 23 16:33:13 EST 2003


Hi,

I use a SequenceFormat.writeSequence(Sequence seq, java.io.PrintStream os)
and it seems to have a bug in some case.

The simple code reads entry of accession "J01566"
and write a file.

But circular location is changed as follows.

Original
     CDS             join(5140..6646,1..62)

Generated
     CDS             join(1..62,5140..6646)



public class FFWriteTest {
        public static void main(String[] args) throws Exception {
                SequenceFormat gFormat = new GenbankFormat();
                BufferedReader gReader = new BufferedReader(new FileReader("J015
66"));
                SequenceBuilderFactory sbFact = new GenbankProcessor.Factory(Sim
pleSequenceBuilder.FACTORY);
                Alphabet alpha = DNATools.getDNA();
                SymbolTokenization rParser = alpha.getTokenization("token");
                SequenceIterator seqI = new StreamReader(gReader, gFormat, rPars
er, sbFact);
                Sequence seq = seqI.nextSequence();
                PrintStream ps = new PrintStream(new FileOutputStream("J01566.ma
ke"));
                gFormat.writeSequence(seq, ps);
                ps.close();
        }
}

Regards,
Yasumasa Shigemoto



More information about the Biojava-l mailing list