1 Load package

library(Rega)

2 Fill in the submission template

Download the empty MS Excel template from inst/extdata/ega_full_template_v2.xlsx and fill it in according to the instructions in the ‘Instructions’ tab.

3 Setup credentials

httr2 is built around the notion that the key should live in an environment variable. So the first step is to make your package key available on your local development machine by adding a line to your your user-level .Renviron (which you can easily open with usethis::edit_r_environ())

The REGA_EGA_PASSWORD environmental variable isn’t supposed to store the password in the plain text, instead:

  • generate a secret key using httr2::secret_make_key() and store it as the “REGA_KEY” environmental variable (e.g. using export command in bash or in .Renviron file)
  • generate an encrypted password using your secret key via httr2::secret_encrypt("<your-ega-password>", "REGA_KEY")
  • use the resulting value as “REGA_EGA_PASSWORD”
Sys.setenv("REGA_EGA_USERNAME" = "<your-ega-username>")
Sys.setenv("REGA_EGA_PASSWORD" = "<your-ega-password>")

4 Data submission

4.1 Submission metadata parsing

The default parser parses the bundled xlsx template (inst/extdata/ega_full_template_v2.xlsx). Changing the parser behavior, such as whether to append c4gh extension to files or which sheets to parse from the metadata files is controlled by YAML config file inst/extdata/default_parser_params.yaml. To modify the parameters, create a local copy of the file and pass it as param_file argument to default_parser function.

metadata_file <- system.file(
    "extdata/submission_example.xlsx",
    package = "Rega"
)

parsed_metadata <- default_parser(metadata_file)
parsed_metadata
$aliases
$aliases$studies
[1] "Study1"

$aliases$experiments
[1] "Experiment1"

$aliases$datasets
[1] "Dataset1"

$aliases$samples
[1] "Sample1"

$aliases$runs
[1] "Run1"

$aliases$analyses
[1] "Analysis1"


$files
# A tibble: 1 × 2
  file             ega_file              
  <chr>            <chr>                 
1 example.fastq.gz /example.fastq.gz.c4gh

$submission
# A tibble: 1 × 1
  title               
  <chr>               
1 Your submission name

$studies
# A tibble: 1 × 4
  study  title         description               study_type            
  <chr>  <chr>         <chr>                     <chr>                 
1 Study1 Example Study Example Study Description Transcriptome Analysis

$samples
# A tibble: 1 × 4
  alias   phenotype biological_sex subject_id
  <chr>   <chr>     <chr>          <chr>     
1 Sample1 Control   male           S1        

$experiments
# A tibble: 1 × 8
  study  experiment  design_description library_selection instrument_model_id
  <chr>  <chr>       <chr>              <chr>                           <int>
1 Study1 Experiment1 Expermient Design  RANDOM                              1
# ℹ 3 more variables: library_layout <chr>, library_strategy <chr>,
#   library_source <chr>

$runs
# A tibble: 1 × 5
  run   experiment  run_file_type alias   files    
  <chr> <chr>       <chr>         <chr>   <list>   
1 Run1  Experiment1 fastq         Sample1 <chr [1]>

$datasets
# A tibble: 1 × 6
  dataset  title         description     policy_accession_id dataset_types runs 
  <chr>    <chr>         <chr>           <chr>               <list>        <lis>
1 Dataset1 Dataset Title Dataset Descri… EGAP00000000001     <chr [1]>     <chr>

$collaborators
# A tibble: 0 × 0

$repositories
# A tibble: 0 × 0

$extra_attributes
# A tibble: 0 × 0

$select_input_data
$select_input_data$study_types
 [1] "Whole Genome Sequencing"    "Metagenomics"              
 [3] "Transcriptome Analysis"     "Resequencing"              
 [5] "Epigenetics"                "Synthetic Genomics"        
 [7] "Forensic or Paleo-genomics" "Gene Regulation Study"     
 [9] "Cancer Genomics"            "Population Genomics"       
