import_blockdesigns {gcplyr} | R Documentation |
Function to import block-shaped designs from files and return tidy designs.
This function acts as a wrapper that calls read_blocks
,
paste_blocks
, trans_block_to_wide
, trans_wide_to_tidy
,
and separate_tidys
import_blockdesigns(
files,
block_names = NULL,
block_name_header = "block_name",
join_designs = TRUE,
sep = NULL,
values_colname = "Designs",
keep_blocknames = !join_designs,
...
)
files |
A vector of filepaths relative to the current working directory
where each filepath is a single plate read to be read by
|
block_names |
Vector of names corresponding to each design element (each block). Inferred from filenames, if not specified. When When |
block_name_header |
When |
join_designs |
logical indicating whether blocks (if there are multiple)
should be treated as describing the same plate (and so joined
as columns in the tidy output). If |
sep |
If designs have been pasted together, this specifies the
string they should be split apart by via |
values_colname |
When |
keep_blocknames |
logical indicating whether the column containing
|
... |
Other arguments to pass to See Details for more information |
Common arguments that you may want to provide via ...
include:
startrow
, endrow
, startcol
, endcol
,
sheet
- specifying the location of design information
inside files
to read_blocks
.
wellnames_sep
- specifying what character (or "" for
none) should be used when pasting together the rownames and
column names. Note that this should be chosen to match
the well names in your measures.
Note that import_blockdesigns
cannot currently handle
metadata specified via the metadata
argument of
read_blocks
.
If you find yourself needing more control, you can run the
steps manually, first reading with read_blocks
,
pasting as needed with paste_blocks
,
transforming to tidy with trans_block_to_wide
and
trans_wide_to_tidy
, and separating as needed with
separate_tidys
.
A tidy-shaped data.frame
containing the design information
from files
. This always includes a "Well" column.
If keep_blocknames = TRUE
, this includes a column with the
column name specified by block_name_header
and containing
block_names
(or those inferred from file names).
If join_designs = TRUE
, each block has been joined as a
column, with the columns named according to block_names
(or inferred from file names) and containing the contents of
each corresponding block. If join_designs = FALSE
, each
block has been joined as rows, with a single column with the
name specified by values_colnames
containing the
contents of all the blocks.