brapi_post_trials: post /trials

View source: R/brapi_post_trials.R

brapi_post_trialsR Documentation

post /trials

Description

Create new trials

Usage

brapi_post_trials(
  con = NULL,
  active = NA,
  additionalInfo = list(),
  commonCropName = "",
  contacts = "",
  datasetAuthorships = "",
  documentationURL = "",
  endDate = "",
  externalReferences = "",
  programDbId = "",
  programName = "",
  publications = "",
  startDate = "",
  trialDescription = "",
  trialName = "",
  trialPUI = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

active

logical; required: FALSE; Is this trial currently active; default: NA, other possible values: TRUE | FALSE

additionalInfo

list; required: FALSE; Additional arbitrary information. If provided use the following construct list(additionalProp1 = "string", additionalProp2 = "string", additionalProp3 = "string").

The Examples section shows an example on how to construct the additionalInfo argument as a list.

commonCropName

character; required: FALSE; Common name for the crop associated with this trial.

contacts

data.frame; required: FALSE; A data.frame of contact entities associated with this trial. The contacts argument data.frame should or can contain the following columns:

  • contactDbId character; required: TRUE; The ID which uniquely identifies this contact. MIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.

  • email character; required: FALSE; The contacts email address. MIAPPE V1.1 (DM-32) Person email - The electronic mail address of the person.

  • instituteName character; required: FALSE; The name of the institution which this contact is part of. MIAPPE V1.1 (DM-35) Person affiliation - The institution the person belongs to.

  • name character; required: FALSE; The full name of this contact person. MIAPPE V1.1 (DM-31) Person name - The name of the person (either full name or as used in scientific publications).

  • orcid character; required: FALSE; The Open Researcher and Contributor ID for this contact person (orcid.org). MIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.

  • type character; required: FALSE; The type of person this contact represents (ex: Coordinator, Scientist, PI, etc.). MIAPPE V1.1 (DM-34) Person role - Type of contribution of the person to the investigation.

The Examples section shows an example of how to construct the contacts argument as a data.frame.

datasetAuthorships

data.frame; required: FALSE; A data.frame of License and citation information for the data in this trial. The datasetAuthorships argument data.frame can contain the following columns:

  • datasetPUI character; required: FALSE; For example a DOI of a publication in which the dataset is used.

  • license character; required: FALSE; MIAPPE V1.1 (DM-7) License - License for the reuse of the data associated with this investigation. The Creative Commons licenses cover most use cases and are recommended.

  • publicReleaseDate character; required: FALSE; MIAPPE V1.1 (DM-6) Public release date - Date of first public release of the dataset presently being described.

  • submissionDate character; required: FALSE; MIAPPE V1.1 (DM-5) Submission date - Date of submission of the data set presently being described to a host repository.

The Examples section shows an example of how to construct the datasetAuthorships argument as a data.frame.

documentationURL

character; required: FALSE; A URL to the human readable documentation of this object.

endDate

character; required: FALSE; The date the trial will end or ended. Coded in the ISO 8601 standard extended format, where date, time and time zone information needs to be provided (check for example https://www.w3.org/TR/NOTE-datetime ).

externalReferences

data.frame; required: FALSE; A data.frame of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI. The externalReferences argument data.frame should contain the following columns:

  • referenceID character; required: TRUE; The external reference ID. Could be a simple string or a URI.

  • referenceSource character; required: TRUE; An identifier for the source system or database of this reference.

The Examples section shows an example of how to construct the externalReferences argument as a data.frame.

programDbId

character; required: FALSE; A program identifier, to which this trial belongs to. Exact match.

programName

character; required: FALSE; Human readable name of the program, to which this trial belongs to. Exact match.

publications

data.frame; required: FALSE; A data.frame of publications in which the trial is described. MIAPPE V1.1 (DM-9) Associated publication

  • An identifier for a literature publication where the investigation is described. Use of DOIs is recommended. The publications data.frame should contain the following columns:

  • publicationPUI character; required: FALSE; Preferably a DOI of the publication

  • publicationReference character; required: FALSE; A reference for the publication, e.g. "Selby, BrAPI - An application programming interface for plant breeding applications, Bioinformatics, https://doi.org/10.1093/bioinformatics/190"

The Examples section shows an example of how to construct the publications argument as a data.frame.

startDate

character; required: FALSE; The date the trial will start or started. Coded in the ISO 8601 standard extended format, where date, time and time zone information needs to be provided (check for example https://www.w3.org/TR/NOTE-datetime ).

trialDescription

character; required: FALSE; The human readable description of a trial. MIAPPE V1.1 (DM-4) Investigation description - Human-readable text describing the investigation in more detail.

trialName

character; required: FALS; The human readable name of a trial. MIAPPE V1.1 (DM-3) Investigation title - Human-readable string summarizing the investigation.

trialPUI

character; required: FALSE; A permanent identifier for a trial. Could be DOI or other URI formatted identifier.

Details

Create new breeding Trials. A Trial represents a collection of related Studies. trialDbId is generated by the server.

Value

data.frame

Author(s)

Maikel Verouden

References

BrAPI SwaggerHub

See Also

Other brapi-core: brapi_get_commoncropnames(), brapi_get_lists_listDbId(), brapi_get_lists(), brapi_get_locations_locationDbId(), brapi_get_locations(), brapi_get_people_personDbId(), brapi_get_people(), brapi_get_programs_programDbId(), brapi_get_programs(), brapi_get_search_lists_searchResultsDbId(), brapi_get_search_locations_searchResultsDbId(), brapi_get_search_people_searchResultsDbId(), brapi_get_search_programs_searchResultsDbId(), brapi_get_search_studies_searchResultsDbId(), brapi_get_search_trials_searchResultsDbId(), brapi_get_seasons_seasonDbId(), brapi_get_seasons(), brapi_get_serverinfo(), brapi_get_studies_studyDbId(), brapi_get_studies(), brapi_get_studytypes(), brapi_get_trials_trialDbId(), brapi_get_trials(), brapi_post_lists_listDbId_items(), brapi_post_lists(), brapi_post_locations(), brapi_post_people(), brapi_post_programs(), brapi_post_search_lists(), brapi_post_search_locations(), brapi_post_search_people(), brapi_post_search_programs(), brapi_post_search_studies(), brapi_post_search_trials(), brapi_post_seasons(), brapi_post_studies(), brapi_put_lists_listDbId(), brapi_put_locations_locationDbId(), brapi_put_people_personDbId(), brapi_put_programs_programDbId(), brapi_put_seasons_seasonDbId(), brapi_put_studies_studyDbId(), brapi_put_trials_trialDbId()

Other Trials: brapi_get_search_trials_searchResultsDbId(), brapi_get_trials_trialDbId(), brapi_get_trials(), brapi_post_search_trials(), brapi_put_trials_trialDbId()

Examples

## Not run: 
con <- brapi_db()$testserver
con[["token"]] <- "YYYY"
active <- TRUE
additionalInfo <- list(additionalProp1 = "string",
                       additionalProp2 = "string",
                       additionalProp3 = "string")
commonCropName <- "Tomatillo"
contacts <- data.frame(contactDbId = "trial_contact_1",
                       email = "a.breeder@brapi.org",
                       instituteName = "Plant Science Institute",
                       name = "A. Breeder",
                       orcid = "http://orcid.org/0000-0002-0607-8728",
                       type = "Breeder")
datasetAuthorships <-
  data.frame(datasetPUI = "doi:10.15454/312953986E3",
             license = "https://CreativeCommons.org/licenses/by/4.0/",
             publicReleaseDate = "2021-04-28",
             submissionDate = "2021-04-28")
documentationURL <- "https://wiki.brapi.org"
endDate <- "2021-04-28T12:34:13.494Z"
externalReferences <-
  data.frame(referenceID = c("doi:10.155454/12341234",
                             "http://purl.obolibrary.org/obo/ro.owl",
                             "75a50e76"),
             referenceSource = c("DOI",
                                 "OBO Library",
                                 "Remote Data Collection Upload Tool"))
programDbId <- "program2"
programName <- "The Fake Tomatillo Breeding Program"
publications <-
  data.frame(publicationPUI = "doi:10.15454/312953986E3",
             publicationReference = "Selby, BrAPI - An application
                                     programming interface for plant breeding
                                     applications, Bioinformatics,
                                     https://doi.org/10.1093/bioinformatics/190")
startDate <- "2021-04-28T12:34:13.494Z"
trialDescription <- "General drought resistance trial initiated in Peru
                     before duplication in Africa"
trialName <- "Peru Yield Trial 1"
trialPUI <- "https://doi.org/101093190"

brapi_post_trials(con = con,
                  active = active,
                  additionalInfo = additionalInfo,
                  commonCropName = commonCropName,
                  contacts = contacts,
                  datasetAuthorships = datasetAuthorships,
                  documentationURL = documentationURL,
                  endDate = endDate,
                  externalReferences = externalReferences,
                  programDbId = programDbId,
                  programName = programName,
                  publications = publications,
                  startDate = startDate,
                  trialDescription = trialDescription,
                  trialName = trialName,
                  trialPUI = trialPUI)

## End(Not run)


mverouden/brapir-v2 documentation built on April 22, 2022, 9:24 a.m.