Documentation of the package for developers

biopax_converter

This module is used to translate BioPAX to a CADBIOM model.

biopax2cadbiom.biopax_converter.addCadbiomSympyCondToReactions(dictReaction, dictPhysicalEntity)[source]

Forge condition for each event attached to a reaction.

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions, created by the function query.getReactions()
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
biopax2cadbiom.biopax_converter.add_cadbiom_names_to_entities(dictPhysicalEntity)[source]

Add ‘listOfCadbiomNames’ attribute to entities.

The aim is to have the list of elements contained in each entities and their naemes.

Note

We process essentially entities with subunits: components or members (complexes or classes).

Note

The attribute ‘listOfCadbiomNames’ corresponds to a list of unique cadbiom IDs for the entity (Complex, Class). Each member of the list is the unique cadbiom ID of each subcomponent present in the attribute ‘flat_components’.

Warning

To fill ‘listOfCadbiomNames’, we first handle complexes that can be classes; BUT as classes are not necessarily complexes (without ‘flat_components’) a recursive decomposition is made. For that, see get_cadbiom_names()

Note

Complexes are already developed in developComplexEntity(); so, these entities do not have to be decompiled recursively here.

Parameters:dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
biopax2cadbiom.biopax_converter.add_controllers_to_reactions(dictReaction, dictControl)[source]

Fill the attribute ‘controllers’ of Reaction objects.

Note

Thanks to filter_control() we have only entities; each controller (control.controller) is an entity (not a pathway), so entities control reactions.

Note

The controllers attribute of a Reaction corresponds to a set of controller entities involved in it.

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions created, by the function query.getReactions()
  • dictControl (<dict <str>: <Control>> keys: uris; values control objects) – Dictionnary of biopax controls created, by the function query.getControls()
biopax2cadbiom.biopax_converter.add_locations_to_entities(dictPhysicalEntity, dictLocation)[source]

Add Location objects to PhysicalEntities

biopax2cadbiom.biopax_converter.add_modifications_features_to_entities(dictPhysicalEntity, dictModificationFeatures)[source]

Add modifications and their number to the entity name

biopax2cadbiom.biopax_converter.add_reactions_to_entities(dictReaction, dictControl, dictPhysicalEntity)[source]

Fill the attribute ‘reactions’ of PhysicalEntity objects.

Note

The reactions attribute corresponds to a set of reactions in which the entity is involved (as controller or participant). We use this attribute with the aim to know if complexes have to be deconstruct (when a subentity is used elsewhere in a reaction).

Note

Supported roles in reactions are: - productComponent - participantComponent - leftComponents - rightComponents - controller of

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions, created by the function query.getReactions()
  • dictControl (<dict <str>: <Control>> keys: uris; values control objects) – Dictionnary of biopax controls, created by the function query.getControls()
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
biopax2cadbiom.biopax_converter.add_unique_cadbiom_name_to_entities(dictPhysicalEntity)[source]

Add ‘cadbiomName’ attribute to entities in dictPhysicalEntity.

Note

The attribute ‘cadbiomName’ corresponds to an unique cadbiom ID for the entity (Protein, Complex, Class, etc.).

Parameters:dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
biopax2cadbiom.biopax_converter.clean_name(name)[source]

Clean name for correct cadbiom parsing.

biopax2cadbiom.biopax_converter.compute_locations_names(dictLocation, full_compartment_name=False)[source]

Create a cadbiom ID for each location.

Warning

It updates the key ‘cadbiomName’ of entities in dictLocation[location].

Parameters:
  • dictLocation (<dict>) – Dictionnary of biopax locations created by query.getLocations(). keys: CellularLocationVocabulary uri; values: Location object
  • full_compartment_name (<bool>) – (optional) If True, compartments will be encoded on the base of their real names instead of numeric values.
Returns:

Dict of encoded locations. keys: numeric value or real location name; values: Location object

Return type:

<dict <str>:<Location>>

biopax2cadbiom.biopax_converter.createControlFromEntityOnBothSides(dictReaction, dictControl)[source]

Remove entities on both sides of reactions and create a control instead.

Note

controlType will be “ACTIVATION”

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions, created by the function query.getReactions()
  • dictControl (<dict <str>: <Control>> keys: uris; values control objects) – Dictionnary of biopax controls, created by the function query.getControls()
biopax2cadbiom.biopax_converter.detectMembersUsedInEntities(dictPhysicalEntity, convertFullGraph=False)[source]

Set the attribute ‘membersUsed’ of generic entities (classes).

Note

