Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
luc.moulinier
ordalie
Commits
70d5a352
Commit
70d5a352
authored
Mar 15, 2019
by
luc.moulinier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
annotation fin
parent
137d5dc6
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
2534 deletions
+104
-2534
src/ordali_affiche.tcl
src/ordali_affiche.tcl
+25
-20
src/ordali_db.tcl
src/ordali_db.tcl
+23
-11
src/ordali_mode.tcl
src/ordali_mode.tcl
+6
-4
src/ordali_setup.tcl
src/ordali_setup.tcl
+6
-2
src/ordali_visu3d.tcl
src/ordali_visu3d.tcl
+0
-6
src/ordali_xml.tcl
src/ordali_xml.tcl
+11
-3
src/tmp
src/tmp
+33
-2488
No files found.
src/ordali_affiche.tcl
View file @
70d5a352
...
...
@@ -2170,8 +2170,8 @@ proc BindModeNormal {} {
bindtags $::NomNomSeq $LNTags
bindtags $::NomTextSeq $LSTags
#
Sauvegarde
#
bind . <Control-Key-s> [list SauveLAlignement]
#
saving shortcut
bind . <Control-Key-s> [list SauveLAlignement]
$::NomTextSeq tag delete Marque
update idletasks
...
...
@@ -2798,6 +2798,9 @@ proc EtatSeqsOut {quoi} {
proc EtatBouton {b} {
# returns :
# - 0 if button is RAISED
# - 1 if button is SUNKEN
if {[$b cget -relief] eq "raised"} {
return 0
...
...
@@ -3956,39 +3959,41 @@ proc ChoixPDBReference {} {
proc AfficheSnapshotAnnotations {} {
global NomTextSeq An
a
no WOrdali
global NomTextSeq Anno WOrdali
if {[TypeAli] eq "pasdali"} {
return
}
if {! [info exists Anno(Lanno)]} {
if {[QuelMode] eq "seqlab"} {
FaireLire "Not available in Editor mode yet !"
return
}
if {[QuelMode] eq "annotation"} {
return
}
unset -nocomplain Anno
LoadSnapAnnotations
parray Anno
update
$NomTextSeq configure -state normal
set bt $WOrdali(BoutAnno)
if {! [EtatBouton $bt]} {
set Anno(Ltags) [list]
foreach ann $Anno(Lanno) {
lassign $ann ian pka txt col zone
set txt "$ian - $txt"
set txtnsp [string map {_ @ " " "_"} $txt]
set tag "FDisp_$txtnsp"
$NomTextSeq tag configure $tag -background [CouleurO2Ordali $col] -foreground black
$NomTextSeq tag add $tag {*}$zone
lappend Anno(Ltags) "FDisp_$txtnsp"
}
# button is ON, show
ShowAnnotation All
$bt configure -relief sunken -background red -foreground white
} else {
foreach tag $Anno(Ltags) {
$NomTextSeq tag remove $tag 1.0 end
}
# Button is sunken, hide
ShowAnnotation None
unset Anno
$bt configure -relief raised -background cyan -foreground black
}
update idletasks
$NomTextSeq configure -state disabled
update idletasks
return
}
...
...
src/ordali_db.tcl
View file @
70d5a352
...
...
@@ -76,7 +76,7 @@ proc DbProfile {sql time} {
proc RemplitOrdaliDB
{}
{
global OrdTmpDir LNOrdali LSOrdali
global
{*}
[
info globals
"TD*"
]
TabSF CompteurDeMac db Defauts LNDG SDG TColScore ListePDB
global
{*}
[
info globals
"TD*"
]
TabSF CompteurDeMac db Defauts LNDG SDG TColScore ListePDB
ListeTypesDeFeatures
#$db profile DbProfile
$db
eval
{
begin transaction
}
...
...
@@ -122,25 +122,32 @@ proc RemplitOrdaliDB {} {
# Met A Jour table des features
# on a TabSF, copie conforme des features
# du XML. On copie tel quel dans seqfeat
array set TAnno
{}
if
{[
info exists TabSF
]}
{
if
{
"SnapAnnotation"
in $ListeTypesDeFeatures
}
{
array set TAnno
[
array get TabSF
"*,SnapAnnotation"
]
RemoveAnnotationFeatures
}
MetAJourTableFeatures
}
else
{
set TabSF
[
list
]
}
# Met A Jour table mac.
##########a###########
#
# 1er MAC : initial mac, never be touched
#
#####################
$db
eval
{
begin transaction
}
set Lx
[
$db
eval
{
select pk_seqali from seqali order by pk_seqali
}]
set titre
"M
[
NumeroNewMac
]
- original alignment"
set pkm 1
$db
eval
{
insert into snapshot values
(
$pkm
, $titre,'original alignment'
)}
set titre
"M
[
NumeroNewMac
]
- original alignment"
LesDefauts IxMacCourant $pkm
LesDefauts NmMacCourant $titre
$db
eval
{
begin transaction
}
set Lx
[
$db
eval
{
select pk_seqali from seqali order by pk_seqali
}]
$db
eval
{
insert into snapshot values
(
$pkm
, $titre,'original alignment'
)}
set pos 0
set i 1
...
...
@@ -163,6 +170,9 @@ proc RemplitOrdaliDB {} {
$db
eval
{
insert into ln_seqali_cluster values
(
$i
, $pk_Cst,$pos
)}
incr pos
}
# Add annotations
Features2Annotations
[
array get TAnno
]
################
#
...
...
@@ -179,7 +189,9 @@ proc RemplitOrdaliDB {} {
set titre
"M
$pkm
- working alignment"
set name
"working alignment"
}
LesDefauts IxMacCourant $pkm
LesDefauts NmMacCourant $titre
$db
eval
{
insert into snapshot values
(
$pkm
, $titre,$name
)}
set pos 0
foreach s $Lx
{
...
...
@@ -187,9 +199,6 @@ proc RemplitOrdaliDB {} {
incr pos
}
LesDefauts IxMacCourant $pkm
LesDefauts NmMacCourant $titre
incr pk_Clg
;
# clustering
incr pk_Cst
;
# cluster
if
{[
TypeAli
]
eq
"XML"
}
{
...
...
@@ -217,6 +226,9 @@ proc RemplitOrdaliDB {} {
set pk_snap
[
$db
eval
{
select max
(
pk_snap
)
from snapshot
}]
set CompteurDeMac $pk_snap
# Add annotations if any
Features2Annotations
[
array get TAnno
]
# Met A Jour conservation/colscores
if
{[
info exists TColScore
]}
{
foreach name $TColScore
(
Names
)
{
...
...
@@ -254,7 +266,7 @@ proc RemplitOrdaliDB {} {
}
}
}
# Creation des Index
$db
eval
{
create index idx_seqinfo on seqinfo
(
pk_seqinfo, seqname, access
)}
$db
eval
{
create index idx_seqali on seqali
(
pk_seqali, pk_seqinfo, seqname, seq
)}
...
...
src/ordali_mode.tcl
View file @
70d5a352
...
...
@@ -253,13 +253,16 @@ proc AfficheModeFeatures {} {
proc AfficheModeAnnotation
{}
{
# hide annotations through snapshot button
set on 0
if
{
!
[
EtatBouton $::WOrdali
(
BoutAnno
)]}
{
AfficheSnapshotAnnotations
set on 1
}
AfficheBoutonsAnnotation
if
{
[
EtatBouton $::WOrdali
(
BoutAnno
)]
}
{
if
{
$on
}
{
AfficheSnapshotAnnotations
}
...
...
@@ -300,10 +303,9 @@ proc AfficheBoutonsOrdali {} {
proc AfficheBoutonsAnnotation
{}
{
global FrmBouton Anno NomTextSeq WOrdali
if
{[
TypeAli
]
eq
"pasdali"
}
{
return
}
unset -nocomplain Anno
LoadSnapAnnotations
# gui
grid columnconfig $FrmBouton 1 -weight 1
set wp
"
${FrmBouton}
.fanno"
...
...
src/ordali_setup.tcl
View file @
70d5a352
#
# ordali_setup.tcl
#
proc InitLesDefauts
{}
{
...
...
@@ -718,7 +720,9 @@ proc DefinitionPreferences {} {
ValsDeCouleurs
set Couleurs
(
Stock
)
{
red blue yellow green1 magenta orange cyan brown forest_green pink goldenrod sea_green coral violet khaki navy_blue salmon sienna turquoise lime_green maroon spring_green medium_blue indian_red dim_gray light_gray gray
}
# Following colors are Tk colors
set Couleurs
(
Stock
)
{
red blue yellow green1 magenta orange cyan brown ForestGreen pink goldenrod SeaGreen coral violet khaki NavyBlue salmon sienna turquoise LimeGreen maroon SpringGreen MediumBlue IndianRed DimGray LightGray gray
}
#set Couleurs
(
Stock
)
{
red blue yellow green1 magenta orange cyan brown forest_green pink goldenrod sea_green coral violet khaki navy_blue salmon sienna turquoise lime_green maroon spring_green medium_blue indian_red dim_gray light_gray gray
}
return
}
...
...
src/ordali_visu3d.tcl
View file @
70d5a352
...
...
@@ -807,9 +807,3 @@ proc TestCoupeMainChain {type Lca {Lcol {}} {Lc {}} {Lo {}}} {
}
src/ordali_xml.tcl
View file @
70d5a352
#
# ordali_xml.tcl
#
proc CreeLeMacsim
{{
out
"dehors"
}
{
LNoms
""
}
{
LSeqs
""
}}
{
...
...
@@ -1043,12 +1045,18 @@ proc CreeLeXml {{filout ""}} {
if
{
$filout
eq
""
}
{
set filout
[
DemandeEtSauveFichier xml 1
]
}
if
{
$filout
eq
""
}
{
return
}
if
{
$filout
eq
""
}
{
return
}
lassign
[
SequencesASauver
]
LNoms LSeqs
if
{
$LNoms ==
{}
|| $LSeqs ==
{}}
{
return
}
if
{
$LNoms ==
{}
|| $LSeqs ==
{}}
{
return
}
Annotations2Features
CreeLeMacsim $filout $LNoms $LSeqs
RemoveAnnotationFeatures
return
}
...
...
src/tmp
View file @
70d5a352
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment