Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Possible to set reference condition for two_sample tests? #205

@adkinsrs

Description

@adkinsrs

I was originally trying to use the rank_genes_groups() function in scanpy to get p-values and logfoldchanges between a single condition and a reference condition. My end-goal was to take the DE results and make a volcano plot. After reading some of the scanpy Github issue tickets (scverse/scanpy#397), I learned of diffxpy and how it seems to be recommended for DEG over scanpy in general situations.

I like how there is less need to transform the diffxpy.api.test.t_test output when compared to the output of scanpy.tl.rank_genes_groups to get the data into a format to create a volcano plot for my code. However, it seems that no matter which order I supply the two conditions for the t-test, the resulting output is the same. This results in some volcano plots that, when compared to a plot made using scanpy.tl.rank_genes_groups output, has about the same p-val but a log-fold change with the opposite sign.

Is there some easy way of forcing one of the conditions to be the reference condition for the diffxpy DEG tests? I apologize if I'm missing some inherent understanding or limitation of the tool.

Also, I think this question relates to #188 and to #184.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions