{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## What apps are there?\n", "\n", "Apps perform functions ranging from multiple sequence alignment (e.g. `progressive_align`), to excluding alignment columns containing non-nucleotide characters (e.g. `omit_degenerates`) to performing maximum-likelihood evolutionary analyses (e.g. `model`).\n", "\n", "Apps that are identified as \"composable\" (with a value of `True` under that clumn) can be combined into a single function by addition." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
modulenamecomposabledocinputsoutputsdata type
cogent3.app.alignalign_to_refTrueAligns to a reference seq, no gaps in the reference.\n", " Returns an Alignment object.sequencesaligned, serialisableSequenceCollection
cogent3.app.alignprogressive_alignTrueProgressive multiple sequence alignment via any cogent3 model.\n", " Returns an Alignment object.sequencesaligned, serialisableSequenceCollection
cogent3.app.distfast_slow_distTruePairwise distance calculation. Uses fast (but less\n", " numerically robust) approach where possible, slow (robust)\n", " approach when not. Returns a DistanceMatrix.alignedpairwise_distances, serialisableArrayAlignment, Alignment
cogent3.app.evoancestral_statesTrueComputes ancestral state probabilities from a model result. Returns a dict\n", " with a DictArray for each node.model_resultresult, tabular_result, serialisablemodel_result
cogent3.app.evobootstrapTrueParametric bootstrap for a provided hypothesis. Returns a bootstrap_result.alignedresult, bootstrap_result, serialisableArrayAlignment, Alignment
cogent3.app.evohypothesisTrueSpecify a hypothesis through defining two models. Returns a\n", " hypothesis_result.aligned, serialisableresult, hypothesis_result, serialisableArrayAlignment, Alignment
cogent3.app.evomodelTrueDefine a substitution model + tree for maximum likelihood evaluation.\n", " Returns model_result.aligned, serialisableresult, model_result, serialisableArrayAlignment, Alignment
cogent3.app.evonatsel_neutralTrueTest of selective neutrality by assessing whether omega equals 1.\n", " Under the alternate, there is one omega for all branches and all sites.aligned, serialisableresult, hypothesis_result, serialisableArrayAlignment, Alignment
cogent3.app.evonatsel_sitehetTrueTest for site-heterogeneity in omega. Under null, there are 2 site-classes,\n", " omega < 1 and omega = 1. Under the alternate, an additional site-class of\n", " omega > 1 is added.aligned, serialisableresult, hypothesis_result, serialisableArrayAlignment, Alignment
cogent3.app.evonatsel_timehetTrueThe branch heterogeneity hypothesis test for natural selection.\n", " Tests for whether a single omega for all branches is sufficient against the\n", " alternate that a user specified subset of branches have a distinct value\n", " (or values) of omega.aligned, serialisableresult, hypothesis_result, serialisableArrayAlignment, Alignment
cogent3.app.evonatsel_zhangTrueThe branch by site-class hypothesis test for natural selection of\n", " Zhang et al MBE 22: 2472-2479.\n", "\n", " Note: Our implementation is not as parametrically succinct as that of\n", " Zhang et al, we have 1 additional bin probability.aligned, serialisableresult, hypothesis_result, serialisableArrayAlignment, Alignment
cogent3.app.evotabulate_statsTrueExtracts all model statistics from model_result as Table.model_result, serialisableresult, tabular_result, serialisablemodel_result
cogent3.app.ioload_alignedTrueLoads aligned sequences. Returns an Alignment object.aligned, serialisableDataStoreMember, str, Path
cogent3.app.ioload_dbTrueLoads json serialised cogent3 objects from a TinyDB file. \n", " Returns whatever object type was stored.serialisable
cogent3.app.ioload_jsonTrueLoads json serialised cogent3 objects from a json file. \n", " Returns whatever object type was stored.serialisable
cogent3.app.ioload_tabularTrueLoads delimited data. Returns a Table.tabular, serialisableDataStoreMember, str, Path
cogent3.app.ioload_unalignedTrueLoads unaligned sequences. Returns a SequenceCollection.sequences, serialisableDataStoreMember, str, Path
cogent3.app.iowrite_dbTrueWrites json serialised objects to a TinyDB instance.serialisableidentifier, serialisable
cogent3.app.iowrite_jsonTrueWrites json serialised objects to individual json files.serialisableidentifier, serialisable
cogent3.app.iowrite_seqsTrueWrites sequences to text files in standard format.sequences, alignedsequences, aligned, identifierArrayAlignment, Alignment, SequenceCollection
cogent3.app.iowrite_tabularTruewrites tabular datatabular_result, tabularidentifierTable, DictArray, DistanceMatrix
cogent3.app.sampleconcatFalseCreates a concatenated alignment from a series. Returns an Alignment.
cogent3.app.samplefixed_lengthTrueSample an alignment to a fixed length. Returns an Alignment of the \n", " specified length, or NotCompleted if alignment too short.aligned, serialisablealigned, serialisableArrayAlignment, Alignment
cogent3.app.samplemin_lengthTrueFilters sequence collections / alignments by length. Returns the \n", " data if it satisfies the condition, NotCompleted otherwise.sequences, aligned, serialisablesequences, aligned, serialisableArrayAlignment, Alignment, SequenceCollection
cogent3.app.sampleomit_bad_seqsTrueEliminates sequences from Alignment based on gap fraction, unique gaps.\n", " Returns modified alignment.aligned, serialisablealigned, serialisableArrayAlignment, Alignment
cogent3.app.sampleomit_degeneratesTrueExcludes alignment columns with degenerate conditions. Can accomodate\n", " reading frame. Returns modified Alignment.aligned, serialisablealigned, serialisableArrayAlignment, Alignment
cogent3.app.sampleomit_duplicatedTrueRemoves redundant sequences, recording dropped sequences in\n", " seqs.info.dropped. Returns sequence collection with only unique sequences.sequences, serialisable, alignedsequences, serialisable, alignedArrayAlignment, Alignment, SequenceCollection
cogent3.app.sampleomit_gap_posTrueExcludes gapped alignment columns meeting a threshold. Can accomodate\n", " reading frame. Returns modified Alignment.aligned, serialisablealigned, serialisableArrayAlignment, Alignment
cogent3.app.sampletake_codon_positionsTrueExtracts the specified codon position(s) from an alignment. \n", " Returns an Alignment.aligned, serialisablealigned, serialisableArrayAlignment, Alignment
cogent3.app.sampletake_named_seqsTrueExtracts (or everything but) named sequences. Returns a filtered\n", " sequences, alignment that satisified the condition, NotCompleted otherwise.sequences, aligned, serialisablesequences, aligned, serialisableArrayAlignment, Alignment, SequenceCollection
cogent3.app.sampletrim_stop_codonsTrueRemoves terminal stop codons. Returns sequences / alignment.sequences, aligned, serialisablesequences, aligned, serialisableArrayAlignment, Alignment, SequenceCollection
cogent3.app.translateselect_translatableTrueIdentifies most likely reading frame. Returns modified sequences / alignment,\n", " if it could be resolved, NotCompleted otherwise.sequences, alignedsequencesArrayAlignment, Alignment, SequenceCollection
cogent3.app.translatetranslate_seqsTrueTranslates sequences, assumes in correct reading frame.sequences, alignedsequences, alignedArrayAlignment, Alignment, SequenceCollection
cogent3.app.treequick_treeTrueNeighbour Joining tree based on pairwise distances.pairwise_distancestree, serialisableDistanceMatrix
cogent3.app.treescale_branchesTrueTransforms tree branch lengths from nucleotide to codon, or the converse.\n", " Returns a Tree.treetree, serialisablePhyloNode, TreeNode
cogent3.app.treeuniformize_treeTrueStandardises the orientation of unrooted trees. Returns a Tree.treetree, serialisablePhyloNode, TreeNode
cogent3.app.composableuser_functionTruewrapper class for user specified function
\n", "

\n", "37 rows x 7 columns

" ], "text/plain": [ "===========================================================================================================================================================================================================================================================================================================================================================================================================================================================\n", " module name composable doc inputs outputs data type\n", "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n", " cogent3.app.align align_to_ref True Aligns to a reference seq, no gaps in the reference.\n", " Returns an Alignment object. sequences aligned, serialisable SequenceCollection\n", " cogent3.app.align progressive_align True Progressive multiple sequence alignment via any cogent3 model.\n", " Returns an Alignment object. sequences aligned, serialisable SequenceCollection\n", " cogent3.app.dist fast_slow_dist True Pairwise distance calculation. Uses fast (but less\n", " numerically robust) approach where possible, slow (robust)\n", " approach when not. Returns a DistanceMatrix. aligned pairwise_distances, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo ancestral_states True Computes ancestral state probabilities from a model result. Returns a dict\n", " with a DictArray for each node. model_result result, tabular_result, serialisable model_result\n", " cogent3.app.evo bootstrap True Parametric bootstrap for a provided hypothesis. Returns a bootstrap_result. aligned result, bootstrap_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo hypothesis True Specify a hypothesis through defining two models. Returns a\n", " hypothesis_result. aligned, serialisable result, hypothesis_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo model True Define a substitution model + tree for maximum likelihood evaluation.\n", " Returns model_result. aligned, serialisable result, model_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo natsel_neutral True Test of selective neutrality by assessing whether omega equals 1.\n", " Under the alternate, there is one omega for all branches and all sites.\n", " aligned, serialisable result, hypothesis_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo natsel_sitehet True Test for site-heterogeneity in omega. Under null, there are 2 site-classes,\n", " omega < 1 and omega = 1. Under the alternate, an additional site-class of\n", " omega > 1 is added. aligned, serialisable result, hypothesis_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo natsel_timehet True The branch heterogeneity hypothesis test for natural selection.\n", " Tests for whether a single omega for all branches is sufficient against the\n", " alternate that a user specified subset of branches have a distinct value\n", " (or values) of omega.\n", " aligned, serialisable result, hypothesis_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo natsel_zhang True The branch by site-class hypothesis test for natural selection of\n", " Zhang et al MBE 22: 2472-2479.\n", "\n", " Note: Our implementation is not as parametrically succinct as that of\n", " Zhang et al, we have 1 additional bin probability.\n", " aligned, serialisable result, hypothesis_result, serialisable ArrayAlignment, Alignment\n", " cogent3.app.evo tabulate_stats True Extracts all model statistics from model_result as Table. model_result, serialisable result, tabular_result, serialisable model_result\n", " cogent3.app.io load_aligned True Loads aligned sequences. Returns an Alignment object. aligned, serialisable DataStoreMember, str, Path\n", " cogent3.app.io load_db True Loads json serialised cogent3 objects from a TinyDB file. \n", " Returns whatever object type was stored. serialisable \n", " cogent3.app.io load_json True Loads json serialised cogent3 objects from a json file. \n", " Returns whatever object type was stored. serialisable \n", " cogent3.app.io load_tabular True Loads delimited data. Returns a Table. tabular, serialisable DataStoreMember, str, Path\n", " cogent3.app.io load_unaligned True Loads unaligned sequences. Returns a SequenceCollection. sequences, serialisable DataStoreMember, str, Path\n", " cogent3.app.io write_db True Writes json serialised objects to a TinyDB instance. serialisable identifier, serialisable \n", " cogent3.app.io write_json True Writes json serialised objects to individual json files. serialisable identifier, serialisable \n", " cogent3.app.io write_seqs True Writes sequences to text files in standard format. sequences, aligned sequences, aligned, identifier ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.io write_tabular True writes tabular data tabular_result, tabular identifier Table, DictArray, DistanceMatrix\n", " cogent3.app.sample concat False Creates a concatenated alignment from a series. Returns an Alignment. \n", " cogent3.app.sample fixed_length True Sample an alignment to a fixed length. Returns an Alignment of the \n", " specified length, or NotCompleted if alignment too short. aligned, serialisable aligned, serialisable ArrayAlignment, Alignment\n", " cogent3.app.sample min_length True Filters sequence collections / alignments by length. Returns the \n", " data if it satisfies the condition, NotCompleted otherwise. sequences, aligned, serialisable sequences, aligned, serialisable ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.sample omit_bad_seqs True Eliminates sequences from Alignment based on gap fraction, unique gaps.\n", " Returns modified alignment. aligned, serialisable aligned, serialisable ArrayAlignment, Alignment\n", " cogent3.app.sample omit_degenerates True Excludes alignment columns with degenerate conditions. Can accomodate\n", " reading frame. Returns modified Alignment. aligned, serialisable aligned, serialisable ArrayAlignment, Alignment\n", " cogent3.app.sample omit_duplicated True Removes redundant sequences, recording dropped sequences in\n", " seqs.info.dropped. Returns sequence collection with only unique sequences. sequences, serialisable, aligned sequences, serialisable, aligned ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.sample omit_gap_pos True Excludes gapped alignment columns meeting a threshold. Can accomodate\n", " reading frame. Returns modified Alignment. aligned, serialisable aligned, serialisable ArrayAlignment, Alignment\n", " cogent3.app.sample take_codon_positions True Extracts the specified codon position(s) from an alignment. \n", " Returns an Alignment. aligned, serialisable aligned, serialisable ArrayAlignment, Alignment\n", " cogent3.app.sample take_named_seqs True Extracts (or everything but) named sequences. Returns a filtered\n", " sequences, alignment that satisified the condition, NotCompleted otherwise. sequences, aligned, serialisable sequences, aligned, serialisable ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.sample trim_stop_codons True Removes terminal stop codons. Returns sequences / alignment. sequences, aligned, serialisable sequences, aligned, serialisable ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.translate select_translatable True Identifies most likely reading frame. Returns modified sequences / alignment,\n", " if it could be resolved, NotCompleted otherwise. sequences, aligned sequences ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.translate translate_seqs True Translates sequences, assumes in correct reading frame. sequences, aligned sequences, aligned ArrayAlignment, Alignment, SequenceCollection\n", " cogent3.app.tree quick_tree True Neighbour Joining tree based on pairwise distances. pairwise_distances tree, serialisable DistanceMatrix\n", " cogent3.app.tree scale_branches True Transforms tree branch lengths from nucleotide to codon, or the converse.\n", " Returns a Tree. tree tree, serialisable PhyloNode, TreeNode\n", " cogent3.app.tree uniformize_tree True Standardises the orientation of unrooted trees. Returns a Tree. tree tree, serialisable PhyloNode, TreeNode\n", "cogent3.app.composable user_function True wrapper class for user specified function \n", "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n", "\n", "37 rows x 7 columns" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cogent3 import available_apps\n", "\n", "available_apps()" ] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:c3dev] *", "language": "python", "name": "conda-env-c3dev-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.1" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }