Open matiasandina opened 2 years ago
Just to clarify, are you thinking, something like:
proj <- bidser::create_project("config.yaml")
?
Because creating a subject first needs a "project", etc.
Yeah, I guess it would be something like (not exhaustive list of things):
1) bidser::create_project_skeleton(config=NULL)
if config==NULL
then call bidser::create_config()
which makes a template empty config and prompts the user to complete it before calling create_project_skeleton()
again. This config would hold things like the naming conventions for the different levels according to BIDS.
2) bidser::create_animal()
uses the config to create a new subject with selected subfolders. The function also adds the subject to participants.tsv
OK, thanks, I will play around with the idea.
Could you also give me an idea of the use case? For example, It's straightforward to create an "empty" bids structure--just the folder nodes. One could create it "in memory" and then write the folder structure to disk when requested.
Adding files to the structure is perhaps more complicated -- i.e. must they exist? Are they copied from another location, etc.
Agreed, adding files is a much more complex problem. I was just going for the skeleton of the project at the "whole project" and "individual" levels, and adding the subjects to participants.tsv
(at least their ID)
This package looks neat, I get that the main point is to parse data but I was actually looking to generate the structure from template, do you have plans to add this? Much in the same way R has
{usethis}
to create packages, it would be nice if this package could create template repositories for datasets that comply with BIDS standard.It would be then nice to
bidser::create_subject()
to recreate whatever nested structure appears on aconfig.yaml
(or awhatever.whatever
file).I'm happy to contribute