Package: ectyper
ECTyper (an easy typer)ECTyperis a standalone versatile serotyping module forEscherichia coli. It supports bothfasta(assembled) andfastq(raw reads) file formats.
The tool provides convenient species identification coupled to quality control module giving a complete, transparent and reference laboratories suitable report on E.coli serotyping.Dependencies:python >= 3.5bcftools >= 1.8blast == 2.7.1seqtk >= 1.2samtools >= 1.8bowtie2 >= 2.3.4.1mash >= 2.0Python packages:biopython >= 1.70pandas >= 0.23.1requests >= 2.0InstallationOption 1: As a conda packageIf you do not have conda environment, get and installminicondaoranaconda:bash miniconda.sh -b -p $HOME/miniconda
echo ". $HOME/miniconda/etc/profile.d/conda.sh" >> ~/.bashrc
source ~/.bashrc```Install conda package frombiocondachannelconda install -c bioconda ectyperOption 2: From the source directlySecond option is to install from the source.Install dependencies. On Ubuntu distro runapt install samtools bowtie2 mash bcftools ncbi-blast+ seqtkInstall python dependencies viapip:pip3 install pandas biopythonClone the repository or checkout a particular release (e.g v1.0.0, etc.):git clone https://github.com/phac-nml/ecoli_serotyping.git
git checkout v1.0.0 #optionally checkout release versionInstall ectyper:python3 setup.py installBasic UsagePut the fasta/fastq files for serotyping analyses in one folder (concatenate paired raw reads files if you would like them to be considered a single entity)ectyper -i [file path] -o [output_dir]View the results on the console or incat [output folder]/output.csvExample Usageectyper -i ecoliA.fastafor a single fileectyper -i ecoliA.fasta -o output_dirfor a single file, results stored inoutput_directyper -i ecoliA.fasta,ecoliB.fastq,ecoliC.fnafor multiple files  (comma-delimited)ectyper -i ecoli_folderfor a folder (all files in the folder will be checked by the tool)Advanced Usageusage: ectyper [-h] [-V] -i INPUT [-c CORES] [-opid PERCENTIDENTITYOTYPE]
               [-hpid PERCENTIDENTITYHTYPE] [-oplen PERCENTLENGTHOTYPE]
               [-hplen PERCENTLENGTHHTYPE] [--verify] [-o OUTPUT] [-r REFSEQ] [-s] [--debug]
               [--dbpath DBPATH]

ectyper v1.0 database v1.0 Prediction of Escherichia coli serotype from raw reads or assembled
genome sequences. The default settings are recommended.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -i INPUT, --input INPUT
                        Location of E. coli genome file(s). Can be a single file, a comma-
                        separated list of files, or a directory
  -c CORES, --cores CORES
                        The number of cores to run ectyper with
  -opid PERCENTIDENTITYOTYPE, --percentIdentityOtype PERCENTIDENTITYOTYPE
                        Percent identity required for an O antigen allele match [default 90]
  -hpid PERCENTIDENTITYHTYPE, --percentIdentityHtype PERCENTIDENTITYHTYPE
                        Percent identity required for an H antigen allele match [default 95]
  -oplen PERCENTLENGTHOTYPE, --percentLengthOtype PERCENTLENGTHOTYPE
                        Percent length required for an O antigen allele match [default 95]
  -hplen PERCENTLENGTHHTYPE, --percentLengthHtype PERCENTLENGTHHTYPE
                        Percent length required for an H antigen allele match [default 50]
  --verify              Enable E. coli species verification
  -o OUTPUT, --output OUTPUT
                        Directory location of output files
  -r REFSEQ, --refseq REFSEQ
                        Location of pre-computed MASH RefSeq sketch. If provided, genomes
                        identified as non-E. coli will have their species identified using MASH.
                        For best results the pre-sketched RefSeq archive
                        https://gembox.cbcb.umd.edu/mash/refseq.genomes.k21s1000.msh is
                        recommended
  -s, --sequence        Prints the allele sequences if enabled as the final columns of the
                        output
  --debug               Print more detailed log including debug messages
  --dbpath DBPATH       Path to a custom database of O and H antigen alleles in JSON format. Check
                        Data/ectyper_database.json for more informationFine-tunning parametersECTyperrequires minimum options to run (-iand-o) but allows for extensive configuration to accomodate wide variaty of typing scenariosParameterExplanationUsage scenario-opidSpecify minimum%identitythreshold just for O antigen matchPoor coverage of O antigen genes or for exploratory work (recommended value is 90)-opcovMinimum%covereagethreshold for a valid match against reference O antigen allelesPoor coverage of O antigen genes and a user wants to get O antigen call regardless (recommend value is 95)-hpidSpecify minimum%identitythreshold just for H antigen matchPoor coverage of O antigen genes or for exploratory work (recommend value is 95)-hpcovMinimum%covereagethreshold for a valid match against reference H antigen allelesPoor coverage of O antigen genes and a user wants to get O antigen call regardless (recommend value is 95)--verifyVerify species of the input and run QC module providing information on the reliability of the result and any typing issuesUser not sure if sample is E.coli and wants to obtain if serotype prediction is of sufficient quality for reporting purposes-rSpecify custom MASH sketch of reference genomes that will be used for species inferenceUser has a new assembled genome that is not available in NCBI RefSeq database. Make sure to add metadata toassembly_summary_refseq.txtand provide custom accession number that start withGCF_prefix--dbpathProvide custom appended database of O and H antigen reference alleles in JSON format following structure and field names as default databaseectyper_alleles_db.jsonUser wants to add new alleles to the alleles database to improve typing performanceQuality Control (QC) moduleTo provide an easier interpretation of the results and typing metrics, following QC codes were developed.
These codes allow to quickly filter "reportable" and "non-reportable" samples. The QC module is tightly linked to ECTyper allele database, specifically,MinPidentandMinPcovfields.
For each reference allele minimum%identityand%coveragevalues were determined as a function of potential "cross-talk" between antigens (i.e. multiple potential antigen calls at a given setting).
The QC module covers the following serotyping scenarios. More scenarios might be added in future versions depending on user needs.QC flagExplanationPASS (REPORTABLE)Both O and H antigen alleles meet min%identityor%coveragethresholds (ensuring no antigen cross-talk) and single antigen predicted for O and HFAIL (-:- TYPING)Sample is E.coli and O and H antigens are not typed. Serotype:  -:-WARNING MIXED O-TYPEA mixed O antigen call is predicted requiring wet-lab confirmationWARNING (WRONG SPECIES)A sample is non-E.coli (e.g. E.albertii, Shigella, etc.) based on RefSeq assembliesWARNING (-:H TYPING)A sample is E.coli and O antigen is not predicted (e.g. -:H18)WARNING (O:- TYPING)A sample is E.coli and O antigen is not predicted (e.g. O17:-)WARNING (O NON-REPORT)O antigen alleles do not meet min %identity or %coverage thresholdsWARNING (H NON-REPORT)H antigen alleles do not meet min %id or %cov thresholdsWARNING (O and H NON-REPORT)Both O and H antigen alleles do not meet min %identity or %coverage thresholdsReport formatECTypercapitalizes on a concise minimum output coupled to easy results interpretation and reporting.ECTyper v1.0serotyping results are available in a tab-delimitedoutput.tsvfile consisting of the 16 columns listed below:Name: Sample name (usually a unique identifier)Species: the species column provides valuable species identification information in case of inadvertent sample contamination or mislabelling eventsO-type: O antigenH-type: H antigenSerotype: Predicted O and H antigen(s)QC: The Quality Control value summarizing the overall quality of predictionEvidence: How many alleles in total used to both call O and H antigensGeneScores: ECTyper O and H antigen gene scores in 0 to 1 rangeAllelesKeys: Best matchingECTyperdatabase allele keys used to call the serotypeGeneIdentities(%):%identityvalues of the query allelesGeneCoverages(%):%coveragevalues of the query allelesGeneContigNames: the contig names where the query alleles were foundGeneRanges: genomic coordinates of the query allelesGeneLengths: allele lengths of the query allelesDatabase: database release version and dateWarnings: any additional warnings linked to the quality control status or any other error message(s).Selected columns from theECTypertypical report are shown below.NameSpeciesSerotypeEvidenceQCGeneScoresAlleleKeysGeneIdentities(%)GeneCoverages(%)GeneContigNamesGeneRangesGeneLengthsDatabaseWarnings15-520Escherichia coliO174:H21Based on 3 allele(s)PASS (REPORTABLE)wzx:1; wzy:1; fliC:1;O104-5-wzx-origin;O104-13-wzy;H7-6-fliC-origin;100;100;100;100;100;100;contig00049;contig00001;contig00019;22302-23492;178-1290;6507-8264;1191;1113;1758;v1.0 (2020-05-07)-EC20151709Escherichia coliO157:H43Based on 3 allele(s)PASS (REPORTABLE)wzx:1;wzy:0.999;fliC:1O157-5-wzx-origin;O157-9-wzy-origin;H43-1-fliC-origin;100;99.916;99.934;100;100;100;contig00002;contig00002;contig00003;62558-63949;64651-65835;59962-61467;1392;1185;1506;v1.0 (2020-05-07)-AvailabilityResourceDescriptionTypePyPIPyPI pacakge that could be installed viapiputilityTerminalCondaConda package available from BioConda channelTerminalDockerImages containing completely initialized ECTyper with all dependenciesTerminalSingluarityImages containing completely initialized ECTyper with all dependenciesTerminalGitHubInstall source code as any Python packageTerminalGalaxy ToolShedGalaxy wrapper available for installation on a private/public instanceWeb-basedGalaxy EuropeGalaxy public server to execute your analysis from anywhereWeb-basedIRIDA pluginIRIDA instances could easily install additional pipelineWeb-based