Package: emmtyper
emmtyper - Emm Automatic Isolate LabellerTable of Contentemmtyper - Emm Automatic Isolate LabellerTable of ContentBackgroundInner workingsRequirementsInstallationBrewCondaUsageExample CommandsResult FormatShort formatVerbose formatVisual formatTagsExample outputsBLAST or PCR?Validation dataAuthorsMaintainerIssuesBackgroundemmtyperis a command line tool for emm-typing ofStreptococcus pyogenesusing ade novoor complete assembly.By default, we use the U.S. Centers for Disease Control and Prevention trimmed emm subtype database,
which can be foundhere.
The database is curated by Dr. Velusamy Srinivasan. We take this opportunity to thank Dr. Srinivasan for his work.Inner workingsThe difficulty in performing M-typing is that there is a single gene of interest (emm), but two other homologue genes (ennandmrp), often referred to asemm-like. The homologue genes may or may not occur in the isolate of interest. When performingemm-typingfrom an assembly, we can distinguish betweeen one or more clusters of matches on the contigs. The best match for each of the clusters identified is then parsed from the BLAST results. Where possible, we try to distinguish between matches to theemmgene, and matches to one of theemm-likegenes.Possible arrangments:emm---->>>>>>>----mrpemmenn---->>>>>>----->>>>>>------>>>>>>-----emmenn----->>>>>>------>>>>>>-----Requirementsblastn≥ 2.6 (tested on 2.9)isPcrpython≥ 3.6InstallationBrewbrewinstallpythonblastispcr
pip3installemmtyper
emmtyper--helpCondacondainstall-cconda-forge-cbioconda-cdefaultsemmtyperUsageemmtyper has 2 workflows: directly BLASTing the contigs against the DB, or using isPcr to generate anin silicoPCR product that is then BLASTed against the DB. The BLAST results go through emmtyper's business logic to distinguish betweenemmandemm-likealleles and derive the isoolate M-type.The basic usage of emmtyper is in the form of:emmtyper[options]contig1contig2...contigNAll the available options can be inspected withemmtyper --help. Options passed on toblastare tagged with[BLAST], and those forisPcrare tagged with[isPcr].Usage:emmtyper[OPTIONS][FASTA]...Welcometoemmtyper.Usage:emmtyper*.fasta

