YMa-lab / CARD

GNU General Public License v3.0
80 stars 20 forks source link

Error Error in norm_cords$x - min(norm_cords$x) : non-numeric argument to binary operator #70

Open krigia opened 3 months ago

krigia commented 3 months ago

Hello @YingMa0107 @YMalab > # Make CARD object

CARD_obj = createCARDObject(

  • sc_count = sc_count,
  • sc_meta = sc_meta,
  • spatial_count = spatial_count,
  • spatial_location = spatial_location,
  • ct.varname = "cellType",
  • ct.select = unique(sc_meta$cellType),
  • sample.varname = "sampleInfo",
  • minCountGene = 100,
  • minCountSpot = 5)

    QC on scRNASeq dataset! ...

    QC on spatially-resolved dataset! ...

    Run CARD deconvolution

    CARD_obj = CARD_deconvolution(CARD_object = CARD_obj)

    create reference matrix from scRNASeq...

    Select Informative Genes! ...

    Error in norm_cords$x - min(norm_cords$x) : non-numeric argument to binary operator In addition: Warning messages: 1: In asMethod(object) : sparse->dense coercion: allocating vector of size 5.6 GiB 2: In asMethod(object) : sparse->dense coercion: allocating vector of size 2.9 GiB 3: In asMethod(object) : sparse->dense coercion: allocating vector of size 2.1 GiB 4: In asMethod(object) : sparse->dense coercion: allocating vector of size 2.1 GiB

I was wondering if this could be related to count data or spatial coordinates. I used spot barcode IDs instead of number x,y coordinates. e. g. x() TACGATCCAAGCCACT-1_1 y()TACGATCCAAGCCACT-1_1 Also, sc and spatial counts are row filtered data.

Please advise. Thank you.

YMalab commented 3 months ago

Hi @krigia,

What does your spatial_location matrix look like? This matrix should contain the spatial coordinates. Please follow our tutorial to check if you input data match exactly with the tutorial example data format. Thanks.

Best, Ying