Ejemplo n.º 1
0
         ]) \
        .with_normalization(Normalization("CLR", "CLR")) \
        .with_pair_strategy("paired_subtract_sex_balanced") \
        .with_metadata_filter([
        None,
        MetadataFilter(
            "Off Treatment",
            "treatment_status",
            ["Off", "Control"]
        )
    ])



    woltka_species = AnalysisFactory(
        [BiomTable("species")],
        metadata_filepath,
        "All Species",
    ).with_normalization(Normalization("CLR", "CLR")) \
    .with_pair_strategy("paired_subtract_sex_balanced")

    return MultiFactory([woltka_species, woltka_transforms])


if __name__ == "__main__":
    # Pretend all scripts are run from root of repo for file paths.
    import os
    os.chdir("..")
    DryRunner().run(configure())
    SerialRunner().run(configure())
Ejemplo n.º 2
0
        .with_normalization([Normalization("CLR", "CLR")])\
        .with_feature_set([fset_species] + fset_species.create_univariate_sets() + fsets)

    probstel_lda = AnalysisFactory(
        BiomTable("genus"),
        metadata_filepath
    )\
        .with_lda(1)\
        .with_pair_strategy(["paired_subtract_sex_balanced"])\
        .with_normalization([Normalization("CLR", "CLR")])\
        .with_feature_set([probstel] + probstel.create_univariate_sets())

    # return MultiFactory([
    #     # umap,
    #     lda,
    #     # pca,
    #     # raw,
    # ])
    # return probstel_lda
    return MultiFactory([raw, probstel_lda])


if __name__ == "__main__":
    # Pretend all scripts are run from root of repo for file paths.
    import os
    os.chdir("..")
    runner = SerialRunner()
    lda_plot = LDAPlot(rows=2)
    lda_plot.hook_events(runner)
    runner.run(configure())
    lda_plot.print_acc()