ConKit SequenceFile Hierarchy Construction

If you wish to construct it as part of a new development to store your sequence information, you might find the following helpful.


  1. How to create a Sequence?
>>> import conkit.core
>>> seq = conkit.core.Sequence("example", "ABCDEF")

The example above creates a Sequence object with id “example” and sequence “ABCDEF”. This sequence contains numerous functions, such as align_global() for a global pairwise alignment with a second sequence

  1. How to create a SequenceFile?
>>> import conkit.core
>>> sfile = conkit.core.SequenceFile("example)

This example shows you how to create a SequenceFile which can store one or more Sequence objects.


Above is an outline for the different sequence-related entities. Each higher entity allows you to store one or more lower-level ones, i.e. you can store one or more Sequence entities in a single SequenceFile; however, be aware that all must have unique IDs.

To illustrate how you can combine the entities, look at the following:

>>> import conkit.core
>>> sfile = conkit.core.SequenceFile("example)
>>> seq1 = conkit.core.Sequence("example", "ABCDEF")
>>> seq2 = conkit.core.Sequence("elpmaxe", "FEDCBA")
>>> # Add the sequences to the sequence file
>>> sfile.add(seq1)
>>> sfile.add(seq2)

Note, the order in which you add entities does not matter.

Once you have constructed your hierarchy, all related functions are available to you.