broadinstitute / infercnv

Inferring CNV from Single-Cell RNA-Seq
Other
565 stars 166 forks source link

Error in seq_len(max(obs_annotations_groups)): argument must be coercible to non-negative integer #526

Open qiuju-Zhang opened 1 year ago

qiuju-Zhang commented 1 year ago

when I was running infercnv,I set parameters as follows: infercnv_obj = CreateInfercnvObject(raw_counts_matrix=expFile, annotations_file=groupFiles, delim="\t", gene_order_file= geneFile, ref_group_names=c("epi_normal_ref"))

infercnv_obj = infercnv::run(infercnv_obj, cutoff=0.1, out_dir="./epi/infercnv/output2", cluster_by_groups=F, analysis_mode="subclusters", denoise=TRUE, HMM=FALSE, output_format = 'pdf', num_threads = 4)

but an error occurred at step 15: STEP 15: computing tumor subclusters via leiden

INFO [2023-04-06 16:05:02] define_signif_tumor_subclusters(p_val=0.1 INFO [2023-04-06 16:05:02] define_signif_tumor_subclusters(), tumor: allobservations Calculating gene variances 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Calculating feature variances of standardized and clipped values 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Centering and scaling data matrix |===================================================================================================| 100% PC 1 Positive: NDUFA7, RPS28, CERS4, RAB11B, ELAVL1, HNRNPM, TRAPPC5, UBL5, STXBP2, PIN1 EIF3G, AC011511.2, ICAM1, CDC37, AP1M2, SLC44A2, ILF3, DNM2, YIPF2, SMARCA4 LDLR, TMEM205, RGL3, PRKCSH, ELOF1, ZNF440, ZNF44, WDR83OS, TRIR, GET3 Negative: AASS, CADPS2, FAM3C, NDUFA5, TSPAN12, WASL, LSM8, CFTR, ZNF800, ST7 ARF5, CAPZA2, SND1, MET, CAV1, HILPDA, CAV2, CALU, AC002066.1, TES ATP6V1F, MDFIC, FOXP2, TNPO3, SMIM30, BMT2, AHCYL2, TMEM168, NRF1, IFRD1 PC 2 Positive: CAPN1, FAU, NEAT1, VPS51, MALAT1, ARL2, SCYL1, SF1, LTBP3, PRDX5 RNASEH2C, TRMT112, CFL1, ESRRA, FIBP, BAD, CCDC85B, DRAP1, PPP1R14B, BANF1 FKBP2, CST6, VEGFB, SF3B2, PACS1, DNAJC4, RAB1B, STIP1, YIF1A, MACROD1 Negative: PTPN13, MAPK10, AFF1, ARHGAP24, HSD17B11, WDFY3, PKD2, CDS1, PYURF, MRPS18C FAM13A, PLAC8, CCSER1, SEC31A, SMARCAD1, SCD5, PDLIM5, HNRNPDL, BMPR1B, HNRNPD STOX2, IRF2, WWC2, ACSL1, SPCS3, SLC25A4, GPM6A, CFAP97, HMGB2, SNX25 PC 3 Positive: C5orf38, IRX2, MED10, NDUFS6, C5orf49, LPCAT1, MTRR, CLPTM1L, MIR4458HG, SLC12A7 CCT5, PDCD6, SDHA, ROPN1L, DAP, DNAH5, TRIO, ANKH, MYO10, BASP1 C5orf17, PDZD2, GOLPH3, MTMR12, ZFR, SUB1, RAI14, BRIX1, DNAJC21, SPEF2 Negative: MCCC1, ATP11B, LAMP3, SOX2, MCF2L2, DNAJC19, B3GNT5, FXR1, KLHL24, CCDC39 PARL, TTC14, ABCC5, USP13, AP2M1, NDUFB5, PSMD2, MRPL47, EIF4G1, MFN1 POLR2H, PIK3CA, VPS8, KCNMB2, MAP3K13, TBL1XR1, LIPH, NAALADL2, NCEH1, SENP2 PC 4 Positive: MLLT6, SYNRG, ACACA, AATF, GGNBP2, CCL4L2, CCL4, CCL3, CCL5, MMP28 TAF15, AP2B1, SLFN5, TMEM98, MYO1D, PSMD11, ZNF207, RHOT1, SUZ12, COPRS OMG, NF1, CRLF3, GOSR1, CPD, COPS6, LAMTOR4, NSRP1, ZKSCAN1, PPP1R35 Negative: SNX1, CIAO2A, PPIB, DAPK2, CSNK1G1, HERC1, ZNF609, USP3, OAZ2, RAB8B SPG21, RPS27L, HACD3, TPM1, DENND4A, VPS13C, RAB11A, RORA, MAP2K1, ANXA2 RPL4, BNIP2, SMAD3, GTF2A2, AAGAB, MYO1E, IQCH, SLTM, MAP2K5, RNF111 PC 5 Positive: UBXN11, CD52, SH3BGRL3, HMGN2, ZNF593, ARID1A, STMN1, SFN, MACO1, TMEM50A RSRP1, SYF2, RUNX3, CLIC4, SRRM1, NCMAP, RCAN3, SRSF10, PNRC2, FUCA1 GALE, LYPLA2, ELOA, RPL11, ID3, TCEA3, HNRNPR, LUZP1, TSC22D1, DNAJC15 Negative: CTSA, WFDC2, PLTP, PIGT, EYA2, SDC4, ZMYND8, SLPI, NCOA3, STK4 ARFGEF2, CFAP61, YWHAB, STAU1, PKIG, ZFAS1, SERINC3, NAA20, SRSF6, B4GALT5 PTPRT, RNF114, CHD6, RIN2, UBE2V1, ZHX3, NCOA6, CEBPB, TOP1, GGT7 Computing nearest neighbor graph Computing SNN INFO [2023-04-06 16:05:19] define_signif_tumor_subclusters(), tumor: epi_normalref Calculating gene variances 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Calculating feature variances of standardized and clipped values 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Centering and scaling data matrix |===================================================================================================| 100% PC 1 Positive: TMEM98, GGNBP2, CCL4L2, CCL4, AATF, CCL3, SLFN5, CCL5, ACACA, AP2B1 MMP28, TAF15, SYNRG, MLLT6, CISD3, PSMB3, CWC25, RPL23, MACO1, TMEM50A STMN1, RSRP1, LASP1, ZNF593, SYF2, RPL19, SH3BGRL3, RUNX3, FBXL20, UBXN11 Negative: TFDP2, ATP1B3, XRN1, RNF7, ATR, RASA2, PLS1, ZBTB38, U2SURP, SLC25A36 DIPK2A, COPB2, PLOD2, PIK3CB, PLSCR1, CEP70, CP, TM4SF1, ARMC8, WWTR1 CLDN18, ANKUB1, NCK1, RNF13, STAG1, PFN2, PPP2R3A, TSC22D2, ANAPC13, SERP1 PC 2 Positive: NUS1, GOPC, SLC35F1, ROS1, CEP85L, FAM184A, KPNA5, MAN1A1, RWDD1, TBC1D32 TSPYL1, SERINC1, DSE, PKIB, SMPDL3A, NT5DC1, RNF217, FRK, HDDC2, NCOA7 HDAC2, TRMT11, RNF146, MARCKS, ECHDC1, KIAA0408, FAM229B, THEMIS, PTPRK, FYN Negative: HSPE1, MOB4, HSPD1, PLCL1, COQ10B, SPATS2L, SF3B1, BZW1, ANKRD44, CLK1 PGAP1, PPIL3, HECW2, ORC2, AC114760.2, FAM126B, STK17B, NDUFB3, DNAH7, CFLAR NABP1, CASP8, MYO1B, TRAK2, STAT4, KIAA2012, STAT1, SUMO1, GLS, MFSD6 PC 3 Positive: HOPX, POLR2B, SRP72, IGFBP7, EXOC1, CENPC, CLOCK, UBA6, TMEM165, UBA6-AS1 SRD5A3, YTHDC1, CHIC2, JCHAIN, FIP1L1, RUFY3, SCFD2, GRSF1, DANCR, MOB1B SPATA18, SLC4A4, ANKRD17, DCUN1D4, CXCL8, OCIAD2, CXCL6, OCIAD1, CXCL1, FRYL Negative: CDK19, AMD1, AK9, GTF3C6, PPIL6, MFSD4B, CD164, REV3L, SESN1, FYN ARMC2, FAM229B, FOXO3, MARCKS, SNX3, HDAC2, SEC63, FRK, NT5DC1, PDSS2 DSE, CD24, TSPYL1, CRYBG1, RWDD1, ATG5, KPNA5, ASCC3, ROS1, GOPC PC 4 Positive: RB1, FNDC3A, ITM2B, EBPL, MED4, KPNA3, SUCLA2, DLEU2, ESD, TRIM13 LRCH1, DLEU1, RNASEH2B, LCP1, INTS6, CPB2, WDFY2, ZC3H13, NEK5, TPT1-AS1 VPS36, SUGT1, TPT1, TDRD3, GTF2F2, PIBF1, KLF5, TSC22D1, KLF12, COMMD6 Negative: DIS3L2, EIF4E2, PTMA, GIGYF2, NCL, INPP5D, DGKD, ARMC9, USP40, PSMD1 ARL4C, CAB39, AGAP1, SP100, IQCA1, SP110, COPS8, TRIP12, MLPH, RAB17 PID1, LRRFIP1, CCL20, RAMP1, BCAS3, MED13, PPM1D, TLK2, APPBP2, AGFG1 PC 5 Positive: KIAA1109, SPATA5, ANXA5, LINC01091, NDNF, INTU, C4orf3, ABHD18, USP53, LARP1B SEC24D, PGRMC2, PRSS12, SCLT1, SNHG8, ELF2, CAMK2D, NDUFC1, LARP7, NAA15 ALPK1, CFI, AC097376.3, PLA2G12A, MGST2, SEC24B, MAML3, OSTC, SCOC, RPL34 Negative: COPG1, PLXND1, CNBP, TMCC1, RAB7A, ATP2C1, RPN1, NEK11, RUVBL1, MRPL3 SEC61A1, TMEM108, MGLL, CDV3, CHCHD6, RYK, ZXDC, SNX4, ANAPC13, ZNF148 PPP2R3A, CCDC14, STAG1, HACD2, NCK1, SEC22A, PARP14, CLDN18, PARP9, ARMC8 Computing nearest neighbor graph Computing SNN INFO [2023-04-06 16:06:10] ::plot_cnv:Start INFO [2023-04-06 16:06:10] ::plot_cnv:Current data dimensions (r,c)=5450,8614 Total=46970944.9487726 Min=0.880751793857027 Max=1.37694528983562. INFO [2023-04-06 16:06:11] ::plot_cnv:Depending on the size of the matrix this may take a moment. INFO [2023-04-06 16:06:12] plot_cnv(): auto thresholding at: (0.933993 , 1.067057) INFO [2023-04-06 16:06:16] plot_cnv_observation:Start INFO [2023-04-06 16:06:16] Observation data size: Cells= 6614 Genes= 5450 INFO [2023-04-06 16:06:16] clustering observations via method: ward.D Error in seq_len(max(obs_annotations_groups)) : argument must be coercible to non-negative integer In addition: Warning message: In max(nchar(obs_annotations_names)) : no non-missing arguments to max; returning -Inf

Can you give me some suggestions about this error? Thanks!!

WYT12138 commented 1 year ago

I also have this problem. Have you solved it?

qiuju-Zhang commented 1 year ago

not yet

GeorgescuC commented 1 year ago

Hi @qiuju-Zhang @WYT12138 ,

Which version of infercnv are you running?

If you are running the latest stable (1.14.2) or a more recent devel version (1.15.2+), could you share the data privately so I can look into the issue?

Regards, Christophe.

hyq9588 commented 1 year ago

I also have this problem. I trying to solve.

hyq9588 commented 1 year ago

not yet

I tried using an older version of "infercnv" (infercnv_1.13.1.tar.gz) and successfully solved this problem.

hyq9588 commented 1 year ago

Hi @qiuju-Zhang @WYT12138 ,

Which version of infercnv are you running?

If you are running the latest stable (1.14.2) or a more recent devel version (1.15.2+), could you share the data privately so I can look into the issue?

Regards, Christophe.

Hi @qiuju-Zhang @WYT12138 ,

Which version of infercnv are you running?

If you are running the latest stable (1.14.2) or a more recent devel version (1.15.2+), could you share the data privately so I can look into the issue?

Regards, Christophe.

The old version can be used, the new version (1.14.2) will show this error. And I don't know how to provide data to you.

qiuju-Zhang commented 1 year ago

Hi @qiuju-Zhang @WYT12138 ,

Which version of infercnv are you running?

If you are running the latest stable (1.14.2) or a more recent devel version (1.15.2+), could you share the data privately so I can look into the issue?

Regards, Christophe.

the version I'm using is "1.14.2". And after I changed the parameters to cluster_by_groups=F and analysis_mode = "samples", my code works fine now!

GeorgescuC commented 1 year ago

Hi @qiuju-Zhang @hyq9588 @WYT12138 ,

Knowing that the bug does not occur in 1.13.1, it looks like the problem is related to the new plotting of subclusters after step 15 that was added in 1.14.2, but only when running with cluster_by_groups=FALSE. There is actually a fix for this that is in version 1.15.3 (Bioc devel) that I could have made into a version 1.14.3, but thought was not needed as the new version of R/BioConductor are scheduled for this month, though later than I realized. If you install version 1.15.3 from Github the issue should be resolved even while keeping the analysis_mode="subclusters". I would recommend this specifically if you are also running the HMM, as subclusters are required in most cases for it to be able to be accurate. This version also displays subclusters on the left-most color bar for observations to easily visualize/inspect them. :

library("devtools")
devtools::install_github("broadinstitute/infercnv")

Regards, Christophe.

hyq9588 commented 1 year ago

Thank you!