smorabit / hdWGCNA

High dimensional weighted gene co-expression network analysis
https://smorabit.github.io/hdWGCNA/
Other
316 stars 31 forks source link

Error in irlba(A = t(x = object), nv = npcs, ...) #9

Closed umranyaman closed 2 years ago

umranyaman commented 2 years ago

Hi Sam,

Thanks for great library and very useful updates!

I am running Zhou et al dataset example, when I run the

seurat_obj <- seurat_obj %>% NormalizeMetacells() %>% ScaleMetacells() %>% RunPCAMetacells(features=VariableFeatures(seurat_obj)) %>% RunHarmonyMetacells(group.by.vars='Sample') %>% RunUMAPMetacells(reduction='harmony', dims=1:15)

I get:

Error in irlba(A = t(x = object), nv = npcs, ...) : max(nu, nv) must be positive

I tried running each function separately, on the ScaleMetaCells part I get

Centering and scaling data matrix |============================================================= | 57%Warning in .rs.normalizePath(filePath) : path[1]="": No such file or directory

I haven't changed anything, just rerunning. How can I solve this?

Thanks very much, Best, Umran

smorabit commented 2 years ago

Hi Umran,

Sounds like the ScaleMetacells function does not finish, is that correct? Just wondering, does it work if you do this?

seurat_obj <- ScaleMetacells(seurat_obj, features = VariableFeatures(seurat_obj))
umranyaman commented 2 years ago

Thanks @smorabit,

It runs ScaleMetacells now, however I cannot run the PCA on metacells:

seurat_obj <-RunPCAMetacells(seurat_obj, features= VariableFeatures(seurat_obj))

Error in irlba(A = t(x = object), nv = npcs, ...) : max(nu, nv) must be positive

Best, Umran

smorabit commented 2 years ago

Do you get the same error when you run RunPCA on your Seurat object?

umranyaman commented 2 years ago

After running the FindVariableFeatures and then the ScaleData, I run RunPCA, and get this error:

seurat_obj= FindVariableFeatures(seurat_obj) seurat_obj = ScaleData(seurat_obj) seurat_obj = RunPCA(seurat_obj)

PC 1 Positive: NEAT1, SLC5A11, GLUL, AC008571.2, AL033523.1, SLC1A3, LINC01170, AC012494.1, LURAP1L-AS1, SPP1 ITPKB, FTH1, ERBB4, PLPP3, HIST1H2AC, FTL, ACSS1, LINC02073, BCL6, PARD3B MAML2, PREX2, ADAMTS18, PDLIM5, ZFP36, LINC02649, LRIG1, B2M, ARHGAP24, MT2A Negative: DLGAP2, STXBP5L, CCSER1, MEG3, GRM5, KCNQ5, FRMPD4, RALYL, FGF12, LRFN5 KALRN, ATRNL1, DCLK1, GABRB3, GABBR2, RGS7, KHDRBS2, KCNIP4, CACNA1B, CDH18 GRIN2B, CACNA1C, NELL2, HECW1, GALNT17, LDB2, SYN2, SH3GL2, SNTG1, LRRTM4 PC 2 Positive: PDE1A, SLC5A11, AC008571.2, AL033523.1, AC012494.1, LURAP1L-AS1, LINC01170, PWRN1, LAMA2, ROBO1 SEMA3C, LINC02073, STMN1, IQCJ-SCHIP1, SPP1, GRID2, RYR2, ADAMTS18, SPANXA2-OT1, PRKCB VSTM2B, RTN1, KCNK1, SV2B, MAP1B, WASF1, LINC01098, LINC01122, LINC01505, ATP1A1 Negative: SLC1A2, ADGRV1, BMPR1B, GFAP, ATP1A2, PITPNC1, RYR3, STON2, F3, PARD3 LINC00299, EFEMP1, ATP1B2, GJA1, FAM189A2, PLSCR4, SLC4A4, ALDH1L1, RGS20, CST3 OBI1-AS1, GLIS3, MRVI1, ACSS3, YAP1, PTPRZ1, MGST1, CACHD1, GPC5, ARHGEF26 PC 3 Positive: ERBB4, ROBO1, LRP1B, SLC5A11, AC008571.2, AL033523.1, AC012494.1, LINC01170, SLC6A1, LURAP1L-AS1 AL589740.1, PLPP3, PDE1A, PREX2, ADGRL3, PWRN1, LAMA2, CKB, PLD5, LRRC4C ROR1, SEMA3C, SEMA6D, LINC02073, GRIA4, MT3, SGCD, LINC01505, ATP13A4, SPANXA2-OT1 Negative: DOCK8, FYB1, PTPRC, APBB1IP, SLCO2B1, TLR2, SLC11A1, TBXAS1, INPP5D, SYK DENND3, RBM47, HCLS1, RHBDF2, PALD1, SP100, SRGAP2B, ATP8B4, FLI1, CSF1R CD74, LNCAROD, IKZF1, ST6GAL1, RNASET2, LRMDA, LYN, DOCK2, FGD2, RUNX1 PC 4 Positive: NRGN, ENC1, SLC17A7, NEFL, SV2B, CHN1, CLU, TMSB10, YWHAH, SNAP25 NRN1, LMO4, PHYHIP, ARPP19, TESPA1, PTK2B, NPTX1, TUBA1B, HOPX, FTH1 ACTB, SATB2, NEFM, PDP1, CKB, NGEF, RGS4, OLFM1, RORB, TPI1 Negative: NXPH1, GAD1, GRIK1, ZNF385D, GAD2, PCDH15, MYO16, SLC24A3, BTBD11, LHFPL3 TENM1, LUZP2, DLX6-AS1, ADARB2, KIAA1211, GRIP1, SGCZ, ERBB4, GRIP2, XKR4 ANK1, KCNIP1, SOX6, VWC2, ALK, DAB1, GRIK2, FAM110B, GRIN3A, RBMS3 PC 5 Positive: GAPDH, HSP90AB1, TUBB2A, SNAP25, RAB3A, ATP6V0C, TUBA1B, PCSK1N, MDH1, ALDOA HSPA8, ATP1A3, THY1, ARL6IP1, SERINC1, HSP90AA1, NEFL, CALM3, CALM1, SNCB TPI1, NAP1L3, PEBP1, VAMP2, STMN2, UCHL1, TUBB3, YWHAG, CHGB, NDUFA4 Negative: AC011287.1, PDZD2, CA10, AL157944.1, AC013287.1, TAFA1, AL117329.1, LINC01378, AC008696.2, LINC01250 CBLN2, AC008574.1, LINC02306, AC034268.2, MLIP, CUX2, IQCJ-SCHIP1, LY86-AS1, AC016598.2, KCNIP4 AC007563.2, ZFPM2, LINC02669, MCHR2, AP000829.1, AC067956.1, VWA3A, AC019211.1, AC107223.1, LINC01331 Cannot add objects with duplicate keys (offending key: PC), setting key to 'pca_'

Thanks very much, Umran

smorabit commented 2 years ago

I am unable to reproduce this issue on my end, so at this point I am not sure how to figure out what's going on. Are you using Windows by any chance? I have only tested this on mac and linux environments.

smorabit commented 2 years ago

Closing this issue now but please open it back up if you have any more information.