Options:--versionShowtheversionandexit.-w,--workflow[blast|pcr]Chooseworkflow[default:blast]-d,--blast_dbTEXTPathtoEMMBLASTDB[default:/path/to/emmtyper/db/emm.fna]-k,--keepKeepBLASTandisPcroutputfiles.[default:False]-d,--cluster-distanceINTEGERDistancebetweenclusterofmatchestoconsiderasdifferentclusters.[default:500]-o,--outputTEXTOutputstream.Pathtofileforoutputtoafile.[default:stdout]-f,--output-format[short|verbose|visual]Outputformat.--dust[yes|no|levelwindowlinker][BLAST]FilterquerysequencewithDUST.[default:no]--percent-identityINTEGER[BLAST]Minimalpercentidentityofsequence.[default:95]--culling-limitINTEGER[BLAST]Totalhitstoreturninaposition.[default:5]--mismatchINTEGER[BLAST]ThresholdfornumberofmismatchtoallowinBLASThit.[default:4]--align-diffINTEGER[BLAST]ThresholdfordifferencebetweenalignmentlengthandsubjectlengthinBLASThit.[default:5]--gapINTEGER[BLAST]ThresholdgaptoallowinBLASThit.[default:2]--blast-pathTEXT[BLAST]Specifyfullpathtoblastnexecutable.--primer-dbTEXT[isPcr]PCRprimer.Textfilewith3columns:Name,ForwardPrimer,ReversePrimer.[default:/path/to/emmtyper/data/isPcrPrim.tsv]--min-perfectINTEGER[isPcr]Minimumsizeofperfectmatchat3\'primerend.[default:15]--min-goodINTEGER[isPcr]Minimumsizewheretheremustbe2matchesforeachmismatch.[default:15]--max-sizeINTEGER[isPcr]MaximumsizeofPCRproduct.[default:2000]--ispcr-pathTEXT[isPcr]SpecifyfullpathtoisPcrexecutable.--helpShowthismessageandexit.Most of these options are self explanatory. The two expections are:--workflow: choose between ablastonly workflow, or ain silicoPCR followed byblastworkflow. See below for more information.--clust_distancedefines the minimum distance between clusters of matched sequences on the contigs to generate separateemm-typecalls for each clusters. Clusters of matches that are within the minimumclust-distanceare treated as a single location match.--output_typedemonstrated below.Example Commands# basic call using the blast workflow for a single contig fileemmtyperisolate1.fa# basic call using the pcr workflow for all the .fa files in a folderemmtyper-wpcr*.fa# basic call changing some of the options for blastemmtyper--keep--culling_limit10--align_diff10*.fa# call using the pcr workflow changing some of the isPcr options and# using the visual output formatemmtyper-wpcr--output-formatvisual--max-size2000--mismatch5*.faResult FormatShort formatemmtyper has three different result formats:short,verbose, andvisual.emmtyper by default produces theshortversion. This consists of five values in tab-separated format printed to stdout.The values are:Isolate nameNumber of clusters: should be between 1 and 3, larger values could indicate contaminationPredictedemm-typePossibleemm-likealleles (semi-colon separated list)EMM cluster: Functional grouping of EMM types into 48 clustersVerbose formatThe verbose result returns:Isolate nameNumber of BLAST hitsNumber of clusters: should be between 1 and 3, larger values could indicate contaminationPredictedemm-typePosition(s)emm-likealleles in the assemblyPossibleemm-likealleles (semi-colon separated list)emm-likeposition(s) in assemblyEMM cluster: Functional grouping of EMM types into 48 clustersThe positions in the assembly are presented in the following format<contig_number>:<position_in_contig>.Visual formatThe visual result returns an ASCII map of theemmand, if found anyemm-alleles, in the genome. Alleles on a single contig are separated by "-", with each "-" representing 500bp. Alleles found on different contigs are separated with tab.TagsThe alleles can be tagged with a suffix character to indicate different possibilities:TagDescriptionAdditional Information*Suspectemm-likeAllele flagged in the CDC database as possiblyemm-like~Imperfect scoreMatch score below 100%Example outputsExample for all result format:Short format:Isolate1	1	EMM65.0		E6
Isolate2	3	EMM4.0	EMM236.3*;EMM156.0*	E1
Isolate3	2	EMM52.1	EMM134.2*	D4Verbose format:Isolate1	6	1	EMM65.0	5:82168	E6
Isolate2	8	3	EMM4.0	2:104111	EMM236.3*;EMM156.0*	2:102762;2:105504	E1
Isolate3	5	2	EMM52.1	14:10502	EMM134.2*	5:913	D4Visual format:Isolate1	EMM65.0
Isolate2	EMM156.0*--EMM4.0--EMM236.3*
Isolate3	EMM52.1	EMM134.2*BLAST or PCR?If you are not sure which pipeline to choose from, we recommend usingblastfirst. Theblastworkflow is fast and works well with assemblies. You can then use thepcrmode if you wish to perform some troubleshooting.For example, thepcrworkflow might be useful when troubleshooting isolates for which emmtyper has reported more than 3 clusteres and/or too many alleles.An important thing to note is that not allemm-likealleles can be identified by using by PCR typing. Thepcrworkflow can be used to test which hits would be returned if carrying out conventional M-typing using PCR. However, the workflow is not foolproof, asin silicoPCR will fail when one or both primers do not align in the same contig (i.e., the allele is broken across two or more contigs) or there are mutations in the primer sites. In the former case, this might be an indication of poor sequence coverage or contamination.Validation dataWe comparedemmtyperagainstSangersequencing data and PHE's toolemm-typing-tool.You can check out the validation comparison go to out binder:AuthorsAndre TanTorsten SeemannJake LaceyMark DaviesLiam McintyreHannah FrostDeborah WilliamsonAnders Gonçalves da SilvaThe codebase foremmtyperwas primarly written by Andre Tan as part of his Master's
Degree in Bioinformatics. Torsten Seemann, Deborah Williamson, and Anders Gonçalves da Silva provided supervision and assistance.Hannah Frost contributed with EMM clustering by suggesting we incorporate it in to the code, and providing the necessary information to do so and test it.Jake Lacey, Liam Mcintyre, and Mark Davies provided assistance in validatingemmtyper.MaintainerThe code is actively maintained by MDU Bioinformatics Team.Contact the principal maintainer at andersgs at gmail dot com.IssuesPlease post bug reports, questions, suggestions in theIssuessection.