Metagene
Metagene calculation and plotting related methods.
- class Metagene[source]
- __init__(report_df: DataFrame, **kwargs)[source]
Base class for Bismark data.
- Parameters:
report_df – pl.DataFrame with cytosine methylation status.
upstream_windows – Number of upstream windows. Required.
gene_windows – Number of gene windows. Required.
downstream_windows – Number of downstream windows. Required.
strand – Strand if filtered.
context – Methylation context if filtered.
plot_data – Data for plotting.
Methods
Constructor for Metagene class from Bismark
coverage2cytosine
report.Constructor for Metagene class from BSSeeker2 CGmap file.
Constructor for Metagene class from
.bedGraph
file.Constructor for Metagene class from
.cov
file.Constructor for Metagene class from
BinomialData.preprocess()
.parquet
file.Method for filtering metagene.
Mutate DataFrame to fewer fragments.
Trim Metagene flanking regions.
Create
LinePlot
method.Create
HeatMap
method.Cluster regions with hierarchical clustering, by their methylation pattern.
- class MetageneFiles[source]
Methods
- __init__(samples, labels: list[str] | None = None)
Create istance of
MetageneFiles
from list of paths.Metagene.filter()
all metagenes.Metagene.resize()
all metagenes.Metagene.trim_flank()
all metagenes.Merge
MetageneFiles
into singleMetagene
Create
LinePlotFiles
method.Create
HeatMapNew
method.Cluster samples regions by methylation pattern.
Cluster samples by total methylation level of regions and draw dendrogram.