Skip to content

Conversation

@patcon
Copy link

@patcon patcon commented Dec 15, 2025

I'm orienting in this tool, and couldn't make sense of this. Then I realized it's not even a column that's created when the command is run. I think it's a copy-paste issue from the observation-level doc section.

Fwiw, n_cells is the only column not mentions, and so perhaps this was supposed to be that? Not sure, so I'll leave that part to someone else.

Thanks! Sorry if I'm doing this wrong -- it's my first PR, and nothing in the template seemed relevant to a docs typo fix 🙏

@codecov
Copy link

codecov bot commented Dec 15, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2337 3 2334 347
View the top 3 failed test(s) by shortest run time
tests/test_neighbors.py::test_connectivities_euclidean[umap]
Stack Traces | 0.021s run time
neigh = <scanpy.neighbors.Neighbors object at 0x7f2c99dab020>, method = 'umap'
conn = [[0.0, 1.0, 0.0, 1.0], [1.0, 0.0, 0.5849691143165735, 0.8277419907567016], [0.0, 0.5849691143165735, 0.0, 1.0], [1.0, 0.8277419907567016, 1.0, 0.0]]
trans = [[0.0, 0.5395987596963403, 0.0, 0.4604012403036599], [0.430368608684738, 0.0, 0.3176747629691457, 0.2519566283461165],...0, 0.40673754271561435, 0.0, 0.5932624572843856], [0.33921243006981133, 0.23275092618009624, 0.42803664375009237, 0.0]]
trans_sym = [[0.0, 0.4818987107873648, 0.0, 0.3951883393150153], [0.48189871078736474, 0.0, 0.3594582764005241, 0.2421634543129348...0.0, 0.3594582764005241, 0.0, 0.5039226836320637], [0.39518833931501524, 0.24216345431293487, 0.5039226836320637, 0.0]]

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mmethod#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mconn#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mtrans#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mtrans_sym#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mumap#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                connectivities_umap,#x1B[90m#x1B[39;49;00m
                transitions_umap,#x1B[90m#x1B[39;49;00m
                transitions_sym_umap,#x1B[90m#x1B[39;49;00m
                marks=SKIPIF_UMAP_BROKEN,#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mumap#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mgauss#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                connectivities_gauss_knn,#x1B[90m#x1B[39;49;00m
                transitions_gauss_knn,#x1B[90m#x1B[39;49;00m
                transitions_sym_gauss_knn,#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mgauss#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mjaccard#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                connectivities_jaccard,#x1B[90m#x1B[39;49;00m
                transitions_jaccard,#x1B[90m#x1B[39;49;00m
                transitions_sym_jaccard,#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mjaccard#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_connectivities_euclidean#x1B[39;49;00m(neigh: Neighbors, method, conn, trans, trans_sym):#x1B[90m#x1B[39;49;00m
        neigh.compute_neighbors(n_neighbors, method=method)#x1B[90m#x1B[39;49;00m
>       np.testing.assert_allclose(neigh.connectivities.toarray(), conn)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: #x1B[0m
#x1B[1m#x1B[31mE       Not equal to tolerance rtol=1e-07, atol=0#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Mismatched elements: 4 / 16 (25%)#x1B[0m
#x1B[1m#x1B[31mE       Max absolute difference among violations: 0.4150308857#x1B[0m
#x1B[1m#x1B[31mE       Max relative difference among violations: 0.7094919638#x1B[0m
#x1B[1m#x1B[31mE        ACTUAL: array([[0., 1., 0., 1.],#x1B[0m
#x1B[1m#x1B[31mE              [1., 0., 1., 1.],#x1B[0m
#x1B[1m#x1B[31mE              [0., 1., 0., 1.],#x1B[0m
#x1B[1m#x1B[31mE              [1., 1., 1., 0.]], dtype=float32)#x1B[0m
#x1B[1m#x1B[31mE        DESIRED: array([[0.      , 1.      , 0.      , 1.      ],#x1B[0m
#x1B[1m#x1B[31mE              [1.      , 0.      , 0.584969, 0.827742],#x1B[0m
#x1B[1m#x1B[31mE              [0.      , 0.584969, 0.      , 1.      ],#x1B[0m
#x1B[1m#x1B[31mE              [1.      , 0.827742, 1.      , 0.      ]])#x1B[0m

