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

SaveClusters ToFCS with multiple data segments #22

Open
jaybob66 opened this issue Feb 1, 2019 · 2 comments
Open

SaveClusters ToFCS with multiple data segments #22

jaybob66 opened this issue Feb 1, 2019 · 2 comments

Comments

@jaybob66
Copy link

jaybob66 commented Feb 1, 2019

In R console I call FlowSOM() to load an FCS and apply clustering and metaclustering and then call SaveClustersToFCS() to save the modified file.

However, SaveClustersToFCS reports an error to me (see below), it looks like FlowSOM can't load or save FCS files with multiple data segments? Is that correct?

Thanks

> fileName <- "MyFile.LMD"
> cols <- c(3:7)

> fsom <- FlowSOM(fileName, pattern=".LMD", compensate=FALSE,transform=FALSE,scale=FALSE,colsToUse=cols, nClus=20)
> SaveClustersToFCS(fsom,fileName)
Extending MyFile.LMD using the FlowSOMmapping of MyFile.LMD indexed by 
Error in m[s, ] <- fsom_f$map$mapping[, 1] : 
  number of items to replace is not a multiple of replacement length
In addition: Warning messages:
1: The file contains 1 additional data segment.
The default is to read the first segment only.
Please consider setting the 'dataset' argument. 
2: Invalid bitwidth specification.
This is a known bug in Beckman Coulter's CPX software.
The data might be corrupted if produced by another software. 
3: The file contains 1 additional data segment.
The default is to read the first segment only.
Please consider setting the 'dataset' argument. 
4: Invalid bitwidth specification.
This is a known bug in Beckman Coulter's CPX software.
The data might be corrupted if produced by another software. 
5: In NewData(fsom, ff) :
  5469 cells (1.63%) seem far from their cluster centers.
@SofieVG
Copy link
Owner

SofieVG commented Feb 4, 2019

Hi,

I have to admit that I haven't tried FlowSOM yet on any files with multiple data segments, so I am not entirely sure how it would behave. From the warnings, I assume only the first data segment is read into R? Maybe that is why it is not matching up later. However, in that case, I'm surprised that there were no warnings running the FlowSOM command. Would it be possible for you to share an example file with me, so I can have a look myself?

Kind regards,
Sofie

@SamGG
Copy link
Contributor

SamGG commented Feb 4, 2019

IMHO, the best way is to solve/clean the LMD file from Beckman instrument before applying FlowSOM.
IIRC the first segment is coded as FCS2 while the second is coded as FCS3. But the channels are not in the order. I have no code yet for transcoding.

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

3 participants