-
Notifications
You must be signed in to change notification settings - Fork 7
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
read.ncdfFlowSet multiple datasets #47
Comments
I don't know if there are separate keywords in the FCS file for the two data sets or if this is a bug in flowCore, we can look into that. library(flowCore)
library(ncdfFlow)
#> Loading required package: RcppArmadillo
#> Loading required package: BH
#' build a couple of toy flowFrames with different marker and channel names.
m <- matrix(rnorm(1000),ncol=4)
m2 <- matrix(rnorm(1000),ncol=4)
colnames(m)<-LETTERS[1:4]
colnames(m2)<-LETTERS[5:8]
fa<-flowFrame(m)
fb<-flowFrame(m2)
#' Can't do this yet, the marker and channel names don't match.
flowSet(fa,fb)
#> 000002_V2 doesn't have the identical colnames as the other samples!
#> Error in validObject(.Object): invalid class "flowSet" object: Some items identified in the data environment either have the wrong dimension or type.
#' set the column names of flowFrame A to be the same as B
colnames(fa)<-colnames(fb)
#' Get the marker names of flowFrame B
na<-markernames(fb)
#' set the column names of the vector of marker names, this acts as a map.
names(na)<-colnames(fb)
#' finally set the marker names of flowFrame A
markernames(fa)<-na
#' now construct the flowSet
fs <- flowSet(list(fa,fb))
ncdfFlowSet(fs)
#> write V1 to empty cdf slot...
#> write V2 to empty cdf slot...
#> An ncdfFlowSet with 2 samples.
#> NCDF file : /var/folders/4x/t5qt3m717tbf3yml7h971mvc0000gn/T//RtmpQ29rRm/ncfs184f82a245d24.nc
#> An object of class 'AnnotatedDataFrame'
#> rowNames: V1 V2
#> varLabels: name
#> varMetadata: labelDescription
#>
#> column names:
#> E, F, G, H Created on 2019-07-31 by the reprex package (v0.3.0) |
|
pull the latest |
Works great, thank you so much for your immediate response! Just for your information; when trying to read in the file now without setting the
|
Thanks for pointing it out! It should be all good now. |
Dear all, just started using your package and stumbled during reading a file:
Browsing in, the issue is inside
read.ncdfFlowSet()
in line 127, call tomy.read.FCS(i)
. Insidemy.read.FCS(i)
in line 7:Where
chnls_common
:But
colnames(this_fr)
:No idea what happened here. Could be it has something to do that even when reading the file with
flowCore
the feature names are different in the two datasets. (Once saved as FCS2 - dataset 1, once as FCS3 - dataset 2)sessionInfo()
Do not feel pressured at all - so far I will just continue using flowCore.
A small question anyways: Is there a straight-forward way to convert a flowCore-flowFrame to a ncdfFlow-flowFrame?
The text was updated successfully, but these errors were encountered: