Package: referenceseeker
ReferenceSeeker: rapid determination of appropriate reference genomesContentsDescriptionInput & OutputInstallationBioCondaGitHubUsageExamplesDatabasesRefSeqCustomDependenciesCitationDescriptionReferenceSeeker determines closely related reference genomes following a scalable hierarchical approach combining an fast kmer profile-based database lookup of candidate reference genomes and subsequent computation of specific average nucleotide identity (ANI) values for the rapid determination of suitable reference genomes.ReferenceSeeker computes kmer-based genome distances between a query genome and potential reference genome candidates via Mash (Ondov et al. 2016). For resulting candidates ReferenceSeeker subsequently computes (bidirectional) ANI values picking genomes meeting community standard thresholds by default (ANI >= 95 % & conserved DNA >= 69 %) (Goris, Konstantinos et al. 2007) ranked by the product of ANI and conserved DNA values to take into account both genome coverage and identity.Custom databases can be built with local genomes. For further convenience, we provide pre-built databases with sequences from RefSeq (https://www.ncbi.nlm.nih.gov/refseq), GTDB and PLSDB copmrising the following taxa:bacteriaarchaeafungiprotozoavirusesas well asplasmids.The reasoning for subsequent calculations of both ANI and conserved DNA values is that Mash distance values correlate well with ANI values for closely related genomes, however the same is not true for conserved DNA values. A kmer fingerprint-based comparison alone cannot distinguish if a kmer is missing due to a SNP, for instance or a lack of the kmer-comprising subsequence. As DNA conservation (next to DNA identity) is very important for many kinds of analyses,e.g.reference based SNP detections, ranking potential reference genomes based on a mash distance alone is often not sufficient in order to select the most appropriate reference genomes. If desired, ANI and conserved DNA values can be computed bidirectionally.Input & OutputInputPath to a taxon database and a draft or finished genome in (zipped) fasta format:$referenceseeker~/bacteriaGCF_000013425.1.fnaOutputTab separated lines to STDOUT comprising the following columns:Unidirectionally (query -> references):RefSeq Assembly IDMash DistanceANIConserved DNANCBI Taxonomy IDAssembly StatusOrganism#ID    Mash Distance    ANI    Con. DNA    Taxonomy ID    Assembly Status    OrganismGCF_000013425.10.00000100.00100.0093061completeStaphylococcusaureussubsp.aureusNCTC8325GCF_001900185.10.00002100.0099.8946170completeStaphylococcusaureussubsp.aureusHG001
GCF_900475245.10.00004100.0099.5793061completeStaphylococcusaureussubsp.aureusNCTC8325NCTC8325
GCF_001018725.20.00016100.0099.281280completeStaphylococcusaureusFDAARGOS_10
GCF_003595465.10.0018599.8696.811280completeStaphylococcusaureusUSA300-SUR6
GCF_003595385.10.0018099.8796.801280completeStaphylococcusaureusUSA300-SUR2
GCF_003595365.10.0018099.8796.801280completeStaphylococcusaureusUSA300-SUR1
GCF_001956815.10.0018099.8796.8046170completeStaphylococcusaureussubsp.aureusUSA300_SUR1
...Bidirectionally (query -> references [QR] & references -> query [RQ]):RefSeq Assembly IDMash DistanceQR ANIQR Conserved DNARQ ANIRQ Conserved DNANCBI Taxonomy IDAssembly StatusOrganism#ID    Mash Distance    QR ANI    QR Con. DNA    RQ ANI    RQ Con. DNA    Taxonomy ID    Assembly Status    OrganismGCF_000013425.10.00000100.00100.00100.00100.0093061completeStaphylococcusaureussubsp.aureusNCTC8325GCF_001900185.10.00002100.0099.89100.0099.8946170completeStaphylococcusaureussubsp.aureusHG001
GCF_900475245.10.00004100.0099.5799.9999.6793061completeStaphylococcusaureussubsp.aureusNCTC8325NCTC8325
GCF_001018725.20.00016100.0099.2899.9598.881280completeStaphylococcusaureusFDAARGOS_10
GCF_001018915.20.0005699.9996.3599.9899.551280completeStaphylococcusaureusNRS133
GCF_001019415.20.0008199.9994.4799.9899.361280completeStaphylococcusaureusNRS146
GCF_001018735.20.00096100.0094.7699.9898.581280completeStaphylococcusaureusNRS137
GCF_003354885.10.0010399.9396.6399.9396.661280completeStaphylococcusaureus164...InstallationReferenceSeeker can be installed via Conda and Git(Hub). In either case, a taxon database must be downloaded which we provide for download at Zenodo:For more information have a look atDatabases.BioCondaThe preferred way to install and run ReferenceSeeker isCondausing theBiocondachannel:$condainstall-cbiocondareferenceseeker
$referenceseeker--helpGitHubAlternatively, you can use this raw GitHub repository:install necessary Python dependencies (if necessary)clone the latest version of the repositoryinstall necessary 3rd party executables (Mash, MUMmer4)$pip3install--userbiopythonxopen
$gitclonehttps://github.com/oschwengers/referenceseeker.git
$# install Mash & MUMmer$./referenceseeker/bin/referenceseeker--helpTestTo test your installation we prepared a tiny mock database comprising 4Salmonella sppgenomes and a query assembly (SRA: SRR498276) in thetestsdirectory:$gitclonehttps://github.com/oschwengers/referenceseeker.git# GitHub installation$./referenceseeker/bin/referenceseekerreferenceseeker/test/dbreferenceseeker/test/data/Salmonella_enterica_CFSAN000189.fasta# BioConda installation$referenceseekerreferenceseeker/test/dbreferenceseeker/test/data/Salmonella_enterica_CFSAN000189.fastaExpected output:#ID    Mash Distance    ANI    Con. DNA    Taxonomy ID    Assembly Status    OrganismGCF_000439415.10.00003100.0099.551173427completeSalmonellaentericasubsp.entericaserovarBareillystr.CFSAN000189
GCF_900205275.10.0152298.6183.1390370completeSalmonellaentericasubsp.entericaserovarTyphiUsageUsage:usage:referenceseeker[--crgCRG][--aniANI][--conserved-dnaCONSERVED_DNA][--unfiltered][--bidirectional][--help][--version][--verbose][--threadsTHREADS]<database><genome>

Rapiddeterminationofappropriatereferencegenomes.

positionalarguments:<database>ReferenceSeekerdatabasepath<genome>targetdraftgenomeinfastaformat

Filteroptions/thresholds:Theseoptionscontrolthefilteringandalignmentworkflow.--crgCRG,-rCRGMaxnumberofcandidatereferencegenomestopasskmerprefilter(default=100)--aniANI,-aANIANIthreshold(default=0.95)--conserved-dnaCONSERVED_DNA,-cCONSERVED_DNAConservedDNAthreshold(default=0.69)--unfiltered,-uSetkmerprefiltertoextremelyconservativevaluesandskipspecieslevelANIcutoffs(ANI>=0.95andconservedDNA>=0.69--bidirectional,-bComputebidirectionalANI/conservedDNAvalues(default=False)Runtime&auxiliaryoptions:--help,-hShowthishelpmessageandexit--version,-Vshowprogram'sversionnumberandexit--verbose,-vPrintverboseinformation--threadsTHREADS,-tTHREADSNumberofusedthreads(default=numberofavailableCPUcores)ExamplesInstallation:$condainstall-cbiocondareferenceseeker
$wgethttps://zenodo.org/record/4415843/files/bacteria-refseq.tar.gz
$tar-xzfbacteria-refseq.tar.gz
$rmbacteria-refseq.tar.gzSimple:$# referenceseeker <REFERENCE_SEEKER_DB> <GENOME>$referenceseekerbacteria-refseq/genome.fastaExpert: verbose output and increased output of candidate reference genomes using a defined number of threads:$# referenceseeker --crg 500 --verbose --threads 8 <REFERENCE_SEEKER_DB> <GENOME>$referenceseeker--crg500--verbose--threads8bacteria-refseq/genome.fastaDatabasesReferenceSeeker depends on databases comprising taxonomic genome informations as well as kmer hash profiles for each entry.Pre-builtWe provide pre-built databases based on public genome data hosted at Zenodo::RefSeqrelease: 205 (2021-04-01)TaxonURL# GenomesSizebacteriahttps://zenodo.org/record/4415843/files/bacteria-refseq.tar.gz30,94140 Gbarchaeahttps://zenodo.org/record/4415843/files/archaea-refseq.tar.gz606553 Mbfungihttps://zenodo.org/record/4415843/files/fungi-refseq.tar.gz3473.3 Gbprotozoahttps://zenodo.org/record/4415843/files/protozoa-refseq.tar.gz881.1 Gbviruseshttps://zenodo.org/record/4415843/files/viral-refseq.tar.gz10,339730 MbGTDBrelease: v95 (2021-01-06)TaxonURL# GenomesSizebacteriahttps://zenodo.org/record/4415843/files/bacteria-gtdb.tar.gz30,23834 Gbarchaeahttps://zenodo.org/record/4415843/files/archaea-gtdb.tar.gz1,6721.1 GbPlasmidsIn addition to the genome based databases, we provide the following plasmid databases based on RefSeq and PLSDB:DBURL# PlasmidsSizeRefSeqhttps://zenodo.org/record/4415843/files/plasmids-refseq.tar.gz32,6111.1 GbPLSDBhttps://zenodo.org/record/4415843/files/plasmids-plsdb.tar.gz27,3931.1 GbCustom databaseIf above mentiond RefSeq based databases do not contain sufficiently-close related genomes or are just too large, ReferenceSeeker provides auxiliary commands in order to either create databases from scratch or to expand existing ones. Therefore, a second executablereferenceseeker_dbacceptsinitandimportsubcommands:Usage:usage:referenceseeker_db[--help][--version]{init,import}...

Rapiddeterminationofappropriatereferencegenomes.

positionalarguments:{init,import}sub-commandhelpinitInitializeanewdatabaseimportAddanewgenometodatabase

Runtime&auxiliaryoptions:--help,-hShowthishelpmessageandexit--version,-Vshowprogram'sversionnumberandexitIf a new database should be created, usereferenceseeker_db init:usage:referenceseeker_dbinit[-h][--outputOUTPUT]--dbDB

optionalarguments:-h,--helpshowthishelpmessageandexit--outputOUTPUT,-oOUTPUToutputdirectory(default=currentworkingdirectory)--dbDB,-dDBNameofthenewReferenceSeekerdatabaseThis new database or an existing one can be used to import genomes in Fasta, GenBank or EMBL format:usage:referenceseeker_dbimport[-h]--dbDB--genomeGENOME[--idID][--taxonomyTAXONOMY][--status{complete,chromosome,scaffold,contig}][--organismORGANISM]optionalarguments:-h,--helpshowthishelpmessageandexit--dbDB,-dDBReferenceSeekerdatabasepath--genomeGENOME,-gGENOMEGenomepath[Fasta,GenBank,EMBL]--idID,-iIDUniquegenomeidentifier(defaultsequenceidoffirstrecord)--taxonomyTAXONOMY,-tTAXONOMYTaxonomyID(default=12908[unclassifiedsequences])--status{complete,chromosome,scaffold,contig},-s{complete,chromosome,scaffold,contig}Assemblylevel(default=contig)--organismORGANISM,-oORGANISMOrganismname(default="NA")DependenciesReferenceSeeker needs the following dependencies:Python (3.8, 3.9), Biopython (>=1.78), xopen(>=1.1.0)Mash (2.3)https://github.com/marbl/MashMUMmer (4.0.0-beta2)https://github.com/gmarcais/mummerReferenceSeeker has been tested against aforementioned versions.CitationSchwengers et al., (2020). ReferenceSeeker: rapid determination of appropriate reference genomes. Journal of Open Source Software, 5(46), 1994,https://doi.org/10.21105/joss.01994