Hi
I am using a software(metaQTL) written by pure java.It can be run by the command as follows: "#java org.metaqtl.main.MetaDB -e data/experiments.csv -m data/genetic-map -q data/qtl-map -t data/trait_ontology.csv -d data/marker_dictionary.csv -o xml".So how to write it by php.
part of the code:
public void printHelp()
{
System.out.println("MetaDB, 1.0");
System.out.println("Copyright (C) 2005 Jean-Baptiste Veyrieras (INRA)");
System.out.println("MetaDB comes with ABSOLUTELY NO WARRANTY. ");
System.out.println("This is free software, and you are welcome ");
System.out.println("to redistribute it under certain conditions.");
System.out.println();
System.out.println(syntax);
System.out.println();
MetaMain.generalHelp();
System.out.println();
System.out.println("-e, --exp : the location of the experiment table");
System.out.println("-m, --mapdb : the location of the directory of the map files");
System.out.println("-q, --qtldb : the location of the directory of the qtl files (optional)");
System.out.println("-o, --outdir : the location of the output directory");
System.out.println("-t, --tonto : the location of the trait ontology");
System.out.println("-d, --mrkdico : the location of marker dictionary");
System.out.println("--mrkup : file for updating some marker names.");
System.out.println("--mrkrm : file for removing some markers.");
System.out.println("--chrm : file for removing some chromosomes.");
}
public static void main(String args[])
{
MetaDB program = new MetaDB();
program.initCmdLineParser();
CmdLineParser parser = program.parser;
CmdLineParser.Option ainFile = parser.addStringOption('e', "exp");
CmdLineParser.Option amapDir = parser.addStringOption('m', "mapdb");
CmdLineParser.Option aqtlDir = parser.addStringOption('q', "qtldb");
CmdLineParser.Option aoutDir = parser.addStringOption('o', "outdir");
CmdLineParser.Option aontoFile = parser.addStringOption('t', "tonto");
CmdLineParser.Option amrkDicoFile = parser.addStringOption('d', "mrkdico");
CmdLineParser.Option amrkUp = parser.addStringOption("mrkup");
CmdLineParser.Option amrkRm = parser.addStringOption("mrkrm");
CmdLineParser.Option achRm = parser.addStringOption("chrm");
program.parseCmdLine(args);
String inFile = (String)parser.getOptionValue(ainFile);
String mapDir = (String)parser.getOptionValue(amapDir);
String qtlDir = (String)parser.getOptionValue(aqtlDir);
String outDir = (String)parser.getOptionValue(aoutDir);
String ontoFile = (String)parser.getOptionValue(aontoFile);
String mrkDicoFile = (String)parser.getOptionValue(amrkDicoFile);
String mrkUpFile = (String)parser.getOptionValue(amrkUp);
String mrkRmFile = (String)parser.getOptionValue(amrkRm);
String chRmFile = (String)parser.getOptionValue(achRm);
......
private static final String syntax = " Syntaxe: MetaDB [{-e, --exp}]] [{-m, --mapdb}]] [{-q, --qtldb}]] [{-o, --outdir}]] [{-t, --tonto}][{-d, --mrkdico}][{--mrkup}][{--mrkrm}][{--chrm}]" + MetaMain.generalUsage();
Thanks!