The value is False if the entity does not have members; if at least one member is involved in a reaction the value is True.

Warning

A generic entity can be any of the subclasses of PhysicalEntity (A complex can also be a class); BUT complexes are the only entities with ALWAYS ‘flat_components’ != None value.

Parameters:
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
  • convertFullGraph (<bool>) – (optional) Convert all entities to cadbiom node, even the entities that are not used elsewhere.
biopax2cadbiom.biopax_converter.developComplexEntity(complex_entity, dictPhysicalEntity)[source]

This procedure fills the value of ‘flat_components’ of the given complex.

Note

Search recursively all components of the components of the given complex.

Ex: Some Complex have subcomplex like in Reactome 56 from PC8:
Complex_c33f6c2be7551100a54e716b3bf8ec8a:
Complex_0088fc0fe989a0b0abc3635b20df8d90 Complex_b87d9cb2e60df79cdde88a9f8f45e80d

Warning

Here we handle ONLY COMPLEXES ! Even if some complexes have subentities that are classes so ‘flat_components’ can contains uri of classes partially decompiled.

Warning

Complexes are the only entities that have a ‘flat_components’ attribute set.

Note

Full explanations: Make a cartesian product lists of entities or lists tuples of entities in devlopped_components Ex:

A: complex composed with components:
B: complex with components:

W: protein X: generic smallmolecule with members:

Y: smallmolecule (used elsewhere) Z: smallmolecule (not used elsewhere)

C: protein

For X: devlopped_components = [X, Y] For W: devlopped_components = [W] So for B: devlopped_components = [[X, Y], [W]] and flat_components = [(X, W), (Y, W)] For A: devlopped_components = [[C], [(X, W), (Y, W)]] and flat_components = [(C, X, W), (C, Y, W)] where X is a class that represents Z, and Y a true smallmolecule

PS: ‘A’ can be Complex_6e3d8ef563cbcc0c9e2a4afb2a920c38 - Reactome v56 inPC8 in this complex, Z is also used, so X is totally removed.

Parameters:
  • complex_entity (<PhysicalEntity>) – Complex entity
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
biopax2cadbiom.biopax_converter.develop_complexes(dictPhysicalEntity)[source]

Set the attribute ‘flat_components’ of complexes entities.

Note

‘flat_components’ is a list of tuples of uris of components.

Note

This function depends of detectMembersUsedInEntities()

Parameters:dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
biopax2cadbiom.biopax_converter.filter_controls(controls, pathways_names, blacklisted_entities)[source]

Remove pathways and cofactors from controls and keep others entities.

Note

We want ONLY entities and by default, there are pathways + entities.

Parameters:
  • arg1 (<dict>) – Contollers.
  • arg2 (<dict>) – Dict of pathways URIs and names. keys: URIs; values: names (or uri if no name)
Returns:

Filtered controllers dict.

Return type:

<dict>

biopax2cadbiom.biopax_converter.filter_entities(dictPhysicalEntity, blacklisted_entities)[source]

Remove blacklisted entities from entities.

Note

Effects: - blacklisted entities are removed from dictPhysicalEntity and from components and members

Parameters:
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
  • blacklisted_entities (<set>) – set of entity uris blacklisted
Returns:

Dictionnary of biopax physicalEntities without entities blacklisted

Return type:

<dict <str>: <PhysicalEntity>>

biopax2cadbiom.biopax_converter.filter_reactions(dictReaction, blacklisted_entities)[source]

Remove blacklisted entities from reactions.

Note

Effects: - productComponent and participantComponent can be set to None - blacklisted entities are removed from leftComponents and rightComponents

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions, created by the function query.getReactions()
  • blacklisted_entities (<set>) – set of entity uris blacklisted
biopax2cadbiom.biopax_converter.find_unique_synonyms(cadbiom_name, entity_uris, unique_cadbiom_names, dictPhysicalEntity)[source]

Get a mapping between uris and unique names for the given uris that have the same cadbiom name.

Note

First we use synonyms from BioPAX database to find a unique name. When there is no more usable synonyms to build a unique name, we add a version number based on the given cadbiom name for all remaining entities.

Parameters:
  • cadbiom_name (<str>) – The redundant cadbiom name
  • entity_uris (<set>) – Set of uris of entities having the same name
  • unique_cadbiom_names (<set>) – Set of unique cadbiom names already used
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

entityToUniqueSynonym

Return type:

<dict>

biopax2cadbiom.biopax_converter.getCadbiomName(entity, synonym=None)[source]

Get entity name formatted for Cadbiom.

