flowCore parameters( ) function does not appear to exist
1
0
Entering edit mode
neilruthen • 0
@neilruthen-16682
Last seen 3.2 years ago

Hello, 

While creating flow frames using the flowFrame function I noticed that while I could change the parameters of an existing flow frame using

"parameters(flowFrame)<-" , I could not use the function parameters(flowFrame) to extract the AnnotatedDataFrame.

When I attempt to use the flowCore parameters() function, the only function available is the parameters() function from the package

'modeltools'. Below is some code from my most recent R session:

> frames <- lapply(dir(path = "/Users/nruthen16/Desktop/MRD-/134", full.names=TRUE), read.FCS)
> frames[[1]]
flowFrame object 'd339ff7a-04fc-4f44-a74f-862590f6e7af'
with 500000 cells and 15 observables:
                  name      desc  range minRange maxRange
$P1              FSC-A      <NA> 262144        0   262143
$P2              FSC-H      <NA> 262144        0   262143
$P3              SSC-A      <NA> 262144        1    10000
$P4              SSC-H      <NA> 262144        1    10000
$P5             FITC-A      CD15 262144        1    10000
$P6               PE-A      CD33 262144        1    10000
$P7      PerCP-Cy5-5-A CD117 PC5 262144        1    10000
$P8           PE-Cy7-A      CD13 262144        1    10000
$P9              APC-A      CD34 262144        1    10000
$P10 Alexa Fluor 700-A      CD71 262144        1    10000
$P11    APC-ALEXA750-A      CD38 262144        1    10000
$P12    Pacific Blue-A     HLADR 262144        1    10000
$P13            V500-A      CD45 262144        1    10000
$P14           BV605-A      CD19 262144        1    10000
$P15              Time      <NA> 262144        0   262143
232 keywords are stored in the 'description' slot

> parameters(frames[[1]])
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘parameters’ for signature ‘"flowFrame"’

> traceback()
3: stop(gettextf("unable to find an inherited method for function %s for signature %s",
       sQuote(fdef@generic), sQuote(cnames)), domain = NA)
2: (function (classes, fdef, mtable)
   {
       methods <- .findInheritedMethods(classes, fdef, mtable)
       if (length(methods) == 1L)
           return(methods[[1L]])
       else if (length(methods) == 0L) {
           cnames <- paste0("\"", vapply(classes, as.character,
               ""), "\"", collapse = ", ")
           stop(gettextf("unable to find an inherited method for function %s for signature %s",
               sQuote(fdef@generic), sQuote(cnames)), domain = NA)
       }
       else stop("Internal error in finding inherited methods; didn't return a unique method",
           domain = NA)
   })(list("flowFrame"), new("standardGeneric", .Data = function (object,
       ...)
   standardGeneric("parameters"), generic = "parameters", package = "modeltools",
       group = list(), valueClass = character(0), signature = "object",
       default = NULL, skeleton = (function (object, ...)
       stop("invalid call in method dispatch to 'parameters' (no default method)",
           domain = NA))(object, ...)), <environment>)
1: parameters(frames[[1]])

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BiocInstaller_1.30.0      ranger_0.10.1             obliqueRF_0.3             mda_0.4-10                class_7.3-14              pls_2.6-0                
 [7] ROCR_1.0-7                gplots_3.0.1              party_1.3-0               strucchange_1.5-1         sandwich_2.4-0            zoo_1.8-3                
[13] modeltools_0.2-22         mvtnorm_1.0-8             e1071_1.6-8               caret_6.0-80              lattice_0.20-35           berryFunctions_1.17.0    
[19] circlize_0.4.4            ComplexHeatmap_1.18.1     randomForest_4.6-14       RColorBrewer_1.1-2        reshape2_1.4.3            FlowSOM_1.12.0           
[25] igraph_1.2.1              ggcyto_1.8.2              flowWorkspace_3.28.1      ncdfFlow_2.26.0           BH_1.66.0-1               RcppArmadillo_0.8.600.0.0
[31] flowCore_1.46.1           ggplot2_3.0.0             reader_1.0.6              NCmisc_1.1.5             

loaded via a namespace (and not attached):
 [1] TH.data_1.0-9               colorspace_1.3-2            rjson_0.2.20                corpcor_1.6.9               GlobalOptions_0.1.0        
 [6] DRR_0.0.3                   hexbin_1.27.2               IDPmisc_1.1.17              prodlim_2018.04.18          lubridate_1.7.4            
[11] coin_1.2-2                  codetools_0.2-15            splines_3.5.0               robustbase_0.93-1.1         knitr_1.20                 
[16] RcppRoll_0.3.0              broom_0.5.0                 ddalpha_1.3.4               cluster_2.0.7-1             kernlab_0.9-26             
[21] sfsmisc_1.1-2               graph_1.58.0                rrcov_1.4-4                 compiler_3.5.0              proftools_0.99-2           
[26] backports_1.1.2             assertthat_0.2.0            Matrix_1.2-14               lazyeval_0.2.1              tools_3.5.0                
[31] bindrcpp_0.2.2              gtable_0.2.0                glue_1.3.0                  dplyr_0.7.6                 Rcpp_0.12.18               
[36] Biobase_2.40.0              gdata_2.18.0                nlme_3.1-137                iterators_1.0.10            timeDate_3043.102          
[41] gower_0.1.2                 stringr_1.3.1               gtools_3.8.1                XML_3.98-1.12               DEoptimR_1.0-8             
[46] zlibbioc_1.26.0             MASS_7.3-49                 scales_0.5.0                ipred_0.9-6                 parallel_3.5.0             
[51] yaml_2.2.0                  gridExtra_2.3               rpart_4.1-13                latticeExtra_0.6-28         stringi_1.2.4              
[56] pcaPP_1.9-73                foreach_1.4.4               caTools_1.17.1.1            BiocGenerics_0.26.0         lava_1.6.2                 
[61] geometry_0.3-6              shape_1.4.4                 flowViz_1.44.0              bitops_1.0-6                rlang_0.2.1                
[66] pkgconfig_2.0.1             matrixStats_0.54.0          purrr_0.2.5                 bindr_0.1.1                 recipes_0.1.3              
[71] CVST_0.2-2                  tidyselect_0.2.4            plyr_1.8.4                  magrittr_1.5                R6_2.2.2                   
[76] multcomp_1.4-8              dimRed_0.1.0                pillar_1.3.0                withr_2.1.2                 survival_2.41-3            
[81] abind_1.4-5                 nnet_7.3-12                 tibble_1.4.2                tsne_0.1-3                  crayon_1.3.4               
[86] KernSmooth_2.23-15          GetoptLong_0.1.7            data.table_1.11.4           Rgraphviz_2.24.0            ConsensusClusterPlus_1.44.0
[91] ModelMetrics_1.1.0          tidyr_0.8.1                 munsell_0.5.0               magic_1.5-8                

 

Any help on how to resolve this issue would be greatly appreciated!

Thanks,

Neil

  

 

flowcore • 343 views
ADD COMMENT
0
Entering edit mode
neilruthen • 0
@neilruthen-16682
Last seen 3.2 years ago

I realized that the parameters function from modeltools interferes with calling the parameters function from flowCore since they are referred to by the same name in both packages.

The solution is simple: 

You can specify which parameters function you would like to use by using

flowCore::parameters()

or 

modeltools::parameters().

ADD COMMENT

Login before adding your answer.

Traffic: 379 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6