Giter Club home page Giter Club logo

autoplate's Introduction

Hi there! I'm Phil Palmer

I'm a PhD student in Cambridge working on computational methods to design broad-spectrum vaccines and antibodies

autoplate's People

Contributors

philpalmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

diosvax wtbxsjy

autoplate's Issues

Heatmap colour bar range is not consistent between plates

Description of the issue

On Quality Control (Step 2) on AutoPlate, the heatmaps colour bar range is not consistent between plates/heatmap plots. For example, as shown by the image below, the colour bar range for the first plate ranges from -40 to 120, while the second plate ranges from -100 to 150. This difference makes the visual comparison of heatmaps error-prone. This is a problem for all continuous features (i.e. neutralisation, dilution and rlu)
image

Solution

The breaks for the heatmap colour bar range were updated to be consistent between plates/heatmaps. (This was done by setting these breaks based upon the min and max values for all plates). This was fixed for all continuous features (i.e. neutralisation, dilution and rlu). See the example here for the neutralisation heatmaps for Plates 1 and 2 from the example data:
image

Add support for International Units (IU)

Logic

IC50 results from pMN should be expressed in International Units (set by NIBSC/WHO) as this would make the results comparable across different labs. As this can be somewhat tricky to calculate it would also be very useful if this was handled by AutoPlate

Design

The steps to specify a calibrant to automatically generate the IU will be as follows

  1. Specify the calibrant wells by types using the new cal type
    image

  2. Specify the sample_id for the calibrants eg HIC Pool 1
    image

  3. A new Calibrant tab will appear which can be used to specify the unitage for each calibrant
    image

  4. AutoPlate will automatically calculate the IU in the downloadable IED (Individual Effective Dose) table containing the international units aka sample_units
    image

Refactor with golem

Logic

To improve the structure of the app codebase and make it more maintainable the golem R library could be used

Tasks

  • Create new github branch?
  • Remove all of the existing codebase
  • Generate a new template with Golem
  • Copy the old codebase into the new one
  • Get gh actions test to work
  • Add more tests
    • Package installation - different platforms?
    • testthat test
    • code coverage
    • lintr

Enhancements

Enhancements

  • 1) Input
    • File upload
      • Allow upload of pre-generated full dataframe
      • Allow re-upload of CSV files (implemented in 1f17a81 as part of #21)
      • Extract date + time & use that to determine plate numbers
      • Support other file formats eg messaging or renaming of input columns
    • Dilutions
      • Prevent dilutions table from overwriting plate data dilutions because horizontal dilutions will be required for ELLA
      • George: app crash when pasting too many dilutions #28
    • Plate data
      • Make switching plates more intuitive
        • Change mouse numbers to start from mouse 6 on plate 2
        • Prevent plates overwiting one another when switching plates
      • Make all plates the same button
      • Add toggle to go betweeen RLU โ†’ types (would be implemented as part of #26)
      • Prevent the plate data from switching back to types when the dilutions are updated
      • Automatically increment all following plates if a user updates the mouse number in a previous plate
      • Conditional formatting (see here)
    • Other features
      • Sort feature levels such as subject
      • Change feature names (#24 )
        • Change name from primary -> virus
      • Section not clear to new users and so needs improvement!
        • Make app more robust if user hasn't entered all data eg title and report still work
        • Provide more guidance/feedback on which features need to be entered
        • Set default dropdown for incoluate to subject
      • Remove button
      • Make Submit button more visible and provide feedback once clicked
    • Performance
      • Reduce the number of uncessary calls resulting from reactivity
      • Improve the efficiency of the code which updates the types/subjects etc.
        • Replace nested for loops with vectors
        • Only update when changes occur
    • Add tooltips for help + improve messaging
    • Add example data (#21)
  • 2) QC
    • Display no. of cells + no. of wells in av. luminescence values table
    • Plate heatmaps
      • Change row names to letters + add a key (for types)
      • Improve error handling eg when other features not set
    • Ask Joanne, Kelly & George re normalisation using cell + virus wells (plate vs global)
    • Update heatmaps automatically rather than on-click on new tab
    • Keep colour scheme consistent between plots
    • Stop errors showing underneath the types boxplot (#27)
  • 3) Results
    • Make plots interactive using plotly
    • Add plotly library declaration to raw R code
    • Create a separate plot for each primary!
    • Have option to change axis eg from -10 -> 110
    • Syntax hightling for raw R code
    • Support multiple primaries/viruses
    • Change Estimate -> IC50 Dilution in IC50 boxplot
    • Use multiple lines on the x-axis to show that it's a log scale
    • Show a loading spinner while the plots are loading
    • Have templates available for reports eg for Cambridge University / DIOSVax (knitr)
    • Have the option to update the colours used in the plot eg make PBS black
  • Other
    • Refactoring (see here)
      • Use Shiny modules for each section of the app
      • Add a function and tests to ensure that the column types are correct
      • Create R package
      • Add tests (CI/CD)
      • Have auto-formatter like prettier
      • Reduce code duplication for plots in the app + code to display + in the Rmd
      • Add default_dilutions as parameter - if NULL then load data(defualt_dilutions)
      • On the show code tab do library(autoplate) and then use autoplate functions to generate the plot(s)
      • Improve the experience of using the library within R
      • Use Shiny modules for each section of the app
      • Generate documentation on the homepage from the readme
      • Add automatic code styling on PR with styler
      • Use shiny:: for all shiny functions so that shiny doesn't need to be loaded when the package is loaded
    • Update the readme - generate UI from markdown content
    • Diff assay types eg ELLA or ELISA or HIA assays
      • NA assay
        • ELISA reader input -> CSV
        • horizontal dilutions
        • support different and/or user defined custom plate templates
        • multiple mice per column eg rows C & D = mouse 2
    • Other (larger) plates eg 384-well plates
    • Custom features
    • Deploy to custom URL?
    • Pay for Shiny premium to get more app hours
    • Add a Rmd documentation web page similar to wpm (see here)

Table gets stuck in an endless loop if user makes two modifications to the same cell in quick succession

Description

In the plate metadata table if a user quickly modifies a cell twice the cell will endlessly go in between the two values that the user entered. This most commonly occurs when deleting a cell and then quickly entering a new value.
image

Related issues

This GitHub issues referees to the first issue in this list, however, there are other related issues:

  1. Cell flashing bug occurs when changing a cell twice rapidly
  2. Plate flashing bug occurs when switching between plates quickly
    3) UX issue occurs when user enters data on any plate it will switch back to the first plate

To replicate the bug

Select any cell in the plate metadata table. Quickly press backspace + any character + enter. The cell will then toggle endlessly between being empty and displaying the character you entered.

Bug post mortem

Solution: Check if the changes$changes is NULL to prevent each cell from updating from the after change event

Each change made by the user to the plate data table will trigger two changes events.

If a user makes two changes in quick succession this will cause a total of four events and these events can get stuck overwriting one another causing this bug.

For the second event for each of the changes the changes$changes property will be NULL. Therefore, we can check if this value is NULL and not update the plate data table in this situation. This will cause the total number of events from two changes to become two, preventing this loop and bug from occurring ๐ŸŽ‰

Improve drc plot for multiple viruses

Logic

Currently, if a user tries to plot a dataset containing multiple viruses in AutoPlate the plot will look like this
image

This is because only one plot can be displayed (rather than a plot for each primary) and so I am using facet_wrap(c("inoculate","primary")) to display all of the different viruses

However, this plot is not correct as the curves are on separate plots and I am not sure why there are multiple lines and why the lines are drawn even if no data points are present for that incoluate x primary combination

Potential solutions

  1. Ideally I would be able to change the value of facet_wrap so that they are all plotted within a single plot, for example, I could try facet_wrap(~primary) but I am not sure if this is correct
    image
  2. Alternatively, I could filter for each primary, plot them individually and then combine the plots with grid.arrange
  3. Or I could provide a dropdown menu to display a given primary

Tasks

  • Check new_data$pred values because predictions are being shown for all primaries
  • Otherwise try solution number 3 to have a separate plot for each primary which can be selected from a dropdown menu as this seems easiest
    • Implement dropdown for each of the different viruses
    • Filter to keep just the virus selected from the dropdown
    • Make sure it displays for both DRC & IC50 plots
    • Update report
      • Update plot colours
      • Create separate plots for each virus

Entering and deleting some exclusion criteria causes the app to crash

Description

Entering and deleting some exclusion criteria causes the app to crash
image

To replicate the bug

  1. Upload input data / CSV files
  2. Navigate to page 2) QC
  3. Enter some plate exclusion criteria eg 1
  4. Delete the criteria so that no plates are excluded

The app will then crash and the user will be forced to start a new session

To fix the bug

Move this line (helpers/2_qc.R#L27) into the tryCatch block to catch an errors that result from there not being any characters in the string entered by the user

Make the plots great again

Description

The plots sometimes look ugly (see below) and could be improved

drc
ic50

Update

This is now the plot to aim for
drc_prism

Improvements

  • 1. Prevent the plots looking squashed
  • 2. Titles
    • 1. Make sure the full title is visible
    • 2. Move the axis and graph titles
    • 3. Remove box around titles
  • 3. Control
    • 1. Change order - make control (PBS) first and positive control (antibody) last
    • 2. Change colours eg make PBS/control black
  • 4. IC50 boxplot
    • 1. Set a cut-off, shown as a dotted line for background PBS mice
    • 2. Make IC50s a dot plot rather than a boxplot
  • Plots
    • DRC
    • IC50
    • CV
    • Data exploration
  • Update
    • Use Prism colorblind safe theme
    • Add log ticks on x-axis
    • Add dotted line for 50% neut
    • Change plot size so that they look less stretched
  • Options
    • Group by sample
    • Add or remove data points (default = data points)
    • Type a plot title
  • Fix problems
    • Fix black background in AutoPlate
    • Add x-axis

plot_ic50_boxplot double plots

When viewing the IC50 boxplot as a scatter plot each point is plotted twice. This is caused by + geom_point() and +geom_jitter(). It should be one or the other.

Add option to modify plot size

With long treatment names (often for the full strain name of a virus) the plots can look rather squished

On the results page the plot text size can be set
image

This will change the size of all of the text in the plots below:
image

Added button to export data for PRISM

The main benefit of AutoPlate is being able to quickly format and preview data. However, PRISM currently has more options for plotting and so it may be useful to allow users to easily export data from AutoPlate to get the best of both approaches

  1. Added button on QC page to export data to PRISM
    image

  2. Which downloads a file containing neutralisations which looks like so:
    image

Fix plate sorting

Plates were sometimes not sorted correctly. This occurred when the plates contained some characters in the plate number and so were sorted as a character. This was fixed by treating all plate numbers as a character but using an alpha numeric sort

Now the plate tabs should always be correctly sorted in the plate data table, for example, making sure that they go from Plate 1 -> Plate 20 here:
image

Add checks when the user enters plate data

Types

The user can now only enter valid types (c,m,x,v) which should prevent typos
image

Dilution

The user has to enter a numeric dilution
image

Exclude

The user can now just click on wells they want to exclude from the analysis
image

Write publication

Logic

To finish the publication for AutoPlate the following steps need to be completed

Tasks

  • Write 1st draft
  • Adress David's comments
  • Add references
  • Add example data #21
    • Update plots in publication
    • Write summary text of example data
  • Be more concise and precise
  • Update based on #25 and #26
  • Check with Grammarly
  • 2nd review from David
  • Update based on ELLA support
  • Review from George (fact check)
  • Write in LaTeX?
  • Convert to word doc format and update references

Update heatmaps

Update heatmaps to:

  1. Use consistent colours between plots (see how Antibody is the same colour on plates 1 and 2)
    image

  2. Bigger right side margin to prevent the key being cut off
    image

  3. Heatmaps should now automatically refresh when the data is updated

Allow all features to be set using the plate data table

Logic

To allow more flexible setting of features (such as having multiple samples/subject per column) all features could be set using the plate data table, as follows:

  1. The user selects an existing feature such as the plate types
  2. The data for that feature for all of the wells loads in 96-well plate format
  3. The user can then modify this data in any way they wish either individually for each plate or use the Template plate to modify all plates
    image

Tasks

  • Allow all features to be set using the 96-well plate table
    • Dropdown?
    • Refactor/generalise the plate data functions so that they can be used for any feature
    • Fetch data
    • Update data
    • Allow multiple changes
    • Update documentation
  • Add template to set all plates (with default values)
    • Create data store for template values eg reactiveValues object in similar format to main assay data frame
    • Fetch and display template data when the user clicks on the template tab
    • If user updates template update all plates

- [ ] Add feedback to show which features have been set
- [ ] Add syntax hightling so that the plate data can replace the QC step
- [ ] If everything above is implemented and works well remove the QC step

Enforce assay dataframe types

Previously I was not enforcing the types of the main assay dataframe. This would often cause errors. For example, a user would update the dilutions via the plate data table, entering text which would then cause the type of the dilutions column to change to character causing the plots to fail and not appear on AutoPlate.

I have now added a function to ensure the types are correct which is called when the plates are first uploaded and each time they are updated

Add example data

Logic

It would be useful to have example data to

  1. Allow users to try out AutoPlate
  2. To publish as part of the publication and use the data for all of the plots etc.

Tasks

  • Improve drc plot for multiple viruses #23
  • Ask George questions re the example data
    • How can the same mouse (eg mouse 45) be inoculated with two different inoculates? Rename them
      image
    • How to analyse plates with no V/C controls? Duplicate V/C controls from another plate?
      image
    • How should the drc plot look?
    • How to interpret the data for publication? Summary?
  • Investigate inverse antibody drc curve for one of the viruses
  • Make the example data as accurate and clean as possible
    • Add new data (3 new plates)
    • Remove Trace 4?
    • Exclude empty wells
    • Ensure all data is entered
    • Ensure all variables are correct
  • Add simple examples of rawdata + ELLA data
  • Make sure that simple data works with the report
  • Add a Use example data button to AutoPlate
    • Allow re-uploading of dataset

Sometimes the normalisation should be calculated across all plates rather than per plate

Description

Sometimes the normalisation should be calculated across all plates rather than per plate

This will require two modifications to AutoPlate:

  1. A plot needs to be generated to make it clear when the luminescence from the virus only wells is too low
    image
    2) A toggle button needs to be added to specify how to calculate normalisation (either per plate or across all plates)

Added plots loading bars + display error messages

Plots can take a long time to appear and showed an Unexpected error message until they did eventually appear. Now:

  1. Plots will show this loading icon so that it's clear they they are just loading
    image

  2. Will display an informative error to the user if they fail to appear
    image

IC50 boxplot doesn't appear

Description

IC50 box plot doesn't appear and an error message is shown
image

Other info

Upon checking the logs around the time of this occurring there was an error relating to the subject for the IC50 boxplot so I think it's related to this

simpleError in model.frame.default(formula = neutralisation ~ dilution, curveid = subject,     data = data): invalid type (list) for variable '(curveid)'>
Warning: Error in UseMethod: no applicable method for 'plotly_build' applied to an object of class "c('simpleError', 'error', 'condition')"
  99: plotly_build
  96: getFromNamespace("prepareWidget", "plotly")
  95: func
  82: origRenderFunc
  81: output$ic50_boxplot
   1: shiny::runApp

To replicate

  1. Upload a previously generated dataset
  2. Change the name of one of the subjects in the plate data table, eg by adding a /
  3. View the IC50 boxplot

Plates with no plate numbers are not supported and check is case-sensitive

Description

  1. Files which do NOT have a plate number in the filename such as n1.csv are not supported
  2. The check for the plate number is case-sensitive so N1.csv will NOT work

Steps to replicate

For issues:

  1. Upload a file without the plate number in the name
  2. Upload a file with a capital N to specify the plate number

How to fix the issue

For issues:

  1. Resolved in edd75b2
  2. Resolved in 0fe6146

Update features names

Logic

Updating the features names eg incolate/subject may useful or three reasons:

  1. Features such as subject could be made more intuitive
  2. Features such as inoculate could be generalised for groups who aren't using vaccines
  3. Features such as subject could be made more consistent between the AutoPlate application and publication

Tasks

  • Update feature names within AutoPlate
    • subject/mouse โ†’ sample_id/sample
    • inoculate โ†’ treatment
    • primary โ†’ virus?
    • study โ†’ experiment_id
  • Update docs
  • Update example data
  • Ensure backwards compatibility by replacing old names with new names on upload
  • Update feature names within the publication

Add support for ELLA assay

Logic

Currently, AutoPlate only supports the pMN assay. Adding support for the ELLA assay would be very useful for the two labs and make AutoPlate useful to a much wider group of people. As ELLA uses a different input format, plate layout and horizontal dilutions rather than vertical the following changes need to be made

Tasks

  • Get data & scripts
    • Excel plain text input files
    • Code to convert Excel -> platelist
    • PRISM files
  • Add dropdown to select assay type
    • Add dropdown
    • Add reactive values to store assay type
  • Add support of Excel plain text input
    • Convert input to assay dataframe platelist format if assay type is ELLA
  • Support horizontal dilutions
    • Prevent dilutions table from overwriting plate data
    • Use horizontal dilutions in plate data table
  • Update default plate layout if ELLA assay (see below)
    • Types (used for normalisation)
    • Samples (2 rows per sample i.e. 4 samples per plate)
  • Fix bug in plots when no positive control is present
  • Fix R cmd check vignettes warning
  • Add documentation for supported input formats
  • Update text in documentation
  • Add update all wells option
  • Add support for updated ELLA format
  • Update plate numbers for ELLA data to be the same as pMN
  • Add link to the AutoPlate docs

Types:
image

Samples:
image

App crashes if user pastes too many rows into dilutions table

Description

As discovered by George the app crashes if a user pastes too many rows into the dilutions table

image

To reproduce

  1. Go to input step 1
  2. Paste the following into one of the columns in the dilutions table
40
80
160
320
640
1280
2560
5120
10240
  1. App will crash (see screenshot above)

How to fix the issue

Add a trycatch to handle the error. As the dilutions value will then be null it will load the last previously functioning dilutions table ๐Ÿ™‚

Make it clearer what features are required and have been entered

  • Make app more robust if user hasn't entered all data eg title and report still work #7
  • Provide more guidance/feedback on which features need to be entered
  • Set default dropdown for incoluate to subject
  • Add documentation
  • Implement new UI design inputting the other features

Only works with plates numbered 1 -> n

Description

If a user tries to upload plates that numbers do not start with one and go up sequentially by one the plate table will fail to be displayed
image

To replicate the error

Try uploading CSV files that do not start with plate 1 and go up sequentially by one. Eg upload plates 3 & 4

Other info

I have made a partial fix (see 163a582) to display any plate number uploaded by the user. However, there is a side effect that seems to break the plate table.

It seems to break here whereby for some reason this change causes the input$metadata to be empty (but not null). Meaning that when the table is updates with empty/no subject it breaks. However, I am not sure what causes this behaviour to happen.

# Update main assay dataframe with types
if (!is.null(input$metadata)) {
    assay_df <- values[["assay_df"]]
    updated_luminescence_df <- hot_to_r(input$metadata)
    updated_subjects <- updated_luminescence_df[1,]
    for (i in seq(1,length(updated_subjects))) {
        assay_df <- assay_df %>% 
            dplyr::mutate(subject = ifelse( (plate_number == plate_n) & (WellRow == i), updated_subjects[i], subject))
    }
    values[["assay_df"]] <- assay_df
}

Dilution heatmaps should have a logarithmic colour scale

Description of the issue

On Quality Control (Step 2) on AutoPlate, the dilution heatmaps should have a logarithmic colour scale. As shown by the image below this is because it is not informative to see all serum dilutions coloured by the same colour due to a much higher dilution range for mAb.
image

Solution

As shown by the image below, a logarithmically spaced colour scale was generated ranging from 1 to the maximum tested dilution
image

Plots width shrinks if a user clicks on the code tab while it's generating

Describe

Plot width shrinks if a user clicks on the code tab while it's generating

To reproduce

  1. Upload data on the input step
  2. Navigate to the results tab
  3. Click on the DRC tab
  4. While the plot is loading click on the View code tab
  5. Switch back to the View Plot tab and the plot will look like this ๐Ÿ˜‘

image

Edit

This seems to occur when the DRM causes an error and then the plots can no longer be updated so I think I need to catch this error
image

Discrepancy between heatmap textual values and colours

Description of the issue

On Quality Control (Step 2) on AutoPlate, there is a discrepancy between some of the textual values and colours. For example, as shown by the image below, 100 could be of two colours, yellow and green.
image

Solution

This issue was resolved as a side effect of implementing #51 (hence why the colourscale is different in the image below). However, to ensure that this issue is resolved, the heatmap colour(scale) was added after rounding the values
image

HICC Updates

Logic

Some updates need to be made for the HICC project

Tasks

  • Update the downloadable IED table
    • (David/Diego) Download all viruses
    • (Diego) Make sample_id the first column in the table
    • (Diego) Add raw IC50 value
    • (Jon) Add international units (IUs) calculated from IC50 values
  • (Diego) Simplify example data
    • (Diego/Phil) Remove unecessary columns
    • (Phil) Simplify example data sample names
    • (Phil) Add example data for a single pMN input plate
  • (Diego) Add a description for columns in the platelist file
    • (Diego) Update the help message based on the selected feature for the plate data table
    • (Phil) Add the column descriptions to the documentation
  • (Angalee) Improve error messaging (eg for plots)
  • (Diego) Display the neuts on the input page?
  • (Jon) Look into LUMINEX support?

The updated IED table should look like so but also include the IUs
image

Neutralisation values are not recalculated if the user updates the plate types

Description

Currently, the neutralisation values are only calculated once when the plates are first uploaded. This is fine is fine for users using the default plate layout, however, if a user wishes the change the position of virus and cell control wells then the neutralisation values will be incorrect. Therefore the neutralisation should be recalculated each time the plate data table is updated

To reproduce

  1. Upload an input plate
  2. Update the plate data to something like this:
patient52	patient52	patient50	patient50	patient51	patient51	patient13	patient13	patient6	patient6	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
x	x	x	x	x	x	x	x	x	x	v	c
  1. Check the neutralisation on the QC tab - the values will incorrect like so
    image

How to fix the issue

Recalculate the neutralisation each time the user updates the plate data table

Release AutoPlate

Logic

The follwing is a checklist of things which would be worth considering before publishing/releasing AutoPlate

Tasks

  • Merge to main branch
    • Update example data link to main branch
  • Update suggests packages eg shiny, pkgdown etc.
  • Add Shiny app link to docs website
  • Inputs
    • Standardise input formats
    • Use the same method to generate the plate numbers for ELLA + pMN data (single func)
    • Use rename_cols func to find any depreciated column names and replace with new ones
  • Add publication image to website
  • Update code coverage to main or dev branch
  • Redeploy and make sure app (inc. report) still works
  • Make the GitHub repository public
  • Make a GitHub release
  • Custom domain name with proxy server?
  • Upgrade RShiny account to increase months usage from 25hrs -> 100hrs (see here)
  • Make a HTML docs page?
  • Make a demo video?
  • Add automated CI/CD testing
    • Add GitHub actions
    • Write tests
  • Update readme (generated from RMD)
  • Add vignettes back (was removed because it was causing this issue)
  • Go through enhancements #2
  • Add logo
  • Update images to ones using example data
  • Fix notes from R cmd / devtools check (no visible binding for global variable ...)
  • Golem
    • Add news and code of conduct files, recommended deps, package data, code coverage?
    • Use with_red_star to denote required arguments

Swap cell-virus boxplot x-axis and colours?

Current cell-virus boxplot

x=types and colour=plate_number
image

Updated cell-virus boxplot

x=plate_number and colour=types
image

Comparison

The updated cell-virus boxplot makes it easier to compare the luminescence values for the same plate, however, it makes it more difficult to compare the cell and virus-only luminescence values for a subset of plates that are not next to one another.

This is because for the current boxplot it is possible to select a subset of plates (eg 1, 8 and 11) by clicking on the plate number in the legend as the plots on AutoPlate are interactive. This is not possible to do with the update cell-virus boxplot
image

Plots don't work if one of the types of the controls wells is changed

EDIT: I don't think this is actually a bug. The user just has to ensure that all of the features (subject_id, treatment, dilution etc. are entered correctly)

Description

Plots don't work if one of the types of the controls wells is changed
image

To reproduce

  1. Go to input step 1
  2. Change plate 1 cell A1 from v -> c
  3. Navigate to the drc plot
  4. The plot will fail to appear as a result of the following error:
simpleError in seq.default(log(min(assay_df$dilution)), log(max(assay_df$dilution)),     length.out = n): 'from' must be a finite number

How to fix the issue

Check the dilutions for the changed well and fix them
It is likely that the dilution for the well is NA and so when it tried to calculate the min dilutions it returns an error

However, after fixing this the seems to be another issue which I am unsure of the cause:

Error in optim(startVec, opfct, hessian = TRUE, method = "L-BFGS-B", lower = lowerLimits,  : 
  non-finite value supplied by optim
<simpleError in drmOpt(opfct, opdfct1, startVecSc, optMethod, constrained, warnVal,     upperLimits, lowerLimits, errorMessage, maxIt, relTol, parmVec = parmVec,     traceVal = control$trace, matchCall = callDetail, silentVal = control$otrace): Convergence failed>

When user enters data on any plate it will switch back to the first plate

Description

UX issue occurs when user enters data on any plate it will switch back to the first plate

This can be very frustrating as a user and it makes it more difficult to enter the plate data
image

Steps to replicate

  1. Upload more than one plate
  2. Switch to plate two
  3. Update the types or subject for any well
  4. The plate data will switch back to plate 1

Curves not fitting the data well

Problem

The estimated gradient of the curve (parameter b) is too influenced by non-responders when fitting noisy data.

Implementation

  • Update results
    • Add an option to view each sample's data and curve separately would make it easier to assess the fit of curves
    • Fit data to just the responders to estimate the correct gradient and then fit curves to all the data but with the gradient fixed to the responder estimate*
    • Report all model parameters (not just the IC50s)
  • Update documentation

*Alternatively, set limits on the gradient before running the model. However, when David tried that with the data set which the problem was observed for the gradient estimate was just the lower limit.

Perform a load test

A load test was performed using shinyloadtest

image

The events which took the longest to complete and so would be most efficient to focus on / refactor to improve performance are:

  1. Downloading the report (22s) - The event which took the longest is downloading the report (this took almost 10x longer than any other event to perform on AutoPlate). This is somewhat expected because generating the report involves re-running the full analysis from start to finish including generating all of the plots. If this becomes a big problem the results from the analyses could be saved and passed directly from AutoPlate to the report to save needing to re-compute them
  2. Events involving updating multiple wells at once
    • Updating the virus for the other features section (3s) - updating the virus for all wells and re-loading the plate data table etc. seemed to take a long time to complete in one instance but was very quick (<0.2s) in other instances
    • Updating the plate data table (<2s) - it takes time to update and re-load the plate data table. This is especially true when updating the template tab because it will update all wells on all plates
  3. Events involving fitting the dose-response model (DRM)
    • Updating the dose-response curve and IC50 plot (<2s)
    • Downloading the IED table (<1.5s)

It's worth noting that this load test was performed when analysing 8 plates and analysing more plates will likely increase the load

These results are in line with what I'd expect. All other events took less than 1 second to complete

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.