#x1B[1m#x1B[31mtests/test_neighbors.py#x1B[0m:230: AssertionError
tests/test_rank_genes_groups.py::test_wilcoxon_tie_correction[True]
Stack Traces | 0.059s run time
reference = True

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mreference#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mTrue#x1B[39;49;00m, #x1B[94mFalse#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_wilcoxon_tie_correction#x1B[39;49;00m(reference):#x1B[90m#x1B[39;49;00m
        pbmc = pbmc68k_reduced()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        groups = [#x1B[33m"#x1B[39;49;00m#x1B[33mCD14+ Monocyte#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mDendritic#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        groupby = #x1B[33m"#x1B[39;49;00m#x1B[33mbulk_labels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        _, groups_masks = select_groups(pbmc, groups, groupby)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        x = pbmc.raw.X[groups_masks[#x1B[94m0#x1B[39;49;00m]].toarray()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        mask_rest = groups_masks[#x1B[94m1#x1B[39;49;00m] #x1B[94mif#x1B[39;49;00m reference #x1B[94melse#x1B[39;49;00m ~groups_masks[#x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        y = pbmc.raw.X[mask_rest].toarray()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        pvals = mannwhitneyu(x, y, use_continuity=#x1B[94mFalse#x1B[39;49;00m, alternative=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-sided#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m).pvalue#x1B[90m#x1B[39;49;00m
        pvals[np.isnan(pvals)] = #x1B[94m1.0#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m reference:#x1B[90m#x1B[39;49;00m
            ref = groups[#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            ref = #x1B[33m"#x1B[39;49;00m#x1B[33mrest#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            groups = groups[:#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        test_obj = _RankGenes(pbmc, groups, groupby, reference=ref)#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
            pytest.warns(#x1B[96mRuntimeWarning#x1B[39;49;00m, match=#x1B[33mr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33minvalid value encountered#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m reference#x1B[90m#x1B[39;49;00m
            #x1B[94melse#x1B[39;49;00m nullcontext()#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            test_obj.compute_statistics(#x1B[33m"#x1B[39;49;00m#x1B[33mwilcoxon#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, tie_correct=#x1B[94mTrue#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       np.testing.assert_allclose(test_obj.stats[groups[#x1B[94m0#x1B[39;49;00m]][#x1B[33m"#x1B[39;49;00m#x1B[33mpvals#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m], pvals)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: #x1B[0m
#x1B[1m#x1B[31mE       Not equal to tolerance rtol=1e-07, atol=0#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Mismatched elements: 383 / 765 (50.1%)#x1B[0m
#x1B[1m#x1B[31mE       Max absolute difference among violations: 2.47e-07#x1B[0m
#x1B[1m#x1B[31mE       Max relative difference among violations: 4.48e-05#x1B[0m
#x1B[1m#x1B[31mE        ACTUAL: array([2.029091e-18, 6.430380e-01, 6.164863e-01, 7.551346e-02,#x1B[0m
#x1B[1m#x1B[31mE              1.590458e-08, 1.884037e-03, 5.290635e-01, 1.314833e-05,#x1B[0m
#x1B[1m#x1B[31mE              5.756106e-08, 2.646892e-01, 2.670054e-02, 4.151307e-01,...#x1B[0m
#x1B[1m#x1B[31mE        DESIRED: array([2.029090e-18, 6.430379e-01, 6.164863e-01, 7.551347e-02,#x1B[0m
#x1B[1m#x1B[31mE              1.590460e-08, 1.884038e-03, 5.290635e-01, 1.314831e-05,#x1B[0m
#x1B[1m#x1B[31mE              5.756110e-08, 2.646892e-01, 2.670054e-02, 4.151307e-01,...#x1B[0m

#x1B[1m#x1B[31mtests/test_rank_genes_groups.py#x1B[0m:301: AssertionError
tests/test_rank_genes_groups.py::test_wilcoxon_tie_correction[False]
Stack Traces | 0.277s run time
reference = False

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mreference#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mTrue#x1B[39;49;00m, #x1B[94mFalse#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_wilcoxon_tie_correction#x1B[39;49;00m(reference):#x1B[90m#x1B[39;49;00m
        pbmc = pbmc68k_reduced()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        groups = [#x1B[33m"#x1B[39;49;00m#x1B[33mCD14+ Monocyte#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mDendritic#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        groupby = #x1B[33m"#x1B[39;49;00m#x1B[33mbulk_labels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        _, groups_masks = select_groups(pbmc, groups, groupby)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        x = pbmc.raw.X[groups_masks[#x1B[94m0#x1B[39;49;00m]].toarray()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        mask_rest = groups_masks[#x1B[94m1#x1B[39;49;00m] #x1B[94mif#x1B[39;49;00m reference #x1B[94melse#x1B[39;49;00m ~groups_masks[#x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        y = pbmc.raw.X[mask_rest].toarray()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        pvals = mannwhitneyu(x, y, use_continuity=#x1B[94mFalse#x1B[39;49;00m, alternative=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-sided#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m).pvalue#x1B[90m#x1B[39;49;00m
        pvals[np.isnan(pvals)] = #x1B[94m1.0#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m reference:#x1B[90m#x1B[39;49;00m
            ref = groups[#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            ref = #x1B[33m"#x1B[39;49;00m#x1B[33mrest#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            groups = groups[:#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        test_obj = _RankGenes(pbmc, groups, groupby, reference=ref)#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
            pytest.warns(#x1B[96mRuntimeWarning#x1B[39;49;00m, match=#x1B[33mr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33minvalid value encountered#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m reference#x1B[90m#x1B[39;49;00m
            #x1B[94melse#x1B[39;49;00m nullcontext()#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            test_obj.compute_statistics(#x1B[33m"#x1B[39;49;00m#x1B[33mwilcoxon#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, tie_correct=#x1B[94mTrue#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       np.testing.assert_allclose(test_obj.stats[groups[#x1B[94m0#x1B[39;49;00m]][#x1B[33m"#x1B[39;49;00m#x1B[33mpvals#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m], pvals)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: #x1B[0m
#x1B[1m#x1B[31mE       Not equal to tolerance rtol=1e-07, atol=0#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Mismatched elements: 465 / 765 (60.8%)#x1B[0m
#x1B[1m#x1B[31mE       Max absolute difference among violations: 7.09e-07#x1B[0m
#x1B[1m#x1B[31mE       Max relative difference among violations: 0.44#x1B[0m
#x1B[1m#x1B[31mE        ACTUAL: array([4.747381e-47, 2.910919e-01, 9.350926e-01, 1.204920e-01,#x1B[0m
#x1B[1m#x1B[31mE              6.826701e-18, 4.262317e-04, 6.489862e-01, 3.630759e-11,#x1B[0m
#x1B[1m#x1B[31mE              3.053055e-17, 3.037204e-01, 2.432239e-01, 5.370464e-01,...#x1B[0m
#x1B[1m#x1B[31mE        DESIRED: array([0.000000e+00, 2.910920e-01, 9.350926e-01, 1.204920e-01,#x1B[0m
#x1B[1m#x1B[31mE              6.826711e-18, 4.262317e-04, 6.489862e-01, 3.630755e-11,#x1B[0m
#x1B[1m#x1B[31mE              3.053048e-17, 3.037204e-01, 2.432239e-01, 5.370464e-01,...#x1B[0m

#x1B[1m#x1B[31mtests/test_rank_genes_groups.py#x1B[0m:301: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@patcon
Copy link
Author

patcon commented Dec 15, 2025

Sorry, I'm a little disoriented, and trying to figure this out. I have a feeling maybe I'm missing something, but on the off chance this has merit, I'll leave it to someone else to close :)

@patcon patcon changed the title Remove "n_genes_by_{expr_type}" from variable-level metrics. Remove "n_genes_by_{expr_type}" typo from variable-level metrics docs Dec 16, 2025
@patcon patcon changed the title Remove "n_genes_by_{expr_type}" typo from variable-level metrics docs Remove "n_genes_by_{expr_type}" typo from variable-level qc metrics docs Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant