diff --git a/Extensions/biotext0.1/biotext.tcl b/Extensions/biotext0.1/biotext.tcl index 9d5618cdfa98e0fbf8228e0ca7770a79b19dc9b3..9658c96356cc5e8d9db07249a5aca60c6c5f7d3b 100755 --- a/Extensions/biotext0.1/biotext.tcl +++ b/Extensions/biotext0.1/biotext.tcl @@ -111,7 +111,7 @@ bind Biotext { proc ::tk::biotext::cursor {w x y} { lassign [split [$w cursor] .] r c set n [::tk::biotext::bufferNTimes "empty"] - $w see [incr r [expr {$y*$n}]].[incr c [expr {$x*$n}]] + $w see [expr {$r + $y*$n}].[expr {$c + $x*$n}] update idletasks return diff --git a/Extensions/biotext0.1/example.tcl b/Extensions/biotext0.1/example.tcl index 426269709e18dfa8e45689836de8178b2f2cb24f..87f6a11fabb44d0d610f7e2bfae13bd6f8b09eab 100755 --- a/Extensions/biotext0.1/example.tcl +++ b/Extensions/biotext0.1/example.tcl @@ -1,27 +1,48 @@ #!/usr/local/bin/wish -set OrdaliDir /home/moumou/ordali -source /home/ripp/gscope/gscope_outils.tcl -source /home/moumou/ordali/src/ordali_source.tcl -load /home/moumou/ordali/Extensions/biotext0.1/test/libbiotext0.1.so -source /home/moumou/ordali/Extensions/biotext0.1/biotext.tcl +package require platform +switch [::platform::generic] { + "macosx-x86_64" { + set OrdaliDir /Users/Luc/moumou/ordali + set lib libbiotext0.1.dylib + } + "linux-x86_64" { + set OrdaliDir /home/moumou/ordali + set lib "libbiotext0.1.so" + } + "win32-x86_64" { + set OrdaliDir o:/ordali/ + set lib "biotext01.dll" + } +} +puts "OrdaliDir $OrdaliDir" +source [file join $OrdaliDir src LesProcsDeGscope.tcl] +source [file join $OrdaliDir src ordali_source.tcl] +load [file join [pwd] test $lib] +source [file join $OrdaliDir Extensions biotext0.1 biotext.tcl] + proc TailleFonte {incr} { - puts "\nTAILLE-FONT" ; flush stdout + puts "\nTAILLE-FONT $incr\n" ; flush stdout set size [font configure SeqFont -size] incr size $incr # keep font sizes sane... - if {$size >= 6 && $size <= 32} { - font configure SeqFont -size $size + if {$size < 6} { + set size 6 + } + if {$size > 32} { + set size 32 } - update idletasks + font configure SeqFont -size $size + update idletasks + return } -proc CoupleY {args} { +proc CoupleYExa {args} { .f.b yview {*}$args .f.t yview {*}$args @@ -107,7 +128,7 @@ A white darkviolet U white darkviolet C white darkviolet X black dimgrey -. black dimgrey +. black grey 0 black white 1 black white 2 black white @@ -128,7 +149,7 @@ foreach l [split $Lignes \n] { } ########################## -font create SeqFont -family "Courier" -size 8 +font create SeqFont -family "Courier" -size 12 frame .f -background blue grid .f -row 0 -column 0 -sticky news @@ -152,6 +173,7 @@ biotext .f.b \ -font SeqFont \ -bd 0 \ -relief flat \ + -setgrid 1 \ -yscrollcommand ".f.sv set " \ -xscrollcommand ".f.sh set " \ -foreground black \ @@ -163,12 +185,13 @@ scrollbar .f.sh \ -command ".f.b xview " scrollbar .f.sv \ -bg blue \ - -command "CoupleY " + -command "CoupleYExa " grid .f.t -row 0 -column 0 -sticky ns grid .f.b -row 0 -column 1 -sticky news -grid .f.sv -row 0 -column 2 -sticky ns +grid .f.sv -row 0 -column 2 -sticky ns -padx 5 grid .f.sh -row 1 -column 1 -sticky ew -pady 5 + grid columnconfig .f 1 -weight 1 grid rowconfig .f 0 -weight 1 @@ -176,6 +199,8 @@ grid rowconfig .f 0 -weight 1 if {[llength $argv] > 0} { set tfa [lindex $argv end] puts "fasta : $tfa" +} else { + set tfa diaa.tfa } LitLeTFA $tfa Ltmp Tseq set Lseq [list] ; set Lnom [list] @@ -189,7 +214,7 @@ puts "[llength $Lnom] seqs [string length [lindex $Lseq 0]] aminoacids" .f.b sequences $Lseq -.f.b mapping $Lmapbw +.f.b mapping $Lmap .f.b map on .f.b configure -state normal @@ -197,17 +222,25 @@ puts "[llength $Lnom] seqs [string length [lindex $Lseq 0]] aminoacids" .f.t insert end "[join $Lnom \n]" .f.t configure -state disabled -bind . {.f.b xview scroll -10 units ; break} -bind . {.f.b xview scroll 10 units ; break} -bind . <4> {CoupleY scroll -1 units ; break} -bind . <5> {CoupleY scroll 1 units ; break} +if {$::tcl_platform(platform) ne "unix"} { + bind VScr {+.f.b xview scroll [expr {-%D/120}] units ; break} + bind VScr {CoupleYExa scroll [expr {-%D/120}] units ; break} +} else { + bind VScr {+.f.b xview scroll -10 units ; break} + bind VScr {+.f.b xview scroll 10 units ; break} + bind VScr <4> {+CoupleYExa scroll -1 units ; break} + bind VScr <5> {+CoupleYExa scroll 1 units ; break} +} +bindtags .f.t [linsert [bindtags .f.t] 1 VScr] +bindtags .f.b [linsert [bindtags .f.b] 1 VScr] +puts "bindtags [bindtags .f.b]" set Toggle(Scores) 0 -bind . [list TailleFonte +2] -bind . [list TailleFonte +2] -bind . [list TailleFonte +2] -bind . [list TailleFonte -2] -bind . [list TailleFonte -2] +bind .f.b [list TailleFonte +2] +bind .f.b [list TailleFonte +2] +bind .f.b [list TailleFonte +2] +bind .f.b [list TailleFonte -2] +bind .f.b [list TailleFonte -2] .f.t configure -state disabled puts "\nbiotext : [.f.b configure -font]" @@ -216,4 +249,20 @@ puts "SeqFont : [font configure SeqFont -size]\n" foreach cf {pady spacing1} { puts "$cf [.f.t cget -$cf]" } -#exit + +.f.b configure -state normal +puts "\nTags toto :" +.f.b tag configure toto -foreground yellow -background black +.f.b tag add toto 1.2 1.12 +.f.b tag add toto 2.5 2.15 +.f.b tag add toto 3.8 3.18 +.f.b tag add toto 4.4 4.14 +.f.b tag add toto 10.10 20.30 +.f.b tag state 0 +puts "Tags done ...\n" + + + + + + diff --git a/Extensions/biotext0.1/log b/Extensions/biotext0.1/log index 5055c3ae17d2a9163e71162ea7f8ccd691e63759..0922173fbedc236094aa8999d6f5080baf66527d 100755 --- a/Extensions/biotext0.1/log +++ b/Extensions/biotext0.1/log @@ -1,41 +1,46 @@ +OrdaliDir /home/moumou/ordali +font : 15 7 15< +config : width -1 23 height -1 10 +config : width -1 23 height -1 10 + +geom : width in -1 height in -1 +geom : width out 161 height out 150 +geom : nR 10 nC 23 bdi 0 + fasta : diaa.tfa -400 seqs 1200 aminoacids +402 seqs 6000 aminoacids +IJLMVRKFYWDBEZQPGHNSTAUCX.0123456789 font : 15 7 15< +config : width 161 23 height 150 10 +config : width 161 23 height 150 10 + +geom : width in -1 height in -1 +geom : width out 161 height out 150 +geom : nR 10 nC 23 bdi 0 + +bindtags .f.b VScr Biotext . all -font : FontSize bef 8 -font : 15 7 16< -font : FontSize aft 15 +biotext : -font font Font {Courier 12} SeqFont +text : -font font Font TkFixedFont SeqFont +SeqFont : 12 -font : FontSize bef 15 -font : 10 5 11< -font : FontSize aft 10 -config : width -1 60 height -1 20 -config : width -1 60 height -1 20 +pady 0 +spacing1 0 +font : 15 7 15< +config : width 161 23 height 150 10 +config : width 161 23 height 150 10 geom : width in -1 height in -1 -geom : width out 304 height out 224 -geom : nR 20 nC 60 bdi 4 - -event : width 304 304 height 224 224 -geom : width in 304 height in 224 -geom : width out 304 height out 224 -geom : nR 20 nC 60 bdi 4 - - -font : FontSize bef 10 -font : 10 5 11< -font : FontSize aft 10 -startXC 0finXC 60 wc 5 -startYC 0 finYC 20 hc 11 -event : width 724 304 height 409 224 -geom : width in 724 height in 409 -geom : width out 724 height out 409 -geom : nR 36 nC 144 bdi 4 - - -font : FontSize bef 10 -font : 10 5 11< -font : FontSize aft 10 -startXC 0finXC 144 wc 5 -startYC 0 finYC 36 hc 11 -startXC 0finXC 144 wc 5 -startYC 0 finYC 36 hc 11 +geom : width out 161 height out 150 +geom : nR 10 nC 23 bdi 0 + + +Tags toto : +Tags done ... + + +EVENT : width 161 161 height 150 150 +geom : width in 161 height in 150 +geom : width out 161 height out 150 +geom : nR 10 nC 23 bdi 0 + +font : 15 7 15< diff --git a/src/ordali_admin.tcl b/src/ordali_admin.tcl index 39984c119dee25012c496bee155108b251c93ded..c54a1b488a58bca8b44683e08190171e80675270 100755 --- a/src/ordali_admin.tcl +++ b/src/ordali_admin.tcl @@ -248,13 +248,14 @@ proc CreeOrdalieStarpack {{plat ""}} { if {$plat eq ""} { package require platform set plat [::platform::generic] + cd [file join $::OrdaliDir Build $plat] } # output runtime tclkit : # may be different for CROSS - BUILDING set platout $plat set plat [::platform::generic] - file copy [file join .. TclKits sdx.kit] sdx.kit + file copy -force [file join .. TclKits sdx.kit] sdx.kit # copy tclkit for building set fkit [glob [file join .. TclKits "tclkit-${plat}*"]] diff --git a/src/ordali_affiche.tcl b/src/ordali_affiche.tcl index 57d2b75db84ff97853f1e4e5549891b62db9f2f9..302b362e169d0d0c63452b962c811ce8e0af4db7 100755 --- a/src/ordali_affiche.tcl +++ b/src/ordali_affiche.tcl @@ -223,13 +223,13 @@ proc FenetreAjoutePDB {} { grid columnconfig $wf 1 -weight 1 set WAP(File) "" label $wf.lbl -text "File : " \ - -relief flat + -relief flat entry $wf.ent \ - -background white \ - -textvariable WAP(File) + -background white \ + -textvariable WAP(File) button $wf.but -text "Browse" \ - -background cyan \ - -command "set WAP(File) \[DemandeEtOuvreFichier PDB\]" + -background cyan \ + -command "set WAP(File) \[DemandeEtOuvreFichier PDB\]" grid $wf.lbl -row 0 -column 0 -sticky w grid $wf.ent -row 0 -column 1 -sticky ew grid $wf.but -row 0 -column 2 -sticky ew @@ -270,8 +270,8 @@ proc FenetreAjoutePDB {} { frame $wb button $wb.dis \ -text "Cancel" \ - -background red \ - -command [list AjoutePDB dismiss] + -background red \ + -command [list AjoutePDB dismiss] button $wb.ok \ -text " OK " \ -background green1 \ @@ -2846,6 +2846,10 @@ proc BtnDeLaFeature {f} { proc LesBoutonsEnfonces {{quoi "features"}} { global FrmBtnFea + if {! [winfo exists $FrmBtnFea]} { + return [list] + } + set Lb {} foreach c [winfo children $FrmBtnFea] { if {[EtatDuBouton $c]} { @@ -3334,11 +3338,11 @@ proc SummaryPCI {} { grid $top.fgr -row 1 -column 0 -padx 5 -pady 5 button $top.bok \ - -text " OK " \ - -bg green1 \ - -command [list destroy $top] + -text " OK " \ + -bg green1 \ + -command [list destroy $top] grid $top.bok -row 2 -column 0 -pady {15 5} - + FenetreAuCentre $top tkwait window $top @@ -4489,7 +4493,7 @@ proc MontreLesStrSecDetaillees {} { grid $w.lesseq.fpos.vposs -row 0 -column 3 -padx 0 text $w.lesseq.textnomseq \ - -relief sunken \ + -relief flat \ -bd 0 \ -cursor left_ptr \ -font SeqFont \ @@ -4497,7 +4501,8 @@ proc MontreLesStrSecDetaillees {} { -wrap none \ -width 15 \ -foreground black \ - -background white + -background white \ + -setgrid 1 text $w.lesseq.regle \ -bd 2 \ @@ -6454,10 +6459,15 @@ proc MetAJourDessinOverview {Id w {f None} {etat 1}} { # Determine Overview ACTIVE set ni [list] foreach i $Li { - if {[set Ovw(O$i,Mac)] != [MacCourant]} {continue} - lappend ni $i + if {[set Ovw(O$i,Mac)] == [MacCourant]} { + lappend ni $i + } + } + if {$ni == {}} { + return + } else { + set Li $ni } - if {$ni == {}} {return} {set Li $ni} if {$f eq "automatic"} { DessineFeatureSurOverview $Li "" "None" $etat $DeBtn @@ -8316,7 +8326,7 @@ proc AfficheFrameSequences {} { set FrmSequence "$w.lessequences" frame $FrmSequence grid $FrmSequence -row 2 -column 0 -sticky news -padx 5 - + # # widgets to display names of sequences, and # sequences, with their scrollbars @@ -8340,8 +8350,8 @@ proc AfficheFrameSequences {} { } text $w.lessequences.textnomseq \ - -relief sunken \ - -bd 2 \ + -relief flat \ + -bd 0 \ -font SeqFont \ -cursor left_ptr \ -yscrollcommand [list .ordali.lessequences.scrolly set] \ @@ -8349,36 +8359,39 @@ proc AfficheFrameSequences {} { -height $Defauts(seqHeight) \ -width $WdtNom \ -wrap none \ - -foreground white \ - -background black \ + -foreground black \ + -background white \ -selectforeground black \ -selectbackground white \ -inactiveselectbackground white \ -state disabled \ -selectborderwidth 0 \ -autoseparators 0 \ - -undo 1 \ - -highlightthickness 0 + -undo 0 \ + -highlightthickness 0 \ + -setgrid 1 \ + -pady 0 # Sequences : biotext widget for seqlab , # text widget otherwise biotext $FrmSequence.biotextsequence \ - -font Seqfont \ + -font SeqFont \ -yscrollcommand FromScrollYBiotext2Names \ -xscrollcommand [list .ordali.lessequences.scrollxseq set] \ -height $Defauts(seqHeight) \ -width $Defauts(seqWidth) \ - -relief sunken \ + -relief flat \ -class Biotext \ - -bd 0 + -bd 0 \ + -setgrid 1 text $w.lessequences.textsequence \ -xscrollcommand [list .ordali.lessequences.scrollxseq set] \ -yscrollcommand [list .ordali.lessequences.scrolly set] \ - -relief sunken \ + -relief flat \ -height $Defauts(seqHeight) \ -width $Defauts(seqWidth) \ - -bd 2 \ + -bd 0 \ -cursor left_ptr \ -font SeqFont \ -wrap none \ @@ -8389,12 +8402,15 @@ proc AfficheFrameSequences {} { -insertbackground yellow \ -selectborderwidth 0 \ -autoseparators 0 \ - -undo 1 \ - -highlightthickness 0 + -undo 0 \ + -highlightthickness 0 \ + -pady 0 \ + -setgrid 1 # position ruler text $w.lessequences.regle \ -bd 0 \ + -relief flat \ -state disabled \ -font SeqFont \ -cursor left_ptr \ diff --git a/src/ordali_misc.tcl b/src/ordali_misc.tcl index 43eb6ac103c790ff13c875d236bca8f49f2a5ff8..8a24f3c66abcaa03261da865ef21ef1de914f6df 100755 --- a/src/ordali_misc.tcl +++ b/src/ordali_misc.tcl @@ -1,3 +1,29 @@ + + + + + +proc transpa {} { + LoadTkAndPackages + + image create photo ori -file torus_180.png + set h [image height ori] ; set w [image width ori] + puts "w $w h $h" + set col {0 0 0} + for {set x 0} {$x < $w} {incr x} { + for {set y 0} {$y < $h} {incr y} { + if {[ori get $x $y] == $col} { + ori transparency set $x $y 1 + } + } + } + ori write new.png + + exit + +} + + proc mapuce {} { LoadTkAndPackages @@ -11870,6 +11896,19 @@ proc dfast {} { proc aatest {} { set Laa [split "ACDEFGHIKLMNPQRSTVWY" ""] set o [open diaa.tfa w] + set length 1000 + + set seq1 "" ; set seq2 "" + set j 0 ; set k 0 + while {$j < 6*$length} { + append seq1 "[lindex $Laa $k]." + append seq2 ".[lindex $Laa $k]" + incr j 2 ; incr k + if {$k == [llength $Laa]} {set k 0} + } + puts $o ">seqTest-1\n$seq1" + puts $o ">seqTest-2\n$seq2" + foreach a $Laa { foreach b $Laa { set nom "$a$b$a$b" @@ -11883,5 +11922,223 @@ proc aatest {} { exit } +proc InitGUILLO {} { + global GLLO COK Cnext Next Save LLO + + LoadTkAndPackages + + . configure -background black + grid columnconfig . 0 -weight 1 + + font create LFont -family Courier -size 38 -weight bold + + set wdt [PlusLongEltDe $LLO(ListOf,Header)] + + label .loutil \ + -bg black -fg white \ + -relief raised -bd 2 \ + -font LFont -justify left -anchor w \ + -textvariable GLLO(labOutil) + label .lkey \ + -width $wdt \ + -bg black -fg white \ + -relief raised -bd 2 \ + -font LFont -justify left -anchor w \ + -textvariable GLLO(labKey) + entry .eval \ + -bg black -fg white \ + -relief groove -bd 2 \ + -font LFont -justify left\ + -textvariable GLLO(entVal) + frame .f \ + -bg black + button .f.bok \ + -text " OK " \ + -fg white -bg "#770077" \ + -font LFont \ + -command {set ::COK 1 ; focus .eval} + button .f.bnx \ + -text " Next " \ + -fg white -bg "#555555" \ + -font LFont \ + -command {set COK 1 ; set Next 1 ; focus .eval} + button .f.bsv \ + -text " Save " \ + -fg white -bg "#007700" \ + -font LFont \ + -command {SaveTxl liste_tmp.csv ::LLO "," ; focus .eval} + grid .f.bok -row 0 -column 0 -sticky w + grid .f.bnx -row 0 -column 1 -padx 10 + grid .f.bsv -row 0 -column 2 -sticky e + grid columnconfig .f all -weight 1 + + frame .f2 \ + -background black + button .f2.bnw \ + -text " New " \ + -fg white -bg "#224488" \ + -font LFont \ + -command {NewItemLLO} + button .f2.bxt \ + -text " Exit " \ + -fg white -bg "#884422" \ + -font LFont \ + -command {SaveTxl liste_tmp.csv ::LLO ","; exit} + grid .f2.bnw -row 0 -column 0 -sticky w -padx 10 + grid .f2.bxt -row 0 -column 1 -sticky e -padx 10 + grid columnconfig .f2 all -weight 1 + + grid .loutil -row 0 -column 0 -pady {10 20} -sticky ew -padx 10 + grid .lkey -row 1 -column 0 -sticky ew -padx 10 + grid .eval -row 2 -column 0 -sticky ew -pady {10 20} -padx 10 + grid .f -row 3 -column 0 -sticky ew -padx 10 -pady {20 5} + grid .f2 -row 4 -column 0 -sticky ew -padx 10 -pady {5 20} + + focus .eval + bind all {.f.bok invoke ; focus .eval ; break} + + FenetreAuCentre . + + return +} + + +proc NewItemLLO {} { + global GLLO LLO + + set Li [lsort -integer $LLO(ListOf,Index)] + set i [expr {[lindex $Li end] + 1}] + + set ::COK 0 ; set ::Next 0 + set GLLO(labOutil) "Nouvel Outil" + foreach h $LLO(ListOf,Header) { + set GLLO(labKey) $h + set GLLO(entVal) "" + vwait ::COK + if {$::Next} { + set ::Next 0 + continue + } + set LLO($i,$h) $GLLO(entVal) + } + + SaveTxl liste_tmp.csv LLO "," + lappend LLO(ListOf,Index) $i + + return +} + +proc SaveTxl {{file ""} aT {sep "\t"}} { + # aT doit venir de la proc : LoadTxl (gscope_atelier) + # et contient les cles : ListOf,Index et ListOf,Header + # + + upvar $aT Tb + + set Lout {} + set Lh $Tb(ListOf,Header) + set Ltmp {} + foreach h $Lh { + regsub -all "_" $h " " h + if {[string first " " $h] > -1} { + set h "\"$h\"" + } + lappend Ltmp $h + } + lappend Lout [join $Ltmp $sep] + + foreach i $Tb(ListOf,Index) { + set Ltmp {} + foreach key $Tb(ListOf,Header) { + regsub -all "_" $Tb($i,$key) " " val + if {[string first " " $val] > -1} { + # il y a des espaces, + set val "\"$val\"" + } + lappend Ltmp $val + } + lappend Lout [join $Ltmp $sep] + } + + if {$file eq ""} { + return $Lout + } + set o [open $file w] + puts $o [join $Lout \n] + close $o + + return +} + + +proc LLoB {{gui 1}} { + global GLLO LLO + + set Fichier "/home/moumou/liste.csv" + LoadTxl $Fichier LLO -1 "," + parray LLO + + if {0} { + lappend LLO(ListOf,Header) "Article" + set idev [lsearch -exact $LLO(ListOf,Header) "Développeur"] + puts "idev $idev" + set LLO(ListOf,Header) [linsert $LLO(ListOf,Header) $idev+1 "Maintenance"] + foreach i $LLO(ListOf,Index) { + set LLO($i,Article) "" + set LLO($i,Maintenance) "" + } + SaveTxl test.csv LLO "," + + exit + } + if {$gui} { + set ::COK 0 + set ::Next 0 + set ::Save 0 + InitGUILLO + } + + foreach i $LLO(ListOf,Index) { + if {$gui} { + set GLLO(labOutil) $LLO($i,Outil) + } else { + puts "" + } + foreach h $LLO(ListOf,Header) { + if {! $gui} { + puts "$h : $LLO($i,$h)" + puts -nonewline " -> : " ; flush stdout + while {! [gets stdin rep]} {} + switch $rep { + "next" {break} + "n" - + "ok" {continue} + "saveme" {SaveTxl liste_tmp.csv LLO ","} + "exit" {exit} + default { + set LLO($i,$h) "$rep" + } + } + } else { + # gui + set GLLO(labKey) $h + set GLLO(entVal) $LLO($i,$h) + update idletasks + + vwait ::COK + if {$::Next} { + set ::Next 0 + break + } + set LLO($i,$h) $GLLO(entVal) + } + } + } + + SaveTxl liste_tmp.csv LLO "," + + exit +} + diff --git a/src/ordali_outils.tcl b/src/ordali_outils.tcl index 4c83260dc6695f64a840ee2373fc060a54aa743d..2f7e572ef28b8b8f2354cb60f43838c0a13ed830 100755 --- a/src/ordali_outils.tcl +++ b/src/ordali_outils.tcl @@ -843,14 +843,20 @@ proc FermeFichier {{DoSave "nosave"}} { } } + update idletasks + if {[ModeI]} { + bindtags $NomNomSeq {} + bindtags $NomTextSeq {} + } + catch {$db close} set CompteurDeMac 0 - if {[info exists ::ListePDB]} { + if {$::ListePDB != {}} { foreach a $::ListePDB { lassign $a mol tmp - set mol "::[DonneIdDeAccessPDB $mol]" - if {[info commands "::$mol"] ne ""} { - $mol destroy + set cmdMol "::[DonneIdDeAccessPDB $mol]" + if {[info commands $cmdMol] ne ""} { + $cmdMol destroy } } update @@ -897,7 +903,6 @@ proc FermeFichier {{DoSave "nosave"}} { DetruitBoutonsOrdali AfficheBoutonsOrdali LesDefauts dispmode "ordali" - #BindModeNormal } # inits ... @@ -906,7 +911,8 @@ proc FermeFichier {{DoSave "nosave"}} { set ::NomSeqSel {} set ::BufferSeq {} set ::LongueurTotale 0 - set ::ListeTypesDeFeatures [list] + set ::ListeTypesDeFeatures {} + set ::ListePDB {} array set ::TabSF {} set ::BufNTimes "" diff --git a/src/ordali_selection.tcl b/src/ordali_selection.tcl index 082f523e7f9ac6cc27efff146e3c6a76b81deb7c..d9dff4c905ca809ea2e7a3dffd8cbc83bac085c8 100755 --- a/src/ordali_selection.tcl +++ b/src/ordali_selection.tcl @@ -1,6 +1,11 @@ + + + + proc CutLesNoms {} { global NomSeqSel LSOrdali LNOrdali LNSeqlab LSSeqlab NomsAffiches Defauts NomTextSeq TScrollY + update idletasks if {[TypeAli] eq "pasdali"} { return } @@ -58,6 +63,7 @@ proc CutLesNoms {} { proc CopyLesNoms {} { global LNOrdali LSOrdali BufferSeq NomSeqSel LNSeqlab LSSeqlab NomNomSeq NomTextSeq + update idletasks if {[TypeAli] eq "pasdali"} {return} if {$NomSeqSel == {}} {return} if {$BufferSeq != {}} { @@ -98,6 +104,7 @@ proc CopyLesNoms {} { proc PasteLesNoms {} { global LSOrdali LNOrdali Sequences LNSeqlab LSSeqlab NomSeqSel BufferSeq NomTextSeq NomNomSeq Defauts ListeSeqsGroupees TDesAccess TDesSeqnames TDesBId + update idletasks if {[TypeAli] eq "pasdali"} { return } diff --git a/src/ordali_sequence.tcl b/src/ordali_sequence.tcl index 30a71ad7c4b7b15480acff086b7168b9f70b0b8b..3910be8bfa365c95d452ae34d03b1b1986455f2b 100755 --- a/src/ordali_sequence.tcl +++ b/src/ordali_sequence.tcl @@ -2751,14 +2751,14 @@ proc DefineGroupForNewSeq {Lseq aT} { proc ReAlignSeqs {} { global NomSeqSel LNOrdali LSOrdali LNSeqlab LSSeqlab - - if {[llength $NomSeqSel] <= 1} { - FaireLire "Please select al least one sequence to be aligned !" + + if {[llength $NomSeqSel] < 1} { + FaireLire "Please select at least one sequence to be re-aligned !" return } - FaireAttendre "Please wait ...\n Re-aligning sequences with MAFFT ..." + FaireAttendre "Please wait ...\n Re-aligning sequences with MAFFT web service ..." if {[QuelMode] eq "seqlab"} { set LNomsAli $LNSeqlab @@ -2787,10 +2787,8 @@ proc ReAlignSeqs {} { # create a TFA from selected sequences set reaTfa [list] foreach n $Lnrea s $Lsrea { - if {$n ne ""} { - set s [string map {. ""} $s] - lappend reaTfa ">$n" $s - } + set s [string map {. ""} $s] + lappend reaTfa ">$n" $s } set reaTfa [join $reaTfa "\n"] diff --git a/src/ordali_source.tcl b/src/ordali_source.tcl index dd3a7d4c05c01326414c48cdf6d6cfe208da4442..13153e04e13c2c5bbd2196178cf9215342bf684b 100755 --- a/src/ordali_source.tcl +++ b/src/ordali_source.tcl @@ -24,6 +24,7 @@ if {! [info exists OrdaliDejaSource] || ! $OrdaliDejaSource} { ordali_image.tcl \ ordali_math.tcl \ ordali_misc.tcl \ + ordali_misynpat.tcl \ ordali_mode.tcl \ ordali_ordali.tcl \ ordali_outils.tcl \ diff --git a/src/ordali_tree.tcl b/src/ordali_tree.tcl index 0672c777df2b39158c2ee8200f5a3376ea3fcd23..e6b27f995573ecb3b171f195be6b695a263eae1c 100755 --- a/src/ordali_tree.tcl +++ b/src/ordali_tree.tcl @@ -960,10 +960,12 @@ proc SwapNode {AId} { set id [$PAD find withtag current] set Ln [$t attr IdRot] set i [lsearch $Ln $id] - set n [lindex $Ln [expr {$i - 1}]] + set n [lindex $Ln $i-1] + if {$n eq "root"} { + return + } $t set $n ordre [expr {![$t get $n ordre]}] - # $t swap {*}[$t children $n] if {[set Abr($AId,TypeTree)] ne "dendrogram"} { Tree2Coordonnees $AId @@ -982,7 +984,6 @@ proc SwapNode {AId} { } - proc ResetArbre {AId w} { global Abr