[11] "RNASeq"                     "Exome Sequencing"          
[13] "Pooled Clone Sequencing"    "Transcriptome Sequencing"  

$select_input_data$biological_sex
[1] "female"        "male"          "hermaphrodite" "unknown"      

$select_input_data$case_controls
[1] "case"    "control" "both"    "NA"     

$select_input_data$platform_models
 [1] "1--LS454--454 GS"                                  
 [2] "2--LS454--454 GS 20"                               
 [3] "3--LS454--454 GS FLX"                              
 [4] "4--LS454--454 GS FLX+"                             
 [5] "5--LS454--454 GS FLX Titanium"                     
 [6] "6--LS454--454 GS Junior"                           
 [7] "7--LS454--unspecified"                             
 [8] "8--ILLUMINA--HiSeq X Five"                         
 [9] "9--ILLUMINA--HiSeq X Ten"                          
[10] "10--ILLUMINA--Illumina Genome Analyzer"            
[11] "11--ILLUMINA--Illumina Genome Analyzer II"         
[12] "12--ILLUMINA--Illumina Genome Analyzer IIx"        
[13] "13--ILLUMINA--Illumina HiScanSQ"                   
[14] "14--ILLUMINA--Illumina HiSeq 1000"                 
[15] "15--ILLUMINA--Illumina HiSeq 1500"                 
[16] "16--ILLUMINA--Illumina HiSeq 2000"                 
[17] "17--ILLUMINA--Illumina HiSeq 2500"                 
[18] "18--ILLUMINA--Illumina HiSeq 3000"                 
[19] "19--ILLUMINA--Illumina HiSeq 4000"                 
[20] "20--ILLUMINA--Illumina HiSeq X"                    
[21] "21--ILLUMINA--Illumina iSeq 100"                   
[22] "22--ILLUMINA--Illumina MiSeq"                      
[23] "23--ILLUMINA--Illumina MiniSeq"                    
[24] "24--ILLUMINA--Illumina NovaSeq X"                  
[25] "25--ILLUMINA--Illumina NovaSeq 6000"               
[26] "26--ILLUMINA--NextSeq 500"                         
[27] "27--ILLUMINA--NextSeq 550"                         
[28] "28--ILLUMINA--NextSeq 1000"                        
[29] "29--ILLUMINA--NextSeq 2000"                        
[30] "30--ILLUMINA--unspecified"                         
[31] "31--HELICOS--Helicos HeliScope"                    
[32] "32--HELICOS--unspecified"                          
[33] "33--ABI_SOLID--AB SOLiD System"                    
[34] "34--ABI_SOLID--AB SOLiD System 2.0"                
[35] "35--ABI_SOLID--AB SOLiD System 3.0"                
[36] "36--ABI_SOLID--AB SOLiD 3 Plus System"             
[37] "37--ABI_SOLID--AB SOLiD 4 System"                  
[38] "38--ABI_SOLID--AB SOLiD 4hq System"                
[39] "39--ABI_SOLID--AB SOLiD PI System"                 
[40] "40--ABI_SOLID--AB 5500 Genetic Analyzer"           
[41] "41--ABI_SOLID--AB 5500xl Genetic Analyzer"         
[42] "42--ABI_SOLID--AB 5500xl-W Genetic Analysis System"
[43] "43--ABI_SOLID--unspecified"                        
[44] "44--COMPLETE_GENOMICS--Complete Genomics"          
[45] "45--COMPLETE_GENOMICS--unspecified"                
[46] "46--BGISEQ--BGISEQ-50"                             
[47] "47--BGISEQ--BGISEQ-500"                            
[48] "48--BGISEQ--MGISEQ-2000RS"                         
[49] "49--OXFORD_NANOPORE--MinION"                       
[50] "50--OXFORD_NANOPORE--GridION"                      
[51] "51--OXFORD_NANOPORE--PromethION"                   
[52] "52--OXFORD_NANOPORE--unspecified"                  
[53] "53--PACBIO_SMRT--PacBio RS"                        
[54] "54--PACBIO_SMRT--PacBio RS II"                     
[55] "55--PACBIO_SMRT--Sequel"                           
[56] "56--PACBIO_SMRT--Sequel II"                        
[57] "57--PACBIO_SMRT--Sequel IIe"                       
[58] "58--PACBIO_SMRT--unspecified"                      
[59] "59--ION_TORRENT--Ion Torrent PGM"                  
[60] "60--ION_TORRENT--Ion Torrent Proton"               
[61] "61--ION_TORRENT--Ion Torrent S5"                   
[62] "62--ION_TORRENT--Ion Torrent S5 XL"                
[63] "63--ION_TORRENT--Ion Torrent Genexus"              
[64] "64--ION_TORRENT--Ion GeneStudio S5"                
[65] "65--ION_TORRENT--Ion GeneStudio S5 Prime"          
[66] "66--ION_TORRENT--Ion GeneStudio S5 Plus"           
[67] "67--ION_TORRENT--unspecified"                      
[68] "68--CAPILLARY--AB 3730xL Genetic Analyzer"         
[69] "69--CAPILLARY--AB 3730 Genetic Analyzer"           
[70] "70--CAPILLARY--AB 3500xL Genetic Analyzer"         
[71] "71--CAPILLARY--AB 3500 Genetic Analyzer"           
[72] "72--CAPILLARY--AB 3130xL Genetic Analyzer"         
[73] "73--CAPILLARY--AB 3130 Genetic Analyzer"           
[74] "74--CAPILLARY--AB 310 Genetic Analyzer"            
[75] "75--CAPILLARY--unspecified"                        
[76] "76--DNBSEQ--DNBSEQ-T7"                             
[77] "77--DNBSEQ--DNBSEQ-G400"                           
[78] "78--DNBSEQ--DNBSEQ-G50"                            
[79] "79--DNBSEQ--DNBSEQ-G400 FAST"                      
[80] "80--DNBSEQ--unspecified"                           

