Relationships Collector and Processor
This module collects and processes relationship data for different types of relationships using the RelationshipPropertiesExtractor and RelationshipDataProcessor classes.
Available Relationship Types
Assay_CompoundAssay_GeneGene_ProteinCompound_GeneCompound_SimilarityCompound_Compound_CooccurrenceCompound_Gene_CooccurrenceCompound_Gene_InteractionCompound_Transformation
Usage Examples
Python
To use the RelationshipsCollectorProcessor class in Python, follow the example below:
from relationship_collector_processor import RelationshipsCollectorProcessor
# Set the relationship type
relationship_type = "Assay_Compound" # Change to the desired relationship type
# Initialize the collector
collector = RelationshipsCollectorProcessor(relationship_type=relationship_type, start_chunk=0)
# Collect and process the relationship data
collector.collect_relationship_data()
Command Line
To collect and process relationship data from the command line, use the following command:
# Collect and process the relationship data for the specified relationship type
collect-process-relationships --relationship_type Assay_Compound --start_chunk 0
Replace Assay_Compound with any of the available relationship types to collect different data.
If your data is downloaded as chunks and you were not able to complete the
download at once, you can use the start_chunk argument to specify the starting
chunk index and continue the download.