copy_number_segmentation
- pylluminator.cnv.copy_number_segmentation(samples: Samples, cnv_df: DataFrame, cnv_column_name: str, tile_width: int = 50000) 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).
tile_width (int) – the genome is split into adjacent non-overlapping tiles of a given size, defined by tile_width. Default: 50 000.
- Returns:
a tuple with: the bins coordinates, the bins signal, the segments
- Return type:
tuple[pyranges.PyRanges, pandas.DataFrame, pandas.DataFrame]