|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.upenn.crimson.io.Queries
public class Queries
Functions related to QUERIES table.
Field Summary | |
---|---|
(package private) static boolean |
DEBUG_OUTPUT
If true, then whenever a (bp or codon) position selection query is run, the list of positions selected will be output to the file 'positions.list'. |
(package private) static int |
SPECIES_CHUNK
When writing data to a NEXUS file ('run()'), this is the number of species queried per SQL statement. |
Constructor Summary | |
---|---|
Queries()
|
Method Summary | |
---|---|
static boolean |
dbContains(java.lang.String id)
This will return true if a query exists in QUERIES with an id equal to 'id'. |
static java.util.ArrayList |
dbList()
This will return an ArrayList with id's for all queries in the QUERIES table. |
static boolean |
delete(java.lang.String id)
Removes a query from the database. |
static java.util.TreeSet |
expandPositions(java.util.HashSet positionSet,
boolean isCodons)
This will convert a set of bp ranges to bp positions. |
private static java.util.TreeSet |
getRandomPositions(int partitionLength,
int numSamples,
boolean isCodons)
|
static void |
load(java.lang.String id)
This will load the specified query from the QUERIES table in the current database. |
static void |
publish(Query query)
This will publish the specified query in the QUERIES table in the current database. |
static void |
publish(Query query,
java.lang.String id,
boolean overwrite)
This will publish the specified query in the QUERIES table in the current database. |
static Tree |
run(java.lang.String queryID,
java.lang.String filename,
boolean incSequence,
boolean incCrimson,
int incTree,
boolean incNotes)
This will perform a tree query, generating a NEXUS file. |
static void |
run(java.lang.String queryID,
java.lang.String filename,
boolean incSequence,
int numRuns)
This will repeatedly run a query, generating a NEXUS file for each run. |
static Tree |
runPhylip(java.lang.String queryID,
java.lang.String filename,
int incTree)
This will perform a tree query, generating a phylip formatted file. |
java.lang.String |
toString()
Returns the non-Clob columns in the QUERIES table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final boolean DEBUG_OUTPUT
static final int SPECIES_CHUNK
Constructor Detail |
---|
public Queries()
Method Detail |
---|
public static void load(java.lang.String id)
public static void publish(Query query)
public static void publish(Query query, java.lang.String id, boolean overwrite)
public static java.util.ArrayList dbList()
public static boolean dbContains(java.lang.String id)
public static boolean delete(java.lang.String id)
public static void run(java.lang.String queryID, java.lang.String filename, boolean incSequence, int numRuns)
queryID
- string ID for query to be runfilename
- filename for NEXUS outputincSequence
- when true, inner sequence IDs will be
included in the NEXUS filenumRuns
- number of runspublic static Tree run(java.lang.String queryID, java.lang.String filename, boolean incSequence, boolean incCrimson, int incTree, boolean incNotes)
queryID
- string ID for query to be runfilename
- filename for NEXUS outputincSequence
- when true, inner sequence IDs will be
included in the NEXUS fileincCrimson
- when true, the CRIMSON block will be included
in the NEXUS fileincTree
- There are multiple options dictated by incTree: 0 = no
tree will be output; 1 = tree is included in NEXUS file; 2 =
tree ouptut to second NEXUS file ("*.tree"); 3 = rooted tree
ouptut to a newick file ("*.newick"); 4 = unrooted tree ouptut
to a newick file ("*.newick")incNotes
- When true, the Query.notes will be appended
to the end of the NEXUS file. The notes can, for example,
contain a PAUP block. It is assumed that the notes are properly
formatted for the NEXUS file.
public static Tree runPhylip(java.lang.String queryID, java.lang.String filename, int incTree)
queryID
- string ID for query to be runfilename
- filename for NEXUS outputincTree
- There are multiple options dictated by incTree: 0 = no
tree will be output; 1 = no tree will be output; 2 =
tree ouptut to second NEXUS file ("*.tree"); 3 = rooted tree
ouptut to a newick file ("*.newick"); 4 = unrooted tree ouptut
to a newick file ("*.newick")
private static java.util.TreeSet getRandomPositions(int partitionLength, int numSamples, boolean isCodons)
public static java.util.TreeSet expandPositions(java.util.HashSet positionSet, boolean isCodons)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |