Data validation functions

Functions to perform data validation and QA/QC checks, and report results as successes, warnings, or failures.

check_all()

Run all validation checks

check_annotation_keys()

Check annotation keys

check_annotation_values()

Check annotation values

valid_annotation_keys()

Valid annotation keys

valid_annotation_values()

Valid annotation values

check_keys()

Check that a given set of keys are all present in an annotations dictionary

check_values()

Check a set of keys and their values

can_coerce()

Check coercibility

check_col_names() check_cols_manifest() check_cols_individual() check_cols_assay() check_cols_biospecimen()

Check column names against their corresponding template

check_cols_complete()

Check for complete columns

check_cols_empty()

Check for empty columns

check_files_manifest()

Check that files are present in manifest

check_ids_match() check_indiv_ids_match() check_specimen_ids_match()

Check ids

check_indiv_ids_dup() check_specimen_ids_dup()

Check uniqueness of individual and specimen IDs

check_schema_json()

Check data against a JSON Schema

check_schema_df()

Check a data frame of data against a JSON Schema

check_parent_syn()

Check synID of parent in manifest

check_ages_over_90()

Check for ages over 90

check_duplicate_paths()

Check for duplicated file paths

check_complete_ids()

Check data against existing IDs

Validation helpers

Functions used by the data validation functions above.

get_synapse_annotations()

Get Synapse annotations

get_synapse_table()

Get Synapse table

get_template()

Get metadata template keys

get_synapse_schema()

Get Synapse validation schema

get_template_keys_synID()

Get excel or csv template

get_template_keys_schema()

Get JSON schema template

df_to_json_list()

Convert data frame to JSON

get_metadataType_indices()

Get metadataType indices

Shiny app functions

Functions to generate and run the dccvalidator Shiny application. Also includes modules that make up the app.

run_app()

Run the Shiny application

app_server()

App server

app_ui()

App UI

mod_main_ui() mod_main_server()

Main dccvalidator UI

mod_synapse_oauth_ui() mod_synapse_oauth_server()

Synapse Oauth Module

with_busy_indicator_ui() with_busy_indicator_server()

Show busy indicator

results_boxes_ui() results_boxes_server()

UI function for results boxes module

file_summary_ui() file_summary_server()

UI for the file summary module

report_unsatisfied_requirements()

Create a modal dialog if user is not in required team(s) or certified

gather_template_ids()

Gather all template ids

App-supporting functions

Functions that the dccvalidator app uses to ensure the user is able to use the application and to provide instructions.

check_certified_user()

Check if user is certified

check_team_membership()

Check team membership

setup_global_oauth_vars()

Sets up global OAuth variables

oauth_process()

Do the OAuth process

has_auth_code()

Has authorization code

attempt_login()

Attempt to log into Synapse

logged_in()

Check if logged in as user

show_modal()

Wrapper for modals

Constructors for validation results

These functions generate custom conditions for reporting check failures, warnings, and successes.

check_condition()

Create a condition of the given type

check_pass() check_warn() check_fail()

Create custom conditions for reporting

Updating metadata template dictionaries

These functions validate annotations data structure, generate new dictionary sheets from the annotations, and upload new versions of the templates.

add_dictionary_sheets()

Add Dictionary Sheets

get_template_synIDs()

Get Template synIDs

update_template_dictionaries()

Update Template Dictionaries

verify_dictionary_structure()

Verify Dictionary Structure

Internal development

These functions help with development needs, such as changing which Synapse endpoints to use.

set_staging_endpoints()

Set Synapse Staging Endpoints