Server Modules
- class modalysis.server.models.GffFormatRequest(*, input_path: str, output_path: str, output_name: str, allowed_chromosomes: list[str])[source]
Bases:
BaseModel- Parameters:
input_path (str)
output_path (str)
output_name (str)
allowed_chromosomes (list[str])
- input_path: str
- output_path: str
- output_name: str
- allowed_chromosomes: list[str]
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.GffAnnotateRequest(*, gff_path: str, expression_paths: list[str], expression_labels: list[str], output_path: str, output_name: str)[source]
Bases:
BaseModel- Parameters:
gff_path (str)
expression_paths (list[str])
expression_labels (list[str])
output_path (str)
output_name (str)
- gff_path: str
- expression_paths: list[str]
- expression_labels: list[str]
- output_path: str
- output_name: str
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.PileupFormatRequest(*, input_path: str, output_path: str, output_name: str, allowed_chromosomes: list[str])[source]
Bases:
BaseModel- Parameters:
input_path (str)
output_path (str)
output_name (str)
allowed_chromosomes (list[str])
- input_path: str
- output_path: str
- output_name: str
- allowed_chromosomes: list[str]
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.PileupMergeRequest(*, pileup_paths: list[str], output_path: str, output_name: str, min_files: int = 2, min_file_coverage: float = 50.0, min_reads: int = 5)[source]
Bases:
BaseModel- Parameters:
pileup_paths (list[str])
output_path (str)
output_name (str)
min_files (int)
min_file_coverage (float)
min_reads (int)
- pileup_paths: list[str]
- output_path: str
- output_name: str
- min_files: int
- min_file_coverage: float
- min_reads: int
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.DmrFormatRequest(*, input_path: str, output_path: str, output_name: str, allowed_chromosomes: list[str], min_score: float = 5, max_p_value: float = 0.05, min_pct_a_samples: float = 50.0, min_pct_b_samples: float = 50.0, min_reads: int = 5)[source]
Bases:
BaseModel- Parameters:
input_path (str)
output_path (str)
output_name (str)
allowed_chromosomes (list[str])
min_score (float)
max_p_value (float)
min_pct_a_samples (float)
min_pct_b_samples (float)
min_reads (int)
- input_path: str
- output_path: str
- output_name: str
- allowed_chromosomes: list[str]
- min_score: float
- max_p_value: float
- min_pct_a_samples: float
- min_pct_b_samples: float
- min_reads: int
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.DmrAnnotateRequest(*, dmr_path: str, gff_path: str, output_path: str, output_name: str)[source]
Bases:
BaseModel- Parameters:
dmr_path (str)
gff_path (str)
output_path (str)
output_name (str)
- dmr_path: str
- gff_path: str
- output_path: str
- output_name: str
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.DmrGeneCountsRequest(*, annotated_dmr_paths: list[str], manifestations: list[str], modifications: list[str], manifestation_labels: list[str], expression_labels: list[str], annotated_gff_path: str, output_path: str, output_name: str, output_excel: bool = False)[source]
Bases:
BaseModel- Parameters:
annotated_dmr_paths (list[str])
manifestations (list[str])
modifications (list[str])
manifestation_labels (list[str])
expression_labels (list[str])
annotated_gff_path (str)
output_path (str)
output_name (str)
output_excel (bool)
- annotated_dmr_paths: list[str]
- manifestations: list[str]
- modifications: list[str]
- manifestation_labels: list[str]
- expression_labels: list[str]
- annotated_gff_path: str
- output_path: str
- output_name: str
- output_excel: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.DmrCommonGenesRequest(*, annotated_dmr_paths: list[str], manifestations: list[str], modifications: list[str], manifestation_labels: list[str], expression_labels: list[str], modification_a: str, modification_b: str, annotated_gff_path: str, output_path: str, output_name: str)[source]
Bases:
BaseModel- Parameters:
annotated_dmr_paths (list[str])
manifestations (list[str])
modifications (list[str])
manifestation_labels (list[str])
expression_labels (list[str])
modification_a (str)
modification_b (str)
annotated_gff_path (str)
output_path (str)
output_name (str)
- annotated_dmr_paths: list[str]
- manifestations: list[str]
- modifications: list[str]
- manifestation_labels: list[str]
- expression_labels: list[str]
- modification_a: str
- modification_b: str
- annotated_gff_path: str
- output_path: str
- output_name: str
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.PlotMeanMethylationRequest(*, gff_path: str, merged_pileup_paths: list[str], labels: list[str], output_path: str, output_name: str, y_min: float = 0.0, y_max: float = 0.1, chromosome_order: list[str] | None = None, plot_title: str | None = None)[source]
Bases:
BaseModel- Parameters:
gff_path (str)
merged_pileup_paths (list[str])
labels (list[str])
output_path (str)
output_name (str)
y_min (float)
y_max (float)
chromosome_order (list[str] | None)
plot_title (str | None)
- gff_path: str
- merged_pileup_paths: list[str]
- labels: list[str]
- output_path: str
- output_name: str
- y_min: float
- y_max: float
- chromosome_order: list[str] | None
- plot_title: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.PlotGeneHeatmapRequest(*, annotated_dmr_paths: list[str], manifestations: list[str], modifications: list[str], manifestation_labels: list[str], expression_labels: list[str], annotated_gff_path: str, gff_path: str, merged_pileup_paths: list[str], pileup_manifestations: list[str], pileup_modifications: list[str], output_path: str, output_name: str, show_gene_labels: bool = False, effect_signs: list[str] | None = None)[source]
Bases:
BaseModel- Parameters:
annotated_dmr_paths (list[str])
manifestations (list[str])
modifications (list[str])
manifestation_labels (list[str])
expression_labels (list[str])
annotated_gff_path (str)
gff_path (str)
merged_pileup_paths (list[str])
pileup_manifestations (list[str])
pileup_modifications (list[str])
output_path (str)
output_name (str)
show_gene_labels (bool)
effect_signs (list[str] | None)
- annotated_dmr_paths: list[str]
- manifestations: list[str]
- modifications: list[str]
- manifestation_labels: list[str]
- expression_labels: list[str]
- annotated_gff_path: str
- gff_path: str
- merged_pileup_paths: list[str]
- pileup_manifestations: list[str]
- pileup_modifications: list[str]
- output_path: str
- output_name: str
- show_gene_labels: bool
- effect_signs: list[str] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.PlotDmrDotplotRequest(*, annotated_dmr_paths: list[str], manifestations: list[str], modifications: list[str], manifestation_labels: list[str], expression_labels: list[str], annotated_gff_path: str, gff_path: str, output_path: str, output_name: str, show_gene_labels: bool = False, effect_signs: list[str] | None = None)[source]
Bases:
BaseModel- Parameters:
annotated_dmr_paths (list[str])
manifestations (list[str])
modifications (list[str])
manifestation_labels (list[str])
expression_labels (list[str])
annotated_gff_path (str)
gff_path (str)
output_path (str)
output_name (str)
show_gene_labels (bool)
effect_signs (list[str] | None)
- annotated_dmr_paths: list[str]
- manifestations: list[str]
- modifications: list[str]
- manifestation_labels: list[str]
- expression_labels: list[str]
- annotated_gff_path: str
- gff_path: str
- output_path: str
- output_name: str
- show_gene_labels: bool
- effect_signs: list[str] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class modalysis.server.models.PlotCommonGenesVennRequest(*, annotated_dmr_paths: list[str], manifestations: list[str], modifications: list[str], modification_a: str, modification_b: str, output_path: str, output_name: str)[source]
Bases:
BaseModel- Parameters:
annotated_dmr_paths (list[str])
manifestations (list[str])
modifications (list[str])
modification_a (str)
modification_b (str)
output_path (str)
output_name (str)
- annotated_dmr_paths: list[str]
- manifestations: list[str]
- modifications: list[str]
- modification_a: str
- modification_b: str
- output_path: str
- output_name: str
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
FastAPI application entrypoint for modalysis.
- modalysis.server.main.lifespan(app: FastAPI) AsyncIterator[None][source]
Configure logging when the FastAPI application starts.
- Parameters:
app (FastAPI)
- Return type:
AsyncIterator[None]
FastAPI routes for GFF operations.
- modalysis.server.gff.gff_format(request: GffFormatRequest) dict[str, str][source]
Handle POST /gff/format and run core GFF formatting.
- Parameters:
request (GffFormatRequest)
- Return type:
dict[str, str]
- modalysis.server.gff.gff_annotate(request: GffAnnotateRequest) dict[str, str][source]
Handle POST /gff/annotate and run core GFF annotation.
- Parameters:
request (GffAnnotateRequest)
- Return type:
dict[str, str]
FastAPI routes for pileup operations.
- modalysis.server.pileup.pileup_format(request: PileupFormatRequest) dict[str, str][source]
Handle POST /pileup/format and run core pileup formatting.
- Parameters:
request (PileupFormatRequest)
- Return type:
dict[str, str]
- modalysis.server.pileup.pileup_merge(request: PileupMergeRequest) dict[str, str][source]
Handle POST /pileup/merge and run core pileup merging.
- Parameters:
request (PileupMergeRequest)
- Return type:
dict[str, str]
FastAPI routes for DMR operations.
- modalysis.server.dmr.dmr_format(request: DmrFormatRequest) dict[str, str][source]
Handle POST /dmr/format and run core DMR formatting.
- Parameters:
request (DmrFormatRequest)
- Return type:
dict[str, str]
- modalysis.server.dmr.dmr_annotate(request: DmrAnnotateRequest) dict[str, str][source]
Handle POST /dmr/annotate and run core DMR interval annotation.
- Parameters:
request (DmrAnnotateRequest)
- Return type:
dict[str, str]
- modalysis.server.dmr.dmr_gene_counts(request: DmrGeneCountsRequest) dict[str, str][source]
Handle POST /dmr/gene-counts and run gene-count aggregation.
- Parameters:
request (DmrGeneCountsRequest)
- Return type:
dict[str, str]
- modalysis.server.dmr.dmr_common_genes(request: DmrCommonGenesRequest) dict[str, str][source]
Handle POST /dmr/common-genes and run overlap aggregation.
- Parameters:
request (DmrCommonGenesRequest)
- Return type:
dict[str, str]
FastAPI routes for plot generation operations.
- modalysis.server.plot.plot_mean_methylation(request: PlotMeanMethylationRequest) dict[str, str][source]
Handle POST /plot/mean-methylation and generate mean methylation plot.
- Parameters:
request (PlotMeanMethylationRequest)
- Return type:
dict[str, str]
- modalysis.server.plot.plot_gene_heatmap(request: PlotGeneHeatmapRequest) dict[str, str][source]
Handle POST /plot/gene-heatmap and generate heatmap plots.
- Parameters:
request (PlotGeneHeatmapRequest)
- Return type:
dict[str, str]
- modalysis.server.plot.plot_dmr_dotplot(request: PlotDmrDotplotRequest) dict[str, str][source]
Handle POST /plot/dmr-dotplot and generate dotplot panels.
- Parameters:
request (PlotDmrDotplotRequest)
- Return type:
dict[str, str]
- modalysis.server.plot.plot_common_genes_venn(request: PlotCommonGenesVennRequest) dict[str, str][source]
Handle POST /plot/common-genes-venn and generate Venn figure.
- Parameters:
request (PlotCommonGenesVennRequest)
- Return type:
dict[str, str]