Table of Contents

MolTK Application Tutorial

There is no MolTK application release until MolTK version 0.7. Try again later.

Interactive MolTK Python Tutorial

Download and install MolTK from the MolTK download site http://code.google.com/p/moltk/downloads/list.

In the following examples, text following the >>> prompt represents commands typed by the user. Other lines represent the output of the program.

Scenario 1: Aligning 3 sequences

In this example, the files insulin_shark_v1.fasta, insulin_pig_v1.fasta, and insulin_human_v1.fasta are sequences in the FASTA format. Information about the FASTA format can be found at http://www.ncbi.nlm.nih.gov/BLAST/blastcgihelp.shtml. A file called test.fasta can be saved with the alignment. The alignment can be also saved as test.pretty which is a nicely formatted but not computer parseable version of the alignment. What follows is an example of performing an alignment of three sequences.

Step 1. Download FASTA test sequences

Go to download page http://code.google.com/p/moltk/downloads/list and download the three FASTA sequences: insulin_shark_v1.fasta, insulin_pig_v1.fasta, and insulin_human_v1.fasta.

Step 2. Start an alignment session

Open a command prompt window. Navigate to the location of your downloaded FASTA files. In the following code block "%" represents your command prompt.

% python -i >>> import moltk

Step 3. Load test1.fasta sequence into seq1
>>> seq1 = moltk.load_fasta("insulin_human_v1.fasta")

Step 4. Load test2.fasta sequence into seq2
>>> seq2 = moltk.load_fasta("insulin_pig_v1.fasta")

Step 5. Align seq1 and seq2
>>> align1 = moltk.align(seq1, seq2)

Step 6. Display the alignment on the screen
>>> print align1

Note: Homo sapiens (human) and Sus scrofa (pig)

Step 7. Load test3.fasta sequence into seq3
>>> seq3 = moltk.load_fasta("insulin_shark_v1.fasta")

Step 8. Align previous alignment of test1.fasta and test2.fasta with test3.fasta
>>> align2 = moltk.align(align1, seq3)

Step 9. Save the alignment to a file
>>> align2.write_fasta("test.fasta")

You can also save as test.pretty for a nicely formatted (but not computer parseable) version.

>>> align2.write_pretty("test.pretty")

Step 10. Display a table of pairwise sequence identities
>>> print align2.id_table()

Step 11. End your alignment session
>>> quit()

Scenario 2: Writing a python script to help automate the alignment process

Scenario 3: Aligning 2 sequences and assessing significance

Scenario 4: Overlaying 2 tertiary structures

MolTK C++ Tutorial

Search MolTK

Loading

Resources

API Documentation