$select_input_data$library_layouts
[1] "SINGLE" "PAIRED"

$select_input_data$library_strategies
 [1] "WGS"                                    
 [2] "WGA"                                    
 [3] "WXS"                                    
 [4] "RNA-Seq"                                
 [5] "ssRNA-seq"                              
 [6] "miRNA-Seq"                              
 [7] "ncRNA-Seq"                              
 [8] "FL-cDNA"                                
 [9] "EST"                                    
[10] "Hi-C"                                   
[11] "ATAC-seq"                               
[12] "WCS"                                    
[13] "RAD-Seq"                                
[14] "CLONE"                                  
[15] "POOLCLONE"                              
[16] "AMPLICON"                               
[17] "CLONEEND"                               
[18] "FINISHING"                              
[19] "ChIP-Seq"                               
[20] "MNase-Seq"                              
[21] "DNase-Hypersensitivity"                 
[22] "Bisulfite-Seq"                          
[23] "CTS"                                    
[24] "MRE-Seq"                                
[25] "MeDIP-Seq"                              
[26] "MBD-Seq"                                
[27] "Tn-Seq"                                 
[28] "VALIDATION"                             
[29] "FAIRE-seq"                              
[30] "SELEX"                                  
[31] "RIP-Seq"                                
[32] "ChIA-PET"                               
[33] "Synthetic-Long-Read"                    
[34] "Targeted-Capture"                       
[35] "Tethered Chromatin Conformation Capture"
[36] "NOMe-Seq"                               
[37] "ChM-Seq"                                
[38] "GBS"                                    
[39] "OTHER"                                  
[40] "snRNA-seq"                              
[41] "Ribo-Seq"                               

$select_input_data$library_sources
[1] "GENOMIC"                    "GENOMIC SINGLE CELL"       
[3] "TRANSCRIPTOMIC"             "TRANSCRIPTOMIC SINGLE CELL"
[5] "METAGENOMIC"                "METATRANSCRIPTOMIC"        
[7] "SYNTHETIC"                  "VIRAL RNA"                 
[9] "OTHER"                     

