Package: emapper2gbk
emapper2gbk: creation of genbank files from Eggnog-mapper annotation outputsStarting from fasta andEggnog-mapperannotation files, build a gbk file that is suitable for metabolic network reconstruction withPathway Tools. Adds the GO terms and EC numbers annotations in the genbank file.
There are two main modes:genes mode: suitable when a list of isolated genes/proteins have been annotated with Eggnog-mapper, typically the gene catalogue of a metagenome.genomes mode: usually when focusing on a single organism, with a.gfffile. The creation of genbanks can be performed in parallel by providing directories (with matching names for genomes, proteomes and annotation files) as inputs.If you use emapper2gbk, please citeBelcour* A, Frioux* C, Aite M, Bretaudeau A, Hildebrand F, Siegel A. Metage2Metabo, microbiota-scale metabolic complementarity for the identification of key species. eLife 2020;9:e61968https://doi.org/10.7554/eLife.61968.Main inputsemapper2gbk genesFor each annotated list of genes, inputs are:a nucleotide fasta file containing the CDS sequence of each genes or a folder containing multiple nucleotide fasta files.the translated sequences in amino-acids in fasta or a folder containing the corresponding protein sequences to the nucleotide sequences (must be the same name).the annotation file obtained after Eggnog-mapper annotation (usuallyxxx.emapper.annotation) or a folder with multiple annotation files (must be the same name as nucleotide fasta file and ends with ‘.tsv’ extension).In addition, as optional files:the name of the considered organism (can be “bacteria” or “metagenome”) or a file with organisms names (matching the genomes names).the merge option to merge genes into fake contigs.the number of available cores for multiprocessing (when working on multiple genomes).a go-basic file of GO ontology (if not given, emapper2gbk will download a copy and use it).Example:Input with files:nucleotide_sequences.fna
protein_sequence.faa
annotation.emapper.annotationInput with folders:nucleotide_sequences
├── gene_list_1.fna
├── gene_list_2.fna
protein_sequence
├── gene_list_1.faa
├── gene_list_2.faa
annotation
├── gene_list_1.tsv
├── gene_list_2.tsvTo work the ID of the genes in the nucleic fasta file (-fn) must be the same than the ID of the proteins in the protein fasta file (-fp) and in the annotation file (-a).emapper2gbk genomesFor each genomes, inputs are:a nucleotide fasta file containing the sequence of each contigs/chromosomes for the genome or a folder containing multiple nucleotide fasta files.the proteome corresponding to the genome or a folder containing the corresponding protein sequences to the nucleotide sequences (having the same name as the nucleotides files).the GFF file corresponding to the genome or a folder containing multiple GFF files (each GFF files must have the same name as the corresponding nucleotide files).the annotation file obtained after Eggnog-mapper annotation (usuallyxxx.emapper.annotation) or a folder with multiple annotation files (must be the same name as nucleotide fasta file and ends with ‘.tsv’ extension)In addition, as optional files:the name of the considered organism (can be “bacteria”) or a file with organisms names (matching the genomes names).the number of available cores for multiprocessing (when working on multiple genomes).a go-basic file of GO ontology (if not given, emapper2gbk will download a copy and use it).Example:Input with files:nucleotide_sequences.fna
protein_sequence.faa
annotation.emapper.annotation
genome.gffInput with folders:nucleotide_sequences
├── genome_1.fna
├── genome_2.fna
protein_sequence
├── genome_1.faa
├── genome_2.faa
annotation
├── genome_1.tsv
├── genome_2.tsv
gff
├── genome_1.gff
├── genome_2.gffThe ID in the chromosome/contigs/scaffolds fasta file (-fn) must correspond to region in the gff file (-g).
Then the genes in the region will be found and the child CDS associated to the genes wil be extracted.
The CDS ID must be the same than the ID in the protein fasta file (-fp) and the ID in the eggnog-mapper annotation file (-a).By default emapper2gbk searches for inheritance between genes and CDS in the GFF files.
A gene feature is required and the CDS feature must have the gene feature as a parent, like in this example:##gff file
region_1    RefSeq  region  1       12642   .       +       .       ID=region_1
region_1    RefSeq  gene    1       2445    .       -       .       ID=gene_1
region_1    RefSeq  CDS     1       2445    .       -       0       ID=cds_1;Parent=gene_1Depending on which field (CDS, mRNA or gene) of the gff is associated with the proteome IDs in faa file, the gff-type (-gt) option can take into account these 3 parameters (CDS,mRNA,gene).
The tool also takes into account particular gff formats (Gmove and eggnog) and the gff-type option (-gt) can take these 2 parameters (gmove,eggnog).CDS gff typeFor example, some GFF files can be formatted differently with only CDS (such as inProdigalorProkkaGFF), it is possible to use them with-gtCDS(case sensitive).
Here is an example of the format accepted by this command (with ID cds_1 being the same as the one in the faa and eggnogg-mapper files):##gff file
region_1    RefSeq  CDS     1       2445    .       -       0       ID=cds_1mRNA gff typeThe-gtmRNAoption (case sensitive) is to be used in case the protein identifiers in the faa file match the identifiers in the “mRNA” field of the gff.
Here is an example of the format accepted by this command (with ID cds_1 being the same as the one in the faa and eggnogg-mapper files):##gff file
region_1    RefSeq  mRNA    1       2445    .       -       0       ID=cds_1It is useful for gff formats containing multiple “CDS” fields associated with 1 gene and/or 1 mRNA and a single sequence in the faa file.gene gff typeThe-gtgeneoption is to be used in case the protein identifiers in the faa file match the identifiers in the “gene” field of the gff.
Here is an example of the format accepted by this command (with ID cds_1 being the same as the one in the faa and eggnogg-mapper files):##gff file
region_1    RefSeq  gene    1       2445    .       -       0       ID=cds_1Gmove gff typeThe tool handle GFF fromGmove(with-gtgmove) with the following format:##gff file
region_1    Gmove   mRNA    1       2445    .       +       .       ID=mRNA_gene_1;Name=mRNA_gene_1
region_1    Gmove   CDS     1       2445    .       -       0       Parent=mRNA_gene_1For gmove, the proteins in the faa and eggnogg-mapper files will be prefixed withprot_(likeprot_gene_1formRNA_gene_1). Emapper2gbk should be able to handle these differences.EggNog gff typeIt is also possible to use the GFF created by eggnog-mapper (if a fasta genome was given as input to eggnog-mapper) with-gteggnog.
An example of such use can be seen in thetest folder.Dependencies and installationDependenciesAll are described inrequirements.txtand can be installed withpip install-rrequirements.txt.biopythongffutilspandasprontorequestsInstallFrom this cloned repositorypipinstall-rrequirements.txtpipinstall.From Pypipipinstallemapper2gbkUsageConvert GFF, fastas, annotation table and species name into Genbank.usage:emapper2gbk[-h][-v]{genes,genomes}...StartingfromfastaandEggnog-mapperannotationfiles,buildagbkfilethatissuitableformetabolicnetworkreconstructionwithPathwayTools.AddstheGOtermsandECnumbersannotationsinthegenbankfile.Twomodes:-genomes(onegenome/proteome/gff/annotfile-->onegbk).-geneswiththeannotationofthefullgenecatalogueandfastafiles(nucleicandprotein)correspondingtolistofgenes.Examples:*Genomic-singlemodeemapper2gbkgenomes-fngenome.fna-fpproteome.faa-gffgenome.gff-n"Escherichia coli"-ocoli.gbk-aeggnog_annotation.tsv[-gogo-basic.obo]*Genomic-multiplemode,"bacteria"asdefaultnameemapper2gbkgenes-fngenome_dir/-fpproteome_dir/-nmetagenome-ogbk_dir/-aeggnog_annotation_dir/[-gogo-basic.obo]*Genomic-multiplemode,tsvfilefororganismnamesemapper2gbkgenes-fngenome_dir/-fpproteome_dir/-nfmatching_genome_orgnames.tsv-ogbk_dir/-aeggnog_annotation_dir/[-gogo-basic.obo]*Metagenomicemapper2gbkgenes-fngenome_dir/-fpproteome_dir/-ogbk_dir/-agene_cat_ggnog_annotation.tsv--one-annot-file[-gogo-basic.obo]YoucangivetheGOontologyasaninputtotheprogram,itwillbeotherwisedownloadedduringtherun.Youcandownloadithere:http://purl.obolibrary.org/obo/go/go-basic.obo.TheprogramrequeststheNCBIdatabasetoretrievetaxonomicinformationoftheorganism.However,iftheorganismis"bacteria"or"metagenome",thetaxonomicinformationwillnothavetoberetrievedonline.Hence,ifyouneedtoruntheprogramfromaclusterwithnointernetaccess,itispossiblefora"bacteria"or"metagenome"organism,andbyprovidingtheGO-basic.obofile.Forspecifichelponeachsubcommanduse:emapper2gbk{cmd}--helpoptionalarguments:-h,--helpshowthishelpmessageandexit-v,--versionshowprogram'sversionnumberandexitsubcommands:validsubcommands:{genes,genomes}genesgenesmode:1-nannot,1-nfaa,1-nfna(genesequences)-->1gbkgenomesgenomesmode:1-ncontig/chromosomefasta,1-nproteinfasta,1-nGFF,1-nannot-->1gbkGenomes modeUsageusage:emapper2gbkgenomes[-h]-fnFASTANUCLEIC-fpFASTAPROT-oOUPUT_DIR-gGFF[-gtGFF_TYPE][-nfNAMEFILE][-nNAME]-aANNOTATION[-cCPU][-goGOBASIC][-q][--keep-gff-annotation]Buildagbkfileforeachgenomewithanannotationfileforeachoptionalarguments:-h,--helpshowthishelpmessageandexit-fnFASTANUCLEIC,--fastanucleicFASTANUCLEICfnafileordirectory-fpFASTAPROT,--fastaprotFASTAPROTfaafileordirectory-oOUPUT_DIR,--outOUPUT_DIRoutputdirectory/filepath-gGFF,--gffGFFgfffileordirectory-gtGFF_TYPE,--gff-typeGFF_TYPEgfftype,bydefaultemapper2gbksearchforCDSwithgeneasParentintheGFF,butbyusingthe'-gt cds_only'optionemapper2gbkwillonlyusetheCDSinformationfromthegenome-nfNAMEFILE,--namefileNAMEFILEorganism/genomename(col2)associatedtogenomefilebasenames(col1).Default='metagenome'formetagenomicand'cellular organisms'forgenomic-nNAME,--nameNAMEorganism/genomenameinquotes-aANNOTATION,--annotationANNOTATIONeggnogannotationfileordirectory-cCPU,--cpuCPUcpunumberformetagenomicmodeorgenomemodeusinginputdirectories-goGOBASIC,--gobasicGOBASICgoontology,GOBASICiseitherthenameofanexistingfilecontainingtheGOOntologyorthenameofthefilethatwillbecreatedbyemapper2gbkcontainingtheGOOntology-q,--quietquietmode,onlywarning,errorsloggedintoconsole--keep-gff-annotationCopytheannotationfromtheGFF(product)intothegenbankoutputfile.ExamplesGenomic - single modeemapper2gbkgenomes-fngenome.fna-fpproteome.faa-gffgenome.gff-n"Escherichia coli"-ocoli.gbk-aeggnog_annotation.tsv[-gogo-basic.obo]Genomic - multiple mode, “bacteria” as default namegenes modeUsageusage:emapper2gbkgenes[-h]-fnFASTANUCLEIC-fpFASTAPROT-oOUPUT_DIR[--one-annot-file]-aANNOTATION[-cCPU][-nNAME][-nfNAMEFILE][-goGOBASIC][--mergeMERGE][-q]Buildagbkfileforeachgenome/setofgeneswithanannotationfileforeachoptionalarguments:-h,--helpshowthishelpmessageandexit-fnFASTANUCLEIC,--fastanucleicFASTANUCLEICfnafileordirectory-fpFASTAPROT,--fastaprotFASTAPROTfaafileordirectory-oOUPUT_DIR,--outOUPUT_DIRoutputdirectory/filepath--one-annot-fileOptiontousewhenthereisonlyoneannotationfileformultiplesgenesfastas.-aANNOTATION,--annotationANNOTATIONeggnogannotationfileordirectory-cCPU,--cpuCPUcpunumberformetagenomicmodeorgenomemodeusinginputdirectories-nNAME,--nameNAMEorganism/genomenameinquotes-nfNAMEFILE,--namefileNAMEFILEorganism/genomename(col2)associatedtogenomefilebasenames(col1).Default='metagenome'formetagenomicand'cellular organisms'forgenomic-goGOBASIC,--gobasicGOBASICgoontology,GOBASICiseitherthenameofanexistingfilecontainingtheGOOntologyorthenameofthefilethatwillbecreatedbyemapper2gbkcontainingtheGOOntology--mergeMERGENumberofgenesequencestomergeintofakecontigfromasamefileinthegenbankfile.-q,--quietquietmode,onlywarning,errorsloggedintoconsoleExampleemapper2gbkgenes-fngenome_dir/-fpproteome_dir/-ogbk_dir/-agene_cat_ggnog_annotation.tsv[-gogo-basic.obo]