EUADR - Literature Analysis
Created: 2011-07-27 17:12:16
Last updated: 2011-07-27 17:24:15
The aim of the "Literature Analysis" workflow is to automate the search of publications related to ADRs corresponding to a given drug/adverse event association. To do so, we defined an approach based on the MeSH thesaurus, using the subheadings «chemically induced» and «adverse effects» with the “Pharmacological Action” knowledge.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (2)
Gayo Diallo |
Paul Avillach, Gayo Diallo |
Titles (4)
Literature Analysis |
Litterature Analysis |
PubMed Literature Analysis |
Lit |
Descriptions (1)
The aim of the "Literature Analysis" workflow is to automate the search of publications related to ADRs corresponding to a given drug/adverse event association. To do so, we defined an approach based on the MeSH thesaurus, using the subheadings «chemically induced» and «adverse effects» with the “Pharmacological Action” knowledge. |
Dependencies (0)
Inputs (2)
Name |
Description |
event |
Event Code
|
atc |
ATC code of the drug
ATC code
|
Processors (2)
Name |
Type |
Description |
Beanshell |
beanshell |
Scriptimport java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.SourceLocator;
import javax.xml.transform.Templates;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
BufferedReader 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);
}
BufferedWriter getWriter (String fileUrl) throws IOException {
Writer writer;
try {
writer = new FileWriter(fileUrl);
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
writer = new OutputStreamWriter (url.openConnection().getOutputStream());
}
return new BufferedWriter(writer);
}
//URL of MedLine articles
String urlmedline= "http://www.ncbi.nlm.nih.gov/pubmed/";
// write getListPublis to tmpFile
BufferedWriter out = new BufferedWriter(new FileWriter("./getlistpublisTmp.xml"));
out.write(listpubli);
out.close();
// XSL MERGE
//String xslFilename = "/home/abauer/Dropbox/signal_substantiation/TavernaWorkflow_Cytoscape/files/EUADR_merge.xsl";;
String xslFilename = "http://lesimisped.free.fr/EUADR_webservice/EUADR_ConvertToHTML.xsl";
// Create transformer factory
TransformerFactory factory = TransformerFactory.newInstance();
// Use the factory to create a template containing the xsl file
Templates template = factory.newTemplates(new StreamSource(getReader(xslFilename)));
// Use the template to create a transformer
Transformer xformer = template.newTransformer();
// Prepare the input and output files
Source source = new StreamSource(getReader("./getlistpublisTmp.xml"));
StringWriter resultStr = new StringWriter();
Result result = new StreamResult(resultStr);
// Apply the xsl file to the source file and write the result to the
// output file
xformer.transform(source, result);
// write output to tmp file
BufferedWriter resultWrite = new BufferedWriter(new FileWriter("./getListPubli.html"));
resultWrite.write(resultStr.toString());
resultWrite.close();
EUADR_listpublis = resultStr.toString();
// change the name of the graph
String name = "the drug " + atc + " and the event " + event;
//EAUDR_listpublis = EAUDR_listpublis.replace("TESTANNATEST", name);
// open browser
/*File tmpFile2 = new File("intersectingPathways.html");
String path = tmpFile2.getAbsolutePath();
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("firefox " + path);
*/
// delete all tmp files
File tmpFile1 = new File("./convertHTML.xml");
tmpFile1.delete();
|
Literature_Analysis |
workflow |
|
Beanshells (1)
Name |
Description |
Inputs |
Outputs |
Beanshell |
|
listpubli
atc
event
|
EUADR_listpublis
|
Outputs (2)
Name |
Description |
out |
List of MedLine publications found formatted according the defined EU-ADR project format
|
resulthtml |
The HTML output of the workflow
|
Datalinks (7)
Source |
Sink |
Literature_Analysis:out |
Beanshell:listpubli |
event |
Beanshell:event |
atc |
Beanshell:atc |
atc |
Literature_Analysis:atc |
event |
Literature_Analysis:event |
Literature_Analysis:out |
out |
Beanshell:EUADR_listpublis |
resulthtml |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
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