$select_input_data$library_selections
 [1] "RANDOM"                                
 [2] "PCR"                                   
 [3] "RANDOM PCR"                            
 [4] "RT-PCR"                                
 [5] "HMPR"                                  
 [6] "MF"                                    
 [7] "repeat fractionation"                  
 [8] "size fractionation"                    
 [9] "MSLL"                                  
[10] "cDNA"                                  
[11] "cDNA_randomPriming"                    
[12] "cDNA_oligo_dT"                         
[13] "PolyA"                                 
[14] "Oligo-dT"                              
[15] "Inverse rRNA"                          
[16] "Inverse rRNA selection"                
[17] "ChIP"                                  
[18] "ChIP-Seq"                              
[19] "MNase"                                 
[20] "DNase"                                 
[21] "Hybrid Selection"                      
[22] "Reduced Representation"                
[23] "Restriction Digest"                    
[24] "5-methylcytidine antibody"             
[25] "MBD2 protein methyl-CpG binding domain"
[26] "CAGE"                                  
[27] "RACE"                                  
[28] "MDA"                                   
[29] "padlock probes capture method"         
[30] "other"                                 
[31] "unspecified"                           

$select_input_data$run_file_types
 [1] "srf--SRF"                                  
 [2] "sff--SFF"                                  
 [3] "fastq--One/Two Fastq"                      
 [4] "Illumina_native--Illumina"                 
 [5] "Illumina_native_qseq--Illumina QSEQ"       
 [6] "SOLiD_native_csfasta--SOLiD CSFASTA"       
 [7] "PacBio_HDF5--PacBio HDF5"                  
 [8] "bam--BAM"                                  
 [9] "cram--CRAM"                                
[10] "CompleteGenomics_native--Complete Genomics"
[11] "OxfordNanopore_native--Oxford Nanopore"    

$select_input_data$analysis_types
[1] "REFERENCE ALIGNMENT" "SEQUENCE VARIATION"  "SAMPLE PHENOTYPE"   

$select_input_data$experiment_types
[1] "Whole genome sequencing"        "Whole transcriptome sequencing"
[3] "Exome sequencing"               "Genotyping by array"           
[5] "transcriptomics"                "Curation"                      
[7] "Genotyping by sequencing"       "Target sequencing"             

$select_input_data$genomes
 [1] "1--29--NCBI36--GCF_000001405.12"     "2--1--GRCh37--GCA_000001405.1"      
 [3] "2--2--GRCh37.p1--GCA_000001405.2"    "2--3--GRCh37.p2--GCA_000001405.3"   
 [5] "2--4--GRCh37.p3--GCA_000001405.4"    "2--5--GRCh37.p4--GCA_000001405.5"   
 [7] "2--6--GRCh37.p5--GCA_000001405.6"    "2--7--GRCh37.p6--GCA_000001405.7"   
 [9] "2--8--GRCh37.p7--GCA_000001405.8"    "2--9--GRCh37.p8--GCA_000001405.9"   
[11] "2--10--GRCh37.p9--GCA_000001405.10"  "2--11--GRCh37.p10--GCA_000001405.11"
[13] "2--12--GRCh37.p11--GCA_000001405.12" "2--13--GRCh37.p12--GCA_000001405.13"
[15] "2--14--GRCh37.p13--GCA_000001405.14" "3--15--GRCh38--GCA_000001405.15"    
[17] "3--16--GRCh38.p2--GCA_000001405.17"  "3--17--GRCh38.p3--GCA_000001405.18" 
[19] "3--18--GRCh38.p4--GCA_000001405.19"  "3--19--GRCh38.p5--GCA_000001405.20" 
[21] "3--20--GRCh38.p6--GCA_000001405.21"  "3--21--GRCh38.p7--GCA_000001405.22" 
[23] "3--22--GRCh38.p8--GCA_000001405.23"  "3--23--GRCh38.p9--GCA_000001405.24" 
[25] "3--24--GRCh38.p10--GCA_000001405.25" "3--25--GRCh38.p11--GCA_000001405.26"
[27] "3--26--GRCh38.p12--GCA_000001405.27" "3--27--GRCh38.p13--GCA_000001405.28"
[29] "3--28--GRCh38.p14--GCA_000001405.29"

