Example of oncoplot¶
In [1]:
Copied!
from pyMut.input import read_maf
maf_path = "../../../src/pyMut/data/examples/MAF/tcga_laml.maf.gz"
print(f'📂 Loading file: {maf_path}')
# Read the MAF file and create the PyMutation object
py_mutation = read_maf(maf_path,assembly="37")
from pyMut.input import read_maf
maf_path = "../../../src/pyMut/data/examples/MAF/tcga_laml.maf.gz"
print(f'📂 Loading file: {maf_path}')
# Read the MAF file and create the PyMutation object
py_mutation = read_maf(maf_path,assembly="37")
2025-08-01 00:58:01,467 | INFO | pyMut.input | Starting MAF reading: ../../../src/pyMut/data/examples/MAF/tcga_laml.maf.gz 2025-08-01 00:58:01,468 | INFO | pyMut.input | Loading from cache: ../../../src/pyMut/data/examples/MAF/.pymut_cache/tcga_laml.maf_8bfbda65c4b23428.parquet 2025-08-01 00:58:01,494 | INFO | pyMut.input | Cache loaded successfully in 0.03 seconds
📂 Cargando archivo: ../../../src/pyMut/data/examples/MAF/tcga_laml.maf.gz
In [2]:
Copied!
py_mutation.configure_high_quality_plots()
py_mutation.configure_high_quality_plots()
In [3]:
Copied!
py_mutation.oncoplot()
py_mutation.oncoplot()
Processing 193 samples and data from 2091 variants... Processed matrix: 1611 genes x 193 samples Genes with mutations: 1611 Applying standard cascade algorithm (maftools)... Cascade applied: - Genes sorted by frequency: 10 - Samples sorted by cascade algorithm: 180 - Final samples shown: 180
/home/luisruimore/Escritorio/TFG/src/pyMut/visualizations/oncoplot.py:416: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)` numeric_matrix = plot_matrix.replace(value_to_num) /home/luisruimore/Escritorio/TFG/src/pyMut/visualizations/oncoplot.py:490: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. numeric_matrix = plot_matrix.applymap(lambda x: value_to_num[x])
Oncoplot created successfully: - 10 genes - 180 samples - 9 variant types - Standard cascade algorithm applied (maftools)
Out[3]: