Module epiclass.utils.bg_val_transfer

Transfer bedgraph values to new positions based on a reference bed file.

Functions

def main() ‑> None

Main function to parse arguments and execute parallel processing of bedgraph files.

def parse_arguments() ‑> argparse.Namespace

Parse command line arguments for the script.

Returns

argparse.Namespace
Namespace object containing the arguments.
def process_bedgraph(bg_path: pathlib.Path, ref_bed: pandas.core.frame.DataFrame, output_dir: pathlib.Path) ‑> None

Process a single bedgraph file to transfer its values to new positions.

Args

bg_path : Path
Path to the bedgraph file.
ref_bed : pd.DataFrame
Reference bed dataframe to which values are mapped.
output_dir : Path
Directory where the output file will be saved.