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

warpSet() #24

Open
mikejiang opened this issue Mar 25, 2019 · 4 comments
Open

warpSet() #24

mikejiang opened this issue Mar 25, 2019 · 4 comments

Comments

@mikejiang
Copy link
Member

Here is a reproducible example (fs.rds attached):

library(flowStats)
fs <- readRDS("fs.rds")
fsN <- warpSet(x = fs, stains = "CD33.CD33-TotalA")
d1 <- densityplot(~`CD33.CD33-TotalA`, fs, main="before warpSet()", filter=curv1Filter("CD33.CD33-TotalA"))
d2 <- densityplot(~`CD33.CD33-TotalA`, fsN, main="after warpSet()", filter=curv1Filter("CD33.CD33-TotalA"))
plot(d1, split=c(1,1,2,1), xlim=c(-.5,2.5))
plot(d2, split=c(2,1,2,1), newpage=FALSE)

image

the main issue is that sample7 (maybe sample 5) is shifted. And so I >wonder, it seems to work well for most of the other channels (not shown) and maybe I can >tweak parameters to get it to work well ..
Thoughts?
Mark

@mikejiang
Copy link
Member Author

The second peak on the right for sample 7 seems to interfere the peak alignment. To eliminate this effect, simply increase the smoothing bandwidth factor (default bwFac = 2 ), which is passed down to curv1Filter.

fsN <- warpSet(x = fs, stains = "CD33.CD33-TotalA", bwFac = 3)

d1 <- densityplot(~`CD33.CD33-TotalA`, fs, main="before warpSet()", filter=curv1Filter("CD33.CD33-TotalA", bwFac = 3))
d2 <- densityplot(~`CD33.CD33-TotalA`, fsN, main="after warpSet()", filter=curv1Filter("CD33.CD33-TotalA", bwFac = 3))

image

@markrobinsonuzh
Copy link

Thanks @mikejiang !

I had tried this already and the problem is, when I choose bwFac = 3, a different channel breaks. For example, here is CD4 (with bwFac = 3):

download

Is there a good strategy (beyond doing it manually) to run multiple bwFrac and then pick-and-choose which one works well for each channel?

Mark

@gfinak
Copy link
Member

gfinak commented Mar 26, 2019

Could you run different channels separately with different parameters?

@markrobinsonuzh
Copy link

I certainly could .. I just wonder if there is a good way to pick off, automatically, the bwFac that works well. If someone has needed to do this before and can suggest a strategy, I'm all ears .. but if not, I/we will try and code something sensible.

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