BLRun package

Submodules

BLRun.genie3Runner module

class BLRun.genie3Runner.GENIE3Runner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the GENIE3 GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for GENIE3. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from GENIE3.

run()[source]

Function to run GENIE3 algorithm

BLRun.grisliRunner module

class BLRun.grisliRunner.GRISLIRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the GRISLI GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for GRISLI. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from GRISLI.

run()[source]

Function to run GRISLI algorithm

BLRun.grnboost2Runner module

class BLRun.grnboost2Runner.GRNBoost2Runner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the GRNBoost2 GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for GRNBoost2. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from GRNBOOST2.

run()[source]

Function to run GRNBOOST2 algorithm

BLRun.grnvbemRunner module

class BLRun.grnvbemRunner.GRNVBEMRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the GRN-VBEM GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for GRNVBEM. It will create the input folder at self.working_dir if it does not exist already. The input folder will contain an ExpressionData.csv with cells ordered according to the pseudotime along the columns, and genes along the rows. If the files already exist, this function will overwrite it.

parseOutput()[source]

Function to parse outputs from GRNVBEM.

run()[source]

Function to run GRN-VBEM algorithm

BLRun.jump3Runner module

class BLRun.jump3Runner.JUMP3Runner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the JUMP3 GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for JUMP3. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from JUMP3.

run()[source]

Function to run JUMP3 algorithm

BLRun.leapRunner module

class BLRun.leapRunner.LEAPRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the LEAP GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for LEAP. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from LEAP.

run()[source]

Function to run LEAP algorithm

Requires the maxLag parameter

BLRun.pearsonRunner module

class BLRun.pearsonRunner.PearsonRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for pairwise Pearson correlation GRN inference. Runs entirely within the BEELINE conda environment; no Docker image is used. The image field in the config should be set to ‘local’.

generateInputs()[source]

Verifies that the expression data file exists in the input directory. No file copying is required because Pearson runs locally without Docker.

Parameters:
  • self.input_dir – Path — directory containing input files

  • self.exprData – str — expression data filename

Raises:

FileNotFoundError – if the expression data file is missing

parseOutput()[source]

Reads the gene x gene correlation matrix from working_dir/outFile.txt and writes a ranked edge list to output_dir/rankedEdges.csv. Both directions of each gene pair are included (the matrix is symmetric). Self-correlations (Gene1 == Gene2) are excluded. Edges are ranked by absolute correlation value, descending.

Parameters:

self.working_dir – Path — directory containing outFile.txt

Output output_dir/rankedEdges.csv:

tab-separated edge list with columns Gene1 (str), Gene2 (str), EdgeWeight (float, signed Pearson r)

run()[source]

Computes pairwise Pearson correlation between all gene pairs. Each gene’s expression is first normalized by its maximum expression value across all cells, bringing values into the range [0, 1] for non-negative data. Genes with zero maximum expression are left unnormalized (divisor replaced with 1). Writes the full (genes x genes) correlation matrix to working_dir/outFile.txt.

Parameters:
  • self.input_dir – Path — directory containing expression data

  • self.exprData – str — CSV filename; rows = genes, columns = cells

  • self.working_dir – Path — output location for outFile.txt

Output working_dir/outFile.txt:

tab-separated (genes x genes) correlation matrix

BLRun.pidcRunner module

class BLRun.pidcRunner.PIDCRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the PIDC GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for PIDC. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from PIDC.

run()[source]

Function to run PIDC algorithm

BLRun.ppcorRunner module

class BLRun.ppcorRunner.PPCORRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the PPCOR GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for PPCOR. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from PPCOR.

run()[source]

Function to run PPCOR algorithm

BLRun.runner module

class BLRun.runner.Runner(root: Path, config: dict)[source]

Bases: ABC

Abstract base_input class for BEELINE GRN inference algorithm runners.

Subclasses must implement generateInputs, run, and parseOutput. Attributes set here reflect the fields accessed by runner implementations.

abstract generateInputs()[source]

Prepare algorithm-specific input files from the dataset.

abstract parseOutput() None[source]

Parse raw algorithm output and write a ranked edge list to disk.

Implementations should build a DataFrame with columns Gene1, Gene2, EdgeWeight and pass it to self._write_ranked_edges(). Returns early without writing if the expected output file is missing.

abstract run()[source]

Execute the inference algorithm.

BLRun.scodeRunner module

class BLRun.scodeRunner.SCODERunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the SCODE GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for SCODE. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from SCODE.

run()[source]

Function to run SCODE algorithm

BLRun.scribeRunner module

class BLRun.scribeRunner.SCRIBERunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the SCRIBE GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for SCRIBE. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from SCRIBE.

run()[source]

Function to run SCRIBE algorithm. To see all the inputs runScribe.R script takes, run: docker run scribe:base /bin/sh -c “Rscript runScribe.R -h”

BLRun.scsglRunner module

class BLRun.scsglRunner.SCSGLRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the scSGL GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for scSGL. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from SCSGL.

run()[source]

Function to run SCSGL algorithm

BLRun.sinceritiesRunner module

class BLRun.sinceritiesRunner.SINCERITIESRunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the SINCERITIES GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for SINCERITIES. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from SINCERITIES.

run()[source]

Function to run SINCERITIES algorithm

BLRun.singeRunner module

class BLRun.singeRunner.SINGERunner(root: Path, config: dict)[source]

Bases: Runner

Concrete runner for the SINGE GRN inference algorithm.

generateInputs()[source]

Function to generate desired inputs for SINGE. If the folder/files under self.input_dir exist, this function will not do anything.

parseOutput()[source]

Function to parse outputs from SINGE.

run()[source]

Function to run SINGE algorithm

Module contents