Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spillover matrix error - Error in .check_sm(sm, isotope_list) : #281

Open
MayaCyTOFnewbie opened this issue May 8, 2022 · 2 comments
Open

Comments

@MayaCyTOFnewbie
Copy link

Hi Helena,

I know this issue was addressed before, but I could not use the solutions there for some reason.

I get an error during the creation of a spillover matrix. I get this value (179.686.157.636.768) for Lu175Di vs Ir191Di.

thank you very much for all your help!!

here is what I did:

read single stained bead fcs file not normalized but with normalization beads

ff =read.FCS(file.path(dir,"20220309_CompBeads_0.FCS"), transformation = FALSE, truncate_max_range = FALSE)

#check colnames
colnames(ff)
[1] "Time" "Event_length" "Pd102Di" "Rh103Di" "Pd104Di" "Pd105Di" "Pd106Di" "Pd108Di" "Pd110Di" "Cd111Di" "Cd112Di"
[12] "In113Di" "Cd114Di" "In115Di" "Cd116Di" "La139Di" "Ce140Di" "Pr141Di" "Nd142Di" "Nd143Di" "Nd144Di" "Nd145Di"
[23] "Nd146Di" "Sm147Di" "Nd148Di" "Sm149Di" "Nd150Di" "Eu151Di" "Sm152Di" "Eu153Di" "Sm154Di" "Gd155Di" "Gd156Di"
[34] "Gd157Di" "Gd158Di" "Tb159Di" "Gd160Di" "Dy161Di" "Dy162Di" "Dy163Di" "Dy164Di" "Ho165Di" "Er166Di" "Er167Di"
[45] "Er168Di" "Tm169Di" "Er170Di" "Yb171Di" "Yb172Di" "Yb173Di" "Yb174Di" "Lu175Di" "Yb176Di" "BCKG190Di" "Ir191Di"
[56] "Ir193Di" "Center" "Offset" "Width" "Residual"

specify mass channels stained for & debarcode

bc_ms <- c(111:116, 141:176)
sce <- prepData(ff)
sce <- assignPrelim(sce, bc_ms, verbose = TRUE)
Debarcoding data...
o ordering
o classifying events
Normalizing...
Computing deltas...
sce <- applyCutoffs(estCutoffs(sce))

compute & extract spillover matrix

sce <- computeSpillmat(sce)
sm <- metadata(sce)$spillover_matrix

#export sm
write.csv(sm, file= "sm_20220309.csv")

do some sanity checks

chs <- channels(sce)
ss_chs <- chs[rowData(sce)$is_bc]
all(diag(sm[ss_chs, ss_chs]) == 1)
[1] TRUE

all(sm >= 0 & sm <= 1)
[1] FALSE

plotSpillmat(sce)
Error in .check_sm(sm, isotope_list) :
The supplied spillover matrix is invalid as it contains entries greater than 1.
Valid spill values are non-negative and mustn't exceed 1.

