flowCore and curvHDR
0
0
Entering edit mode
Albert Park ▴ 10
@albert-park-4094
Last seen 9.6 years ago
Hi, Has anyone used the curvHDRfilter function from Matt Wand? I downloaded his package, installed it and can get it to run just fine. Using the standard test dataset of GvHD as he does in his vignette, the function is able to create a set of 3 clusters. I am then stuck as to how one should extract the data that is defined by the boundaries of the clusters if I want a specific cluster. For example, if I want a subsetted flowFrame that contains data specific to the cluster defined by the top left most boundary, how can I do this? The vignette explains that one should be able to use the inPolygon functions in flowCore to do this. I have attempted to use the polygonGate function where the .gate parameter is defined by the curvHDR object, but this does not seem to give me what I desire. #Loading the necessary libraries library(flowCore) library(flowViz) library(curvHDR) #Defining my data source as a flowSet object data(GvHD) #Transforming all flowFrames in the flowSet with the asin transform GvHDtrans <- transform("FSC-H" = asinh, "SSC-H" = asinh, "FL1-H" = asinh, "FL2-H" = asinh, "FL3-H" = asinh, "FL2-A" = asinh, "FL4-H" = asinh) %on% GvHD #Selecting two columns out of a specific flowFrame inputData <- exprs(GvHDtrans$s9a01)[, c(4, 2)] #Running the curvHDR algorithm cvo1 <- curvHDRfilter(inputData, HDRlevel =0.2) #Plotting the output of curvHDRfilter, note that this only depicts #the boundaries of the 3 clusters and does not show the individual #data points (not sure why this is) plot(cvo1) #If we perform a show(cvo1) we see that there are a set of 3 defined polys matrices (containing a set of x and y vertices coordinates). This makes absolute sense since plotting cvo1 returns 3 clusters. #Now I would like to extract the data defined by the curvHDR matrix for the top left cluster, I do the following to attempt this... #Create a polygonGate object using the defined curvHDR filter object pg1 <- polygonGate(filterId="pg1", .gate=cvo1) #Applying the polygonGate filter obj to the specific flowFrame that we are examining pg1filt <- filter(GvHDtrans$s9a01, pg1) #Taking a look at what is returned with a split command, I only see a plus and minus set, not 3 clusters. split(GvHDtrans$s9a01, pg1) This makes sense since the pg1filt is a logicalFilterResult, but this is not what I want. Does anyone have any ideas as to where I could go from here? Is there a way to create a matrix that the .gate parameter could take when creating the polygonGate that is specific to say cvo1$polys[[2]], or whatever cluster? Thanks. Albert Park
GO flowCore GO flowCore • 1.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 792 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