Giter Club home page Giter Club logo

gplate2's Introduction

gplate2

Codecov test coverage R-CMD-check

gplate2 is the successor of gplate, with the goal of providing a simpler and faster back end and more intuitive and expected user interface. The main difference is how gplates are constructed. Instead of being a dataframe, plates are now a list of wells, and wells are a list of contents.

Installation

You can install the development version of gplate2 from GitHub with:

# install.packages("devtools")
devtools::install_github("KaiAragaki/gplate2")

gplate2's People

Contributors

kaiaragaki avatar

Watchers

 avatar  avatar

gplate2's Issues

`as_plate`

as_plate should probably be able to take the following:

data.frame

  • either tidy = TRUE (requires - minimally - numeric columns x and y. The rest of the columns will be considered values and the column names the keys
  • tidy = FALSE - a matrix of values, with x and y 'as is', and a name supplied as a separate arg

matrix/array

  • almost exactly the same as data.frame for matrix
  • for array, can either supply names equal to the extent of the 3rd dimension, or use the dimnames of third dimension if not null. Will override dimnames if names is supplied
  • Must not accept >3D arrays

vector

  • Will form column of wells. Requires names. Can be transposed after with t()

well

  • simply list(well)

list

  • largely will lapply any of the above

Can you filter a plate? How?

While this might seem easy, you have to think about:

  1. Not all wells may contain the same keys in content
  2. Not all values for a given key may be of the same type

`[` method for `plate`

Might be nice to be able to access a well/a set of wells by doing something like

my_plate[1, ] # return row 1 of wells
my_plate[1,2] # return well in position row 1, col 2
my_plate[, 2] # return col 2 of wells

Ordering wells in list

There should probably be some canonical ordering of wells in a list. This makes for easier testing, as well as more reliable behavior. I'd imagine ordering by row, then col is best.

easier well(s) creation

Making wells should be dead simple, I think.

Some things that should be possible:

# Create a row of wells
well(1:10, 1)

# Create a column of wells
well(1, 1:10)

# Create a matrix of wells
well(1:10, 1:10, matrix = TRUE)

# Create wells where each contains a letter
well(1:10, 1, content = letters[1:10])

# Create wells where every well contains the first 10 letters
well(1:10, 1, content = list(letters[1:10]))

# Create a matrix of wells where each well contains a number
well(1:10, 1:10, content = 1:100, matrix = TRUE)

# 1 11 ...
# 2 12 ...
# 3 13 ...
# 4 14 ...
# : :  ...

# Fill matrix by row:
well(1:10, 1:10, content = 1:100, matrix = TRUE, byrow = TRUE)

# 1  2  ...
# 11 12 ...
# 21 22 ...
# 31 32 ...
# :  :  ...

well(1:10, rep(c(1, 2), each = 5), content = 1:10)
# 1 3 5 7 9
# 2 4 6 8 10

well(1:10, rep(c(1, 2), each = 5), content = 1:10, byrow = TRUE)
# 1 2 3 4 5
# 6 7 8 9 10

These should probably error:

# Mismatch, non-multiple content
well(1:10, 1, content = letters[1:9])

# Likewise:
well(1:10, 1:10, content = 1:99, matrix = TRUE)
well(1:10, 1:10, content = 1:9)

Ideas

kronecker allows for some pattern (X) to be 'dilated' to dimensions given by Y. It also allows for 'tiling' using a vector of 1s (column or row - just need to use t)

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.