| 1 | |
|---|
| 2 | *** This is just a draft, it's not implemented *** |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | Automatic synchronization of DNA- and Protein-Alignments |
|---|
| 6 | ======================================================== |
|---|
| 7 | |
|---|
| 8 | - An alignment ALI_1 may have a subitem named 'synced_alignment' which contains the name |
|---|
| 9 | of an other alignment ALI_2 (datapath: /preset/ali_1/synced_alignment). |
|---|
| 10 | In this case .. |
|---|
| 11 | |
|---|
| 12 | * .. ALI_2 has to have an 'synced_alignment'-entry containing the name of ALI_1 and .. |
|---|
| 13 | * .. one of these alignments has to be a DNA-alignment, the other one has to be a |
|---|
| 14 | protein-alignment (we call them ALI_DNA and ALI_PRO). |
|---|
| 15 | |
|---|
| 16 | Such alignments are called _synced alignments_. |
|---|
| 17 | |
|---|
| 18 | - Species-data residing below a synced alignment may have a 'sync_flag' (datapath: |
|---|
| 19 | /species_data/species_xxx/ali_dna/sync_flag). |
|---|
| 20 | |
|---|
| 21 | sync_flag-value meaning |
|---|
| 22 | -------------------------------------------------------------------------------- |
|---|
| 23 | SYNC_NOT species should not be synchronized (this is the default |
|---|
| 24 | value in case of missing sync_flag). |
|---|
| 25 | |
|---|
| 26 | SYNC_OK both alignments (ALI_DNA and ALI_PRO) are synchronized. |
|---|
| 27 | |
|---|
| 28 | SYNC_PRO ALI_PRO is not up to date and has to be re-translated. |
|---|
| 29 | |
|---|
| 30 | SYNC_DNA ALI_DNA is not up to date and has to be re-aligned. |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | * If /species_data/species_xxx/ali_dna does not exist no synchronization will be done |
|---|
| 34 | for this species!! |
|---|
| 35 | |
|---|
| 36 | - Changed read/write-mechanism for synchronized alignments (this affects only .../ali_xx/data): |
|---|
| 37 | |
|---|
| 38 | * reading ali_dna/data: if sync_flag==SYNC_DNA => re-align; |
|---|
| 39 | read data; |
|---|
| 40 | * reading ali_pro/data: if sync_flag==SYNC_PRO => translate; |
|---|
| 41 | read data; |
|---|
| 42 | |
|---|
| 43 | * writing ali_dna/data: write data; |
|---|
| 44 | if sync_flag!=SYNC_NOT => sf=SYNC_PRO; mc=ali_pro; |
|---|
| 45 | * writing ali_pro/data: write data; |
|---|
| 46 | if sync_flag!=SYNC_NOT => sf=SYNC_DNA; mc=ali_dna; |
|---|
| 47 | |
|---|
| 48 | sf=<value> set sync_flag to <value> |
|---|
| 49 | mc=<ali> mark data below <ali> as changed (to force refresh in editor) |
|---|
| 50 | |
|---|
| 51 | - Due to performance issues it's possible to bypass the automatic synchronization: |
|---|
| 52 | |
|---|
| 53 | 1. force_synchronize(species); |
|---|
| 54 | 2. |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | |
|---|