Skip to content

Commit

Permalink
fixed problem with missing parameters, closes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
pfgherardini committed May 11, 2018
1 parent b3e949e commit c428bd7
Show file tree
Hide file tree
Showing 37 changed files with 12 additions and 40 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: premessa
Type: Package
Title: R package for pre-processing of flow and mass cytometry data
Version: 0.1.5
Version: 0.1.6
Author: "Pier Federico Gherardini <pfgherardini@parkerici.org> [aut, cre]"
Description: This package includes panel editing/renaming for FCS files, bead-based normalization and debarcoding.
Imports: shiny (>= 0.14), flowCore, reshape, ggplot2, hexbin, gridExtra, rhandsontable, jsonlite
License: GPL v3
LazyData: TRUE
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ To stop the software simply hit the "ESC" key in your R session.

## Usage

Once you have selected the working directory, the software will extract the panel information from all the FCS files contained in the directory. This information is then displayed in a table, where each row corresponds to a different parameter name ($PnN keyword), indicated by the row names (leftmost column), and each column corresponds to a different file, indicated in the column header. Each cell represents the description string ($PnS keyword) of a specific parameter in a given file. If a parameter is missing from a file, an *NA* is displayed in the corresponding cell, which will be colored orange.
Once you have selected the working directory, the software will extract the panel information from all the FCS files contained in the directory. This information is then displayed in a table, where each row corresponds to a different parameter name ($PnN keyword), indicated by the row names (leftmost column), and each column corresponds to a different file, indicated in the column header. Each cell represents the description string ($PnS keyword) of a specific parameter in a given file. If a parameter is missing from a file, the word *absent* is displayed in the corresponding cell, which will be colored orange (note that this means that *absent* cannot be a valid parameter name)

The table begins with three special columns:
- *Remove*: if the box is checked the corresponding parameter is removed from all the files, and the row is grayed out
Expand Down
12 changes: 9 additions & 3 deletions inst/paneleditor_shinyGUI/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ shinyServer(function(input, output, session) {
isolate({
df <- rhandsontable::hot_to_r(input$paneleditorui_panel_table)
for(i in 1:ncol(df))
df[, i] <- gsub("^NA$", NA, df[, i])
df[, i] <- gsub("absent", NA, df[, i])
df$Remove <- as.logical(df$Remove)


Expand All @@ -78,7 +78,13 @@ shinyServer(function(input, output, session) {
})

output$paneleditorui_panel_table <- rhandsontable::renderRHandsontable({
df <- data.frame(Remove = FALSE, panel.table, check.names = F, stringsAsFactors = F)
temp <- panel.table

for(i in 1:ncol(temp))
temp[, i][is.na(temp[, i])] <- "absent"

df <- data.frame(Remove = FALSE, temp, check.names = F, stringsAsFactors = F)


hot <- rhandsontable::rhandsontable(df, rowHeaderWidth = 100)
hot <- rhandsontable::hot_cols(hot, fixedColumnsLeft = 3, renderer = "
Expand All @@ -92,7 +98,7 @@ shinyServer(function(input, output, session) {
if(instance.params.data[row][0])
td.style.background = 'lightgrey'
else {
if(value == 'NA')
if(value == 'absent')
td.style.background = 'orange'
else if(value != instance.params.data[row][2] && col > 2)
td.style.background = 'lightpink'
Expand Down
1 change: 0 additions & 1 deletion man/as_flowFrame.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/calculate_baseline.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/calculate_bcs_separation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/copy_keywords.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/correct_data_channels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/debarcode_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/debarcode_data_matrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/debarcode_fcs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/debarcoder_GUI.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_assignments_at_threshold.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_barcode_channels_names.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_mahalanobis_distance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_mahalanobis_distance_from_beads.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_sample_idx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_well_abundances.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/identify_beads.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/normalize_by_pop.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/normalize_folder.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/normalizer_GUI.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_all_barcode_biaxials.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_barcode_channels_intensities.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_barcode_separation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_barcode_yields.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_distance_from_beads.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_separation_histogram.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/premessa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/read_barcode_key.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/read_parameters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/remove_beads_from_fcs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/remove_beads_from_file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rename_fcs_parameters_desc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rename_fcs_parameters_name.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rename_parameters_in_files.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/write_flowFrame.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c428bd7

Please sign in to comment.