Skip to content

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_Compound
  • Assay_Gene
  • Gene_Protein
  • Compound_Gene
  • Compound_Similarity
  • Compound_Compound_Cooccurrence
  • Compound_Gene_Cooccurrence
  • Compound_Gene_Interaction
  • Compound_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.