Practical 12 Object Manager

Object Manager Learning Tasks

Starting point

To jump-start your first project utilizing the C++ Object Manager in the C++ Toolkit framework, we suggest using the new_project shell script, which creates a sample application and a makefile:

1. Create a new project called task in the folder task using the new_project shell script (this will create the folder, the source file and the makefile):

new_project task app/objmgr

2. Build the sample project and run the application:

cd task
make -f Makefile.task_app
./task -gi 333

The output should look like this:
First ID: emb|CAA23443.1|
Sequence: length=263, data=MARFLGLCTW
# of descriptions: 6
# of features:
[whole] Any: 2
[whole] Genes: 0
[0..9] Any: 2
[0..999, TSE] Any: 1
# of alignments:
[whole] Any: 0
Done

3. Now you can go ahead and convert the sample code in the task.cpp into the code that performs your learning task. Here a list of teaching examples to help you start working with the C++ Object Manager. The main idea here is to build one task on the top of another, in growing level of complexity:

  • having a Seq-id (GI), get the Bioseq;
  • print the Bioseq's title descriptor;
  • print the Bioseq's length;

Use the teaching example sequence:

Accession Version Gi Definition
AJ438945 AJ438945.1 19584253 Homo sapiens SLC16A1 gene...

The application should produce the following results for the above Bioseq:

ID: emb|AJ438945.1|HSA438945 + gi|19584253
Homo sapiens SLC16A1 gene for monocarboxylate transporter isoform 1, exons 2-5
Sequence length: 17312
Sequence map:
Segment: pos=0, length=17312, type=DATA
Total: 40.29%
cdr0: 46.4405%
Cdreg: 46.4405%
Non-Cdreg: 39.7052%

See here for more tasks and example sequences: http://www.ncbi.nlm.nih.gov/bookshelf/br.fcgi?book=toolkit&part=ch_objmgr#ch_objmgr.om_tasks.html





Comments