Parameters:
  • arg1 (<PhysicalEntity>) – PhysicalEntity for which the name will be encoded.
  • arg2 (<dict>) – Dictionnary of biopax locations created by query.getLocations(). keys: CellularLocationVocabulary uri; values: Location object
  • arg3 (<str>) – (Optional) Synonym that will be used instead of the name of the given entity.
Returns:

Encoded name with location if it exists.

Return type:

<str>

biopax2cadbiom.biopax_converter.getEntityNameUnmatched(entities, entityToEntitiesMatched, dictPhysicalEntity)[source]
biopax2cadbiom.biopax_converter.getListOfPossibilitiesAndCadbiomNames(entity, dictPhysicalEntity)[source]

Return list of tuple with uris associated to a cadbiomName.

# TODO: listOfCadbiomNames devrait etre un dictionnaire avec en clé les uris des composants et en valeurs les noms associés

Returns:list of tuples ((uris), name)
Return type:<list <tuple <tuple, <str>>>
biopax2cadbiom.biopax_converter.getPathwayToPhysicalEntities(dictReaction, dictControl, dictPhysicalEntity)[source]

This function creates the dictionnary pathwayToPhysicalEntities.

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions, created by the function query.getReactions()
  • dictControl (<dict <str>: <Control>> keys: uris; values control objects) – Dictionnary of biopax controls, created by the function query.getControls()
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

pathwayToPhysicalEntities keys: pathway uris; values set of entities involved in the pathway.

Return type:

<dict <str>: <set>>

biopax2cadbiom.biopax_converter.getProductCadbioms(entities_uris, entityToListOfEquivalentsAndCadbiomName)[source]

Get all cartesian product of all possible names of entities.

example:

entities_uris: {

}

return: [

(u’AP_2_adaptor_complex’, ‘IL8_CXCR2_v2_integral_to_membrane’, u’beta_Arrestin1’), (u’AP_2_adaptor_complex’, ‘IL8_CXCR2_v2_integral_to_membrane’, ‘beta_Arrestin2_v1’)

]

Parameters:arg1 (<set>) – Set of entities.
Returns:List of tuples of possible names for he given entities.
Return type:<list <tuple <str>>>
biopax2cadbiom.biopax_converter.getProductCadbiomsMatched(entities_uris, entityToListOfEquivalentsAndCadbiomName, entityToEntitiesMatched)[source]
biopax2cadbiom.biopax_converter.getSetOfCadbiomPossibilities(entity, dictPhysicalEntity)[source]

=> obsolète set de composants possibles pour 1 complexe

Note

First call: entity is a controller of a/multiple reaction(s)

Note

The attribute ‘listOfCadbiomNames’ corresponds to a list of unique cadbiom IDs for the entity (Complex, Class). Each member of the list is the unique cadbiom ID of each subcomponent present in the attribute ‘flat_components’.

Parameters:
  • entity (<PhysicalEntity>) – A Physical entity object that is a controller.
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

Return type:

<set>

biopax2cadbiom.biopax_converter.getTransitions(dictReaction, dictPhysicalEntity)[source]

Return transitions with (ori/ext nodes) and their respective events.

Warning

dictPhysicalEntity is modified in place. We add “virtual nodes” for genes that are not in BioPAX format.

Todo

handle TRASH nodes => will crash cadbiom writer because they are not entities…

Parameters:
  • dictReaction (<dict <str>: <Reaction>> keys: uris; values reaction objects) – Dictionnary of biopax reactions, created by the function query.getReactions()
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

Dictionnary of transitions and their respective set of events. .. example:

