Mercurial > repos > pfrommolt > ngsrich
comparison NGSrich_0.5.5/src/NGSrich.java @ 0:89ad0a9cca52 default tip
Uploaded
author | pfrommolt |
---|---|
date | Mon, 21 Nov 2011 08:12:19 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:89ad0a9cca52 |
---|---|
1 import java.io.IOException; | |
2 | |
3 import _main.NGSrichEvaluate; | |
4 import _main.NGSrichSummarize; | |
5 import exceptions.FileFormatException; | |
6 | |
7 /** | |
8 * This is the main class. | |
9 * | |
10 * @author Peter Frommolt | |
11 * @author Ali Abdallah | |
12 */ | |
13 | |
14 public class NGSrich { | |
15 | |
16 /** | |
17 * Self Explanatory. | |
18 * | |
19 * @param args an Array of argument. The first argument is command and the | |
20 * other arguments are its options. | |
21 * | |
22 * @throws FileFormatException if the used files have formally a bad format. | |
23 * @throws IOException | |
24 * @throws InterruptedException | |
25 */ | |
26 public static void main(String[] args) throws FileFormatException, | |
27 IOException, InterruptedException { | |
28 | |
29 String usagestr = | |
30 "\nThis is NGSrich, version 0.5.4.\n\n" | |
31 + "Usage: java NGSrich [command] [options]\n\n" | |
32 + "\tCommands:\n" | |
33 + "\tevaluate" | |
34 + "\tEvaluate target enrichment for a single sample.\n" | |
35 + "\tsummarize" | |
36 + "\tCreate a summary report for several evaluations.\n"; | |
37 | |
38 int alen = args.length; | |
39 if (alen == 0) { | |
40 System.out.println(usagestr); | |
41 System.exit(0); | |
42 } else { | |
43 String[] cparams = new String[alen - 1]; | |
44 for (int i = 0; i < alen - 1; i = i + 1) { | |
45 cparams[i] = args[i + 1]; | |
46 } | |
47 String eval = "evaluate", summ = "summarize"; | |
48 if (eval.equals(args[0])) { | |
49 // Geändert von AA 27.07.2011. | |
50 new NGSrichEvaluate(cparams).evaluate(); | |
51 } | |
52 if (summ.equals(args[0])) { | |
53 // Geändert von AA 27.07.2011. | |
54 new NGSrichSummarize(cparams).summarize(); | |
55 } | |
56 } | |
57 } | |
58 } |