impute_mlst_in_data: Impute MLST allelic profiles by matching profiles in the...

Description Usage Arguments Details Value Examples

View source: R/pubmlst.R

Description

Imputes missing alleles if there is a unique match in PubMLST, and adds sequence type (ST), clonal complex (CC) and c.coli (Coli, logical) columns to the given database or data.frame.

Usage

1
2
impute_mlst_in_data(db, cols_mlst = c("ASP", "GLN", "GLT", "GLY", "PGM",
  "TKT", "UNC"))

Arguments

db

the database or data.frame.

cols_mlst

the columns in the data representing the seven loci.

Details

Alleles marked as "NEW" are interpreted as new alleles, and given a large allele number.

Value

db, with additional columns ST, CC, and Coli, where cols_mlst have been imputed.

Examples

1
2
3
df <- data.frame(id=c("A", "B"), ASP=c(2,2), GLN=c(1,4), GLT=c(54,1), 
                 GLY=c(NA, 2), PGM=c(4,2), TKT=c(1,1), UNC=c(5,NA))
impute_mlst_in_data(df)

jmarshallnz/pubmlst documentation built on Nov. 16, 2020, 2:44 a.m.