Search Europe PMC and get ChEBI annotations
Created: 2018-02-09 14:09:48
Last updated: 2018-02-12 16:12:40
This workflow first conducts a search and downloads the PMIDs for all publications in PubMed and PMC that match a particular query using the Europe PMC Articles API. In a second phase, the workflow fetches the ChEBI annotations for all these publications using the Europe PMC Annotations API.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Search Europe PMC and get ChEBI annotations |
Descriptions (1)
This workflow first conducts a search and downloads the PMIDs for all publications in PubMed and PMC that match a particular query using the Europe PMC Articles API. In a second phase, the workflow fetches the ChEBI annotations for all these publications using the Europe PMC Annotations API. |
Dependencies (0)
Inputs (1)
Name |
Description |
Query |
Europe PMC query string
|
Processors (13)
Name |
Type |
Description |
searchPublications_and_get_ChEBIs |
workflow |
|
getAnnotations |
rest |
|
Flatten_Sources_List |
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_Ids_List |
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); |
Remove_Sources_header |
localworker |
Scriptfilteredlist = new ArrayList();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
if (item.matches(regex)) {
filteredlist.add(item);
}
}
|
MED_or_PMC |
stringconstant |
ValueMED|PMC |
Remove_Ids_header |
localworker |
Scriptfilteredlist = new ArrayList();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
if (item.matches(regex)) {
filteredlist.add(item);
}
}
|
number |
stringconstant |
Value[0-9]+ |
extract_URI |
jsonpath |
|
Flatten_URI_List |
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); |
Write_Text_File |
localworker |
Script
BufferedWriter out;
if (encoding == void) {
out = new BufferedWriter(new FileWriter(outputFile));
}
else {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding));
}
out.write(filecontents);
out.flush();
out.close();
outputFile = filecontents;
|
filename |
stringconstant |
ValueC:\tmp\from_taverna.txt |
Merge_String_List_to_a_String |
localworker |
ScriptString seperatorString = "\n";
if (seperator != void) {
seperatorString = seperator;
}
StringBuffer sb = new StringBuffer();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
sb.append(item);
if (i.hasNext()) {
sb.append(seperatorString);
}
}
concatenated = sb.toString();
|
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
Build_Query |
This build_query BeanShell constructs the Europe PMC search query for a single protein in UniProt. |
nextCursorMark
Query
Iteration
|
queryString
cursorMark
Iteration
|
add_sources |
|
new_Sources
Sources
|
Sources
|
add_ids |
|
Ids
new_Ids
|
Ids
|
Outputs (4)
Name |
Description |
Sources |
|
hitCount |
|
annotations |
|
Ids |
|
Datalinks (18)
Source |
Sink |
Query |
searchPublications_and_get_ChEBIs:Query |
Remove_Sources_header:filteredlist |
getAnnotations:source |
Remove_Ids_header:filteredlist |
getAnnotations:id |
searchPublications_and_get_ChEBIs:Sources |
Flatten_Sources_List:inputlist |
searchPublications_and_get_ChEBIs:Ids |
Flatten_Ids_List:inputlist |
Flatten_Sources_List:outputlist |
Remove_Sources_header:stringlist |
MED_or_PMC:value |
Remove_Sources_header:regex |
Flatten_Ids_List:outputlist |
Remove_Ids_header:stringlist |
number:value |
Remove_Ids_header:regex |
getAnnotations:responseBody |
extract_URI:json_text |
extract_URI:nodelist |
Flatten_URI_List:inputlist |
filename:value |
Write_Text_File:outputFile |
Merge_String_List_to_a_String:concatenated |
Write_Text_File:filecontents |
Flatten_URI_List:outputlist |
Merge_String_List_to_a_String:stringlist |
searchPublications_and_get_ChEBIs:Sources |
Sources |
searchPublications_and_get_ChEBIs:hitCount |
hitCount |
Write_Text_File:outputFile |
annotations |
searchPublications_and_get_ChEBIs:Ids |
Ids |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1 (earliest)
(of 3)
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