File: WinClustalw.java

package info (click to toggle)
proalign 0.603-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 492 kB
  • sloc: java: 8,673; sh: 27; makefile: 4
file content (55 lines) | stat: -rw-r--r-- 975 bytes parent folder | download | duplicates (5)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
 * Title:        ProAlign<p>
 * Description:  <p>
 * Copyright:    Copyright (c) Ari Loytynoja<p>
 * License:      GNU GENERAL PUBLIC LICENSE<p>
 * @see          http://www.gnu.org/copyleft/gpl.html
 * Company:      ULB<p>
 * @author Ari Loytynoja
 * @version 1.0
 */
package proalign;

public class WinClustalw extends Thread {

  String command;
  int num;
  boolean running = true;

  WinClustalw(int num, String command) { 

      this.num = num;
      this.command = command;
      start();
  }

  public void run(){
    runClustalw(num,command);
    running = false;
  }
    
  /**
   * Run native ClustalW
   */
  public native void runClustalw(int num, String cmnd);
  static {
      Runtime.getRuntime().load(ProAlign.clustalwPath);
  }
  
  /**
   * Get output and write it in the log.
   */
  private void writeout(String txt) {
      //System.out.println(txt);
      ProAlign.log(txt);
    try {
	sleep(20);
    } catch(InterruptedException e) {}
  }
}