copy_number_segmentation

pylluminator.cnv.copy_number_segmentation(samples: Samples, cnv_df: DataFrame, cnv_column_name: str) tuple[PyRanges, DataFrame, DataFrame]

With the output dataframe of copy_number_variation, group the genome in segments with similar CNV using the Circular Binary Segmentation (CBS) algorithm.

Parameters:
  • samples (Samples) – samples to be analyzed

  • cnv_df (pandas.DataFrame) – dataframe with the CNV information

  • cnv_column_name (str) – name of the CNV column in the dataframe (it usually corresponds to the sample name used for CNV calculation).

Returns:

a tuple with: the bins coordinates, the bins signal, the segments

Return type:

tuple[pyranges.PyRanges, pandas.DataFrame, pandas.DataFrame]