Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDAregion error: data are essentially constant #6

Open
stanaka6 opened this issue Sep 4, 2021 · 1 comment
Open

getDAregion error: data are essentially constant #6

stanaka6 opened this issue Sep 4, 2021 · 1 comment

Comments

@stanaka6
Copy link

stanaka6 commented Sep 4, 2021

Hi DAseq team,

Thank you for providing a nice tool. I am having an error message and several warnings when running getDAregion. The error is probably related to the statistical test (t-test), but I am not sure if I can use other tests here, or something is wrong with my input data. My aim in performing DAseq is to see whether there are differentially abundant cell populations between WT and KO samples and identify if those DA populations are statistically and biologically reliable. My original Seurat object is an integrated object (WT: 2366 cells; KO: 5046 cells) created by the standard protocol.

Could you please help me to solve this issue? Any suggestions or comments would be appreciated.

Error and warnings:

da_regions_res001 <- getDAregion(
  X = integ,
  da.cells = da_cells,
  cell.labels = [email protected]$orig.ident,
  labels.1 = label_res,
  labels.2 = label_nonres,
  resolution = 0.01,
  plot.embedding = embed
)

# Turning X to a matrix.
# Using min.cell = 50
# Warning: The following arguments are not used: row.names
# Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
# Warning: The following arguments are not used: row.names
# Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
# Warning: The following arguments are not used: row.names
# Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
# Removing 3 DA regions with cells < 50.
# Error in t.test.default(x = idx.label.ratio[labels.2], idx.label.ratio[labels.1]) : 
#   data are essentially constant

The details of my data are below:

se <- readRDS("WT_KO_integrated_SeuratObject.rds")

se
# An object of class Seurat 
# 18075 features across 7412 samples within 2 assays 
# Active assay: integrated (2000 features, 2000 variable features)
#  1 other assay present: RNA
#  3 dimensional reductions calculated: pca, umap, tsne

integ <- data.frame(se@[email protected][,1:21])
label_res <- se$orig.ident[se$sample == "KO"]
label_nonres <- se$orig.ident[se$sample == "WT"]
embed <- data.frame(se@[email protected])

head(embed)
#                           tSNE_1    tSNE_2
# WT_AAACCCAAGATCCGAG-1 -37.097319  11.12396
# WT_AAACCCACAGAGACTG-1 -16.785063  30.81720
# WT_AAACCCACATGAGAAT-1   1.463344  14.66381
# WT_AAACCCATCGAGAAAT-1  38.852505 -16.65050
# WT_AAACGAATCCTTGGAA-1  -7.666700  15.41251
# WT_AAAGAACAGCAACAAT-1  12.399879 -22.62338

tail(embed)
#                           tSNE_1     tSNE_2
# KO_TTTGTTGAGGTAAACT-1  34.348403 -12.031938
# KO_TTTGTTGCAGCGACCT-1 -22.358025 -18.574149
# KO_TTTGTTGCATACCATG-1   3.216129  10.567165
# KO_TTTGTTGCATATAGCC-1 -21.909047  24.071238
# KO_TTTGTTGGTTGGAGAC-1  -8.336157  -3.233347
# KO_TTTGTTGTCGCTTACC-1  -2.244519  43.394538

da_cells <- getDAcells(
  X = integ,
  cell.labels = [email protected]$orig.ident,
  labels.1 = label_res,
  labels.2 = label_nonres,
  k.vector = seq(50, 500, 50),
  plot.embedding = embed
)

Thank you!

@klgoss
Copy link

klgoss commented Jul 26, 2022

I'm having the same issue. Has anyone found a solution?

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

No branches or pull requests

2 participants