Comments (6)
Do you have more than one sample for this group?
ValueError: Could not calculate statistics for groups Ionocyte since they only contain one sample.
Generally, please post usage questions in the scverse discourse
from scanpy.
Do you have more than one sample for this group?
ValueError: Could not calculate statistics for groups Ionocyte since they only contain one sample.
Generally, please post usage questions in the scverse discourse
Yes, this group has 39 categories:
[2992 rows x 17 columns]
adata_sc.obs['Manuscript_Identity']
010I_AAACCTGAGAAGCCCA Macrophage
010I_AAACCTGAGTCGAGTG Macrophage
010I_AAACGGGGTCATACTG Macrophage
010I_AAACGGGGTTGGACCC T
010I_AAAGATGAGAACTGTA B
...
8CO_TGGGCGTTCTTAGCCC cMonocyte
8CO_TGGTTCCGTCTCACCT ATII
8CO_TTGACTTGTCGGCTCA Myofibroblast
8CO_TTGTAGGTCCAGATCA cMonocyte
8CO_TTTATGCGTAGGCTGA VE_Venous
Name: Manuscript_Identity, Length: 78081, dtype: category
Categories (39, object): ['ATI', 'ATII', 'Aberrant_Basaloid', 'B', ..., 'cDC2', 'cMonocyte',
'ncMonocyte', 'pDC']
from scanpy.
I am not sure what code you used to generate the above output? In any case
Could not calculate statistics for groups Ionocyte since they only contain one sample.
The issue seems to be related to Ionocytes.
so adata_sc.obs['Manuscript_Identity'].value_counts()
or so would be needed to check that indeed more than 1 Ionocyte is present.
from scanpy.
I am not sure what code you used to generate the above output? In any case
Could not calculate statistics for groups Ionocyte since they only contain one sample.
The issue seems to be related to Ionocytes.
so
adata_sc.obs['Manuscript_Identity'].value_counts()
or so would be needed to check that indeed more than 1 Ionocyte is present.
I ran the code you sent to me, hers is the result:
'Manuscript_Identity
Macrophage 14051
T_Cytotoxic 10739
T 9941
Macrophage_Alveolar 9938
NK 7997
cMonocyte 5508
B 4506
ncMonocyte 2291
Multiplet 1300
Myofibroblast 1153
Ciliated 1055
Mast 987
cDC2 867
T_Regulatory 809
Lymphatic 677
VE_Capillary_B 571
VE_Peribronchial 556
Fibroblast 527
ILC_A 392
B_Plasma 379
ATII 364
Club 362
Pericyte 309
VE_Arterial 309
pDC 289
ILC_B 288
SMC 284
VE_Capillary_A 276
ATI 268
cDC1 249
VE_Venous 244
Basal 172
DC_Mature 149
Mesothelial 109
Goblet 103
Aberrant_Basaloid 32
DC_Langerhans 20
PNEC 9
Ionocyte 1
Name: count, dtype: int64
'
So I just need to remove "Ionocyte" group, it could be work,right?
from scanpy.
Since sc.tl.rank_genes_groups
computes e.g. the variance within groups, there has to be more samples per group than 1, yes.
What cells you want remove during your analysis can be a tricky question, (e.g. maybe a strict preprocessing kicks out many cells) - but if you want to use this method on your data you seem to use here, the single Ionocyte has to be removed.
Hope this helps!
Quick hint: as mentioned above, ideally you raise such a question here: scverse discourse
This way, other users who encounter the same problem as you will also find the answer, easier than here :)
from scanpy.
I will close the issue for now, as based on the provided information and the discussion so far, it seems that the question has been addressed and hopefully resolved :)
However, please don't hesitate to start user questions on scverse discourse, or software & maintenance releated things here. Or reopen the issue if you think I missed your point!
Thanks for being a part of our community! :)
from scanpy.
Related Issues (20)
- Unify `method`/`flavor`/`backend`/… parameters
- Parameter docs render text in backticks as `<cite/>` text HOT 1
- Unable to plot embedding after Scanpy release 1.9.7 HOT 4
- pytest 8 compatibility HOT 2
- Fix plotting warnings raised in tutorial notebooks HOT 2
- Violin plots in Preprocessing and clustering 3k PBMCs tutorial HOT 4
- Documentation for percent_top= in scanpy.pp.calculate_qc_metrics is unclear and contradictory HOT 4
- Use of fast_matrix_market library to read mtx files HOT 1
- ValueError: b'Extrapolation not allowed with blending' when using `"sc.pp.highly_variable_genes"` function HOT 3
- sc.pp.subsample, allow for sampling with replacement HOT 1
- String conversion of `qc_vars` into a `Collection` when a `str` input is provided in `calculate_qc_metrics`
- ``biomart_annotations`` still creates cache when ``use_cache=False`` HOT 2
- Submodular optimization using apricot HOT 2
- Change default leiden clustering backend to `igraph`, and reduce default number of iterations
- Scanorama causing segfault on CI HOT 1
- Rename master -> main HOT 4
- More in depth example for `neighbors(transformer=...)` HOT 1
- scanpy 1.10.0rc1 breaks anndata pre-release tests
- log1p return matrix HOT 1
- Leiden and louvain params not saved to matching `key_added` key in `uns` dictionary
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scanpy.