Name |
Type |
Description |
SelectDataset |
localworker |
Scriptimport java.awt.CardLayout;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import javax.swing.ImageIcon;
import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
class FileExtFilter extends FileFilter {
public FileExtFilter(String ext, String label, boolean includeDir) {
this.ext = ext;
this.label = label;
this.includeDir = includeDir;
}
public String getDescription() {
return this.label;
}
public boolean accept(File file) {
if (file.isDirectory() && includeDir) {
return true;
} else {
return file.getName().endsWith(this.ext);
}
}
String ext, label;
boolean includeDir;
}
if (title == void) {
title = null;
}
if ((fileExtensions == void) || (fileExtensions == null)) {
fileExtensions = "";
}
if ((fileExtLabels == void) || (fileExtLabels == null)) {
fileExtLabels = "";
}
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(title);
String[] fileTypeList = fileExtensions.split(",");
String[] filterLabelList = fileExtLabels.split(",");
if (fileTypeList != null && filterLabelList != null && fileTypeList.length != filterLabelList.length) {
throw new RuntimeException("The list of extensions and file filter labels must be the same length");
}
// create the file filters
for (int i = 0; i < fileTypeList.length; i++) {
FileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);
chooser.setFileFilter(filter);
}
// folders only mod
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.showOpenDialog(null);
File file = chooser.getSelectedFile();
selectedFile = file.getAbsolutePath();
|
SelectShape |
localworker |
Scriptimport java.awt.CardLayout;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import javax.swing.ImageIcon;
import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
class FileExtFilter extends FileFilter {
public FileExtFilter(String ext, String label, boolean includeDir) {
this.ext = ext;
this.label = label;
this.includeDir = includeDir;
}
public String getDescription() {
return this.label;
}
public boolean accept(File file) {
if (file.isDirectory() && includeDir) {
return true;
} else {
return file.getName().endsWith(this.ext);
}
}
String ext, label;
boolean includeDir;
}
if (title == void) {
title = null;
}
if ((fileExtensions == void) || (fileExtensions == null)) {
fileExtensions = "";
}
if ((fileExtLabels == void) || (fileExtLabels == null)) {
fileExtLabels = "";
}
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(title);
String[] fileTypeList = fileExtensions.split(",");
String[] filterLabelList = fileExtLabels.split(",");
if (fileTypeList != null && filterLabelList != null && fileTypeList.length != filterLabelList.length) {
throw new RuntimeException("The list of extensions and file filter labels must be the same length");
}
// create the file filters
for (int i = 0; i < fileTypeList.length; i++) {
FileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);
chooser.setFileFilter(filter);
}
chooser.showOpenDialog(null);
File file = chooser.getSelectedFile();
selectedFile = file.getAbsolutePath();
|
run_localspheres |
localworker |
Scriptif (command == void || command.equals("")) {
throw new RuntimeException("The 'command' port cannot be null.");
}
String cmd = ctf+command+" -d "+dataset+" -s "+shape+" -M -v";
Process proc = null;
Runtime rt = Runtime.getRuntime();
proc = rt.exec(cmd);
// 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();
|
localSpheres |
stringconstant |
ValuelocalSpheres |
ReadProtocols |
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();
|
SelectProtocol |
localworker |
Scriptimport java.awt.CardLayout;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import javax.swing.ImageIcon;
import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
class FileExtFilter extends FileFilter {
public FileExtFilter(String ext, String label, boolean includeDir) {
this.ext = ext;
this.label = label;
this.includeDir = includeDir;
}
public String getDescription() {
return this.label;
}
public boolean accept(File file) {
if (file.isDirectory() && includeDir) {
return true;
} else {
return file.getName().endsWith(this.ext);
}
}
String ext, label;
boolean includeDir;
}
if (title == void) {
title = null;
}
if ((fileExtensions == void) || (fileExtensions == null)) {
fileExtensions = "";
}
if ((fileExtLabels == void) || (fileExtLabels == null)) {
fileExtLabels = "";
}
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(title);
String[] fileTypeList = fileExtensions.split(",");
String[] filterLabelList = fileExtLabels.split(",");
if (fileTypeList != null && filterLabelList != null && fileTypeList.length != filterLabelList.length) {
throw new RuntimeException("The list of extensions and file filter labels must be the same length");
}
// create the file filters
for (int i = 0; i < fileTypeList.length; i++) {
FileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);
chooser.setFileFilter(filter);
}
chooser.showOpenDialog(null);
File file = chooser.getSelectedFile();
selectedFile = file.getAbsolutePath();
|
run_SAMwrap |
localworker |
Script// parse protocol file
// look for csv bands and piped triggers
String[] pFileLines = protocol.split("\\n");
String[] bands;
ArrayList windows = new ArrayList();
ArrayList windowFiles = new ArrayList();
for(int i=0;i1)
{
if(pFileLines[i].indexOf(",")>0)
{ // freq bands
bands = pFileLines[i].split(";");
}
if(pFileLines[i].indexOf("|")>0)
{ // time window
windows.add(pFileLines[i]);
}
}
}
String out0;
// create file for each window
for(int x=0;x |
SAMwrap_path |
stringconstant |
Value/mnt/home/users/megadmin/shells/SAMwrap |
options_value |
stringconstant |
Value-x -7 14 -y -9 9 -z 0 14 -s 0.5 -l 1 -D2 -p -n -v |
launchSAMMenu |
localworker |
Scriptimport javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
ButtonGroup group = new ButtonGroup();
JPanel messagePanel = new JPanel();
messagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));
messagePanel.add(new JLabel((message == void ? null : message)));
JRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];
for (int i = 0; i < buttonArray.length; i++) {
buttonArray[i] = new JRadioButton(selectionValues.get(i));
if (i==0) buttonArray[i].setSelected(true);
group.add(buttonArray[i]);
messagePanel.add(buttonArray[i]);
}
JOptionPane.showOptionDialog(null, messagePanel, (title == void ? null : title),
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"OK"}, null);
String answer="";
for (JRadioButton button : buttonArray) {
if (button.isSelected()) {
answer=button.getText();
}
}
|
SAMMenu |
stringconstant |
ValueLaunch SAMMenu |
Skip_SAM |
stringconstant |
ValueSkip |
run_SAMMenu |
localworker |
Script
if(choice!="Skip")
{
Process proc = null;
Runtime rt = Runtime.getRuntime();
String cmd = ctf+"SAMMenu "+ds;
proc = rt.exec(cmd);
// 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();
}
|
launchMRIViewer |
localworker |
Scriptimport javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
ButtonGroup group = new ButtonGroup();
JPanel messagePanel = new JPanel();
messagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));
messagePanel.add(new JLabel((message == void ? null : message)));
JRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];
for (int i = 0; i < buttonArray.length; i++) {
buttonArray[i] = new JRadioButton(selectionValues.get(i));
if (i==0) buttonArray[i].setSelected(true);
group.add(buttonArray[i]);
messagePanel.add(buttonArray[i]);
}
JOptionPane.showOptionDialog(null, messagePanel, (title == void ? null : title),
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"OK"}, null);
String answer="";
for (JRadioButton button : buttonArray) {
if (button.isSelected()) {
answer=button.getText();
}
}
|
Skip_MRI |
stringconstant |
ValueSkip |
MRIViewer |
stringconstant |
ValueLaunch MRIViewer |
run_MRIViewer |
localworker |
Script
if(choice!="Skip")
{
String cmd = ctf+"MRIViewer";
Process proc = null;
Runtime rt = Runtime.getRuntime();
proc = rt.exec(cmd);
// 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();
}
|
title1 |
stringconstant |
ValueSelect DataSet |
title2 |
stringconstant |
ValueSelect shape file |
title3 |
stringconstant |
ValueSelect protocol file |
.shape |
stringconstant |
Value.shape |
CTF |
stringconstant |
Value/mnt/home/users/megadmin/CTF/ctf-5.1/bin/ |
Complete |
localworker |
Scriptimport javax.swing.JOptionPane;
JOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.INFORMATION_MESSAGE);
answer = "answer";
|
message_value |
stringconstant |
ValueBatch jobs have been submitted to the Sun Grid Engine. Use qstat to view progress. |
p |
stringconstant |
Valuep |
Comments (0)
No comments yet
Log in to make a comment