Spectre
                                
                                
                                
                                    Spectre copied to clipboard
                            
                            
                            
                        Error in train.cytnorm
Hi all,
I am following the method in th "Discovery workflow with batch alignment using CytoNorm"
All works well until I try the "cytnrm <- train.cytonorm(model = cytnrm, align.cols = cellular.cols)" part.
It starts off smoothly then I am repeatedly getting the error:
Training alignment - setup
Working directory is '/Volumes/mmp-1/Moreland lab Auckland/Cytek/START runs/Spectre/Output_Spectre/Output 2 - alignment/tmp-train'
Training alignment - file (batch) preparation
Training alignment - file (batch) and metacluster splitting
 -- running File '1'
 -- running File '2'
 -- running File '3'
Training alignment - learning conversions
Processing cluster 1
Computing Quantiles
  A (FileID 1)
Error in flowCore::exprs(ff)[, channels, drop = FALSE] : 
  subscript out of bounds
In addition: Warning messages:
1: In FlowSOM::NewData(model$fsom, file.ff) :
  3243 cells (0.66%) seem far from their cluster centers.
2: In FlowSOM::NewData(model$fsom, file.ff) :
  3048 cells (0.73%) seem far from their cluster centers.
3: In FlowSOM::NewData(model$fsom, file.ff) :
  4214 cells (1.07%) seem far from their cluster centers.
Thank you again, Spectre is proving invaluable, both the package and the resources and papers!
@ReubenMcG hmmm what are your 'cellular.cols'?
Hi @tomashhurst,
Given the error I went back and changed the {cytnrm <-prep.cytonorm...} to include {cluster.cols = cellular.cols} as well as {cellular.cols = cellular.cols}
This rectified the error but seems like it's not the optimal solution as the exploratory clustering etc would the be using all cellular.cols to cluster?
Sorry if I am just confusing things...
@ReubenMcG ah yes, I thought it might be this issue. There is a bit of an idiosyncratic use of that function. You need to define the cellular.cols argument to include all the cellular columns, and then the align.cols and cluster.cols can be a subset of those. The idea is that the function will pull in and record the data that is cellular in preparation for running CytoNorm. Only the columns in cluster.cols will be used for the actual clustering, and only the columns in 'align.cols' will actually be aligned.
thanks @tomashhurst, yes this was my understanding, but it seems if I do not include all the cellular.cols in the cluster.cols argument within the prep.cytonorm I get the error message above.
This should not be the case right?
Hmm that shouldn't be the case, but I will have a look and see what's up!
@ReubenMcG I went and tested it and there is definitely an unintentional issue there -- I'm going to push our next release shortly which won't include a fix for this (we've got some folks waiting on new spatial analysis functions). Once that's done I'll go and make a patch for the cytonorm issues, which hopefully we can put out next week!
Thanks, just glad it wasn't me doing something crazy which was my first assessment.
Hi @tomashhurst, I'm having the same issue (if my cluster.cols do not include all cellular.cols, the train.cytonorm function fails when align.cols = cellular.cols.) Was there a patch or update made for this that I'm unaware of?
Hi @tomashhurst , I too am having the same issue, are there any updates available?
Having the same issue here.
I second that, I am having the same problem.
It may have been fixed in development branch. Can you try re-installing from development branch and try?
@ghar1821 I have installed the package from the development branch using devtools::install_github("immunedynamics/spectre", ref = 'development')
Running it with all cellular.cols for clustering worked fine but I would prefer clustering it with only the clustering.cols if possible. Could there be a link to this issue https://github.com/ImmuneDynamics/Spectre/issues/70 ?
Any updates for this issue?
Fixed in v1.2.0