From 7343bd8c25edf8d0f14a6609ba6c6d6e72c995fb Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 27 Nov 2015 23:46:34 +0100 Subject: Some manual updates and fixes to the import of wide data --- GNUmakefile | 2 +- inst/GUI/gmkin.R | 9 +++++++-- vignettes/gmkin_manual.html | 14 +++++++------- vignettes/img/dataset_Z.png | Bin 81502 -> 77074 bytes vignettes/img/generatedatagrid.png | Bin 74037 -> 78599 bytes vignettes/img/gmkin_start.png | Bin 102926 -> 97244 bytes vignettes/img/import.png | Bin 49396 -> 50967 bytes vignettes/img/new_project.png | Bin 31691 -> 30713 bytes 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index a9849b8..25e3cc1 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -62,7 +62,7 @@ README.html: README.md vignettes/gmkin_manual.html: vignettes/gmkin_manual.Rmd "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/gmkin_manual.Rmd', dir = 'vignettes')" -vignettes/gmkin_manual.md: vignettes/gmkin_manual.Rmd +vignettes/gmkin_manual.md: vignettes/gmkin_manual.Rmd vignettes/img/* cd vignettes; \ "$(RBIN)/Rscript" -e "knitr::knit('gmkin_manual.Rmd', out = 'gmkin_manual.md')"; \ diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R index bbce29b..2028fbc 100644 --- a/inst/GUI/gmkin.R +++ b/inst/GUI/gmkin.R @@ -663,6 +663,9 @@ new_ds_from_csv_handler <- function(h, ...) { stringsAsFactors = FALSE)) if(svalue(ds.e.up.widelong) == "wide") { tmpdl <- mkin_wide_to_long(tmpd, time = as.character(svalue(ds.e.up.wide.time))) + tmpdl$name <- as.character(tmpdl$name) + tmpdl$override <- NA + tmpdl$err <- 1 } else { tmpdl <- data.frame( name = tmpd[[svalue(ds.e.up.long.name)]], @@ -736,8 +739,10 @@ visible(ds.e.import) <- FALSE ds.e.preview <- ggroup(cont = ds.e.import, width = 400, height = 150, ext.args = list(layout = list(type="vbox", align = "center"))) ds.e.up.text <- ghtml("
", cont = ds.e.preview, width = 380, height = 150)
-ds.e.up.import <- gbutton("Import using options specified below", cont = ds.e.import,
-                          handler = new_ds_from_csv_handler)
+
+ds.e.up.import.line <- ggroup(cont = ds.e.import)
+ds.e.up.import <- gbutton("Import using options specified below", cont = ds.e.up.import.line,
+                          width = 250, handler = new_ds_from_csv_handler)
 ds.e.up.options <- ggroup(cont = ds.e.import, width = 200, horizontal = FALSE)
 ds.e.up.skip <- gedit(tmptextskip, label = "Comment lines", width = 20, cont = ds.e.up.options)
 ds.e.up.header <- gcheckbox(cont = ds.e.up.options, label = "Column names",
diff --git a/vignettes/gmkin_manual.html b/vignettes/gmkin_manual.html
index c6e17f2..47a8469 100644
--- a/vignettes/gmkin_manual.html
+++ b/vignettes/gmkin_manual.html
@@ -10,7 +10,7 @@
 
 
 
-
+
 
 Manual for gmkin
 
@@ -65,7 +65,7 @@ img {
 
 
 
@@ -107,7 +107,7 @@ img {

This will cause the default browser to start up or, if it is already running, to pop up and open a new tab for displaying the gmkin user interface.

In the R console, you should see a message that the httpd help server is started, if it wasn’t already started before.

In the browser, you should see something like the screenshot below.

-

Screenshot of the newly started gmkin GUI

+

Screenshot of the newly started gmkin GUI

The statusbar at the bottom of the gmkin window shows, among others, the working directory that gmkin uses.

If the browser only shows “Loading ExtJS…” and nothing else happens for about 10 to 15 seconds, please enter the gmkin() command again in the R console. If this still does not bring up the gmkin GUI, please close the browser and try again.

@@ -121,17 +121,17 @@ img {

At startup, the project explorer to the left shows the two project workspaces ‘FOCUS_2006’ and ‘FOCUS_2006_Z’ delivered with the package. The project manangement area in the center gives the possibility to save these projects under a new name, or to start a new, empty project.

A gmkin project workspace contains datasets, kinetic models for fitting, and so-called fits, i.e. the results of fitting models to data. The project area also shows the current working directory, where project workspace files are saved using the file extension .gmkinws.

Once a project has been saved by the user, the project explorer to the left will show it in the project list.

-

Screenshot of saving a new project

+

Screenshot of saving a new project

The current state of a project should repeatedly be saved during the work in order to avoid loosing data. This can be achieved by selecting the ‘Project’ tab in the center and pressing the ‘Save project to project file’ button. More conveniently, the keyboard shortcut Ctrl-X can be used to save the current status of the project.

In the project file management area, datasets and models can be imported from one of the projects in the project list, once it has been selected in the droplist labelled ‘Import from:’.

-

Screenshot of importing datasets and models

+

Screenshot of importing datasets and models

Once the project has been set up, you may want to minimize the project explorer, especially if you are limited in vertical screen space.

Screenshot of minimized project explorer

Dataset editor

When you select one of the datasets in the dataset explorer to the left, some summary information about the dataset is shown in the center, and the data itself is loaded into the data editor to the right.

-

Screenshot of the GUI after loading a dataset

+

Screenshot of the GUI after loading a dataset

When you have added information about the units, or edited the data to the right, you should hit the button ‘Keep changes’. This will add a new entry in the dataset explorer.

In the dataset editor to the right, you can override original data (for example in order to follow FOCUS recommendations for time zero samples or values below the limit of detection) by entering numbers in the override column.

When saving a dataset, the sampling times, the number of replicates and the list of observed variables will be computed from the current data in the data editor.

@@ -140,7 +140,7 @@ img {

Entering data directly

For entering new data manually, there are two possibilities. You can either change the Dataset title of the current dataset and edit the data in the Data editor to the right. Or, if the new data should have a different structure, e.g. different sampling times, observed variables and replicates, click on “New dataset”, edit the dataset title, sampling times, number of replicates and the list of observed variables, and press the button ‘Generate grid for entering kinetic data’, in order to prepare the Data editor to the right.

For sampling times and short names of the relevant compounds, a comma separated list must be entered, with a space after each comma. An example of filling out the respective fields is shown below.

-

Screenshot of generating a data grid

+

Screenshot of generating a data grid

After that, the actual measurements can be entered into the Data editor to the right, in the column ‘value’.

If everything is OK, press “Keep changes” to save the dataset in the current workspace. Note that you need to save the project file (see above) in order to be able to use the dataset that you created in a future gmkin session.

diff --git a/vignettes/img/dataset_Z.png b/vignettes/img/dataset_Z.png index 7162b76..c76cbe8 100644 Binary files a/vignettes/img/dataset_Z.png and b/vignettes/img/dataset_Z.png differ diff --git a/vignettes/img/generatedatagrid.png b/vignettes/img/generatedatagrid.png index ac547e1..bc70099 100644 Binary files a/vignettes/img/generatedatagrid.png and b/vignettes/img/generatedatagrid.png differ diff --git a/vignettes/img/gmkin_start.png b/vignettes/img/gmkin_start.png index f15a798..9b494ec 100644 Binary files a/vignettes/img/gmkin_start.png and b/vignettes/img/gmkin_start.png differ diff --git a/vignettes/img/import.png b/vignettes/img/import.png index ec884e8..94e56dd 100644 Binary files a/vignettes/img/import.png and b/vignettes/img/import.png differ diff --git a/vignettes/img/new_project.png b/vignettes/img/new_project.png index 3800f4e..d946cbd 100644 Binary files a/vignettes/img/new_project.png and b/vignettes/img/new_project.png differ -- cgit v1.2.1