Drizzle-Zhang / scMAGIC

Accurately annotating scRNA-seq data using two rounds of reference-based classification
GNU General Public License v3.0
6 stars 3 forks source link

Issue abuut human mouse mixed sample #12

Closed Tianqi-Ma closed 1 year ago

Tianqi-Ma commented 2 years ago

Hi,

I was trying to apply scMAGIC on my human mouse mixed 10x data, whose row names are all start with 'GRCh38-' and 'mm10---'.

> head(rownames(seurat.query))
[1] "GRCh38-AL627309.1" "GRCh38-AL627309.5" "GRCh38-AP006222.2"
[4] "GRCh38-LINC01409"  "GRCh38-FAM87B"     "GRCh38-LINC01128"
> tail(rownames(seurat.query))
[1] "mm10---AC132444.6"     "mm10---Vamp7"          "mm10---Spry3"
[4] "mm10---Tmlhe"          "mm10---CAAA01147332.1" "mm10---AC149090.1"

So I add 'GRCh38-' to all row names in ref dataset, which contains only human cells (as I want to annotate human cells for test run)

> tail(rownames(seurat.ref))
[1] "GRCh38-TSPEAR"     "GRCh38-AP001505.2" "GRCh38-LINC00334"
[4] "GRCh38-LINC00316"  "GRCh38-BX322562.1" "GRCh38-AP001476.1"

But I got an error saying

[1] "B220728C1L1_220722"
[1] "Sum single cell counts matrix:"
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
[1] "Number of overlapped genes:"
[1] 0
[1] "Start clustering :"
Error in `$<-.data.frame`(`*tmp*`, "variance.expected", value = 0) :
  replacement has 1 row, data has 0
Calls: scMAGIC_Seurat ... FindVariableFeatures.default -> $<- -> $<-.data.frame
In addition: Warning message:
In dir.create("./5_scMAGIC") : './5_scMAGIC' already exists
Execution halted

Is this because of the prefix of gene names? The pipeline used to work perfectly on my other dataset (human cells only).

BTW, does scMAGIC support human mouse mixed dataset? I specify 'HCL' in altas as I only want to annotate human cell types.

# output
  seurat.query <- scMAGIC_Seurat(seurat.query, seurat.ref, atlas = 'HCL', corr_use_HVGene = 3000)

Hope receive your reply soon and have a nice day!

Drizzle-Zhang commented 2 years ago

At present, the scMAGIC doesn't support that the input includes both human and mouse data. You can use the function "transformHomoloGene" to transform the mouse data to the human data, then concat the two matrix as the input.