DillonHammill / CytoExploreR

Interactive Cytometry Data Analysis
60 stars 13 forks source link

cyto_setup parse_names argument #127

Closed rwbaer closed 2 years ago

rwbaer commented 2 years ago

Briefly describe what you hope to achieve: I would like to parse my .fcs file names as split by an underscore image

Outline the steps taken to attempt to reach this goal (paste code below):

gsMarav <- cyto_setup(path = "Maraviroc",
                 gatingTemplate = "Maraviroc.csv",
                 details = "Maraviroc-Details.csv",
                 parse_names = TRUE,
                 restrict = TRUE)
a = cyto_names_parse(gsMarav, 
                 vars = c("Well", "CCL4", "MVC", "Sample", "Replicate"),
                 split = "_")
print(a)

I also tried setting parsenames = "".

I'm not sure I understand the expected operation of parse_names if it is not to prepopulate the second shiny prompt of cyto_setup. On the other hand, even as I was using it I was confused about how to supply vars =

I'm also confused how to use cyto_names_parse as it seems to return an S4 object that I don't know how to get back into my "Maraviroc-Details.csv" file. Any insights?

Include any associated screenshots or images here:

DillonHammill commented 2 years ago

@rwbaer, make sure there are no "Experiment-Deatils.csv" files in your working directory and try again. Experiment details are preferentially inherited from such files by default.

Likewise if the details don't exist in the file you supply to details these will not be displayed in the editor.

rwbaer commented 2 years ago

Thank you. Deleting Experiment-Details.csv (or in my case "Maraviroc-Details.csv") worked (mostly). It seems that cyto_setup() is unable to use a vars = c("Well", "CCL4", "MVC", "Sample", "Replicate") arguement if parse_names = TRUE. Therefore, I seem to be left with generic names that I have to edit each time I run the script on a fresh set of .fcs files. Still, the parsing saves me a lot of work typing that is much appreciated. So, thanks ...

I still have a question about how to effectively use cyto_names_parse() in a workflow to end up with a similar final product.

DillonHammill commented 2 years ago

For now you will need to update the variables interactively in the editor. cyto_setup() does not currently accept the vars argument. I will consider adding it but it is easy enough just to use the editor for this.

rwbaer commented 2 years ago

@DillonHammil. Thanks for considering it. Feel free to close the "help wanted" aspect of the issue. I leave it to you whether you want to retag as "feature request". Your program does some much already, and as you say the editing task is minor! Every time I start on a new type of flow project, I learn new things about its capabilities.