welch-lab / liger

R package for integrating and analyzing multiple single-cell datasets
GNU General Public License v3.0
389 stars 78 forks source link

error when performs seuratToLiger #147

Closed yiranzou12138 closed 4 years ago

yiranzou12138 commented 4 years ago

Hi,

I am trying to use seuratToLiger to convert my Seurat result (from Seurat V3) into Liger obeject. However, when I use the following code, it shows an error.

combined_sample=readRDS("combined_sample.rds")
ligerex = seuratToLiger(combined_sample, combined.seurat = T, meta.var = 'original')
Error in object@raw.data[[1]] : subscript out of bounds

I have checked my Seurat file (combined_sample) and I think my file is okay.

> combined_sample$RNA[1:5,1:5]
5 x 5 sparse Matrix of class "dgCMatrix"
              AAACCCAGTCAACGCC-1 AAACCCAGTCGCTGCA-1 AAACCCAGTTAGTTCG-1
RP11-34P13.7                   .                  .                  .
RP11-34P13.9                   .                  .                  .
FO538757.2                     .                  .                  .
AP006222.2                     .                  .                  .
RP4-669L17.10                  .                  .                  .
              AAACCCATCCTCACGT-1 AAACCCATCCTCTCGA-1
RP11-34P13.7                   .                  .
RP11-34P13.9                   .                  .
FO538757.2                     .                  .
AP006222.2                     .                  .
RP4-669L17.10           

How can I fix that?

jw156605 commented 4 years ago

This issue should be fixed with a new seuratToLiger function in the current version of the package.