File: controlling_third_party_applications.rst

package info (click to toggle)
python-cogent 1.9-14
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 19,752 kB
  • sloc: python: 137,485; makefile: 149; sh: 64
file content (45 lines) | stat: -rw-r--r-- 1,238 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
************************************
Controlling third party applications
************************************

Existing supported apps
=======================

Alignment apps
--------------

clustalw and muscle
^^^^^^^^^^^^^^^^^^^

.. doctest::
    
    >>> from cogent import LoadSeqs, DNA
    >>> from cogent.app.clustalw import align_unaligned_seqs as clustal_aln
    >>> from cogent.app.muscle import align_unaligned_seqs as muscle_aln
    >>> seqs = LoadSeqs(filename='data/test2.fasta', aligned=False)
    >>> aln1 = clustal_aln(seqs, DNA)
    >>> aln2 = muscle_aln(seqs, DNA)
    >>> aln1 == aln2
    True
    >>> from cogent.app.fasttree import build_tree_from_alignment
    >>> tr = build_tree_from_alignment(aln1,moltype=DNA)
    >>> print tr.asciiArt()
              /-Mouse
             |
    ---------|--NineBande
             |
             |          /-DogFaced
              \0.508---|
                       |          /-HowlerMon
                        \0.752---|
                                  \-Human

And if you have matplotlib installed you can draw the tree (see :ref:`draw-trees`).

.. note:: Tree output based on v2.0.1
.. TODO add in cross-ref to drawing usage example

BLAST
-----

See :ref:`blast-usage`.