Name |
Type |
Description |
token |
stringconstant |
Value5f64b645-12f3-4f19-a31d-1b8cba78fcc7 |
MoSS |
beanshell |
Scriptwarnings = new ArrayList();
File SMItmp = File.createTempFile("SMItmp", ".smi");
File SUBtmp = File.createTempFile("SUBtmp", ".sub");
File IDStmp = File.createTempFile("IDStmp", ".ids");
SMItmp.deleteOnExit();
SUBtmp.deleteOnExit();
IDStmp.deleteOnExit();
FileWriter fw = new FileWriter(SMItmp);
for (int i = 0; i < SMILES.size(); i++) {
switch (SMILES.get(i).size()) {
case 0: {
warnings.add("Warning: search for '" + compounds_list.get(i) + "' didn't produce any result. This compound will be ignored");
break;
}
case 1: {
fw.write(compounds_list.get(i) + "_" + CSID.get(i).get(0) + "," + focus.get(i) + "," + SMILES.get(i).get(0) + "\n");
break;
}
default:
for (int j = 0; j < SMILES.get(i).size(); j++)
fw.write(compounds_list.get(i) + "_" + CSID.get(i).get(j) + "," + focus.get(i) + "," + SMILES.get(i).get(j) + "\n");
}
}
fw.close();
String[] args = new String[3];
args[0] = SMItmp.getPath();
args[1] = SUBtmp.getPath();
args[2] = IDStmp.getPath();
moss.Miner.main(args);
sub = args[1];
ids = args[2];
|
Read_ids_File |
localworker |
ScriptBufferedReader getReader (String fileUrl, String encoding) throws IOException {
InputStreamReader reader;
try {
if (encoding == null) {
reader = new FileReader(fileUrl);
} else {
reader = new InputStreamReader(new FileInputStream(fileUrl),encoding);
}
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
if (encoding == null) {
reader = new InputStreamReader (url.openStream());
} else {
reader = new InputStreamReader (url.openStream(), encoding);
}
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
if (encoding == void) {
encoding = null;
}
BufferedReader in = getReader(fileurl, encoding);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Read_sub_File |
localworker |
ScriptBufferedReader getReader (String fileUrl, String encoding) throws IOException {
InputStreamReader reader;
try {
if (encoding == null) {
reader = new FileReader(fileUrl);
} else {
reader = new InputStreamReader(new FileInputStream(fileUrl),encoding);
}
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
if (encoding == null) {
reader = new InputStreamReader (url.openStream());
} else {
reader = new InputStreamReader (url.openStream(), encoding);
}
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
if (encoding == void) {
encoding = null;
}
BufferedReader in = getReader(fileurl, encoding);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Workflow1 |
workflow |
|
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]);
}
}
|
Regex_1 |
stringconstant |
Value\n |
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]);
}
}
|
Regex_2 |
stringconstant |
Value\n |
BioDICE |
FLSOM |
|
Flatten_CSID |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Flatten_SMILES |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Comments (0)
No comments yet
Log in to make a comment