/usr/share/doc/libbiojava-java-demos/examples/biosql/SeqGFF.java is in libbiojava-java-demos 1:1.7.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | package biosql;
import java.io.*;
import org.biojava.bio.seq.*;
import org.biojava.bio.symbol.*;
import org.biojava.bio.program.gff.*;
import org.biojava.bio.seq.db.*;
import org.biojava.bio.seq.db.biosql.*;
public class SeqGFF {
public static void main(String[] args)
throws Exception
{
String dbURL = "jdbc:mysql://fred.biohack.egenetics.com/test_biosql";
String dbUser = "";
String dbPass = "";
String bioName = "embl_rod";
SequenceDB seqDB = new BioSQLSequenceDB(dbURL, dbUser, dbPass, bioName, false);
Sequence seq = seqDB.getSequence(args[0]);
SequencesAsGFF seqgff = new SequencesAsGFF();
if (args.length == 1) {
seqgff.setFeatureFilter(FeatureFilter.all);
} else {
seqgff.setFeatureFilter(new FeatureFilter.OverlapsLocation(new RangeLocation(Integer.parseInt(args[1]),
Integer.parseInt(args[2]))));
}
seqgff.setRecurse(false);
PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
GFFWriter gffw = new GFFWriter(pw);
seqgff.processSequence(seq, gffw);
pw.flush();
}
}
|