gather_preprocessing_metadata | R Documentation |
I am hoping to fill this little function out with a bunch of useful file specifications and regular expressions. If I do a good job, then it should become trivial to fill in a sample sheet with lots of fun useful numbers in preparations for creating a nice table S1. I am thinking to split this up into sections for trimming/mapping/etc. But for the moment I just want to add some specifications/regexes and see if it proves itself robust. If Theresa reads this, I think this is another good candidate for a true OO implmentation. E.g. make a base-class for the metadata and use S4 multi-dispatch to pick up different log files. I wrote the downstream functions with this in mind already, but I am too stupid/lazy to do the full implementation until I am confident that these functions/ideas actually have merit.
gather_preprocessing_metadata(
starting_metadata = NULL,
specification = NULL,
basedir = "preprocessing",
new_metadata = NULL,
species = "*",
type = "genome",
verbose = FALSE,
...
)
starting_metadata |
Existing sample sheet or NULL. When NULL it will look in basedir for subdirectories not named 'test' and ontaining subdirectories named 'scripts' and use them to create an empty sample sheet. |
specification |
List containing one element for each new column to append to the sample sheet. Each element in turn is a list containing column names and/or input filenames (and presumably other stuff as I think of it). |
basedir |
Root directory containing the files/logs of metadata. |
new_metadata |
Filename to which to write the new metadata |
species |
Define a desired species when file hunting. |
type |
Define a feature type when file hunting. |
verbose |
Currently just used to debug the regexes. |
... |
This is one of the few instances where I used ... intelligently. Pass extra variables to the file specification and glue will pick them up (note the species entries in the example specifications. |
For the moment it just returns the modified metadata, I suspect there is something more useful it should do.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.