Makes a microreact compatible dataframe combining epi_data, ast_data, qc_and_assembly_data, mlst_data, acquired_amr_data and point_amr_data

make_microreact_metadata(
  epi_data,
  ast_data,
  qc_and_assembly_data,
  mlst_data,
  acquired_amr_data,
  point_amr_data,
  sample_ids = NULL,
  present_colour = "#ff6b6b",
  absent_colour = "#efefef",
  max_number_genes = 5,
  epi_data_columns = NULL,
  ast_data_columns = c("Sample id", "AST profile"),
  qc_and_assembly_data_columns = c("Sample id", "Bactinspector species",
    "Quast num contigs", "Quast N50", "Quast Total length"),
  mlst_data_columns = c("Sample id", "ST", "profile")
)

Arguments

epi_data

A dataframe containing epidemiological data where 'Sample id' is the key

ast_data

A dataframe containing antimicrobial susceptibility data where 'Sample id' is the key

qc_and_assembly_data

A dataframe containing the outputs from the qc and assembly pipeline where 'Sample id' is the key

mlst_data

A dataframe containing the outputs from the MLST pipeline where 'Sample id' is the key

acquired_amr_data

A dataframe containing the acquired gene output from the AMR prediction pipeline where 'Sample id' is the key

point_amr_data

A dataframe containing the point gene output from the AMR prediction pipeline where 'Sample id' is the key

sample_ids

Default is NULL. If a last is given only those rows where 'Sample id' matches one of the ids specified in the list will be returned

present_colour

The colour to use in Microreact when a locus is present

absent_colour

The colour to use in Microreact when a locus is absent

max_number_genes

The maximum number of genes names in a column label before a common prefix is taken

epi_data_columns

The columns to be used in the output from the epidemiological data Defaults are 'Sample id', 'Alternative sample id', 'Year', 'Month', 'Day', 'Country', 'Location', 'Latitude', 'Longitude'

ast_data_columns

The columns to be used in the output from the antimicrobial susceptibility data Defaults are 'Sample id', 'AST profile'

qc_and_assembly_data_columns

The columns to be used in the output from the qc and assembly pipeline outputs Defaults are 'Sample id', 'Bactinspector species', 'Quast num contigs', 'Quast N50', 'Quast Total length'

mlst_data_columns

The columns to be used in the output from the MLST pipeline outpurs Defaults are 'Sample id', 'ST', 'profile'

Value

A dataframe combining all the data and where the 'Sample id' column is renamed to 'id' to make it compatible with microreact