$select_input_data$chromosomes
 [1] "1--1--chr1--NC_000001.9"    "1--2--chr2--NC_000002.10"  
 [3] "1--3--chr3--NC_000003.10"   "1--4--chr4--NC_000004.10"  
 [5] "1--5--chr5--NC_000005.8"    "1--6--chr6--NC_000006.10"  
 [7] "1--7--chr7--NC_000007.12"   "1--8--chr8--NC_000008.9"   
 [9] "1--9--chr9--NC_000009.10"   "1--10--chr10--NC_000010.9" 
[11] "1--11--chr11--NC_000011.8"  "1--12--chr12--NC_000012.10"
[13] "1--13--chr13--NC_000013.9"  "1--14--chr14--NC_000014.7" 
[15] "1--15--chr15--NC_000015.8"  "1--16--chr16--NC_000016.8" 
[17] "1--17--chr17--NC_000017.9"  "1--18--chr18--NC_000018.8" 
[19] "1--19--chr19--NC_000019.8"  "1--20--chr20--NC_000020.9" 
[21] "1--21--chr21--NC_000021.7"  "1--22--chr22--NC_000022.9" 
[23] "1--23--chrX--NC_000023.9"   "1--24--chrY--NC_000024.8"  
[25] "2--25--1--CM000663.1"       "2--26--2--CM000664.1"      
[27] "2--27--3--CM000665.1"       "2--28--4--CM000666.1"      
[29] "2--29--5--CM000667.1"       "2--30--6--CM000668.1"      
[31] "2--31--7--CM000669.1"       "2--32--8--CM000670.1"      
[33] "2--33--9--CM000671.1"       "2--34--10--CM000672.1"     
[35] "2--35--11--CM000673.1"      "2--36--12--CM000674.1"     
[37] "2--37--13--CM000675.1"      "2--38--14--CM000676.1"     
[39] "2--39--15--CM000677.1"      "2--40--16--CM000678.1"     
[41] "2--41--17--CM000679.1"      "2--42--18--CM000680.1"     
[43] "2--43--19--CM000681.1"      "2--44--20--CM000682.1"     
[45] "2--45--21--CM000683.1"      "2--46--22--CM000684.1"     
[47] "2--47--X--CM000685.1"       "2--48--Y--CM000686.1"      
[49] "2--49--MT--J01415.2"        "3--50--chr1--CM000663.2"   
[51] "3--51--chr2--CM000664.2"    "3--52--chr3--CM000665.2"   
[53] "3--53--chr4--CM000666.2"    "3--54--chr5--CM000667.2"   
[55] "3--55--chr6--CM000668.2"    "3--56--chr7--CM000669.2"   
[57] "3--57--chr8--CM000670.2"    "3--58--chr9--CM000671.2"   
[59] "3--59--chr10--CM000672.2"   "3--60--chr11--CM000673.2"  
[61] "3--61--chr12--CM000674.2"   "3--62--chr13--CM000675.2"  
[63] "3--63--chr14--CM000676.2"   "3--64--chr15--CM000677.2"  
[65] "3--65--chr16--CM000678.2"   "3--66--chr17--CM000679.2"  
[67] "3--67--chr18--CM000680.2"   "3--68--chr19--CM000681.2"  
[69] "3--69--chr20--CM000682.2"   "3--70--chr21--CM000683.2"  
[71] "3--71--chr22--CM000684.2"   "3--72--chrX--CM000685.2"   
[73] "3--73--chrY--CM000686.2"    "3--74--chrM--J01415.2"     

$select_input_data$dataset_types
 [1] "Whole genome sequencing"                                        
 [2] "Exome sequencing"                                               
 [3] "Genotyping by array"                                            
 [4] "Transcriptome profiling by high-throughput sequencing"          
 [5] "Transcriptome profiling by array"                               
 [6] "Amplicon sequencing"                                            
 [7] "Methylation binding domain sequencing"                          
 [8] "Methylation profiling by high-throughput sequencing"            
 [9] "Phenotype information"                                          
[10] "Study summary information"                                      
[11] "Genomic variant calling"                                        
[12] "Chromatin accessibility profiling by high-throughput sequencing"
[13] "Histone modification profiling by high-throughput sequencing"   
[14] "Chip-Seq"                                                       

4.2 Submission metadata validation

The internal validation is a bit stricter in enforcing uniqueness of titles and descriptions for individual tables (the API itself doesn’t have this requirement). If the validation only fails in this particular case, you can still continue with creating the submission. However, there have been instances of failed reviews due to non-unique titles and descriptions before.

validation_summary <- default_validator(parsed_metadata)
validation_summary
                            name items passes fails nNA error warning
1                    study_is_na     1      1     0   0 FALSE   FALSE
2                study_is_unique     1      1     0   0 FALSE   FALSE
3               study_in_aliases     1      1     0   0 FALSE   FALSE
4              study_all_aliases     1      1     0   0 FALSE   FALSE
5               experiment_is_na     1      1     0   0 FALSE   FALSE
6           experiment_is_unique     1      1     0   0 FALSE   FALSE
7          experiment_in_aliases     1      1     0   0 FALSE   FALSE
8         experiment_all_aliases     1      1     0   0 FALSE   FALSE
9                    alias_is_na     1      1     0   0 FALSE   FALSE
10               alias_is_unique     1      1     0   0 FALSE   FALSE
11              alias_in_aliases     1      1     0   0 FALSE   FALSE
12             alias_all_aliases     1      1     0   0 FALSE   FALSE
13                     run_is_na     1      1     0   0 FALSE   FALSE
14                 run_is_unique     1      1     0   0 FALSE   FALSE
15                run_in_aliases     1      1     0   0 FALSE   FALSE
16               run_all_aliases     1      1     0   0 FALSE   FALSE
17                 dataset_is_na     1      1     0   0 FALSE   FALSE
18             dataset_is_unique     1      1     0   0 FALSE   FALSE
19            dataset_in_aliases     1      1     0   0 FALSE   FALSE
20           dataset_all_aliases     1      1     0   0 FALSE   FALSE
21        submission_title_is_na     1      1     0   0 FALSE   FALSE
22          run_experiment_is_na     1      1     0   0 FALSE   FALSE
23              run_sample_is_na     1      1     0   0 FALSE   FALSE
24           run_file_type_is_na     1      1     0   0 FALSE   FALSE
25                run_file_is_na     1      1     0   0 FALSE   FALSE
26            run_file_is_unique     1      1     0   0 FALSE   FALSE
27     run_experiment_in_aliases     1      1     0   0 FALSE   FALSE
28         run_sample_in_aliases     1      1     0   0 FALSE   FALSE
29       studies_title_is_unique     1      1     0   0 FALSE   FALSE
30 studies_description_is_unique     1      1     0   0 FALSE   FALSE
31       dataset_title_is_unique     1      1     0   0 FALSE   FALSE
32 dataset_description_is_unique     1      1     0   0 FALSE   FALSE
33        dataset_run_in_aliases     1      1     0   0 FALSE   FALSE
34    dataset_all_aliases_in_run     1      1     0   0 FALSE   FALSE
                                  expression
