Package: familyanalyzer
WARNING:Family-Analyzer is outdated and have been replace by pyHam
available athttps://github.com/DessimozLab/pyham.Family-Analyzer: summarize gene family evolution from orthoxmlMotivationFamily-Analyzer is a tool to further analyze the hierarchical orthologous
groups from an orthoXML file. More informations on the schema of orthoxml and
some examples are available athttp://orthoxml.org.Family-Analyzer report to the user a summary of the evolutionary history acting
on the gene families. The summary reports with respect to one or two levels
taxonomic levels what happens after respectively between the specified
taxonimic levels which genes were maintained, got lost, duplicated, were gained
in that period.InstallationFamily-Analyzer is written in python3, with little external dependencies, i.e.
currently only the lxml library. The setup script should resolve these
dependencies automatically.
Consider using pip to install the package directly from a checked out git repopipinstall-e</path/to/family-analyzer-repo/>Running Family-AnalyzerSo far running the family analyzer on a specific dataset is relatively easy.
The main entry point for it is the ‘main’ section in
familyanalyzer/familyanalyzer.pyIf this script is called with -h as argument, it gives a short description
of the required and optional arguments and what they are used for. Here is
what the usage output reports as of now. Since this is still work in progress,
make sure the current usage did not change.pythonfamilyanalyzer/familyanalyzer.py-husage:familyanalyzer.py[-h][--xreftagXREFTAG][--show_levels][-r][--taxonomyTAXONOMY][--propagate_top][--show_taxonomy][--store_augmented_xmlSTORE_AUGMENTED_XML][--compare_second_levelCOMPARE_SECOND_LEVEL]orthoxmllevelspecies[species...]AnalyzeHierarchicalOrthoXMLfamilies.positionalarguments:orthoxmlpathtoorthoxmlfiletobeanalyzedleveltaxonomiclevelatwhichanalysisshouldbedonespecies(listof)speciestobeanalyzed.Notethatonlygenesoftheselectedspeciesarereported.Inorderfortheoutputtomakesense,theselectedspeciesallmustbepartofthelinagesspecifiedin'level'(and--compare_second_level).optionalarguments:-h,--helpshowthishelpmessageandexit--xreftagXREFTAGxreftagofgenestoreport.OrthoXMLallowstostoremultipleidsandxrefannotationspergeneasattributesinthespeciessection.Ifnotset,theinternal(purelynumerical)idsarereported.--show_levelsprintthelevelsandspeciesfoundintheorthoXMLfileandquit-r,--use-recursionDEPRECATED:Userecursiontosamplefamiliesthatareasubsetofthequery--taxonomyTAXONOMYTaxonomyusedtoreconstructintermediatelevels.Hastobeeither'implicit'(default)orapathtoafileinNewickformat.Thetaxonomymightbemultifurcating.Ifsetto'implicit',thetaxonomyisextractedfromtheinputOrthoXMLfile.TheorthoXMLleveldonothavetocoverallthelevelsforallfamilies.InordertoinfergenelossesFamily-Analyzerneedstoinfertheseskippedlevelsandreconcileeachfamilywiththecompletetaxonomy.--propagate_toppropagatetaxonomylevelsuptothetoplevel.Asanillustration,consideragenefamilyinaneukaryoticanalysisthathasonlymammaliangenes.Itstopmosttaxonomiclevelwillthereforbe'Mammalia'andanancestralgenewasgainedatthatlevel.However,if'--propagete-top'isset,thefamilyisassumedtohavealreadybepresentinthetopmosttaxonomiclevel,i.e.Eukaryotainthisexample,andnon-mammalianspecieshavealllostthisgene.--show_taxonomywritethetaxonomyusedtostandardout.--store_augmented_xmlSTORE_AUGMENTED_XMLfilenametowhichtheinputorthoxmlfilewithaugmentedannotationsiswritten.TheaugmentedannotationsincludeforexampletheadditionaltaxonomiclevelsoforthologGroupanduniqueHOGIDs.--compare_second_levelCOMPARE_SECOND_LEVELComparesecondarylevelwithprimaryone,i.e.reportwhathappendbetweenthesecondaryandprimaryleveltotheindividualhistories.NotethattheSecondlevelneedstobeyoungerthantheprimary.Code organisationOrthoXMLParser: class which holds the orthoxml file and gives access to itsdata and keeps internal mappings to speed up lookups.Taxonomy: class wich provides a basic navigation through the species taxonomy.Objects will be constructed using the TaxonomyFactory and can be
either based on the orthoxml or a newick tree.