Create votable from sextractor results
Created: 2012-07-26 11:39:53
Last updated: 2012-08-21 08:20:36
The workflow creates a votable from the results provided by sextractor. It returns this table and an aditional table that is joined to the input table. It requires a votable that contains a column with the file name resulting from running sextractor and such files must be accesible from taverna. It uses astrotaverna plugin (http://wf4ever.github.com/astrotaverna/).
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Create votable from sextractor results |
Descriptions (1)
The workflow creates a votable from the results provided by sextractor.
It returns this table and an aditional table that is joined to the input table.
It requires a votable that contains a column with the file name resulting from running sextractor and such files accesible from taverna.
It uses astrotaverna plugin (http://wf4ever.github.com/astrotaverna/). |
Dependencies (0)
Inputs (3)
Name |
Description |
ConlumnName_catFile |
|
votable |
|
Precedence |
|
Processors (8)
Name |
Type |
Description |
Cat_n-tables |
tcat |
|
List_from_column |
voutils |
|
Read_File_2 |
beanshell |
Scriptimport java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
String readFileAsString(String filePath) throws java.io.IOException{
byte[] buffer = new byte[(int) new File(filePath).length()];
BufferedInputStream f = null;
try {
f = new BufferedInputStream(new FileInputStream(filePath));
f.read(buffer);
} finally {
if (f != null) try { f.close(); } catch (IOException ignored) { }
}
return new String(buffer);
}
string = readFileAsString(filePath); |
Format_conversion |
tpipe |
|
ascii_format |
stringconstant |
Valueascii |
votable_format |
stringconstant |
Valuevotable |
CatFile2Ascii |
beanshell |
Scriptimport java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
resultTable ="#";
// read column names from cat file and add header to resultTable
String number = "([-0123456789.]+)";
String word = "(\\w+)";
String expression = "#\\s+"+number+"\\s+"+word+".*"; // Position x, y
Pattern pattern1 = Pattern.compile(expression);
Matcher matcher1 = pattern1.matcher(table);
//ArrayList values = new ArrayList();
while (matcher1.find()) {
String num = matcher1.group(1);
String col = matcher1.group(2);
//values.add(col);
resultTable += " " + col.toLowerCase();
}
resultTable +="\n";
// read data from cat file and add it to resultTable after the header
expression = "[^"+Pattern.quote("#")+"]"+Pattern.quote("(")+".*"+Pattern.quote(")"); // Position x, y
expression = "((\\s+"+number+"){4,})" ;//"(.*)"; // Position x, y
pattern1 = Pattern.compile(expression);
matcher1 = pattern1.matcher(table);
//ArrayList dataLines = new ArrayList();
while (matcher1.find()) {
String line = matcher1.group(1);
resultTable+=line+"\n";
//dataLines.add(line);
} |
tjoin |
tjoin |
|
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
Read_File_2 |
|
filePath
|
string
|
CatFile2Ascii |
|
table
|
resultTable
|
Outputs (2)
Name |
Description |
sextractorVotable |
|
joinedResultTable |
|
Datalinks (12)
Source |
Sink |
Format_conversion:outputTable |
Cat_n-tables:votableList |
ConlumnName_catFile |
List_from_column:ColumnName |
votable |
List_from_column:voTable |
List_from_column:list |
Read_File_2:filePath |
ascii_format:value |
Format_conversion:formatTableIn |
votable_format:value |
Format_conversion:formatTableOut |
CatFile2Ascii:resultTable |
Format_conversion:voTable |
Read_File_2:string |
CatFile2Ascii:table |
votable |
tjoin:votable1 |
Cat_n-tables:outputFileOut |
tjoin:votable2 |
Cat_n-tables:outputFileOut |
sextractorVotable |
tjoin:outputFileOut |
joinedResultTable |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1 (earliest)
(of 2)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (1)
(Workflows/Files)
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment