brapi_post_samples: post /samples

View source: R/brapi_post_samples.R

brapi_post_samplesR Documentation

post /samples

Description

Add new Samples

Usage

brapi_post_samples(
  con = NULL,
  additionalInfo = list(),
  column = as.integer(NA),
  externalReferences = "",
  germplasmDbId = "",
  observationUnitDbId = "",
  plateDbId = "",
  plateName = "",
  programDbId = "",
  row = "",
  sampleBarcode = "",
  sampleDescription = "",
  sampleGroupDbId = "",
  sampleName = "",
  samplePUI = "",
  sampleTimestamp = "",
  sampleType = "",
  studyDbId = "",
  takenBy = "",
  tissueType = "",
  trialDbId = "",
  well = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

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.

column

integer; required: FALSE; The Column identifier for this sample's location in the plate.

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.

germplasmDbId

character; required: FALSE; Unique database identifier for a germplasm (accession).

observationUnitDbId

character; required: FALSE; Database identifier, which unique identifies a observation unit.

plateDbId

character; required: FALSE; The database identifier, which uniquely identifies a plate of samples.

plateName

character; required: FALSE; The human readable name of a plate.

programDbId

character; required: FALSE; The datbase identifier, which uniquely identifies a program.

row

character; required: FALSE; The Row identifier for this sample's location in the plate.

sampleBarcode

character; required: FALSE; A unique identifier physically attached to the sample.

sampleDescription

character; required: FALSE; Description of a sample. MIAPPE V1.1 (DM-79) Sample description - Any information not captured by the other sample fields, including quantification, sample treatments and processing.

sampleGroupDbId

character; required: FALSE; The identifier, which uniquely identifies a group of samples.

sampleName

character; required: FALSE; The name of the sample.

samplePUI

character; required: FALSE; A permanent unique identifier for the sample (DOI, URL, UUID, etc.). MIAPPE V1.1 (DM-81) External ID - An identifier for the sample in a persistent repository, comprising the name of the repository and the accession number of the observation unit therein. Submission to the EBI Biosamples repository is recommended. URI are recommended when possible.

sampleTimestamp

character; required: FALSE; The date and time a sample was collected from the field. MIAPPE V1.1 (DM-80) Collection date - The date and time when the sample was collected / harvested.

sampleType

character; required: FALSE; The type of sample taken. e.g. 'DNA', 'RNA', 'Tissue', etc..

studyDbId

character; required: FALSE; The database identifier, which uniquely identifies a study.

takenBy

character; required: FALSE; The name or identifier of the entity, which took the sample from the field.

tissueType

character; required: FALSE; The type of tissue sampled, e.g. 'Leaf', 'Root', etc.. MIAPPE V1.1 (DM-78) Plant anatomical entity - A description of the plant part (e.g. leaf) or the plant product (e.g. resin) from which the sample was taken, in the form of an accession number to a suitable controlled vocabulary (Plant Ontology).

trialDbId

character; required: FALSE; The database identifier, which uniquely identifies a trial.

well

character; required: FALSE; The Well identifier for this sample's location in the plate. Usually a concatenation of Row and Column, or just a number if the samples are not part of an ordered plate.

Details

Call to register the event of a sample being taken. Sample identifier is assigned as a result of the operation and returned in response.

Value

data.frame

Author(s)

Maikel Verouden

References

BrAPI SwaggerHub

See Also

Other brapi-genotyping: brapi_get_callsets_callSetDbId_calls(), brapi_get_callsets_callSetDbId(), brapi_get_callsets(), brapi_get_calls(), brapi_get_maps_mapDbId_linkagegroups(), brapi_get_maps_mapDbId(), brapi_get_maps(), brapi_get_markerpositions(), brapi_get_references_referenceDbId_bases(), brapi_get_references_referenceDbId(), brapi_get_referencesets_referenceSetDbId(), brapi_get_referencesets(), brapi_get_references(), brapi_get_samples_sampleDbId(), brapi_get_samples(), brapi_get_search_calls_searchResultsDbId(), brapi_get_search_callsets_searchResultsDbId(), brapi_get_search_markerpositions_searchResultsDbId(), brapi_get_search_references_searchResultsDbId(), brapi_get_search_referencesets_searchResultsDbId(), brapi_get_search_samples_searchResultsDbId(), brapi_get_search_variants_searchResultsDbId(), brapi_get_search_variantsets_searchResultsDbId(), brapi_get_variants_variantDbId_calls(), brapi_get_variants_variantDbId(), brapi_get_variantsets_variantSetDbId_callsets(), brapi_get_variantsets_variantSetDbId_calls(), brapi_get_variantsets_variantSetDbId_variants(), brapi_get_variantsets_variantSetDbId(), brapi_get_variantsets(), brapi_get_variants(), brapi_get_vendor_orders_orderId_plates(), brapi_get_vendor_orders_orderId_results(), brapi_get_vendor_orders_orderId_status(), brapi_get_vendor_orders(), brapi_get_vendor_specifications(), brapi_post_search_callsets(), brapi_post_search_calls(), brapi_post_search_markerpositions(), brapi_post_search_referencesets(), brapi_post_search_references(), brapi_post_search_samples(), brapi_post_search_variantsets(), brapi_post_search_variants(), brapi_post_variantsets_extract(), brapi_put_samples_sampleDbId()

Other Samples: brapi_get_samples_sampleDbId(), brapi_get_samples(), brapi_get_search_samples_searchResultsDbId(), brapi_post_search_samples(), brapi_put_samples_sampleDbId()

Examples

## Not run: 
con <- brapi_db()$testserver
con[["token"]] <- "YYYY"
## Create function argument values
additionalInfo <- list(dummyData = "TRUE",
                       example = "post_samples")
column <- 3
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"))
germplasmDbId <- "germplasm3"
observationUnitDbId <- "observation_unit3"
plateDbId <- "plate1"
plateName <- "Plate 1"
programDbId <- "program1"
row <- "B"
sampleBarcode <- "1234567890"
sampleDescription <- "Fake sample"
sampleGroupDbId <- "sample_group_02"
sampleName <- "Sample 4"
samplePUI <- "doi://40.12345/fake/4423"
sampleTimestamp <- "2012-12-12T12:12:12Z"
sampleType <- "Tissue"
studyDbId <- "study1"
takenBy <- "M. Verouden"
tissueType <- "Stem"
trialDbId <- "trial1"
well <- "B3"
brapi_post_samples(con = con,
                   additionalInfo = additionalInfo,
                   column = column,
                   externalReferences = externalReferences,
                   germplasmDbId = germplasmDbId,
                   observationUnitDbId = observationUnitDbId,
                   plateDbId = plateDbId,
                   plateName = plateName,
                   programDbId = programDbId,
                   row = row,
                   sampleBarcode = sampleBarcode,
                   sampleDescription = sampleDescription,
                   sampleGroupDbId = sampleGroupDbId,
                   sampleName = sampleName,
                   samplePUI = samplePUI,
                   sampleTimestamp = sampleTimestamp,
                   sampleType = sampleType,
                   studyDbId = studyDbId,
                   takenBy = takenBy,
                   tissueType = tissueType,
                   trialDbId = trialDbId,
                   well = well)

## End(Not run)


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