session_info()

  • Session info --------------------------------------------------------------------------------------------------------------------------------------------------------
    setting value
    version R version 4.1.2 (2021-11-01)
    os Windows Server x64 (build 17763)
    system x86_64, mingw32
    ui RStudio
    language (EN)
    collate English_Europe.1252
    ctype English_Europe.1252
    tz Asia/Jerusalem
    date 2022-05-08
    rstudio 1.4.1717 Juliet Rose (desktop)
    pandoc 2.11.4 @ C:/Program Files/RStudio/bin/pandoc/ (via rmarkdown)

  • Packages ------------------------------------------------------------------------------------------------------------------------------------------------------------
    ! package * version date (UTC) lib source
    abind 1.4-5 2016-07-21 [1] CRAN (R 4.1.1)
    assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.2)
    aws.s3 0.3.21 2020-04-07 [1] CRAN (R 4.1.2)
    aws.signature 0.6.0 2020-06-01 [1] CRAN (R 4.1.2)
    backports 1.4.1 2021-12-13 [1] CRAN (R 4.1.2)
    base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.1.1)
    beachmat 2.10.0 2021-10-26 [1] Bioconductor
    beeswarm 0.4.0 2021-06-01 [1] CRAN (R 4.1.1)
    Biobase * 2.54.0 2021-10-26 [1] Bioconductor
    BiocGenerics * 0.40.0 2021-10-26 [1] Bioconductor
    BiocManager 1.30.16 2021-06-15 [1] CRAN (R 4.1.2)
    BiocNeighbors 1.12.0 2021-10-26 [1] Bioconductor
    BiocParallel 1.28.3 2021-12-09 [1] Bioconductor
    BiocSingular 1.10.0 2021-10-26 [1] Bioconductor
    bitops 1.0-7 2021-04-24 [1] CRAN (R 4.1.1)
    brio 1.1.3 2021-11-30 [1] CRAN (R 4.1.2)
    broom 0.7.12 2022-01-28 [1] CRAN (R 4.1.2)
    cachem 1.0.6 2021-08-19 [1] CRAN (R 4.1.2)
    Cairo 1.5-14 2021-12-21 [1] CRAN (R 4.1.2)
    callr 3.7.0 2021-04-20 [1] CRAN (R 4.1.2)
    car 3.0-12 2021-11-06 [1] CRAN (R 4.1.2)
    carData 3.0-5 2022-01-06 [1] CRAN (R 4.1.2)
    CATALYST * 1.18.1 2022-01-16 [1] Bioconductor
    caTools 1.18.2 2021-03-28 [1] CRAN (R 4.1.2)
    cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.1.2)
    changepoint 2.2.2 2016-10-04 [1] CRAN (R 4.1.2)
    circlize 0.4.14 2022-02-11 [1] CRAN (R 4.1.2)
    class 7.3-20 2022-01-13 [1] CRAN (R 4.1.2)
    cli 3.2.0 2022-02-14 [1] CRAN (R 4.1.2)
    clue 0.3-60 2021-10-11 [1] CRAN (R 4.1.2)
    cluster 2.1.2 2021-04-17 [1] CRAN (R 4.1.2)
    codetools 0.2-18 2020-11-04 [1] CRAN (R 4.1.2)
    colorRamps 2.3 2012-10-29 [1] CRAN (R 4.1.1)
    colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.1.2)
    ComplexHeatmap 2.10.0 2021-10-26 [1] Bioconductor
    ConsensusClusterPlus 1.58.0 2021-10-26 [1] Bioconductor
    cowplot * 1.1.1 2020-12-30 [1] CRAN (R 4.1.2)
    crayon 1.5.0 2022-02-14 [1] CRAN (R 4.1.2)
    curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.2)
    cytofclean * 1.0.3 2022-02-24 [1] Github (JimboMahoney/cytofclean@8375a5a)
    cytolib 2.6.2 2022-02-08 [1] Bioconductor
    CytoML * 2.6.0 2021-10-26 [1] Bioconductor
    CytoNorm * 0.0.7 2022-02-24 [1] Github (saeyslab/CytoNorm@f189d26)
    cytutils * 0.1.0 2022-02-24 [1] Github (ismms-himc/cytutils@53ec353)
    data.table * 1.14.2 2021-09-27 [1] CRAN (R 4.1.2)
    DBI 1.1.2 2021-12-20 [1] CRAN (R 4.1.2)
    dbplyr 2.1.1 2021-04-06 [1] CRAN (R 4.1.2)
    DelayedArray 0.20.0 2021-10-26 [1] Bioconductor
    DelayedMatrixStats 1.16.0 2021-10-26 [1] Bioconductor
    desc 1.4.1 2022-03-06 [1] CRAN (R 4.1.2)
    devtools * 2.4.3 2021-11-30 [1] CRAN (R 4.1.2)
    dichromat 2.0-0 2013-01-24 [1] CRAN (R 4.1.1)
    digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.2)
    doParallel 1.0.17 2022-02-07 [1] CRAN (R 4.1.2)
    dotCall64 1.0-1 2021-02-11 [1] CRAN (R 4.1.2)
    dplyr * 1.0.8 2022-02-08 [1] CRAN (R 4.1.2)
    drc 3.0-1 2016-08-30 [1] CRAN (R 4.1.2)
    e1071 1.7-9 2021-09-16 [1] CRAN (R 4.1.2)
    ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.2)
    evaluate 0.15 2022-02-18 [1] CRAN (R 4.1.2)
    fansi 1.0.2 2022-01-14 [1] CRAN (R 4.1.2)
    farver 2.1.0 2021-02-28 [1] CRAN (R 4.1.2)
    fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.2)
    fields 13.3 2021-10-30 [1] CRAN (R 4.1.2)
    flowAI * 1.24.0 2021-10-26 [1] Bioconductor
    flowCore * 2.6.0 2021-10-26 [1] Bioconductor
    flowCut * 1.5.1 2022-02-24 [1] Github (jmeskas/flowCut@7ad0afd)
    flowDensity * 1.28.0 2021-10-26 [1] Bioconductor
    FlowSOM * 2.2.0 2021-10-26 [1] Bioconductor
    flowViz 1.58.0 2021-10-26 [1] Bioconductor
    flowWorkspace * 4.6.0 2021-10-26 [1] Bioconductor
    forcats * 0.5.1 2021-01-27 [1] CRAN (R 4.1.2)
    foreach 1.5.2 2022-02-02 [1] CRAN (R 4.1.2)
    fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.2)
    generics 0.1.2 2022-01-31 [1] CRAN (R 4.1.2)
    GenomeInfoDb * 1.30.1 2022-01-30 [1] Bioconductor
    GenomeInfoDbData 1.2.7 2022-02-24 [1] Bioconductor
    GenomicRanges * 1.46.1 2021-11-18 [1] Bioconductor
    GEOmap 2.4-4 2018-01-18 [1] CRAN (R 4.1.2)
    GetoptLong 1.0.5 2020-12-15 [1] CRAN (R 4.1.2)
    ggbeeswarm 0.6.0 2017-08-07 [1] CRAN (R 4.1.2)
    ggcyto 1.22.0 2021-10-26 [1] Bioconductor
    ggforce 0.3.3 2021-03-05 [1] CRAN (R 4.1.2)
    ggnewscale 0.4.6 2022-02-15 [1] CRAN (R 4.1.2)
    ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 4.1.2)
    ggpointdensity 0.1.0 2019-08-28 [1] CRAN (R 4.1.2)
    ggpubr * 0.4.0 2020-06-27 [1] CRAN (R 4.1.2)
    ggrepel 0.9.1 2021-01-15 [1] CRAN (R 4.1.2)
    ggridges 0.5.3 2021-01-08 [1] CRAN (R 4.1.2)
    ggsignif 0.6.3 2021-09-09 [1] CRAN (R 4.1.2)
    GlobalOptions 0.1.2 2020-06-10 [1] CRAN (R 4.1.2)
    glue 1.6.1 2022-01-22 [1] CRAN (R 4.1.2)
    gplots 3.1.1 2020-11-28 [1] CRAN (R 4.1.2)
    graph 1.72.0 2021-10-26 [1] Bioconductor
    gridExtra 2.3 2017-09-09 [1] CRAN (R 4.1.2)
    gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.2)
    gtools 3.9.2 2021-06-06 [1] CRAN (R 4.1.2)
    haven 2.4.3 2021-08-04 [1] CRAN (R 4.1.2)
    hexbin 1.28.2 2021-01-08 [1] CRAN (R 4.1.2)
    hms 1.1.1 2021-09-26 [1] CRAN (R 4.1.2)
    htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.2)
    httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.2)
    IDPmisc 1.1.20 2020-01-21 [1] CRAN (R 4.1.2)
    igraph * 1.2.11 2022-01-04 [1] CRAN (R 4.1.2)
    IRanges * 2.28.0 2021-10-26 [1] Bioconductor
    irlba 2.3.5 2021-12-06 [1] CRAN (R 4.1.2)
    iterators 1.0.14 2022-02-05 [1] CRAN (R 4.1.2)
    jpeg 0.1-9 2021-07-24 [1] CRAN (R 4.1.1)
    jsonlite 1.8.0 2022-02-22 [1] CRAN (R 4.1.2)
    KernSmooth 2.23-20 2021-05-03 [1] CRAN (R 4.1.2)
    knitr 1.37 2021-12-16 [1] CRAN (R 4.1.2)
    labeling 0.4.2 2020-10-20 [1] CRAN (R 4.1.1)
    lattice 0.20-45 2021-09-22 [1] CRAN (R 4.1.2)
    latticeExtra 0.6-29 2019-12-19 [1] CRAN (R 4.1.2)
    lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.2)
    lubridate 1.8.0 2021-10-07 [1] CRAN (R 4.1.2)
    magrittr 2.0.2 2022-01-26 [1] CRAN (R 4.1.2)
    mapproj 1.2.8 2022-01-12 [1] CRAN (R 4.1.2)
    maps 3.4.0 2021-09-25 [1] CRAN (R 4.1.2)
    MASS 7.3-55 2022-01-13 [1] CRAN (R 4.1.2)
    Matrix * 1.4-0 2021-12-08 [1] CRAN (R 4.1.2)
    MatrixGenerics * 1.6.0 2021-10-26 [1] Bioconductor
    matrixStats * 0.61.0 2021-09-17 [1] CRAN (R 4.1.2)
    MBA 0.0-9 2017-03-08 [1] CRAN (R 4.1.2)
    memoise 2.0.1 2021-11-26 [1] CRAN (R 4.1.2)
    modelr 0.1.8 2020-05-19 [1] CRAN (R 4.1.2)
    multcomp 1.4-18 2022-01-04 [1] CRAN (R 4.1.2)
    munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.2)
    mvtnorm 1.1-3 2021-10-08 [1] CRAN (R 4.1.1)
    ncdfFlow 2.40.0 2021-10-26 [1] Bioconductor
    nnls 1.4 2012-03-19 [1] CRAN (R 4.1.1)
    pals * 1.7 2021-04-17 [1] CRAN (R 4.1.2)
    pheatmap * 1.0.12 2019-01-04 [1] CRAN (R 4.1.2)
    pillar 1.7.0 2022-02-01 [1] CRAN (R 4.1.2)
    pkgbuild 1.3.1 2021-12-20 [1] CRAN (R 4.1.2)
    pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.2)
    pkgload 1.2.4 2021-11-30 [1] CRAN (R 4.1.2)
    plotrix 3.8-2 2021-09-08 [1] CRAN (R 4.1.1)
    plyr 1.8.6 2020-03-03 [1] CRAN (R 4.1.2)
    png 0.1-7 2013-12-03 [1] CRAN (R 4.1.1)
    polyclip 1.10-0 2019-03-14 [1] CRAN (R 4.1.1)
    premessa * 0.3.2 2022-02-24 [1] Github (ParkerICI/premessa@e05eb53)
    prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.2)
    processx 3.5.2 2021-04-30 [1] CRAN (R 4.1.2)
    proxy 0.4-26 2021-06-07 [1] CRAN (R 4.1.2)
    ps 1.6.0 2021-02-28 [1] CRAN (R 4.1.2)
    purrr * 0.3.4 2020-04-17 [1] CRAN (R 4.1.2)
    R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.2)
    RBGL 1.70.0 2021-10-26 [1] Bioconductor
    RColorBrewer * 1.1-2 2014-12-07 [1] CRAN (R 4.1.1)
    Rcpp 1.0.8 2022-01-13 [1] CRAN (R 4.1.2)
    RcppAnnoy 0.0.19 2021-07-30 [1] CRAN (R 4.1.2)
    D RcppParallel 5.1.5 2022-01-05 [1] CRAN (R 4.1.2)
    RCurl 1.98-1.6 2022-02-08 [1] CRAN (R 4.1.2)
    readr * 2.1.2 2022-01-30 [1] CRAN (R 4.1.2)
    readxl 1.3.1 2019-03-13 [1] CRAN (R 4.1.2)
    remotes * 2.4.2 2021-11-30 [1] CRAN (R 4.1.2)
    reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.2)
    reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.1.2)
    RFOC 3.4-6 2018-01-18 [1] CRAN (R 4.1.2)
    rgeos 0.5-9 2021-12-15 [1] CRAN (R 4.1.2)
    Rgraphviz 2.38.0 2021-10-26 [1] Bioconductor
    rjson 0.2.21 2022-01-09 [1] CRAN (R 4.1.2)
    rlang 1.0.1 2022-02-03 [1] CRAN (R 4.1.2)
    rmarkdown 2.12 2022-03-02 [1] CRAN (R 4.1.2)
    RPMG 2.2-3 2019-09-23 [1] CRAN (R 4.1.1)
    rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.1.2)
    RProtoBufLib 2.6.0 2021-10-26 [1] Bioconductor
    RSEIS 4.0-3 2021-08-02 [1] CRAN (R 4.1.1)
    RSpectra 0.16-0 2019-12-01 [1] CRAN (R 4.1.2)
    rstatix 0.7.0 2021-02-13 [1] CRAN (R 4.1.2)
    rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.2)
    rsvd 1.0.5 2021-04-16 [1] CRAN (R 4.1.2)
    Rtsne 0.15 2018-11-10 [1] CRAN (R 4.1.2)
    rvest 1.0.2 2021-10-16 [1] CRAN (R 4.1.2)
    Rwave 2.6-0 2021-09-29 [1] CRAN (R 4.1.1)
    S4Vectors * 0.32.3 2021-11-21 [1] Bioconductor
    sandwich 3.0-1 2021-05-18 [1] CRAN (R 4.1.2)
    ScaledMatrix 1.2.0 2021-10-26 [1] Bioconductor
    scales * 1.1.1 2020-05-11 [1] CRAN (R 4.1.2)
    scater 1.22.0 2021-10-27 [1] Bioconductor
    scattermore 0.8 2022-02-14 [1] CRAN (R 4.1.2)
    scuttle 1.4.0 2021-10-26 [1] Bioconductor
    sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.2)
    shape 1.4.6 2021-05-19 [1] CRAN (R 4.1.1)
    SingleCellExperiment * 1.16.0 2021-10-26 [1] Bioconductor
    sp 1.4-6 2021-11-14 [1] CRAN (R 4.1.2)
    spam 2.8-0 2022-01-06 [1] CRAN (R 4.1.2)
    sparseMatrixStats 1.6.0 2021-10-26 [1] Bioconductor
    splancs 2.01-42 2021-04-20 [1] CRAN (R 4.1.2)
    stringi 1.7.6 2021-11-29 [1] CRAN (R 4.1.2)
    stringr * 1.4.0 2019-02-10 [1] CRAN (R 4.1.2)
    SummarizedExperiment * 1.24.0 2021-10-26 [1] Bioconductor
    survival 3.2-13 2021-08-24 [1] CRAN (R 4.1.2)
    tcltk2 * 1.2-11 2014-12-20 [1] CRAN (R 4.1.1)
    testthat 3.1.2 2022-01-20 [1] CRAN (R 4.1.2)
    TH.data 1.1-0 2021-09-27 [1] CRAN (R 4.1.2)
    tibble * 3.1.6 2021-11-07 [1] CRAN (R 4.1.2)
    tidyr * 1.2.0 2022-02-01 [1] CRAN (R 4.1.2)
    tidyselect 1.1.2 2022-02-21 [1] CRAN (R 4.1.2)
    tidyverse * 1.3.1 2021-04-15 [1] CRAN (R 4.1.2)
    tweenr 1.0.2 2021-03-23 [1] CRAN (R 4.1.2)
    tzdb 0.2.0 2021-10-27 [1] CRAN (R 4.1.2)
    usethis * 2.1.5 2021-12-09 [1] CRAN (R 4.1.2)
    utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.2)
    uwot * 0.1.11 2021-12-02 [1] CRAN (R 4.1.2)
    vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.2)
    vipor 0.4.5 2017-03-22 [1] CRAN (R 4.1.2)
    viridis 0.6.2 2021-10-13 [1] CRAN (R 4.1.2)
    viridisLite 0.4.0 2021-04-13 [1] CRAN (R 4.1.2)
    withr 2.5.0 2022-03-03 [1] CRAN (R 4.1.2)
    xfun 0.29 2021-12-14 [1] CRAN (R 4.1.2)
    XML 3.99-0.8 2021-09-17 [1] CRAN (R 4.1.2)
    xml2 1.3.3 2021-11-30 [1] CRAN (R 4.1.2)
    XVector 0.34.0 2021-10-26 [1] Bioconductor
    yaml 2.3.5 2022-02-21 [1] CRAN (R 4.1.2)
    zlibbioc 1.40.0 2021-10-26 [1] Bioconductor
    zoo 1.8-9 2021-03-09 [1] CRAN (R 4.1.2)

[1] C:/Users/MayaB/Documents/R/R-4.1.2/library

D -- DLL MD5 mismatch, broken installation.


@HelenaLC
Copy link
Owner

Could you try using the prepData function directly to create the SCE? I.e., prepData(fcs_file_name) (by default,
transformation = FALSE and truncate_max_range = FALSE)? You're SCE currently contains non-mass channels (e.g., time, event length). These will be moved to the internal cell metadata (int_colData) by prepData. I am not certain, but my guess is that these cause issues when trying to match masses internally.

@HelenaLC
Copy link
Owner

Hey, is this still an active issue? If no, please close it (or I will do so soon). Else, any feedback re my comment above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants