Giter VIP home page Giter VIP logo

plater's Introduction

plater

R-CMD-check CRAN version CRAN downloads DOI

plater makes it easy to work with data from experiments performed in plates. It is aimed at scientists and analysts who deal with microtiter plate-based instruments.

Installation

plater is available through CRAN. Just run:

install.packages("plater") 

Getting your data in

Many scientific instruments (such as plate readers and qPCR machines) produce data in tabular form that mimics a microtiter plate: each cell corresponds to a well as physically laid out on the plate. For experiments like this, it’s often easiest to keep records of what was what (control vs. treatment, concentration, sample type, etc.) in a similar plate layout form.

But data in those dimensions aren’t ideal for analysis. That’s where read_plate() and add_plate() come in.

  • read_plate() takes data in plate layout form and converts it to a data frame, with one well per row, identified by well name.
  • add_plate() does the same thing, but merges the new columns into an existing data frame you provide.

In other words, these functions seamlessly convert plate-shaped data (easy to think about) into tidy data (easy to analyze).

To make it even easier, if you have multiple plates in an experiment, use read_plates() to read them all in and combine them into a single data frame.

Seeing your data

Sometimes it’s useful to map your data back onto a plate (are the weird outliers all from the same corner of the plate?). For that, there’s view_plate(), which takes a data frame with one well per row, and lays it out like it’s on a plate.

Vignette

For a detailed example of how to use plater, check out the vignette.

Contributing to plater

plater is developed under a Contributor Code of Conduct. To contribute to its development, you must agree to abide by its terms. Pull requests for changes are accepted with gratitude. Please include tests as appropriate with any pull requests.

Requests for new features and reports of bugs or security vulnerabilities can be made here or emailed to the address listed here.

ropensci footer

plater's People

Contributors

karthik avatar noamross avatar sckott avatar seaaan avatar superpuffin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plater's Issues

More general purpose plate-related functions.

Hello @seaaan !

I've been working on some other plate-adjacent packages. {plater} is fantastic for the reading of plate-based metadata and the like. I have having the need to have more general purpose plate-related functions for dealing with well IDs, column / row data and plate layouts and the like. I started compiling them into a more general-purpose utility package (currently {wellr}.

I thought before I go any further with it, I should ask if maybe incorporating into plater, or exposing some of the internal functions inside of plater might be the better way to go. My overarching idea would be to have a utility package that multiple different packages, such as plater and tidyqpcr could then utilise, to try and start ensuring consistent API etc across packages that are working on the same data types (plate-based data), and to have it come under the ropensci banner.

I'm open to any of your thoughts on the matter!

Additional plate formats

I like the clear intention and focus of the package but is there any reason to not generalize it to other platedimensions than 12, 24, 48, 96 or 384 wells? For example I frequently work with 1536 well format and I could imagine that sometimes the 6 well format is required.

Say which file generated error

E.g.
Error in validatePlate(plate, plateSize) : Correct row labels not found. Found 'A B C D E G H I' but expected 'a b c d e f g h' or 'A B C D E F G H'. or Error: Invalid plate dimensions. Found 7 rows and 12 columns. Must be (8, 12) for a 96-well plate. should both specify the name of the file causing the error.

More plate formats

Currently there is a very stringent check for the plate format, and some existing plates are not supported.
For example a plate with 15 wells - 5 columns and 3 rows. Could this be relaxed?
From what I can see, the number of rows and columns is inferred from the plate_size argument of view_plate()

Add support for delimiters other than commas (e.g. semi-colons)

Right now, passing in a file with a semi-colon as delimiter gives an unhelpful error message:

Error: Could not guess plate size from number of columns. Invalid number of columns: -Inf In addition: 

Warning message:
In max(as.numeric(first_line_vector)) :
  no non-missing arguments to max; returning -Inf

Error message on Mac

Warning messages:
1: In readLines(file) :
  incomplete final line found on '../../DATA/16-10-12 sort C4B 3 donors/gels/161012_978_2_G1.csv'
2: In readLines(file) :
  incomplete final line found on '../../DATA/16-10-12 sort C4B 3 donors/gels/161012_978_2_G1.csv'

example files.zip

Error with view_plate on grouped tibbles

tibble(well = c("A01", "F12", "G09"), Droplets = 1:3) %>% group_by(Droplets) %>% view_plate("well", "Droplets", 96)
Error: Error in cbind_all(x) : cannot convert object to a data frame

tibble(well = c("A01", "F12", "G09"), Droplets = 1:3) %>% group_by(well) %>% view_plate("well", "Droplets", 96)
Error: Error: Well IDs are invalid.

Running ungroup() or as.data.frame() in before view_plate resolves the issue.

read_plates()

Wrapper around lapply(..., FUN = read_plate) that also combines all of the plates into a single data frame.

Things to think about:

  • What if plates have different columns (how to combine that into a df)

Put NA's in plate or experimental data if it is missing

Sometimes I have meta data in plater format with no corresponding experimental data because of a technical problem. It would be nice if I did not have to remove this well from my plater meta data in order to get the rest of the merge to work,. Maybe there could just be NA's if plater can't find a match for that well? all.x = TRUE or all.y = TRUE kind of thing... :)

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.