{ "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": [ "
module | \n", "name | \n", "composable | \n", "doc | \n", "inputs | \n", "outputs | \n", "data type | \n", "\n", "\n", "
---|---|---|---|---|---|---|
cogent3.app.align | \n", "align_to_ref | \n", "True | \n", "Aligns to a reference seq, no gaps in the reference.\n", " Returns an Alignment object. | \n", "sequences | \n", "aligned, serialisable | \n", "SequenceCollection | \n", "
cogent3.app.align | \n", "progressive_align | \n", "True | \n", "Progressive multiple sequence alignment via any cogent3 model.\n", " Returns an Alignment object. | \n", "sequences | \n", "aligned, serialisable | \n", "SequenceCollection | \n", "
cogent3.app.dist | \n", "fast_slow_dist | \n", "True | \n", "Pairwise distance calculation. Uses fast (but less\n", " numerically robust) approach where possible, slow (robust)\n", " approach when not. Returns a DistanceMatrix. | \n", "aligned | \n", "pairwise_distances, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "ancestral_states | \n", "True | \n", "Computes ancestral state probabilities from a model result. Returns a dict\n", " with a DictArray for each node. | \n", "model_result | \n", "result, tabular_result, serialisable | \n", "model_result | \n", "
cogent3.app.evo | \n", "bootstrap | \n", "True | \n", "Parametric bootstrap for a provided hypothesis. Returns a bootstrap_result. | \n", "aligned | \n", "result, bootstrap_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "hypothesis | \n", "True | \n", "Specify a hypothesis through defining two models. Returns a\n", " hypothesis_result. | \n", "aligned, serialisable | \n", "result, hypothesis_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "model | \n", "True | \n", "Define a substitution model + tree for maximum likelihood evaluation.\n", " Returns model_result. | \n", "aligned, serialisable | \n", "result, model_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "natsel_neutral | \n", "True | \n", "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 | \n", "result, hypothesis_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "natsel_sitehet | \n", "True | \n", "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. | \n", "aligned, serialisable | \n", "result, hypothesis_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "natsel_timehet | \n", "True | \n", "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 | \n", "result, hypothesis_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "natsel_zhang | \n", "True | \n", "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 | \n", "result, hypothesis_result, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.evo | \n", "tabulate_stats | \n", "True | \n", "Extracts all model statistics from model_result as Table. | \n", "model_result, serialisable | \n", "result, tabular_result, serialisable | \n", "model_result | \n", "
cogent3.app.io | \n", "load_aligned | \n", "True | \n", "Loads aligned sequences. Returns an Alignment object. | \n", "\n", " | aligned, serialisable | \n", "DataStoreMember, str, Path | \n", "
cogent3.app.io | \n", "load_db | \n", "True | \n", "Loads json serialised cogent3 objects from a TinyDB file. \n", " Returns whatever object type was stored. | \n", "\n", " | serialisable | \n", "\n", " |
cogent3.app.io | \n", "load_json | \n", "True | \n", "Loads json serialised cogent3 objects from a json file. \n", " Returns whatever object type was stored. | \n", "\n", " | serialisable | \n", "\n", " |
cogent3.app.io | \n", "load_tabular | \n", "True | \n", "Loads delimited data. Returns a Table. | \n", "\n", " | tabular, serialisable | \n", "DataStoreMember, str, Path | \n", "
cogent3.app.io | \n", "load_unaligned | \n", "True | \n", "Loads unaligned sequences. Returns a SequenceCollection. | \n", "\n", " | sequences, serialisable | \n", "DataStoreMember, str, Path | \n", "
cogent3.app.io | \n", "write_db | \n", "True | \n", "Writes json serialised objects to a TinyDB instance. | \n", "serialisable | \n", "identifier, serialisable | \n", "\n", " |
cogent3.app.io | \n", "write_json | \n", "True | \n", "Writes json serialised objects to individual json files. | \n", "serialisable | \n", "identifier, serialisable | \n", "\n", " |
cogent3.app.io | \n", "write_seqs | \n", "True | \n", "Writes sequences to text files in standard format. | \n", "sequences, aligned | \n", "sequences, aligned, identifier | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.io | \n", "write_tabular | \n", "True | \n", "writes tabular data | \n", "tabular_result, tabular | \n", "identifier | \n", "Table, DictArray, DistanceMatrix | \n", "
cogent3.app.sample | \n", "concat | \n", "False | \n", "Creates a concatenated alignment from a series. Returns an Alignment. | \n", "\n", " | \n", " | \n", " |
cogent3.app.sample | \n", "fixed_length | \n", "True | \n", "Sample an alignment to a fixed length. Returns an Alignment of the \n", " specified length, or NotCompleted if alignment too short. | \n", "aligned, serialisable | \n", "aligned, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.sample | \n", "min_length | \n", "True | \n", "Filters sequence collections / alignments by length. Returns the \n", " data if it satisfies the condition, NotCompleted otherwise. | \n", "sequences, aligned, serialisable | \n", "sequences, aligned, serialisable | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.sample | \n", "omit_bad_seqs | \n", "True | \n", "Eliminates sequences from Alignment based on gap fraction, unique gaps.\n", " Returns modified alignment. | \n", "aligned, serialisable | \n", "aligned, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.sample | \n", "omit_degenerates | \n", "True | \n", "Excludes alignment columns with degenerate conditions. Can accomodate\n", " reading frame. Returns modified Alignment. | \n", "aligned, serialisable | \n", "aligned, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.sample | \n", "omit_duplicated | \n", "True | \n", "Removes redundant sequences, recording dropped sequences in\n", " seqs.info.dropped. Returns sequence collection with only unique sequences. | \n", "sequences, serialisable, aligned | \n", "sequences, serialisable, aligned | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.sample | \n", "omit_gap_pos | \n", "True | \n", "Excludes gapped alignment columns meeting a threshold. Can accomodate\n", " reading frame. Returns modified Alignment. | \n", "aligned, serialisable | \n", "aligned, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.sample | \n", "take_codon_positions | \n", "True | \n", "Extracts the specified codon position(s) from an alignment. \n", " Returns an Alignment. | \n", "aligned, serialisable | \n", "aligned, serialisable | \n", "ArrayAlignment, Alignment | \n", "
cogent3.app.sample | \n", "take_named_seqs | \n", "True | \n", "Extracts (or everything but) named sequences. Returns a filtered\n", " sequences, alignment that satisified the condition, NotCompleted otherwise. | \n", "sequences, aligned, serialisable | \n", "sequences, aligned, serialisable | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.sample | \n", "trim_stop_codons | \n", "True | \n", "Removes terminal stop codons. Returns sequences / alignment. | \n", "sequences, aligned, serialisable | \n", "sequences, aligned, serialisable | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.translate | \n", "select_translatable | \n", "True | \n", "Identifies most likely reading frame. Returns modified sequences / alignment,\n", " if it could be resolved, NotCompleted otherwise. | \n", "sequences, aligned | \n", "sequences | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.translate | \n", "translate_seqs | \n", "True | \n", "Translates sequences, assumes in correct reading frame. | \n", "sequences, aligned | \n", "sequences, aligned | \n", "ArrayAlignment, Alignment, SequenceCollection | \n", "
cogent3.app.tree | \n", "quick_tree | \n", "True | \n", "Neighbour Joining tree based on pairwise distances. | \n", "pairwise_distances | \n", "tree, serialisable | \n", "DistanceMatrix | \n", "
cogent3.app.tree | \n", "scale_branches | \n", "True | \n", "Transforms tree branch lengths from nucleotide to codon, or the converse.\n", " Returns a Tree. | \n", "tree | \n", "tree, serialisable | \n", "PhyloNode, TreeNode | \n", "
cogent3.app.tree | \n", "uniformize_tree | \n", "True | \n", "Standardises the orientation of unrooted trees. Returns a Tree. | \n", "tree | \n", "tree, serialisable | \n", "PhyloNode, TreeNode | \n", "
cogent3.app.composable | \n", "user_function | \n", "True | \n", "wrapper class for user specified function | \n", "\n", " | \n", " | \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 }