Name |
Type |
Description |
runMGCAT |
localworker |
Scriptif (command == void || command.equals("")) {
throw new RuntimeException("The 'command' port cannot be null.");
}
Process proc = null;
Runtime rt = Runtime.getRuntime();
String osName = System.getProperty("os.name");
String[] cmdArray = null;
if (osName.equals("Windows NT") || osName.equals("Windows XP")) {
cmdArray = new String[] { "cmd.exe", "/c", command };
} else if (osName.equals("Windows 95")) {
cmdArray = new String[] { "command.exe", "/c", command };
} else {// TODO: investigate if this will work in Linux and OSX
cmdArray = new String[] { command };
}
// concatenate the arrays
if (args == null) {
String args = new String();
}
int argSize = cmdArray.length + 1;
ArrayList appArray = new ArrayList(argSize);
for (int i = 0; i < cmdArray.length; i++) {
appArray.add(cmdArray[i]);
}
appArray.add(args);
String[] applist = new String[argSize];
appArray.toArray(applist);
File f = new File("D:/blastdb/");
proc = rt.exec(applist,null,f);
// Get the input stream and read from it
InputStream in = proc.getInputStream();
int c;
StringBuffer sb = new StringBuffer();
while ((c = in.read()) != -1) {
sb.append((char) c);
}
in.close();
result = sb.toString();
|
MGCAT_Path |
stringconstant |
ValueD:\mgcat_v15b\mgcat.exe |
Working_Dir |
stringconstant |
ValueD:\blastdb\ |
Read_Text_File |
localworker |
ScriptBufferedReader getReader (String fileUrl) throws IOException {
InputStreamReader reader;
try {
reader = new FileReader(fileUrl);
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
reader = new InputStreamReader (url.openStream());
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
BufferedReader in = getReader(fileurl);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Split_string_into_string_list_by_regular_expression |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
Regex1 |
stringconstant |
Value\n |
Filter_List_of_Strings_by_regex |
localworker |
Scriptimport java.util.regex.*;
filteredlist = new ArrayList();
Pattern thePat1 = Pattern.compile(regex1);
Pattern thePat2 = Pattern.compile(regex2);
int theGroup = Integer.parseInt(group);
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
Matcher matcher1 = thePat1.matcher(item);
Matcher matcher2 = thePat2.matcher(item);
if (matcher1.find()) {
filteredlist.add("file=" + file + "\r");
} else if (matcher2.find()) {
filteredlist.add("file1=" + file2 + "\r");
} else {
filteredlist.add(item);
}
} |
Regex2 |
stringconstant |
Value^file=.* |
Regex3 |
stringconstant |
Value^file1=.* |
Write_Text_File |
localworker |
ScriptBufferedWriter out = new BufferedWriter(new FileWriter(outputFile));
out.write(filecontents);
out.close();
outputFile = filecontents;
|
Concatenate_strings |
localworker |
ScriptString output = new String();
output = stringlist.get(0);
for (i = 1; i < stringlist.size(); i++)
{
output = output + "\n" + stringlist.get(i);
} |
Group |
stringconstant |
Value1 |
INI_File |
stringconstant |
ValueD:\mgcat_v15b\mgcat.ini |
Read_Text_File_2 |
localworker |
ScriptString fileUrl1 = new String();
fileUrl1 = fileurl + "/output/mgcat.log";
BufferedReader getReader (String fileUrl) throws IOException {
InputStreamReader reader;
try {
reader = new FileReader(fileUrl1);
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl1);
reader = new InputStreamReader (url.openStream());
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
BufferedReader in = getReader(fileUrl1);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Split_string_into_string_list_by_regular_expression_2 |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
Regex1_2 |
stringconstant |
Value\n |
Filter_list_of_strings_extracting_match_to_a_regex |
localworker |
Scriptimport java.util.regex.*;
filteredlist = new ArrayList();
Pattern thePat = Pattern.compile(regex);
int theGroup = Integer.parseInt(group);
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
Matcher matcher = thePat.matcher(item);
if (matcher.find()) {
String t = new String();
t = matcher.group(theGroup);
t = t.trim();
filteredlist.add(t);
}
}
|
Group1 |
stringconstant |
Value1 |
regex2 |
stringconstant |
ValueTotal.coverage.among.all.sequences.(.*)\% |
Thresholder |
beanshell |
Scriptdouble a = Double.valueOf(seqSim);
double b = Double.valueOf(reqSim);
if (a >= b)
{
cont = 1;
}
else
{
cont = 0;
} |
Ask |
localworker |
Scriptimport javax.swing.JOptionPane;
answer = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);
|
Message |
stringconstant |
ValuePlease enter the minimum required strain similarity |
Title |
stringconstant |
ValueGenome similarity |
Comments (0)
No comments yet
Log in to make a comment