File: complement.tcl

package info (click to toggle)
staden 2.0.0%2Bb11-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 21,556 kB
  • sloc: ansic: 240,603; tcl: 65,360; cpp: 12,854; makefile: 11,201; sh: 2,952; fortran: 2,033; perl: 63; awk: 46
file content (40 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# Copyright (c) Medical Research Council, Laboratory of Molecular Biology,
# 1995. All rights reserved.
#
# This file is part of the Staden Package. See the Staden Package copyright
# notice for information on the restrictions for usage and distribution, and
# for a disclaimer of all warranties.
#
proc ComplementContig {io} {
    global gap_defs

    set l [keylget gap_defs COMPLEMENT_CONTIG]
    set t [keylget l WIN]
    if {[xtoplevel $t -resizable 0] == ""} return
    wm title $t "Complement contig"

    contig_id $t.id \
	    -command "ComplementContig2 $io $t $t.id" \
	    -io $io \
	    -range 0

    okcancelhelp $t.ok \
	-ok_command "ComplementContig2 $io $t $t.id" \
	-cancel_command "destroy $t" \
	-help_command "show_help gap4 {Complement}" \
	-bd 2 -relief groove

    pack $t.id $t.ok -side top -fill x
}

proc ComplementContig2 {io t id} {
    if {[set c [contig_id_gel $id]] == ""} {bell; return}

    destroy $t
    update idletasks

    set cnum [db_info get_contig_num $io $c]
    complement_contig -io $io -contigs "$c"
    SetContigGlobals $io [left_gel $io $cnum]
}