1                              !is.na(study)
2                           is_unique(study)
3           study %vin% aliases[["studies"]]
4           aliases[["studies"]] %vin% study
5                         !is.na(experiment)
6                      is_unique(experiment)
7  experiment %vin% aliases[["experiments"]]
8  aliases[["experiments"]] %vin% experiment
9                              !is.na(alias)
10                          is_unique(alias)
11          alias %vin% aliases[["samples"]]
12          aliases[["samples"]] %vin% alias
13                               !is.na(run)
14                            is_unique(run)
15               run %vin% aliases[["runs"]]
16               aliases[["runs"]] %vin% run
17                           !is.na(dataset)
18                        is_unique(dataset)
19       dataset %vin% aliases[["datasets"]]
20       aliases[["datasets"]] %vin% dataset
21                             !is.na(title)
22                        !is.na(experiment)
23                             !is.na(alias)
24                     !is.na(run_file_type)
25                             !is.na(files)
26                  is_unique(unlist(files))
27 experiment %vin% aliases[["experiments"]]
28          alias %vin% aliases[["samples"]]
29                          is_unique(title)
30                    is_unique(description)
31                          is_unique(title)
32                    is_unique(description)
33      unlist(runs) %vin% aliases[["runs"]]
34      aliases[["runs"]] %vin% unlist(runs)

4.3 Create API client

Extract EGA API using the bundled YAML specification

api <- extract_api()

Create a client using the embedded httr2 OAuth authentication (default).

ega <- create_client(api, verbosity = 0)

4.4 Run new submission workflow

Specify one of the available workflow function with your parsed metadata and a client as parameters.

responses <- new_submission(parsed_metadata, ega, "log.yaml")

4.5 Other workflows

You can get the entire contents of current submission metadata via get_submission workflow.

resp <- get_submission(00001, ega, logfile = "log.yaml")
resp <- get_submission(00001, ega)

Or delete the entire contents of current submission metadata via delete_submission_contents workflow or delete the entire submission by using the delete_submission workflow.

resp <- delete_submission_contents(00001, ega)
resp <- delete_submission(00001, ega)

Workflow for updating the submission metadata by PUT method is under development.

5 Authentication

Rega package supports authentication through OAuth or Bearer token via functions ega_oauth (default) and ega_token respectively.

6 Utilities

If you wish to create your own templates for EGA submissions, we provide a few functions to retrieve properties and enums through API and save them in text files. We will use the API and the client created above.

Relevant functions include:

  • get_schemas()
  • get_properties()

7 Notes

7.1 Bearer token authentication

For testing, debugging and prototyping purposes, it is possible to directly use generated bearer token with API when creating the client. It is then your responsibility of the user to track the validity and refresh the token as necessary.

bt <- ega_token()
ega <- create_client(api, bt$access_token)

ega$get__enums()

8 Issues

9 Session Info

sessionInfo()
R version 4.5.0 (2025-04-11)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.2 LTS

Matrix products: default
BLAS:   /home/biocbuild/bbs-3.22-bioc/R/lib/libRblas.so 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB              LC_COLLATE=C              
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/New_York
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rega_0.99.1      knitr_1.50       BiocStyle_2.37.0

loaded via a namespace (and not attached):
 [1] jsonlite_2.0.0      dplyr_1.1.4         compiler_4.5.0     
 [4] BiocManager_1.30.26 tidyselect_1.2.1    validate_1.1.5     
 [7] stringr_1.5.1       tidyr_1.3.1         jquerylib_0.1.4    
[10] yaml_2.3.10         fastmap_1.2.0       readxl_1.4.5       
[13] jsonvalidate_1.5.0  R6_2.6.1            generics_0.1.4     
[16] httr2_1.1.2         tibble_3.2.1        bookdown_0.43      
[19] bslib_0.9.0         pillar_1.10.2       rlang_1.1.6        
[22] utf8_1.2.5          cachem_1.1.0        stringi_1.8.7      
[25] xfun_0.52           sass_0.4.10         cli_3.6.5          
[28] magrittr_2.0.3      digest_0.6.37       grid_4.5.0         
[31] settings_0.2.7      rappdirs_0.3.3      askpass_1.2.1      
[34] lifecycle_1.0.4     vctrs_0.6.5         evaluate_1.0.3     
[37] glue_1.8.0          cellranger_1.1.0    rmarkdown_2.29     
[40] purrr_1.0.4         tools_4.5.0         pkgconfig_2.0.3    
[43] htmltools_0.5.8.1