Retrieval of molecular interactions within a set of given molecules
Created: 2011-06-10 14:35:39
Last updated: 2011-06-10 14:35:41
Description of the flow steps:
- split the list of identifiers using allows separators,
- build a MIQL query with these identifier in preparation of running a PSICQUIC request,
- Retrieve molecular interaction from IntAct's PSICQUIC service using the generated MIQL statement,
- filter the list of returned MITAB using the list of identifiers and only keep those lines where both participating molecules are members of the input list,
- return the count and list of filtered MITAB lines.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Samuel Kerrien (EMBL-EBI) |
Titles (1)
Retrieval of molecular interactions within a set of given molecules |
Descriptions (1)
Description of the flow steps:
1. split the list of identifiers using allows separators,
2. build a MIQL query with these identifier in preparation of running a PSICQUIC request,
3. Retrieve molecular interaction from IntAct's PSICQUIC service using the generated MIQL statement,
4. filter the list of returned MITAB using the list of identifiers and only keep those lines where both participating molecules are members of the input list,
5. return the count and list of filtered MITAB lines. |
Dependencies (3)
psimitab-1.7.9.jar |
psi25-xml-1.7.9.jar |
com.springsource.org.apache.commons.lang-2.4.0.jar |
Inputs (1)
Name |
Description |
identifiers |
A list of molecule identifier within which we are looking for molecular interactions.
These identifiers can be separated using any of the following characters:
- space
- tabulation
- line return
- comma
- pipe
|
Processors (4)
Name |
Type |
Description |
INTACT_PSICQUIC |
rest |
|
MIQL_Builder |
beanshell |
Script// Converts a list of UniProtKB AC into a MIQL query
StringBuilder sb = new StringBuilder( 128 );
for( ac : identifiers ) {
if( ac.contains( ":" ) ) {
// escape identifier if need be, e.g. CHEBI:12345
ac = "\"" + ac + "\"";
}
sb.append( "identifier:" + ac ).append( ' ' );
}
final String miql = sb.toString().trim();
System.out.println( "MIQL: " + miql ); |
filter_MITAB |
beanshell |
Scriptimport psidev.psi.mi.tab.PsimiTabReader;
import psidev.psi.mi.tab.PsimiTabWriter;
import psidev.psi.mi.tab.converter.txt2tab.MitabLineException;
import psidev.psi.mi.tab.converter.txt2tab.behaviour.UnparseableLineBehaviour;
import psidev.psi.mi.tab.model.*;
import psidev.psi.mi.xml.converter.ConverterException;
// ------------------- BEGIN OF UTILITY METHODS ----------------
public boolean isInvolved( Interactor interactor, List identifiers ) {
for ( CrossReference xref : interactor.getIdentifiers() ) {
if( identifiers.contains( xref.getIdentifier() ) ){
return true;
}
}
for ( CrossReference xref : interactor.getAlternativeIdentifiers() ) {
if( identifiers.contains( xref.getIdentifier() ) ){
return true;
}
}
for ( Alias alias : interactor.getAliases() ) {
if( identifiers.contains( alias.getName() ) ){
return true;
}
}
return false;
}
// ------------------- END OF UTILITY METHODS ----------------
final boolean hasHeader = false;
final PsimiTabReader reader = new PsimiTabReader( hasHeader );
final String[] lines = mitab.split( "\n" );
StringBuilder sb = new StringBuilder( 512 );
interactionCount = 0;
for ( int i = 0; i < lines.length; i++ ) {
final String line = lines[i];
final BinaryInteraction bi = reader.readLine( line );
// check if the interaction involves 2 interactors present in the identifier list
boolean aInvolved = isInvolved( bi.getInteractorA(), identifiers );
boolean bInvolved = isInvolved( bi.getInteractorB(), identifiers );
if ( aInvolved && bInvolved ) {
sb.append( line ).append( "\n" );
interactionCount++;
}
}
filteredMITAB = sb.toString();
|
split_identifiers |
beanshell |
Scriptidentifiers = Arrays.asList( uniprotAcs.split( "\\t|\\s|,|\\||\n" ) ); |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
MIQL_Builder |
|
identifiers
|
miql
|
filter_MITAB |
|
mitab
identifiers
|
filteredMITAB
interactionCount
|
split_identifiers |
|
uniprotAcs
|
identifiers
|
Outputs (3)
Name |
Description |
HTTP_STATUS |
|
filtered_MITAB |
|
interactionCount |
|
Datalinks (8)
Source |
Sink |
MIQL_Builder:miql |
INTACT_PSICQUIC:$MIQL |
split_identifiers:identifiers |
MIQL_Builder:identifiers |
INTACT_PSICQUIC:responseBody |
filter_MITAB:mitab |
split_identifiers:identifiers |
filter_MITAB:identifiers |
identifiers |
split_identifiers:uniprotAcs |
INTACT_PSICQUIC:status |
HTTP_STATUS |
filter_MITAB:filteredMITAB |
filtered_MITAB |
filter_MITAB:interactionCount |
interactionCount |
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 (1)
Featured In Packs (1)
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