subDictTransition[(cadbiomL,right)].append({
    'event': transition['event'],
    'reaction': reaction,
    'sympyCond': transitionSympyCond
}

Return type:

<dict <tuple <str>, <str>>: <list <dict>>>

biopax2cadbiom.biopax_converter.get_cadbiom_names(entity, dictPhysicalEntity)[source]

To be called recursively or by add_cadbiom_names_to_entities()

Note

see add_cadbiom_names_to_entities() for more informations.

Parameters:
  • entity (<PhysicalEntity>) – A PhysicalEntity.
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

Set of cadbiom names for the given entity.

Return type:

<set>

biopax2cadbiom.biopax_converter.get_control_group_condition(controls, dictPhysicalEntity)[source]

Get condition for a group of controllers.

Activators are linked by a logical ‘OR’, inhibitors are linked by a logical ‘OR’, but activators and inhibitors are linked together by a logical ‘AND’.

Note

linked by the same evidences. => no

Warning

controlType can be (*are types that are currently supported because they are general terms; others are from EcoCyc):

ACTIVATION* INHIBITION* INHIBITION-ALLOSTERIC INHIBITION-COMPETITIVE INHIBITION-IRREVERSIBLE INHIBITION-NONCOMPETITIVE INHIBITION-OTHER INHIBITION-UNCOMPETITIVE ACTIVATION-NONALLOSTERIC ACTIVATION-ALLOSTERIC
Parameters:
  • controls (<set <Control>>) – Set of Control objects.
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

Sympy condition.

Return type:

<sympy.core.symbol.Symbol>

biopax2cadbiom.biopax_converter.load_blacklisted_entities(blacklist)[source]

Get all uris of blacklisted elements in the given file.

Note

The csv can be written with ‘,;’ delimiters. In the first column we expect the uri, In the second users can put the corresponding cadbiom name (not used).

Param:Blacklist filename.
Type:<str>
Returns:Set of uris.
Return type:<set>
biopax2cadbiom.biopax_converter.main(params)[source]

Entry point

Here we detect the presence of the pickle backup and of its settings. If there is no backup or if the user doesn’t want to use this functionality, normal queries are made against the triplestore.

We construct a Cadbiom model with all the data retrieved.

biopax2cadbiom.biopax_converter.refInCommon(entities1, entities2, dictPhysicalEntity)[source]

Check common references between 2 sets of entities.

Note

This function is used to make a transition between 2 set of entities. => Is there any transition between these 2 sets ?

Parameters:
  • entities1 (<list>) – List of uris of entities.
  • entities2 (<list>) – List of uris of entities.
  • dictPhysicalEntity (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
Returns:

False if a set of entities have no entityRefs or if entityRefs in 1 are not in 2 and if entityRefs in 2 are not in 1. True otherwhise or if entities1 is a subset of entities2, or if entities2 is a subset of entities1.

Return type:

<bool>

biopax2cadbiom.biopax_converter.updateTransitions(reaction, dictPhysicalEntity, dictTransition)[source]

cadbiom_writer

This module is used to export biopax processed data to cabiom model file format.

biopax2cadbiom.cadbiom_writer.createCadbiomFile(dictTransition, dictPhysicalEntity, nameModel, filePath, no_scc_fix)[source]

Export data into a cadbiom model file format.

Parameters:
  • arg1 (<dict <tuple <str>, <str>>: <list <dict>>>) –

    Dictionnary of transitions and their respective set of events. .. example:

    subDictTransition[(cadbiomL,right)].append({
            'event': transition['event'],
            'reaction': reaction,
            'sympyCond': transitionSympyCond
    }
    
  • arg2 (<dict <str>: <PhysicalEntity>> keys: uris; values entity objects) – Dictionnary of biopax physicalEntities, created by the function query.getPhysicalEntities()
  • arg3 (<str>) – Name of the model.
  • arg4 (<str>) – File path.
biopax2cadbiom.cadbiom_writer.formatCadbiomSympyCond(cadbiomSympyCond)[source]
Return type:<str>
biopax2cadbiom.cadbiom_writer.formatEventAndCond(setOfEventAndCond)[source]
Return type:<str>
biopax2cadbiom.cadbiom_writer.get_names_of_missing_physical_entities(dictPhysicalEntity)[source]

Get uri and cadbiom name for each entity in the model.

Param:Dictionnary of uris as keys and PhysicalEntities as values.
Type:<dict>
Returns:Dictionnary of names as keys and uris as values.
Return type:<dict>

classes

This modules describes classes on top of BioPAX formalism.

class biopax2cadbiom.classes.Control(uri, classType, controlType, reaction_uri, controller)[source]

Class for Control

Attributes

classType => subclass of Control controlType => type of control (ACTIVATION or INHIBITION) reaction_uri=> entity that is controlled

(supposed to be a subclass of Interaction)

controller => entity that controls the reaction evidences => set of evidences uris (identify controllers of the

same reaction)
class biopax2cadbiom.classes.GenericBioPAXEntity[source]

Generic class for BioPAX entities which brings basic common functions

class biopax2cadbiom.classes.Location(uri, locationTerm)[source]

Class for Location

Attributes
locationTerm dbRef
Optional
xrefs => UnificationXref with db as keys and terms as values cadbiomName
add_xref(dbref, idref)[source]

Add xref to the existant dict

Note

dbref as key, idref as value in set

class biopax2cadbiom.classes.PhysicalEntity(uri, name, location_uri, entityType, entityRef)[source]

Class for Physical Entity

Attributes:
name location_uri entityType entityRef (str) (not a set!)
Optional
synonym (set) components_uris (set) members (set) location (Location) xrefs (dict) => UnificationXref with db as keys and terms as values reactions (set) membersUsed (set) cadbiomName (set) modificationFeatures (dict/Counter) flat_components (list) listOfCadbiomNames (list)
add_xref(dbref, idref)[source]

Add xref to the existant dict

Note

dbref as key, idref as value in set

class biopax2cadbiom.classes.Reaction(uri, name, reactiontype, productComponent, participantComponent)[source]

Class for reaction

Attributes:
name reactiontype => subclass of Interaction productcomponent participantcomponent
Optional
pathways (set) leftcomponents rightcomponents controllers (set) => controls/entities that control the reaction cadbiomSympyCond event

sparql_biopaxQueries

This module contains a list of functions to query any SPARQL endpoint with BIOPax data.

biopax2cadbiom.sparql_biopaxQueries.getControls(listOfGraphUri)[source]
biopax2cadbiom.sparql_biopaxQueries.getModificationFeature(listOfGraphUri)[source]

Get ModificationFeatures that occur on PhysicalEntities, grouped by entity, modification type and number of modifications per type.

biopax2cadbiom.sparql_biopaxQueries.getPhysicalEntities(listOfGraphUri)[source]

Note

About the use of memberPhysicalEntity: Use of this property is not recommended. It is only defined to support legacy data in certain databases. Used to define a generic physical entity that is a collection of other physical entities. In general, EntityReference class should be used to create generic groups of physical entities, however, there are some cases where this is not possible, in which case, this property must be used. For instance, when entity reference is used to define a generic physical entity with generic features, the generic features of the same type must be grouped. If you do not have grouping information for features of generic physical entities, you cannot use entity reference to define generic physical entities and must use the memberPhysicalEntity property. Another example for using this property is to create generic complexes, which are currently not supported with the EntityReference scheme (there is no “ComplexReference” class).

biopax2cadbiom.sparql_biopaxQueries.getReactions(listOfGraphUri)[source]

Warning

si on fait ‘rdfs:subClassOf* biopax3:Interaction’

alors on recupere aussi les ‘Control’, ce qui doit etre fait par getControls(listOfGraphUri)

=> du coup supression des controls des resultats via le MINUS {}

Note

Control class contains (Catalysis, TemplateReactionRegulation, …)

biopax2cadbiom.sparql_biopaxQueries.get_xref_from_database(listOfGraphUri, database_name)[source]

Get corresponding xref from the given database name for all entities.

Note

Each ontology can name its database differently. Ex: ‘UniProt’ vs ‘uniprot knowledgebase’, ‘ChEBI’ vs ‘chebi’

namespaces

This module is used to load all RDF Namespaces.

Use: from namespaces import *

biopax2cadbiom.namespaces.get_RDF_prefixes()[source]

Prefixes sent in SPARQL queries.

sparql_wrapper

Module used to query SPARQL endpoint.

biopax2cadbiom.sparql_wrapper.auto_add_prefixes(func)[source]

Decorator: Add all prefixes to the SPARQL query at first argument of sparql_query()

biopax2cadbiom.sparql_wrapper.load_sparql_endpoint()[source]

Make a connection to SPARQL endpoint & retrieve a cursor.

Returns:sparql cursor in version 1! => we don’t use SPARQLWrapper2 cursor that provides SPARQLWrapper.SmartWrapper.Bindings-class to convert JSON from server.
Return type:<SPARQLWrapper>
biopax2cadbiom.sparql_wrapper.order_results(query, orderby='?uri', limit=9999)[source]

Build nested query for access points with restrictions.

Build the nested query by encapsulate the original between the same SELECT command (minus useless DISTINCT clause), and the OFFSET & LIMIT clauses at the end. PS: don’t forget to add the ORDER BY at the end of the original query.

http://vos.openlinksw.com/owiki/wiki/VOS/VirtTipsAndTricksHowToHandleBandwidthLimitExceed https://etl.linkedpipes.com/components/e-sparqlendpointselectscrollablecursor

Warning

WE ASSUME THAT THE SECOND LINE OF THE QUERY CONTAINS THE FULL SELECT COMMAND !!!

Parameters:
  • arg1 (<str>) – Original normal SPARQL query.
  • arg2 (<str>) – Order queries by this variable.
  • arg3 (<int>) – Max items queried for 1 block.
Returns:

A generator of lines of results.

Return type:

<dict>

biopax2cadbiom.sparql_wrapper.sparql_query(*args, **kwargs)[source]

Return modified function with prefix added on the first argument