2006 version init
This commit is contained in:
commit
a25316aa9e
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,764 @@
|
|||
1menu:File
|
||||
|
||||
item:test cmask output
|
||||
itemmethod: kedit in1
|
||||
|
||||
in:in1
|
||||
informat:colormask
|
||||
|
||||
item:New sequence <meta N>
|
||||
itemmethod:echo "$Type$Name" > out1
|
||||
itemmeta:n
|
||||
itemhelp:new_sequence.help
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:New Sequence name?
|
||||
argtext:New
|
||||
|
||||
arg:Type
|
||||
argtype:choice_list
|
||||
arglabel:Type?
|
||||
argchoice:DNA/RNA:#
|
||||
argchoice:Amino Acid:%
|
||||
argchoice:Text:\"
|
||||
argchoice:Mask:@
|
||||
|
||||
out:out1
|
||||
outformat:flat
|
||||
|
||||
item:Import Foreign Format
|
||||
itemmethod:cp $INPUTFILE OUTFILE.tmp;readseq OUTFILE.tmp -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:INPUTFILE
|
||||
argtype:text
|
||||
arglabel:Name of foreign file?
|
||||
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:Export Foreign Format
|
||||
itemmethod:readseq INPUTFILE -a -f$FORMAT > $OUTPUTFILE
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:FORMAT
|
||||
argtype:choice_list
|
||||
argchoice:FASTA:8
|
||||
argchoice:NEXUS:17
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:IG/Stanford:1
|
||||
argchoice:GenBank:2
|
||||
argchoice:NBRF:3
|
||||
argchoice:EMBL:4
|
||||
argchoice:GCG:5
|
||||
argchoice:DNA Strider:6
|
||||
argchoice:Fitch:7
|
||||
argchoice:Pearson:8
|
||||
argchoice:Zuker:9
|
||||
argchoice:Olsen:10
|
||||
argchoice:Phylip v3.2:11
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:Plain text:13
|
||||
|
||||
arg:OUTPUTFILE
|
||||
argtype:text
|
||||
arglabel:Save as?
|
||||
|
||||
in:INPUTFILE
|
||||
informat:genbank
|
||||
|
||||
|
||||
item:Save Selection
|
||||
itemmethod: cat $SAVE_FUNC > $Name
|
||||
itemhelp:save_selection.help
|
||||
|
||||
arg:SAVE_FUNC
|
||||
argtype:chooser
|
||||
arglabel:File format
|
||||
argchoice:Flat:in1
|
||||
argchoice:Genbank:in2
|
||||
argchoice:GDE/HGL:in3
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:File name?
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
in:in2
|
||||
informat:genbank
|
||||
|
||||
in:in3
|
||||
informat:gde
|
||||
|
||||
item:Print Selection
|
||||
itemmethod:(PrintStrat in1 $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; /bin/rm -f in1 in1.tmp)&
|
||||
itemhelp:print_alignment.help
|
||||
|
||||
arg:SCALE
|
||||
argtype:slider
|
||||
arglabel:Reduce printout by?
|
||||
argmin:1
|
||||
argmax:20
|
||||
argvalue:1
|
||||
|
||||
arg:CMD
|
||||
argtype:chooser
|
||||
argchoice:Lpr:lpr
|
||||
argchoice:Enscript Gaudy:enscript -G -q
|
||||
argchoice:Enscript Two column:enscript -2rG
|
||||
|
||||
arg:PRINTER
|
||||
argtype:text
|
||||
arglabel:Which printer?
|
||||
argtext:lp
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
menu:Edit
|
||||
|
||||
item:Sort
|
||||
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;/bin/rm -f in1*)&
|
||||
itemhelp:heapsortHGL.help
|
||||
|
||||
arg:PRIM_KEY
|
||||
argtype:choice_list
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Primary sort field?
|
||||
|
||||
arg:SEC_KEY
|
||||
argtype:choice_list
|
||||
argchoice:None:
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Secondary sort field?
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:extract
|
||||
itemmethod:(gde in1;/bin/rm -f in1)&
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
menu:DNA/RNA
|
||||
|
||||
item:Translate...
|
||||
itemmethod:Translate -tbl $TBL -frame $FRAME -min_frame $MNFRM $LTRCODE in1 > out1
|
||||
|
||||
arg:FRAME
|
||||
argtype:chooser
|
||||
arglabel:Which reading frame?
|
||||
argchoice:First:1
|
||||
argchoice:Second:2
|
||||
argchoice:Third:3
|
||||
argchoice:All six:6
|
||||
|
||||
arg:MNFRM
|
||||
arglabel:Minimum length of AA sequence to translate?
|
||||
argtype:slider
|
||||
argmin:0
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
arg:LTRCODE
|
||||
argtype:chooser
|
||||
arglabel:Translate to:
|
||||
argchoice:Single letter codes:
|
||||
argchoice:Triple letter codes:-3
|
||||
|
||||
arg:TBL
|
||||
arglabel:Codon table?
|
||||
argtype:chooser
|
||||
argchoice:universal:1
|
||||
argchoice:mycoplasma:2
|
||||
argchoice:yeast:3
|
||||
argchoice:Vert. mito.:4
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
item:Dot plot
|
||||
itemmethod:(DotPlotTool in1 ; /bin/rm -f in1)&
|
||||
itemhelp:DotPlotTool.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:Clustal alignment
|
||||
itemmethod:(tr '%#' '>'<in1>clus_in;clustalw -quicktree -output=PIR -infile=clus_in -align > in1.rpt;sed "s/>DL;/#/g" < clus_in.pir> in1;$REPORT gde in1;/bin/rm -f clus_in* in1* )&
|
||||
|
||||
itemhelp:clustal_help
|
||||
|
||||
arg:KTUP
|
||||
argtype:slider
|
||||
arglabel:K-tuple size for pairwise search
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:2
|
||||
|
||||
arg:WIN
|
||||
argtype:slider
|
||||
arglabel:Window size
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:4
|
||||
|
||||
arg:Trans
|
||||
argtype:chooser
|
||||
arglabel:Transitions weighted?
|
||||
argchoice:Yes:/TRANSIT
|
||||
argchoice:No:
|
||||
|
||||
arg:FIXED
|
||||
argtype:slider
|
||||
arglabel:Fixed gap penalty
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:FLOAT
|
||||
arglabel:Floating gap penalty
|
||||
argtype:slider
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:REPORT
|
||||
argtype:chooser
|
||||
arglabel:View assembly report?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit in1.rpt&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Variable Positions
|
||||
itemmethod:varpos $REV < in1 > out1
|
||||
|
||||
arg:REV
|
||||
argtype:chooser
|
||||
arglabel:Highlight (darken)
|
||||
argchoice:Conserved positions:
|
||||
argchoice:variable positions:-rev
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Phrap
|
||||
itemmethod:readseq in1 -a -f8 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp; phrap OUTPUTFILE; readseq -a -f2 OUTPUTFILE.contigs > out1;/bin/rm -rf OUTPUT*;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
|
||||
out:out1
|
||||
outformat:genbank
|
||||
|
||||
item:SNAP
|
||||
itemmethod: cat in1 > infile;/usr/local/bio/GDE/bin/fasta2snap.pl > outfile; /usr/bin/X11/xterm -e /home/tulio/bio/SNAP/SNAP.pl outfile; kedit backg*; kedit summ*; sheeltool /home/tulio/bio/codons-xyplot.pl codons.*; kedit codon.data; /bin/rm -rf back* codon* summ*;
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
out:out1
|
||||
outformat:text
|
||||
|
||||
|
||||
|
||||
|
||||
item:Find all <meta-f>
|
||||
itemmethod:findall $SEARCH $PRCNT $CASE $UT -match $MAT -mismatch $MIS < in1 > out1;
|
||||
itemhelp:findall.help
|
||||
itemmeta:f
|
||||
|
||||
arg:SEARCH
|
||||
argtype:text
|
||||
arglabel:Search String
|
||||
|
||||
arg:PRCNT
|
||||
argtype:slider
|
||||
arglabel:Percent mismatch
|
||||
argmin:0
|
||||
argmax:75
|
||||
argvalue:10
|
||||
|
||||
arg:CASE
|
||||
argtype:chooser
|
||||
arglabel:Case
|
||||
argchoice:Upper equals lower:
|
||||
argchoice:Upper not equal lower:-case
|
||||
|
||||
arg:UT
|
||||
argtype:chooser
|
||||
arglabel:U equal T?
|
||||
argchoice:Yes:-u=t
|
||||
argchoice:No:
|
||||
argvalue:0
|
||||
|
||||
arg:MAT
|
||||
arglabel:Match color
|
||||
argtype:choice_list
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:2
|
||||
|
||||
arg:MIS
|
||||
argtype:choice_list
|
||||
arglabel:Mismatch color
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:7
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Sequence Consensus
|
||||
itemmethod:(MakeCons in1 $METHOD $MASK > out1)
|
||||
itemhelp:MakeCons.help
|
||||
|
||||
arg:METHOD
|
||||
arglabel:Method
|
||||
argtype:chooser
|
||||
argchoice:IUPAC:-iupac
|
||||
argchoice:Majority:-majority $PERCENT
|
||||
|
||||
arg:MASK
|
||||
argtype:chooser
|
||||
arglabel:Create a new:
|
||||
argchoice:Sequence:
|
||||
argchoice:Selection Mask: | Consto01mask
|
||||
|
||||
arg:PERCENT
|
||||
arglabel:Minimum Percentage for Majority
|
||||
argtype:slider
|
||||
argmin:50
|
||||
argmax:100
|
||||
argvalue:75
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
|
||||
#Menu for DNA/RNA
|
||||
|
||||
item:blastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastn -d $BLASTDBDNA -i in1.f -W $WORDLEN -M $MATCH > in1.tmp; kedit in1.tmp; rm in1*)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV-1 Seq. Db.:/usr/local/bio/db/DNA/hiv17-08-01.fasta2
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:MATCH
|
||||
argtype:slider
|
||||
arglabel:Match Score
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:5
|
||||
|
||||
arg:MMSCORE
|
||||
argtype:slider
|
||||
arglabel:Mismatch Score
|
||||
argmin:-10
|
||||
argmax:-1
|
||||
argvalue:-5
|
||||
|
||||
item:blastx
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastx -d $BLASTDB -i in1.f -W $WORDLEN -M PAM30 > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1*)&
|
||||
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:genpept:$GDE_HELP_DIR/BLAST/genpept
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
item:------------------------
|
||||
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p F -o T; /usr/local/bio/GDE/bin/installBLASTDB.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: enter the file name
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: enter the name of the DB
|
||||
|
||||
|
||||
#Sequence dataset
|
||||
menu:seq. datasets
|
||||
|
||||
|
||||
item:-------------
|
||||
item:add a new dataset
|
||||
itemmethod:mkdir db; cp $file db/ ;xterm -e /usr/local/bio/GDE/newDATASET.pl $name $file
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the dataset name ?
|
||||
|
||||
arg:file
|
||||
argtype:text
|
||||
arglabel:Enter the dataset file (in FASTA) ?
|
||||
|
||||
|
||||
#Menu for Protein
|
||||
menu:protein
|
||||
item:blastp
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM30; /usr/local/bio/blast/blastall -p blastp -d $BLASTDBPROT -i in1.f -W $WORDLEN -M $Matrix > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1* PAM30)&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBPROT
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
|
||||
arg:Matrix
|
||||
barglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
item:tblastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM??? .; tblastn $BLASTDB in1.f W=$WORDLEN M=$Matrix C=$CODE > in1.tmp; kedit in1.tmp; rm in1* PAM???)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:genbank:$GDE_HELP_DIR/BLAST/genbank
|
||||
argchoice:genbank update:$GDE_HELP_DIR/BLAST/genupdate
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
|
||||
item:Map View
|
||||
itemmethod:(mapview in1 -pbl $PBL -npp $NPP; /bin/rm -f in1)&
|
||||
itemhelp:mapview.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
arg:PBL
|
||||
arglabel:Pixel Between Lines
|
||||
argtype:slider
|
||||
argvalue:10
|
||||
argmin:1
|
||||
argmax:15
|
||||
|
||||
arg:NPP
|
||||
arglabel:Nucleotides Per Pixel
|
||||
argtype:slider
|
||||
argvalue:1
|
||||
argmin:1
|
||||
argmax:20
|
||||
|
||||
arg:LWIDTH
|
||||
arglabel:Line Thickness
|
||||
argtype:slider
|
||||
argvalue:2
|
||||
argmin:1
|
||||
argmax:5
|
||||
|
||||
item:--------------------------
|
||||
item:Add a new Protein blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p T -o T; /usr/local/bio/GDE/bin/installBLASTDBPROT.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: Enter the file (in FASTA)
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: Enter the name of the DB
|
||||
|
||||
#Phylogenetic Menu
|
||||
|
||||
menu:Phylogeny
|
||||
|
||||
item:Phylip help
|
||||
itemmethod:(netscape /usr/local/bio/phylip/doc/$FILE)&
|
||||
|
||||
arg:FILE
|
||||
argtype:choice_list
|
||||
arglabel:Which program?
|
||||
argchoice:clique:clique.html
|
||||
argchoice:consense:consense.html
|
||||
argchoice:contchar:contchar.html
|
||||
argchoice:contml:contml.html
|
||||
argchoice:contrast:contrast.html
|
||||
argchoice:discrete:discrete.html
|
||||
argchoice:distance:distance.html
|
||||
argchoice:dnaboot:dnaboot.html
|
||||
argchoice:dnacomp:dnacomp.html
|
||||
argchoice:dnadist:dnadist.html
|
||||
argchoice:dnainvar:dnainvar.html
|
||||
argchoice:dnaml:dnaml.html
|
||||
argchoice:dnamlk:dnamlk.html
|
||||
argchoice:dnamove:dnamove.html
|
||||
argchoice:dnapars:dnapars.html
|
||||
argchoice:dnapenny:dnapenny.html
|
||||
argchoice:dollop:dollop.html
|
||||
argchoice:dolmove:dolmove.html
|
||||
argchoice:dolpenny:dolpenny.html
|
||||
argchoice:draw:draw.html
|
||||
argchoice:drawgram:drawgram.html
|
||||
argchoice:drawtree:drawtree.html
|
||||
argchoice:factor:factor.html
|
||||
argchoice:fitch:fitch.html
|
||||
argchoice:gendist:gendist.html
|
||||
argchoice:kitsch:kitsch.html
|
||||
argchoice:main:main.html
|
||||
argchoice:mix:mix.html
|
||||
argchoice:move:move.html
|
||||
argchoice:neighbor:neighbor.html
|
||||
argchoice:penny:penny.html
|
||||
argchoice:protpars:protpars.html
|
||||
argchoice:read.me.general:read.me.general.html
|
||||
argchoice:restml:restml.html
|
||||
argchoice:seqboot:seqboot.html
|
||||
argchoice:sequence:sequence.html
|
||||
|
||||
|
||||
|
||||
item:Phylip 3.5
|
||||
itemmethod:(rm -f outfile ; readseq -a -f12 in1 | sed "s/ YF//1" > infile;$PREEDIT /usr/bin/X11/xterm -e $PROGRAM;kedit outfile; treetool outtree; rm in1 )&
|
||||
|
||||
arg:PROGRAM
|
||||
argtype:choice_list
|
||||
arglabel:Which program to run?
|
||||
argchoice:DNAPARS:dnapars
|
||||
argchoice:DNABOOT:dnaboot
|
||||
argchoice:DNAPENNY:dnapenny
|
||||
argchoice:DNAML:dnaml
|
||||
argchoice:DNAMLK:dnamlk
|
||||
argchoice:DNACOMP:dnacomp
|
||||
argchoice:DNAMOVE:dnamove
|
||||
argchoice:DNAINVAR:dnainvar
|
||||
argchoice:PROTPARS:protpars
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
item:Phylip DNA Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 | sed "s/ YF//1" > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e dnadist;mv -f outfile infile; cp infile $DNA; /usr/bin/X11/xterm -e neighbor; cp outtree intree; cp outfile $NEI; $PROGRAM kedit outfile; cp outtree $TREE; treetool outtree; /bin/rm -f in1 infile outfile intree outtree)&
|
||||
|
||||
arg:EXPLAIN
|
||||
argtype:text
|
||||
arglabel:To produce a bootstraped tree choose DNADIST+NEIGHOR+CONSENSE
|
||||
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:DNADIST+NEIGHBOR:
|
||||
argchoice:DNADIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Run ?
|
||||
argtype:chooser
|
||||
argchoice:Run without Bootstrap:
|
||||
argchoice:Run with Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
|
||||
arg:DNA
|
||||
argtype:text
|
||||
arglabel:Name of DNADIST outfile?
|
||||
|
||||
arg:NEI
|
||||
argtype:text
|
||||
arglabel:Name of NEIGHBOR outfile?
|
||||
|
||||
arg:TREE
|
||||
argtype:text
|
||||
arglabel:Name of TREEFILE ?
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
item:Phylip PROTEIN Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e protdist;mv -f outfile infile; /usr/bin/X11/xterm -e neighbor; cp outtree intree; $PROGRAM kedit outfile;treetool outtree;/bin/rm -f in1 infile outfile)&
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:PROTDIST+NEIGHBOR:
|
||||
argchoice:PROTDIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
argchoice:No Bootstrap:
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
#Online menu
|
||||
menu:On-Line Res.
|
||||
|
||||
item:GDE for Linux resources at Bioafrica.net
|
||||
itemmethod:netscape http://www.bioafrica.net &
|
||||
|
||||
item:-------------------------
|
||||
item:add a new website
|
||||
itemmethod:xterm -e /usr/local/bio/GDE/newURL.pl $name $url
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the site name
|
||||
|
||||
arg:url
|
||||
argtype:text
|
||||
arglabel:Enter the URL (including http://)
|
|
@ -0,0 +1,761 @@
|
|||
1menu:File
|
||||
|
||||
item:test cmask output
|
||||
itemmethod: kedit in1
|
||||
|
||||
in:in1
|
||||
informat:colormask
|
||||
|
||||
item:New sequence <meta N>
|
||||
itemmethod:echo "$Type$Name" > out1
|
||||
itemmeta:n
|
||||
itemhelp:new_sequence.help
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:New Sequence name?
|
||||
argtext:New
|
||||
|
||||
arg:Type
|
||||
argtype:choice_list
|
||||
arglabel:Type?
|
||||
argchoice:DNA/RNA:#
|
||||
argchoice:Amino Acid:%
|
||||
argchoice:Text:\"
|
||||
argchoice:Mask:@
|
||||
|
||||
out:out1
|
||||
outformat:flat
|
||||
|
||||
item:Import Foreign Format
|
||||
itemmethod:cp $INPUTFILE OUTFILE.tmp;readseq OUTFILE.tmp -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:INPUTFILE
|
||||
argtype:text
|
||||
arglabel:Name of foreign file?
|
||||
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:Export Foreign Format
|
||||
itemmethod:readseq INPUTFILE -a -f$FORMAT > $OUTPUTFILE
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:FORMAT
|
||||
argtype:choice_list
|
||||
argchoice:FASTA:8
|
||||
argchoice:NEXUS:17
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:IG/Stanford:1
|
||||
argchoice:GenBank:2
|
||||
argchoice:NBRF:3
|
||||
argchoice:EMBL:4
|
||||
argchoice:GCG:5
|
||||
argchoice:DNA Strider:6
|
||||
argchoice:Fitch:7
|
||||
argchoice:Pearson:8
|
||||
argchoice:Zuker:9
|
||||
argchoice:Olsen:10
|
||||
argchoice:Phylip v3.2:11
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:Plain text:13
|
||||
|
||||
arg:OUTPUTFILE
|
||||
argtype:text
|
||||
arglabel:Save as?
|
||||
|
||||
in:INPUTFILE
|
||||
informat:genbank
|
||||
|
||||
|
||||
item:Save Selection
|
||||
itemmethod: cat $SAVE_FUNC > $Name
|
||||
itemhelp:save_selection.help
|
||||
|
||||
arg:SAVE_FUNC
|
||||
argtype:chooser
|
||||
arglabel:File format
|
||||
argchoice:Flat:in1
|
||||
argchoice:Genbank:in2
|
||||
argchoice:GDE/HGL:in3
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:File name?
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
in:in2
|
||||
informat:genbank
|
||||
|
||||
in:in3
|
||||
informat:gde
|
||||
|
||||
item:Print Selection
|
||||
itemmethod:(PrintStrat in1 $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; /bin/rm -f in1 in1.tmp)&
|
||||
itemhelp:print_alignment.help
|
||||
|
||||
arg:SCALE
|
||||
argtype:slider
|
||||
arglabel:Reduce printout by?
|
||||
argmin:1
|
||||
argmax:20
|
||||
argvalue:1
|
||||
|
||||
arg:CMD
|
||||
argtype:chooser
|
||||
argchoice:Lpr:lpr
|
||||
argchoice:Enscript Gaudy:enscript -G -q
|
||||
argchoice:Enscript Two column:enscript -2rG
|
||||
|
||||
arg:PRINTER
|
||||
argtype:text
|
||||
arglabel:Which printer?
|
||||
argtext:lp
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
menu:Edit
|
||||
|
||||
item:Sort
|
||||
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;/bin/rm -f in1*)&
|
||||
itemhelp:heapsortHGL.help
|
||||
|
||||
arg:PRIM_KEY
|
||||
argtype:choice_list
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Primary sort field?
|
||||
|
||||
arg:SEC_KEY
|
||||
argtype:choice_list
|
||||
argchoice:None:
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Secondary sort field?
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:extract
|
||||
itemmethod:(gde in1;/bin/rm -f in1)&
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
menu:DNA/RNA
|
||||
|
||||
item:Translate...
|
||||
itemmethod:Translate -tbl $TBL -frame $FRAME -min_frame $MNFRM $LTRCODE in1 > out1
|
||||
|
||||
arg:FRAME
|
||||
argtype:chooser
|
||||
arglabel:Which reading frame?
|
||||
argchoice:First:1
|
||||
argchoice:Second:2
|
||||
argchoice:Third:3
|
||||
argchoice:All six:6
|
||||
|
||||
arg:MNFRM
|
||||
arglabel:Minimum length of AA sequence to translate?
|
||||
argtype:slider
|
||||
argmin:0
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
arg:LTRCODE
|
||||
argtype:chooser
|
||||
arglabel:Translate to:
|
||||
argchoice:Single letter codes:
|
||||
argchoice:Triple letter codes:-3
|
||||
|
||||
arg:TBL
|
||||
arglabel:Codon table?
|
||||
argtype:chooser
|
||||
argchoice:universal:1
|
||||
argchoice:mycoplasma:2
|
||||
argchoice:yeast:3
|
||||
argchoice:Vert. mito.:4
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
item:Dot plot
|
||||
itemmethod:(DotPlotTool in1 ; /bin/rm -f in1)&
|
||||
itemhelp:DotPlotTool.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:Clustal alignment
|
||||
itemmethod:(tr '%#' '>'<in1>clus_in;clustalw -quicktree -output=PIR -infile=clus_in -align > in1.rpt;sed "s/>DL;/#/g" < clus_in.pir> in1;$REPORT gde in1;/bin/rm -f clus_in* in1* )&
|
||||
|
||||
itemhelp:clustal_help
|
||||
|
||||
arg:KTUP
|
||||
argtype:slider
|
||||
arglabel:K-tuple size for pairwise search
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:2
|
||||
|
||||
arg:WIN
|
||||
argtype:slider
|
||||
arglabel:Window size
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:4
|
||||
|
||||
arg:Trans
|
||||
argtype:chooser
|
||||
arglabel:Transitions weighted?
|
||||
argchoice:Yes:/TRANSIT
|
||||
argchoice:No:
|
||||
|
||||
arg:FIXED
|
||||
argtype:slider
|
||||
arglabel:Fixed gap penalty
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:FLOAT
|
||||
arglabel:Floating gap penalty
|
||||
argtype:slider
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:REPORT
|
||||
argtype:chooser
|
||||
arglabel:View assembly report?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit in1.rpt&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Variable Positions
|
||||
itemmethod:varpos $REV < in1 > out1
|
||||
|
||||
arg:REV
|
||||
argtype:chooser
|
||||
arglabel:Highlight (darken)
|
||||
argchoice:Conserved positions:
|
||||
argchoice:variable positions:-rev
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Phrap
|
||||
itemmethod:readseq in1 -a -f8 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp; phrap OUTPUTFILE; readseq -a -f2 OUTPUTFILE.contigs > out1;/bin/rm -rf OUTPUT*;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
|
||||
out:out1
|
||||
outformat:genbank
|
||||
|
||||
item:SNAP
|
||||
itemmethod: cat in1 > infile;/usr/local/bio/GDE/bin/fasta2snap.pl > outfile; /usr/bin/X11/xterm -e /home/tulio/bio/SNAP/SNAP.pl outfile; kedit backg*; kedit summ*; sheeltool /home/tulio/bio/codons-xyplot.pl codons.*; kedit codon.data; /bin/rm -rf back* codon* summ*;
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
out:out1
|
||||
outformat:text
|
||||
|
||||
|
||||
|
||||
|
||||
item:Find all <meta-f>
|
||||
itemmethod:findall $SEARCH $PRCNT $CASE $UT -match $MAT -mismatch $MIS < in1 > out1;
|
||||
itemhelp:findall.help
|
||||
itemmeta:f
|
||||
|
||||
arg:SEARCH
|
||||
argtype:text
|
||||
arglabel:Search String
|
||||
|
||||
arg:PRCNT
|
||||
argtype:slider
|
||||
arglabel:Percent mismatch
|
||||
argmin:0
|
||||
argmax:75
|
||||
argvalue:10
|
||||
|
||||
arg:CASE
|
||||
argtype:chooser
|
||||
arglabel:Case
|
||||
argchoice:Upper equals lower:
|
||||
argchoice:Upper not equal lower:-case
|
||||
|
||||
arg:UT
|
||||
argtype:chooser
|
||||
arglabel:U equal T?
|
||||
argchoice:Yes:-u=t
|
||||
argchoice:No:
|
||||
argvalue:0
|
||||
|
||||
arg:MAT
|
||||
arglabel:Match color
|
||||
argtype:choice_list
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:2
|
||||
|
||||
arg:MIS
|
||||
argtype:choice_list
|
||||
arglabel:Mismatch color
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:7
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Sequence Consensus
|
||||
itemmethod:(MakeCons in1 $METHOD $MASK > out1)
|
||||
itemhelp:MakeCons.help
|
||||
|
||||
arg:METHOD
|
||||
arglabel:Method
|
||||
argtype:chooser
|
||||
argchoice:IUPAC:-iupac
|
||||
argchoice:Majority:-majority $PERCENT
|
||||
|
||||
arg:MASK
|
||||
argtype:chooser
|
||||
arglabel:Create a new:
|
||||
argchoice:Sequence:
|
||||
argchoice:Selection Mask: | Consto01mask
|
||||
|
||||
arg:PERCENT
|
||||
arglabel:Minimum Percentage for Majority
|
||||
argtype:slider
|
||||
argmin:50
|
||||
argmax:100
|
||||
argvalue:75
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
|
||||
#Menu for DNA/RNA
|
||||
|
||||
item:blastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastn -d $BLASTDBDNA -i in1.f -W $WORDLEN -M $MATCH > in1.tmp; kedit in1.tmp; rm in1*)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV-1 Seq. Db.:/usr/local/bio/db/DNA/hiv17-08-01.fasta2
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:MATCH
|
||||
argtype:slider
|
||||
arglabel:Match Score
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:5
|
||||
|
||||
arg:MMSCORE
|
||||
argtype:slider
|
||||
arglabel:Mismatch Score
|
||||
argmin:-10
|
||||
argmax:-1
|
||||
argvalue:-5
|
||||
|
||||
item:blastx
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastx -d $BLASTDB -i in1.f -W $WORDLEN -M PAM30 > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1*)&
|
||||
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:genpept:$GDE_HELP_DIR/BLAST/genpept
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
item:------------------------
|
||||
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p F -o T; /usr/local/bio/GDE/installBLASTDB.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: enter the file name
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: enter the name of the DB
|
||||
|
||||
menu:seq. datasets
|
||||
|
||||
item:-------------
|
||||
item:add a new dataset
|
||||
itemmethod:cp $file /usr/local/biotools/GDE/db/ ;xterm -e /usr/local/biotools/GDE/newDATASET.pl $name $file
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the dataset name ?
|
||||
|
||||
arg:file
|
||||
argtype:text
|
||||
arglabel:Enter the dataset file (in FASTA) ?
|
||||
|
||||
|
||||
#Menu for Protein
|
||||
menu:protein
|
||||
item:blastp
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM30; /usr/local/bio/blast/blastall -p blastp -d $BLASTDB -i in1.f -W $WORDLEN -M $Matrix > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1* PAM30)&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
|
||||
arg:Matrix
|
||||
barglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
item:tblastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM??? .; tblastn $BLASTDB in1.f W=$WORDLEN M=$Matrix C=$CODE > in1.tmp; kedit in1.tmp; rm in1* PAM???)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:genbank:$GDE_HELP_DIR/BLAST/genbank
|
||||
argchoice:genbank update:$GDE_HELP_DIR/BLAST/genupdate
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
|
||||
item:Map View
|
||||
itemmethod:(mapview in1 -pbl $PBL -npp $NPP; /bin/rm -f in1)&
|
||||
itemhelp:mapview.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
arg:PBL
|
||||
arglabel:Pixel Between Lines
|
||||
argtype:slider
|
||||
argvalue:10
|
||||
argmin:1
|
||||
argmax:15
|
||||
|
||||
arg:NPP
|
||||
arglabel:Nucleotides Per Pixel
|
||||
argtype:slider
|
||||
argvalue:1
|
||||
argmin:1
|
||||
argmax:20
|
||||
|
||||
arg:LWIDTH
|
||||
arglabel:Line Thickness
|
||||
argtype:slider
|
||||
argvalue:2
|
||||
argmin:1
|
||||
argmax:5
|
||||
|
||||
item:--------------------------
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p T -o T; /usr/local/bio/GDE/installBLASTDBPROT.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: Enter the file (in FASTA)
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: Enter the name of the DB
|
||||
|
||||
menu:Phylogeny
|
||||
|
||||
|
||||
item:Phylip help
|
||||
itemmethod:(netscape /usr/local/bio/phylip/doc/$FILE)&
|
||||
|
||||
arg:FILE
|
||||
argtype:choice_list
|
||||
arglabel:Which program?
|
||||
argchoice:clique:clique.html
|
||||
argchoice:consense:consense.html
|
||||
argchoice:contchar:contchar.html
|
||||
argchoice:contml:contml.html
|
||||
argchoice:contrast:contrast.html
|
||||
argchoice:discrete:discrete.html
|
||||
argchoice:distance:distance.html
|
||||
argchoice:dnaboot:dnaboot.html
|
||||
argchoice:dnacomp:dnacomp.html
|
||||
argchoice:dnadist:dnadist.html
|
||||
argchoice:dnainvar:dnainvar.html
|
||||
argchoice:dnaml:dnaml.html
|
||||
argchoice:dnamlk:dnamlk.html
|
||||
argchoice:dnamove:dnamove.html
|
||||
argchoice:dnapars:dnapars.html
|
||||
argchoice:dnapenny:dnapenny.html
|
||||
argchoice:dollop:dollop.html
|
||||
argchoice:dolmove:dolmove.html
|
||||
argchoice:dolpenny:dolpenny.html
|
||||
argchoice:draw:draw.html
|
||||
argchoice:drawgram:drawgram.html
|
||||
argchoice:drawtree:drawtree.html
|
||||
argchoice:factor:factor.html
|
||||
argchoice:fitch:fitch.html
|
||||
argchoice:gendist:gendist.html
|
||||
argchoice:kitsch:kitsch.html
|
||||
argchoice:main:main.html
|
||||
argchoice:mix:mix.html
|
||||
argchoice:move:move.html
|
||||
argchoice:neighbor:neighbor.html
|
||||
argchoice:penny:penny.html
|
||||
argchoice:protpars:protpars.html
|
||||
argchoice:read.me.general:read.me.general.html
|
||||
argchoice:restml:restml.html
|
||||
argchoice:seqboot:seqboot.html
|
||||
argchoice:sequence:sequence.html
|
||||
|
||||
|
||||
|
||||
item:Phylip 3.5
|
||||
itemmethod:(rm -f outfile ; readseq -a -f12 in1 | sed "s/ YF//1" > infile;$PREEDIT /usr/bin/X11/xterm -e $PROGRAM;kedit outfile; treetool outtree; rm in1 )&
|
||||
|
||||
arg:PROGRAM
|
||||
argtype:choice_list
|
||||
arglabel:Which program to run?
|
||||
argchoice:DNAPARS:dnapars
|
||||
argchoice:DNABOOT:dnaboot
|
||||
argchoice:DNAPENNY:dnapenny
|
||||
argchoice:DNAML:dnaml
|
||||
argchoice:DNAMLK:dnamlk
|
||||
argchoice:DNACOMP:dnacomp
|
||||
argchoice:DNAMOVE:dnamove
|
||||
argchoice:DNAINVAR:dnainvar
|
||||
argchoice:PROTPARS:protpars
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
item:Phylip DNA Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 | sed "s/ YF//1" > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e dnadist;mv -f outfile infile; cp infile $DNA; /usr/bin/X11/xterm -e neighbor; cp outtree intree; cp outfile $NEI; $PROGRAM kedit outfile; cp outtree $TREE; treetool outtree; /bin/rm -f in1 infile outfile intree outtree)&
|
||||
|
||||
arg:EXPLAIN
|
||||
argtype:text
|
||||
arglabel:To produce a bootstraped tree choose DNADIST+NEIGHOR+CONSENSE
|
||||
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:DNADIST+NEIGHBOR:
|
||||
argchoice:DNADIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Run ?
|
||||
argtype:chooser
|
||||
argchoice:Run without Bootstrap:
|
||||
argchoice:Run with Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
|
||||
arg:DNA
|
||||
argtype:text
|
||||
arglabel:Name of DNADIST outfile?
|
||||
|
||||
arg:NEI
|
||||
argtype:text
|
||||
arglabel:Name of NEIGHBOR outfile?
|
||||
|
||||
arg:TREE
|
||||
argtype:text
|
||||
arglabel:Name of TREEFILE ?
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
item:Phylip PROTEIN Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e protdist;mv -f outfile infile; /usr/bin/X11/xterm -e neighbor; cp outtree intree; $PROGRAM kedit outfile;treetool outtree;/bin/rm -f in1 infile outfile)&
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:PROTDIST+NEIGHBOR:
|
||||
argchoice:PROTDIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
argchoice:No Bootstrap:
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
menu:On-Line Res.
|
||||
|
||||
item:GDE for Linux resources at Bioafrica.net
|
||||
itemmethod:netscape http://www.bioafrica.net &
|
||||
|
||||
item:-------------------------
|
||||
item:add a new website
|
||||
itemmethod:xterm -e /usr/local/biotools/GDE/newURL.pl $name $url
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the site name
|
||||
|
||||
arg:url
|
||||
argtype:text
|
||||
arglabel:Enter the URL (including http://)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,791 @@
|
|||
1menu:File
|
||||
|
||||
item:test cmask output
|
||||
itemmethod: kedit in1
|
||||
|
||||
in:in1
|
||||
informat:colormask
|
||||
|
||||
item:New sequence <meta N>
|
||||
itemmethod:echo "$Type$Name" > out1
|
||||
itemmeta:n
|
||||
itemhelp:new_sequence.help
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:New Sequence name?
|
||||
argtext:New
|
||||
|
||||
arg:Type
|
||||
argtype:choice_list
|
||||
arglabel:Type?
|
||||
argchoice:DNA/RNA:#
|
||||
argchoice:Amino Acid:%
|
||||
argchoice:Text:\"
|
||||
argchoice:Mask:@
|
||||
|
||||
out:out1
|
||||
outformat:flat
|
||||
|
||||
item:Import Foreign Format
|
||||
itemmethod:cp $INPUTFILE OUTFILE.tmp;readseq OUTFILE.tmp -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:INPUTFILE
|
||||
argtype:text
|
||||
arglabel:Name of foreign file?
|
||||
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:Export Foreign Format
|
||||
itemmethod:readseq INPUTFILE -a -f$FORMAT > $OUTPUTFILE
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:FORMAT
|
||||
argtype:choice_list
|
||||
argchoice:FASTA:8
|
||||
argchoice:NEXUS:17
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:IG/Stanford:1
|
||||
argchoice:GenBank:2
|
||||
argchoice:NBRF:3
|
||||
argchoice:EMBL:4
|
||||
argchoice:GCG:5
|
||||
argchoice:DNA Strider:6
|
||||
argchoice:Fitch:7
|
||||
argchoice:Pearson:8
|
||||
argchoice:Zuker:9
|
||||
argchoice:Olsen:10
|
||||
argchoice:Phylip v3.2:11
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:Plain text:13
|
||||
|
||||
arg:OUTPUTFILE
|
||||
argtype:text
|
||||
arglabel:Save as?
|
||||
|
||||
in:INPUTFILE
|
||||
informat:genbank
|
||||
|
||||
|
||||
item:Save Selection
|
||||
itemmethod: cat $SAVE_FUNC > $Name
|
||||
itemhelp:save_selection.help
|
||||
|
||||
arg:SAVE_FUNC
|
||||
argtype:chooser
|
||||
arglabel:File format
|
||||
argchoice:Flat:in1
|
||||
argchoice:Genbank:in2
|
||||
argchoice:GDE/HGL:in3
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:File name?
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
in:in2
|
||||
informat:genbank
|
||||
|
||||
in:in3
|
||||
informat:gde
|
||||
|
||||
item:Print Selection
|
||||
itemmethod:(PrintStrat in1 $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; /bin/rm -f in1 in1.tmp)&
|
||||
itemhelp:print_alignment.help
|
||||
|
||||
arg:SCALE
|
||||
argtype:slider
|
||||
arglabel:Reduce printout by?
|
||||
argmin:1
|
||||
argmax:20
|
||||
argvalue:1
|
||||
|
||||
arg:CMD
|
||||
argtype:chooser
|
||||
argchoice:Lpr:lpr
|
||||
argchoice:Enscript Gaudy:enscript -G -q
|
||||
argchoice:Enscript Two column:enscript -2rG
|
||||
|
||||
arg:PRINTER
|
||||
argtype:text
|
||||
arglabel:Which printer?
|
||||
argtext:lp
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
menu:Edit
|
||||
|
||||
item:Sort
|
||||
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;/bin/rm -f in1*)&
|
||||
itemhelp:heapsortHGL.help
|
||||
|
||||
arg:PRIM_KEY
|
||||
argtype:choice_list
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Primary sort field?
|
||||
|
||||
arg:SEC_KEY
|
||||
argtype:choice_list
|
||||
argchoice:None:
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Secondary sort field?
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:extract
|
||||
itemmethod:(gde in1;/bin/rm -f in1)&
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
menu:DNA/RNA
|
||||
|
||||
item:Translate...
|
||||
itemmethod:Translate -tbl $TBL -frame $FRAME -min_frame $MNFRM $LTRCODE in1 > out1
|
||||
|
||||
arg:FRAME
|
||||
argtype:chooser
|
||||
arglabel:Which reading frame?
|
||||
argchoice:First:1
|
||||
argchoice:Second:2
|
||||
argchoice:Third:3
|
||||
argchoice:All six:6
|
||||
|
||||
arg:MNFRM
|
||||
arglabel:Minimum length of AA sequence to translate?
|
||||
argtype:slider
|
||||
argmin:0
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
arg:LTRCODE
|
||||
argtype:chooser
|
||||
arglabel:Translate to:
|
||||
argchoice:Single letter codes:
|
||||
argchoice:Triple letter codes:-3
|
||||
|
||||
arg:TBL
|
||||
arglabel:Codon table?
|
||||
argtype:chooser
|
||||
argchoice:universal:1
|
||||
argchoice:mycoplasma:2
|
||||
argchoice:yeast:3
|
||||
argchoice:Vert. mito.:4
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
item:Dot plot
|
||||
itemmethod:(DotPlotTool in1 ; /bin/rm -f in1)&
|
||||
itemhelp:DotPlotTool.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:Clustal alignment
|
||||
itemmethod:(tr '%#' '>'<in1>clus_in;clustalw -quicktree -output=PIR -infile=clus_in -align > in1.rpt;sed "s/>DL;/#/g" < clus_in.pir> in1;$REPORT gde in1;/bin/rm -f clus_in* in1* )&
|
||||
|
||||
itemhelp:clustal_help
|
||||
|
||||
arg:KTUP
|
||||
argtype:slider
|
||||
arglabel:K-tuple size for pairwise search
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:2
|
||||
|
||||
arg:WIN
|
||||
argtype:slider
|
||||
arglabel:Window size
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:4
|
||||
|
||||
arg:Trans
|
||||
argtype:chooser
|
||||
arglabel:Transitions weighted?
|
||||
argchoice:Yes:/TRANSIT
|
||||
argchoice:No:
|
||||
|
||||
arg:FIXED
|
||||
argtype:slider
|
||||
arglabel:Fixed gap penalty
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:FLOAT
|
||||
arglabel:Floating gap penalty
|
||||
argtype:slider
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:REPORT
|
||||
argtype:chooser
|
||||
arglabel:View assembly report?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit in1.rpt&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Variable Positions
|
||||
itemmethod:varpos $REV < in1 > out1
|
||||
|
||||
arg:REV
|
||||
argtype:chooser
|
||||
arglabel:Highlight (darken)
|
||||
argchoice:Conserved positions:
|
||||
argchoice:variable positions:-rev
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Phrap
|
||||
itemmethod:readseq in1 -a -f8 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp; phrap OUTPUTFILE; readseq -a -f2 OUTPUTFILE.contigs > out1;/bin/rm -rf OUTPUT*;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
|
||||
out:out1
|
||||
outformat:genbank
|
||||
|
||||
item:SNAP
|
||||
itemmethod: cat in1 > infile;/usr/local/biotools/GDE/bin/fasta2snap.pl > outfile; /usr/bin/X11/xterm -e /home/tulio/biotools/SNAP/SNAP.pl outfile; kedit backg*; kedit summ*; sheeltool /home/tulio/biotools/codons-xyplot.pl codons.*; kedit codon.data; /bin/rm -rf back* codon* summ*;
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
out:out1
|
||||
outformat:text
|
||||
|
||||
|
||||
|
||||
|
||||
item:Find all <meta-f>
|
||||
itemmethod:findall $SEARCH $PRCNT $CASE $UT -match $MAT -mismatch $MIS < in1 > out1;
|
||||
itemhelp:findall.help
|
||||
itemmeta:f
|
||||
|
||||
arg:SEARCH
|
||||
argtype:text
|
||||
arglabel:Search String
|
||||
|
||||
arg:PRCNT
|
||||
argtype:slider
|
||||
arglabel:Percent mismatch
|
||||
argmin:0
|
||||
argmax:75
|
||||
argvalue:10
|
||||
|
||||
arg:CASE
|
||||
argtype:chooser
|
||||
arglabel:Case
|
||||
argchoice:Upper equals lower:
|
||||
argchoice:Upper not equal lower:-case
|
||||
|
||||
arg:UT
|
||||
argtype:chooser
|
||||
arglabel:U equal T?
|
||||
argchoice:Yes:-u=t
|
||||
argchoice:No:
|
||||
argvalue:0
|
||||
|
||||
arg:MAT
|
||||
arglabel:Match color
|
||||
argtype:choice_list
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:2
|
||||
|
||||
arg:MIS
|
||||
argtype:choice_list
|
||||
arglabel:Mismatch color
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:7
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Sequence Consensus
|
||||
itemmethod:(MakeCons in1 $METHOD $MASK > out1)
|
||||
itemhelp:MakeCons.help
|
||||
|
||||
arg:METHOD
|
||||
arglabel:Method
|
||||
argtype:chooser
|
||||
argchoice:IUPAC:-iupac
|
||||
argchoice:Majority:-majority $PERCENT
|
||||
|
||||
arg:MASK
|
||||
argtype:chooser
|
||||
arglabel:Create a new:
|
||||
argchoice:Sequence:
|
||||
argchoice:Selection Mask: | Consto01mask
|
||||
|
||||
arg:PERCENT
|
||||
arglabel:Minimum Percentage for Majority
|
||||
argtype:slider
|
||||
argmin:50
|
||||
argmax:100
|
||||
argvalue:75
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
|
||||
#Menu for DNA/RNA
|
||||
|
||||
item:blastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/biotools/blast/blastall -p blastn -d $BLASTDBDNA -i in1.f -W $WORDLEN -M $MATCH > in1.tmp; kedit in1.tmp; rm in1*)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV-1 Seq. Db.:/usr/local/biotools/db/DNA/hiv17-08-01.fasta2
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:MATCH
|
||||
argtype:slider
|
||||
arglabel:Match Score
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:5
|
||||
|
||||
arg:MMSCORE
|
||||
argtype:slider
|
||||
arglabel:Mismatch Score
|
||||
argmin:-10
|
||||
argmax:-1
|
||||
argvalue:-5
|
||||
|
||||
item:blastx
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/biotools/blast/blastall -p blastx -d $BLASTDB -i in1.f -W $WORDLEN -M PAM30 > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1*)&
|
||||
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/biotools/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:genpept:$GDE_HELP_DIR/BLAST/genpept
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
item:------------------------
|
||||
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p F -o T; /usr/local/biotools/GDE/bin/installBLASTDB.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: enter the file name
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: enter the name of the DB
|
||||
|
||||
menu:seq. datasets
|
||||
item:tttt
|
||||
itemmethod:readseq /usr/local/biotools/GDE/db/ttttt -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:HIV1POLDNA.fasta
|
||||
itemmethod:readseq /usr/local/biotools/GDE/db/HIV1POLDNA.fasta -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:structure
|
||||
itemmethod:readseq /usr/local/biotools/GDE/db/structprot.fasta -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:-------------
|
||||
item:add a new dataset
|
||||
itemmethod:mkdir db; cp $file db/ ;xterm -e /usr/local/biotools/GDE/newDATASET.pl $name $file
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the dataset name ?
|
||||
|
||||
arg:file
|
||||
argtype:text
|
||||
arglabel:Enter the dataset file (in FASTA) ?
|
||||
|
||||
|
||||
#Menu for Protein
|
||||
menu:protein
|
||||
item:blastp
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/biotools/db/PAM30; /usr/local/biotools/blast/blastall -p blastp -d $BLASTDBPROT -i in1.f -W $WORDLEN -M $Matrix > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1* PAM30)&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBPROT
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/biotools/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:ttttt:/usr/local/biotools/db/tttt
|
||||
argchoice:tytuiphn:/usr/local/biotools/db/yejhuh[9hp
|
||||
argchoice:yyyy:/usr/local/biotools/db/test
|
||||
|
||||
arg:Matrix
|
||||
barglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
item:tblastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/biotools/db/PAM??? .; tblastn $BLASTDB in1.f W=$WORDLEN M=$Matrix C=$CODE > in1.tmp; kedit in1.tmp; rm in1* PAM???)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:genbank:$GDE_HELP_DIR/BLAST/genbank
|
||||
argchoice:genbank update:$GDE_HELP_DIR/BLAST/genupdate
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
|
||||
item:Map View
|
||||
itemmethod:(mapview in1 -pbl $PBL -npp $NPP; /bin/rm -f in1)&
|
||||
itemhelp:mapview.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
arg:PBL
|
||||
arglabel:Pixel Between Lines
|
||||
argtype:slider
|
||||
argvalue:10
|
||||
argmin:1
|
||||
argmax:15
|
||||
|
||||
arg:NPP
|
||||
arglabel:Nucleotides Per Pixel
|
||||
argtype:slider
|
||||
argvalue:1
|
||||
argmin:1
|
||||
argmax:20
|
||||
|
||||
arg:LWIDTH
|
||||
arglabel:Line Thickness
|
||||
argtype:slider
|
||||
argvalue:2
|
||||
argmin:1
|
||||
argmax:5
|
||||
|
||||
item:--------------------------
|
||||
item:Add a new Protein blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p T -o T; /usr/local/biotools/GDE/bin/installBLASTDBPROT.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: Enter the file (in FASTA)
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: Enter the name of the DB
|
||||
|
||||
menu:Phylogeny
|
||||
|
||||
|
||||
item:Phylip help
|
||||
itemmethod:(netscape /usr/local/biotools/phylip/doc/$FILE)&
|
||||
|
||||
arg:FILE
|
||||
argtype:choice_list
|
||||
arglabel:Which program?
|
||||
argchoice:clique:clique.html
|
||||
argchoice:consense:consense.html
|
||||
argchoice:contchar:contchar.html
|
||||
argchoice:contml:contml.html
|
||||
argchoice:contrast:contrast.html
|
||||
argchoice:discrete:discrete.html
|
||||
argchoice:distance:distance.html
|
||||
argchoice:dnaboot:dnaboot.html
|
||||
argchoice:dnacomp:dnacomp.html
|
||||
argchoice:dnadist:dnadist.html
|
||||
argchoice:dnainvar:dnainvar.html
|
||||
argchoice:dnaml:dnaml.html
|
||||
argchoice:dnamlk:dnamlk.html
|
||||
argchoice:dnamove:dnamove.html
|
||||
argchoice:dnapars:dnapars.html
|
||||
argchoice:dnapenny:dnapenny.html
|
||||
argchoice:dollop:dollop.html
|
||||
argchoice:dolmove:dolmove.html
|
||||
argchoice:dolpenny:dolpenny.html
|
||||
argchoice:draw:draw.html
|
||||
argchoice:drawgram:drawgram.html
|
||||
argchoice:drawtree:drawtree.html
|
||||
argchoice:factor:factor.html
|
||||
argchoice:fitch:fitch.html
|
||||
argchoice:gendist:gendist.html
|
||||
argchoice:kitsch:kitsch.html
|
||||
argchoice:main:main.html
|
||||
argchoice:mix:mix.html
|
||||
argchoice:move:move.html
|
||||
argchoice:neighbor:neighbor.html
|
||||
argchoice:penny:penny.html
|
||||
argchoice:protpars:protpars.html
|
||||
argchoice:read.me.general:read.me.general.html
|
||||
argchoice:restml:restml.html
|
||||
argchoice:seqboot:seqboot.html
|
||||
argchoice:sequence:sequence.html
|
||||
|
||||
|
||||
|
||||
item:Phylip 3.5
|
||||
itemmethod:(rm -f outfile ; readseq -a -f12 in1 | sed "s/ YF//1" > infile;$PREEDIT /usr/bin/X11/xterm -e $PROGRAM;kedit outfile; treetool outtree; rm in1 )&
|
||||
|
||||
arg:PROGRAM
|
||||
argtype:choice_list
|
||||
arglabel:Which program to run?
|
||||
argchoice:DNAPARS:dnapars
|
||||
argchoice:DNABOOT:dnaboot
|
||||
argchoice:DNAPENNY:dnapenny
|
||||
argchoice:DNAML:dnaml
|
||||
argchoice:DNAMLK:dnamlk
|
||||
argchoice:DNACOMP:dnacomp
|
||||
argchoice:DNAMOVE:dnamove
|
||||
argchoice:DNAINVAR:dnainvar
|
||||
argchoice:PROTPARS:protpars
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
item:Phylip DNA Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 | sed "s/ YF//1" > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e dnadist;mv -f outfile infile; cp infile $DNA; /usr/bin/X11/xterm -e neighbor; cp outtree intree; cp outfile $NEI; $PROGRAM kedit outfile; cp outtree $TREE; treetool outtree; /bin/rm -f in1 infile outfile intree outtree)&
|
||||
|
||||
arg:EXPLAIN
|
||||
argtype:text
|
||||
arglabel:To produce a bootstraped tree choose DNADIST+NEIGHOR+CONSENSE
|
||||
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:DNADIST+NEIGHBOR:
|
||||
argchoice:DNADIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Run ?
|
||||
argtype:chooser
|
||||
argchoice:Run without Bootstrap:
|
||||
argchoice:Run with Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
|
||||
arg:DNA
|
||||
argtype:text
|
||||
arglabel:Name of DNADIST outfile?
|
||||
|
||||
arg:NEI
|
||||
argtype:text
|
||||
arglabel:Name of NEIGHBOR outfile?
|
||||
|
||||
arg:TREE
|
||||
argtype:text
|
||||
arglabel:Name of TREEFILE ?
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
item:Phylip PROTEIN Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e protdist;mv -f outfile infile; /usr/bin/X11/xterm -e neighbor; cp outtree intree; $PROGRAM kedit outfile;treetool outtree;/bin/rm -f in1 infile outfile)&
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:PROTDIST+NEIGHBOR:
|
||||
argchoice:PROTDIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
argchoice:No Bootstrap:
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
menu:On-Line Res.
|
||||
item:tytyt
|
||||
itemmethod:netscape hnu[phoph &
|
||||
item:SANBI
|
||||
itemmethod:netscape again &
|
||||
item:PlasmoDB
|
||||
itemmethod:netscape http://www.plasmodb.org &
|
||||
item:NCBI
|
||||
itemmethod:netscape http://www.ncbi.nlm.nih.gov &
|
||||
item:sanbi
|
||||
itemmethod:netscape http://www.sanbi.ac.za &
|
||||
item:SANBI
|
||||
itemmethod:netscape http://www.sanbi.ac.za &
|
||||
|
||||
item:GDE for Linux resources at Bioafrica.net
|
||||
itemmethod:netscape http://www.bioafrica.net &
|
||||
|
||||
item:-------------------------
|
||||
item:add a new website
|
||||
itemmethod:xterm -e /usr/local/biotools/GDE/newURL.pl $name $url
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the site name
|
||||
|
||||
arg:url
|
||||
argtype:text
|
||||
arglabel:Enter the URL (including http://)
|
|
@ -0,0 +1,761 @@
|
|||
1menu:File
|
||||
|
||||
item:test cmask output
|
||||
itemmethod: kedit in1
|
||||
|
||||
in:in1
|
||||
informat:colormask
|
||||
|
||||
item:New sequence <meta N>
|
||||
itemmethod:echo "$Type$Name" > out1
|
||||
itemmeta:n
|
||||
itemhelp:new_sequence.help
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:New Sequence name?
|
||||
argtext:New
|
||||
|
||||
arg:Type
|
||||
argtype:choice_list
|
||||
arglabel:Type?
|
||||
argchoice:DNA/RNA:#
|
||||
argchoice:Amino Acid:%
|
||||
argchoice:Text:\"
|
||||
argchoice:Mask:@
|
||||
|
||||
out:out1
|
||||
outformat:flat
|
||||
|
||||
item:Import Foreign Format
|
||||
itemmethod:cp $INPUTFILE OUTFILE.tmp;readseq OUTFILE.tmp -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:INPUTFILE
|
||||
argtype:text
|
||||
arglabel:Name of foreign file?
|
||||
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:Export Foreign Format
|
||||
itemmethod:readseq INPUTFILE -a -f$FORMAT > $OUTPUTFILE
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:FORMAT
|
||||
argtype:choice_list
|
||||
argchoice:FASTA:8
|
||||
argchoice:NEXUS:17
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:IG/Stanford:1
|
||||
argchoice:GenBank:2
|
||||
argchoice:NBRF:3
|
||||
argchoice:EMBL:4
|
||||
argchoice:GCG:5
|
||||
argchoice:DNA Strider:6
|
||||
argchoice:Fitch:7
|
||||
argchoice:Pearson:8
|
||||
argchoice:Zuker:9
|
||||
argchoice:Olsen:10
|
||||
argchoice:Phylip v3.2:11
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:Plain text:13
|
||||
|
||||
arg:OUTPUTFILE
|
||||
argtype:text
|
||||
arglabel:Save as?
|
||||
|
||||
in:INPUTFILE
|
||||
informat:genbank
|
||||
|
||||
|
||||
item:Save Selection
|
||||
itemmethod: cat $SAVE_FUNC > $Name
|
||||
itemhelp:save_selection.help
|
||||
|
||||
arg:SAVE_FUNC
|
||||
argtype:chooser
|
||||
arglabel:File format
|
||||
argchoice:Flat:in1
|
||||
argchoice:Genbank:in2
|
||||
argchoice:GDE/HGL:in3
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:File name?
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
in:in2
|
||||
informat:genbank
|
||||
|
||||
in:in3
|
||||
informat:gde
|
||||
|
||||
item:Print Selection
|
||||
itemmethod:(PrintStrat in1 $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; /bin/rm -f in1 in1.tmp)&
|
||||
itemhelp:print_alignment.help
|
||||
|
||||
arg:SCALE
|
||||
argtype:slider
|
||||
arglabel:Reduce printout by?
|
||||
argmin:1
|
||||
argmax:20
|
||||
argvalue:1
|
||||
|
||||
arg:CMD
|
||||
argtype:chooser
|
||||
argchoice:Lpr:lpr
|
||||
argchoice:Enscript Gaudy:enscript -G -q
|
||||
argchoice:Enscript Two column:enscript -2rG
|
||||
|
||||
arg:PRINTER
|
||||
argtype:text
|
||||
arglabel:Which printer?
|
||||
argtext:lp
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
menu:Edit
|
||||
|
||||
item:Sort
|
||||
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;/bin/rm -f in1*)&
|
||||
itemhelp:heapsortHGL.help
|
||||
|
||||
arg:PRIM_KEY
|
||||
argtype:choice_list
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Primary sort field?
|
||||
|
||||
arg:SEC_KEY
|
||||
argtype:choice_list
|
||||
argchoice:None:
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Secondary sort field?
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:extract
|
||||
itemmethod:(gde in1;/bin/rm -f in1)&
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
menu:DNA/RNA
|
||||
|
||||
item:Translate...
|
||||
itemmethod:Translate -tbl $TBL -frame $FRAME -min_frame $MNFRM $LTRCODE in1 > out1
|
||||
|
||||
arg:FRAME
|
||||
argtype:chooser
|
||||
arglabel:Which reading frame?
|
||||
argchoice:First:1
|
||||
argchoice:Second:2
|
||||
argchoice:Third:3
|
||||
argchoice:All six:6
|
||||
|
||||
arg:MNFRM
|
||||
arglabel:Minimum length of AA sequence to translate?
|
||||
argtype:slider
|
||||
argmin:0
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
arg:LTRCODE
|
||||
argtype:chooser
|
||||
arglabel:Translate to:
|
||||
argchoice:Single letter codes:
|
||||
argchoice:Triple letter codes:-3
|
||||
|
||||
arg:TBL
|
||||
arglabel:Codon table?
|
||||
argtype:chooser
|
||||
argchoice:universal:1
|
||||
argchoice:mycoplasma:2
|
||||
argchoice:yeast:3
|
||||
argchoice:Vert. mito.:4
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
item:Dot plot
|
||||
itemmethod:(DotPlotTool in1 ; /bin/rm -f in1)&
|
||||
itemhelp:DotPlotTool.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:Clustal alignment
|
||||
itemmethod:(tr '%#' '>'<in1>clus_in;clustalw -quicktree -output=PIR -infile=clus_in -align > in1.rpt;sed "s/>DL;/#/g" < clus_in.pir> in1;$REPORT gde in1;/bin/rm -f clus_in* in1* )&
|
||||
|
||||
itemhelp:clustal_help
|
||||
|
||||
arg:KTUP
|
||||
argtype:slider
|
||||
arglabel:K-tuple size for pairwise search
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:2
|
||||
|
||||
arg:WIN
|
||||
argtype:slider
|
||||
arglabel:Window size
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:4
|
||||
|
||||
arg:Trans
|
||||
argtype:chooser
|
||||
arglabel:Transitions weighted?
|
||||
argchoice:Yes:/TRANSIT
|
||||
argchoice:No:
|
||||
|
||||
arg:FIXED
|
||||
argtype:slider
|
||||
arglabel:Fixed gap penalty
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:FLOAT
|
||||
arglabel:Floating gap penalty
|
||||
argtype:slider
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:REPORT
|
||||
argtype:chooser
|
||||
arglabel:View assembly report?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit in1.rpt&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Variable Positions
|
||||
itemmethod:varpos $REV < in1 > out1
|
||||
|
||||
arg:REV
|
||||
argtype:chooser
|
||||
arglabel:Highlight (darken)
|
||||
argchoice:Conserved positions:
|
||||
argchoice:variable positions:-rev
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Phrap
|
||||
itemmethod:readseq in1 -a -f8 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp; phrap OUTPUTFILE; readseq -a -f2 OUTPUTFILE.contigs > out1;/bin/rm -rf OUTPUT*;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
|
||||
out:out1
|
||||
outformat:genbank
|
||||
|
||||
item:SNAP
|
||||
itemmethod: cat in1 > infile;/usr/local/bio/GDE/bin/fasta2snap.pl > outfile; /usr/bin/X11/xterm -e /home/tulio/bio/SNAP/SNAP.pl outfile; kedit backg*; kedit summ*; sheeltool /home/tulio/bio/codons-xyplot.pl codons.*; kedit codon.data; /bin/rm -rf back* codon* summ*;
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
out:out1
|
||||
outformat:text
|
||||
|
||||
|
||||
|
||||
|
||||
item:Find all <meta-f>
|
||||
itemmethod:findall $SEARCH $PRCNT $CASE $UT -match $MAT -mismatch $MIS < in1 > out1;
|
||||
itemhelp:findall.help
|
||||
itemmeta:f
|
||||
|
||||
arg:SEARCH
|
||||
argtype:text
|
||||
arglabel:Search String
|
||||
|
||||
arg:PRCNT
|
||||
argtype:slider
|
||||
arglabel:Percent mismatch
|
||||
argmin:0
|
||||
argmax:75
|
||||
argvalue:10
|
||||
|
||||
arg:CASE
|
||||
argtype:chooser
|
||||
arglabel:Case
|
||||
argchoice:Upper equals lower:
|
||||
argchoice:Upper not equal lower:-case
|
||||
|
||||
arg:UT
|
||||
argtype:chooser
|
||||
arglabel:U equal T?
|
||||
argchoice:Yes:-u=t
|
||||
argchoice:No:
|
||||
argvalue:0
|
||||
|
||||
arg:MAT
|
||||
arglabel:Match color
|
||||
argtype:choice_list
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:2
|
||||
|
||||
arg:MIS
|
||||
argtype:choice_list
|
||||
arglabel:Mismatch color
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:7
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Sequence Consensus
|
||||
itemmethod:(MakeCons in1 $METHOD $MASK > out1)
|
||||
itemhelp:MakeCons.help
|
||||
|
||||
arg:METHOD
|
||||
arglabel:Method
|
||||
argtype:chooser
|
||||
argchoice:IUPAC:-iupac
|
||||
argchoice:Majority:-majority $PERCENT
|
||||
|
||||
arg:MASK
|
||||
argtype:chooser
|
||||
arglabel:Create a new:
|
||||
argchoice:Sequence:
|
||||
argchoice:Selection Mask: | Consto01mask
|
||||
|
||||
arg:PERCENT
|
||||
arglabel:Minimum Percentage for Majority
|
||||
argtype:slider
|
||||
argmin:50
|
||||
argmax:100
|
||||
argvalue:75
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
|
||||
#Menu for DNA/RNA
|
||||
|
||||
item:blastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastn -d $BLASTDBDNA -i in1.f -W $WORDLEN -M $MATCH > in1.tmp; kedit in1.tmp; rm in1*)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV-1 Seq. Db.:/usr/local/bio/db/DNA/hiv17-08-01.fasta2
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:MATCH
|
||||
argtype:slider
|
||||
arglabel:Match Score
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:5
|
||||
|
||||
arg:MMSCORE
|
||||
argtype:slider
|
||||
arglabel:Mismatch Score
|
||||
argmin:-10
|
||||
argmax:-1
|
||||
argvalue:-5
|
||||
|
||||
item:blastx
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastx -d $BLASTDB -i in1.f -W $WORDLEN -M PAM30 > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1*)&
|
||||
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:genpept:$GDE_HELP_DIR/BLAST/genpept
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
item:------------------------
|
||||
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p F -o T; /usr/local/bio/GDE/installBLASTDB.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: enter the file name
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: enter the name of the DB
|
||||
|
||||
menu:seq. datasets
|
||||
|
||||
item:-------------
|
||||
item:add a new dataset
|
||||
itemmethod:cp $file /usr/local/biotools/GDE/db/ ;xterm -e /usr/local/biotools/GDE/newDATASET.pl $name $file
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the dataset name ?
|
||||
|
||||
arg:file
|
||||
argtype:text
|
||||
arglabel:Enter the dataset file (in FASTA) ?
|
||||
|
||||
|
||||
#Menu for Protein
|
||||
menu:protein
|
||||
item:blastp
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM30; /usr/local/bio/blast/blastall -p blastp -d $BLASTDB -i in1.f -W $WORDLEN -M $Matrix > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1* PAM30)&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
|
||||
arg:Matrix
|
||||
barglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
item:tblastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM??? .; tblastn $BLASTDB in1.f W=$WORDLEN M=$Matrix C=$CODE > in1.tmp; kedit in1.tmp; rm in1* PAM???)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:genbank:$GDE_HELP_DIR/BLAST/genbank
|
||||
argchoice:genbank update:$GDE_HELP_DIR/BLAST/genupdate
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
|
||||
item:Map View
|
||||
itemmethod:(mapview in1 -pbl $PBL -npp $NPP; /bin/rm -f in1)&
|
||||
itemhelp:mapview.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
arg:PBL
|
||||
arglabel:Pixel Between Lines
|
||||
argtype:slider
|
||||
argvalue:10
|
||||
argmin:1
|
||||
argmax:15
|
||||
|
||||
arg:NPP
|
||||
arglabel:Nucleotides Per Pixel
|
||||
argtype:slider
|
||||
argvalue:1
|
||||
argmin:1
|
||||
argmax:20
|
||||
|
||||
arg:LWIDTH
|
||||
arglabel:Line Thickness
|
||||
argtype:slider
|
||||
argvalue:2
|
||||
argmin:1
|
||||
argmax:5
|
||||
|
||||
item:--------------------------
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p T -o T; /usr/local/bio/GDE/installBLASTDBPROT.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: Enter the file (in FASTA)
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: Enter the name of the DB
|
||||
|
||||
menu:Phylogeny
|
||||
|
||||
|
||||
item:Phylip help
|
||||
itemmethod:(netscape /usr/local/bio/phylip/doc/$FILE)&
|
||||
|
||||
arg:FILE
|
||||
argtype:choice_list
|
||||
arglabel:Which program?
|
||||
argchoice:clique:clique.html
|
||||
argchoice:consense:consense.html
|
||||
argchoice:contchar:contchar.html
|
||||
argchoice:contml:contml.html
|
||||
argchoice:contrast:contrast.html
|
||||
argchoice:discrete:discrete.html
|
||||
argchoice:distance:distance.html
|
||||
argchoice:dnaboot:dnaboot.html
|
||||
argchoice:dnacomp:dnacomp.html
|
||||
argchoice:dnadist:dnadist.html
|
||||
argchoice:dnainvar:dnainvar.html
|
||||
argchoice:dnaml:dnaml.html
|
||||
argchoice:dnamlk:dnamlk.html
|
||||
argchoice:dnamove:dnamove.html
|
||||
argchoice:dnapars:dnapars.html
|
||||
argchoice:dnapenny:dnapenny.html
|
||||
argchoice:dollop:dollop.html
|
||||
argchoice:dolmove:dolmove.html
|
||||
argchoice:dolpenny:dolpenny.html
|
||||
argchoice:draw:draw.html
|
||||
argchoice:drawgram:drawgram.html
|
||||
argchoice:drawtree:drawtree.html
|
||||
argchoice:factor:factor.html
|
||||
argchoice:fitch:fitch.html
|
||||
argchoice:gendist:gendist.html
|
||||
argchoice:kitsch:kitsch.html
|
||||
argchoice:main:main.html
|
||||
argchoice:mix:mix.html
|
||||
argchoice:move:move.html
|
||||
argchoice:neighbor:neighbor.html
|
||||
argchoice:penny:penny.html
|
||||
argchoice:protpars:protpars.html
|
||||
argchoice:read.me.general:read.me.general.html
|
||||
argchoice:restml:restml.html
|
||||
argchoice:seqboot:seqboot.html
|
||||
argchoice:sequence:sequence.html
|
||||
|
||||
|
||||
|
||||
item:Phylip 3.5
|
||||
itemmethod:(rm -f outfile ; readseq -a -f12 in1 | sed "s/ YF//1" > infile;$PREEDIT /usr/bin/X11/xterm -e $PROGRAM;kedit outfile; treetool outtree; rm in1 )&
|
||||
|
||||
arg:PROGRAM
|
||||
argtype:choice_list
|
||||
arglabel:Which program to run?
|
||||
argchoice:DNAPARS:dnapars
|
||||
argchoice:DNABOOT:dnaboot
|
||||
argchoice:DNAPENNY:dnapenny
|
||||
argchoice:DNAML:dnaml
|
||||
argchoice:DNAMLK:dnamlk
|
||||
argchoice:DNACOMP:dnacomp
|
||||
argchoice:DNAMOVE:dnamove
|
||||
argchoice:DNAINVAR:dnainvar
|
||||
argchoice:PROTPARS:protpars
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
item:Phylip DNA Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 | sed "s/ YF//1" > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e dnadist;mv -f outfile infile; cp infile $DNA; /usr/bin/X11/xterm -e neighbor; cp outtree intree; cp outfile $NEI; $PROGRAM kedit outfile; cp outtree $TREE; treetool outtree; /bin/rm -f in1 infile outfile intree outtree)&
|
||||
|
||||
arg:EXPLAIN
|
||||
argtype:text
|
||||
arglabel:To produce a bootstraped tree choose DNADIST+NEIGHOR+CONSENSE
|
||||
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:DNADIST+NEIGHBOR:
|
||||
argchoice:DNADIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Run ?
|
||||
argtype:chooser
|
||||
argchoice:Run without Bootstrap:
|
||||
argchoice:Run with Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
|
||||
arg:DNA
|
||||
argtype:text
|
||||
arglabel:Name of DNADIST outfile?
|
||||
|
||||
arg:NEI
|
||||
argtype:text
|
||||
arglabel:Name of NEIGHBOR outfile?
|
||||
|
||||
arg:TREE
|
||||
argtype:text
|
||||
arglabel:Name of TREEFILE ?
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
item:Phylip PROTEIN Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e protdist;mv -f outfile infile; /usr/bin/X11/xterm -e neighbor; cp outtree intree; $PROGRAM kedit outfile;treetool outtree;/bin/rm -f in1 infile outfile)&
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:PROTDIST+NEIGHBOR:
|
||||
argchoice:PROTDIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
argchoice:No Bootstrap:
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
menu:On-Line Res.
|
||||
|
||||
item:GDE for Linux resources at Bioafrica.net
|
||||
itemmethod:netscape http://www.bioafrica.net &
|
||||
|
||||
item:-------------------------
|
||||
item:add a new website
|
||||
itemmethod:xterm -e /usr/local/biotools/GDE/newURL.pl $name $url
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the site name
|
||||
|
||||
arg:url
|
||||
argtype:text
|
||||
arglabel:Enter the URL (including http://)
|
|
@ -0,0 +1,761 @@
|
|||
1menu:File
|
||||
|
||||
item:test cmask output
|
||||
itemmethod: kedit in1
|
||||
|
||||
in:in1
|
||||
informat:colormask
|
||||
|
||||
item:New sequence <meta N>
|
||||
itemmethod:echo "$Type$Name" > out1
|
||||
itemmeta:n
|
||||
itemhelp:new_sequence.help
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:New Sequence name?
|
||||
argtext:New
|
||||
|
||||
arg:Type
|
||||
argtype:choice_list
|
||||
arglabel:Type?
|
||||
argchoice:DNA/RNA:#
|
||||
argchoice:Amino Acid:%
|
||||
argchoice:Text:\"
|
||||
argchoice:Mask:@
|
||||
|
||||
out:out1
|
||||
outformat:flat
|
||||
|
||||
item:Import Foreign Format
|
||||
itemmethod:cp $INPUTFILE OUTFILE.tmp;readseq OUTFILE.tmp -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:INPUTFILE
|
||||
argtype:text
|
||||
arglabel:Name of foreign file?
|
||||
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:Export Foreign Format
|
||||
itemmethod:readseq INPUTFILE -a -f$FORMAT > $OUTPUTFILE
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:FORMAT
|
||||
argtype:choice_list
|
||||
argchoice:FASTA:8
|
||||
argchoice:NEXUS:17
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:IG/Stanford:1
|
||||
argchoice:GenBank:2
|
||||
argchoice:NBRF:3
|
||||
argchoice:EMBL:4
|
||||
argchoice:GCG:5
|
||||
argchoice:DNA Strider:6
|
||||
argchoice:Fitch:7
|
||||
argchoice:Pearson:8
|
||||
argchoice:Zuker:9
|
||||
argchoice:Olsen:10
|
||||
argchoice:Phylip v3.2:11
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:Plain text:13
|
||||
|
||||
arg:OUTPUTFILE
|
||||
argtype:text
|
||||
arglabel:Save as?
|
||||
|
||||
in:INPUTFILE
|
||||
informat:genbank
|
||||
|
||||
|
||||
item:Save Selection
|
||||
itemmethod: cat $SAVE_FUNC > $Name
|
||||
itemhelp:save_selection.help
|
||||
|
||||
arg:SAVE_FUNC
|
||||
argtype:chooser
|
||||
arglabel:File format
|
||||
argchoice:Flat:in1
|
||||
argchoice:Genbank:in2
|
||||
argchoice:GDE/HGL:in3
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:File name?
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
in:in2
|
||||
informat:genbank
|
||||
|
||||
in:in3
|
||||
informat:gde
|
||||
|
||||
item:Print Selection
|
||||
itemmethod:(PrintStrat in1 $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; /bin/rm -f in1 in1.tmp)&
|
||||
itemhelp:print_alignment.help
|
||||
|
||||
arg:SCALE
|
||||
argtype:slider
|
||||
arglabel:Reduce printout by?
|
||||
argmin:1
|
||||
argmax:20
|
||||
argvalue:1
|
||||
|
||||
arg:CMD
|
||||
argtype:chooser
|
||||
argchoice:Lpr:lpr
|
||||
argchoice:Enscript Gaudy:enscript -G -q
|
||||
argchoice:Enscript Two column:enscript -2rG
|
||||
|
||||
arg:PRINTER
|
||||
argtype:text
|
||||
arglabel:Which printer?
|
||||
argtext:lp
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
menu:Edit
|
||||
|
||||
item:Sort
|
||||
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;/bin/rm -f in1*)&
|
||||
itemhelp:heapsortHGL.help
|
||||
|
||||
arg:PRIM_KEY
|
||||
argtype:choice_list
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Primary sort field?
|
||||
|
||||
arg:SEC_KEY
|
||||
argtype:choice_list
|
||||
argchoice:None:
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Secondary sort field?
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:extract
|
||||
itemmethod:(gde in1;/bin/rm -f in1)&
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
menu:DNA/RNA
|
||||
|
||||
item:Translate...
|
||||
itemmethod:Translate -tbl $TBL -frame $FRAME -min_frame $MNFRM $LTRCODE in1 > out1
|
||||
|
||||
arg:FRAME
|
||||
argtype:chooser
|
||||
arglabel:Which reading frame?
|
||||
argchoice:First:1
|
||||
argchoice:Second:2
|
||||
argchoice:Third:3
|
||||
argchoice:All six:6
|
||||
|
||||
arg:MNFRM
|
||||
arglabel:Minimum length of AA sequence to translate?
|
||||
argtype:slider
|
||||
argmin:0
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
arg:LTRCODE
|
||||
argtype:chooser
|
||||
arglabel:Translate to:
|
||||
argchoice:Single letter codes:
|
||||
argchoice:Triple letter codes:-3
|
||||
|
||||
arg:TBL
|
||||
arglabel:Codon table?
|
||||
argtype:chooser
|
||||
argchoice:universal:1
|
||||
argchoice:mycoplasma:2
|
||||
argchoice:yeast:3
|
||||
argchoice:Vert. mito.:4
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
item:Dot plot
|
||||
itemmethod:(DotPlotTool in1 ; /bin/rm -f in1)&
|
||||
itemhelp:DotPlotTool.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:Clustal alignment
|
||||
itemmethod:(tr '%#' '>'<in1>clus_in;clustalw -quicktree -output=PIR -infile=clus_in -align > in1.rpt;sed "s/>DL;/#/g" < clus_in.pir> in1;$REPORT gde in1;/bin/rm -f clus_in* in1* )&
|
||||
|
||||
itemhelp:clustal_help
|
||||
|
||||
arg:KTUP
|
||||
argtype:slider
|
||||
arglabel:K-tuple size for pairwise search
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:2
|
||||
|
||||
arg:WIN
|
||||
argtype:slider
|
||||
arglabel:Window size
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:4
|
||||
|
||||
arg:Trans
|
||||
argtype:chooser
|
||||
arglabel:Transitions weighted?
|
||||
argchoice:Yes:/TRANSIT
|
||||
argchoice:No:
|
||||
|
||||
arg:FIXED
|
||||
argtype:slider
|
||||
arglabel:Fixed gap penalty
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:FLOAT
|
||||
arglabel:Floating gap penalty
|
||||
argtype:slider
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:REPORT
|
||||
argtype:chooser
|
||||
arglabel:View assembly report?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit in1.rpt&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Variable Positions
|
||||
itemmethod:varpos $REV < in1 > out1
|
||||
|
||||
arg:REV
|
||||
argtype:chooser
|
||||
arglabel:Highlight (darken)
|
||||
argchoice:Conserved positions:
|
||||
argchoice:variable positions:-rev
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Phrap
|
||||
itemmethod:readseq in1 -a -f8 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp; phrap OUTPUTFILE; readseq -a -f2 OUTPUTFILE.contigs > out1;/bin/rm -rf OUTPUT*;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
|
||||
out:out1
|
||||
outformat:genbank
|
||||
|
||||
item:SNAP
|
||||
itemmethod: cat in1 > infile;/usr/local/bio/GDE/bin/fasta2snap.pl > outfile; /usr/bin/X11/xterm -e /home/tulio/bio/SNAP/SNAP.pl outfile; kedit backg*; kedit summ*; sheeltool /home/tulio/bio/codons-xyplot.pl codons.*; kedit codon.data; /bin/rm -rf back* codon* summ*;
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
out:out1
|
||||
outformat:text
|
||||
|
||||
|
||||
|
||||
|
||||
item:Find all <meta-f>
|
||||
itemmethod:findall $SEARCH $PRCNT $CASE $UT -match $MAT -mismatch $MIS < in1 > out1;
|
||||
itemhelp:findall.help
|
||||
itemmeta:f
|
||||
|
||||
arg:SEARCH
|
||||
argtype:text
|
||||
arglabel:Search String
|
||||
|
||||
arg:PRCNT
|
||||
argtype:slider
|
||||
arglabel:Percent mismatch
|
||||
argmin:0
|
||||
argmax:75
|
||||
argvalue:10
|
||||
|
||||
arg:CASE
|
||||
argtype:chooser
|
||||
arglabel:Case
|
||||
argchoice:Upper equals lower:
|
||||
argchoice:Upper not equal lower:-case
|
||||
|
||||
arg:UT
|
||||
argtype:chooser
|
||||
arglabel:U equal T?
|
||||
argchoice:Yes:-u=t
|
||||
argchoice:No:
|
||||
argvalue:0
|
||||
|
||||
arg:MAT
|
||||
arglabel:Match color
|
||||
argtype:choice_list
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:2
|
||||
|
||||
arg:MIS
|
||||
argtype:choice_list
|
||||
arglabel:Mismatch color
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:7
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Sequence Consensus
|
||||
itemmethod:(MakeCons in1 $METHOD $MASK > out1)
|
||||
itemhelp:MakeCons.help
|
||||
|
||||
arg:METHOD
|
||||
arglabel:Method
|
||||
argtype:chooser
|
||||
argchoice:IUPAC:-iupac
|
||||
argchoice:Majority:-majority $PERCENT
|
||||
|
||||
arg:MASK
|
||||
argtype:chooser
|
||||
arglabel:Create a new:
|
||||
argchoice:Sequence:
|
||||
argchoice:Selection Mask: | Consto01mask
|
||||
|
||||
arg:PERCENT
|
||||
arglabel:Minimum Percentage for Majority
|
||||
argtype:slider
|
||||
argmin:50
|
||||
argmax:100
|
||||
argvalue:75
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
|
||||
#Menu for DNA/RNA
|
||||
|
||||
item:blastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastn -d $BLASTDBDNA -i in1.f -W $WORDLEN -M $MATCH > in1.tmp; kedit in1.tmp; rm in1*)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV-1 Seq. Db.:/usr/local/bio/db/DNA/hiv17-08-01.fasta2
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:MATCH
|
||||
argtype:slider
|
||||
arglabel:Match Score
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:5
|
||||
|
||||
arg:MMSCORE
|
||||
argtype:slider
|
||||
arglabel:Mismatch Score
|
||||
argmin:-10
|
||||
argmax:-1
|
||||
argvalue:-5
|
||||
|
||||
item:blastx
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/bio/blast/blastall -p blastx -d $BLASTDB -i in1.f -W $WORDLEN -M PAM30 > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1*)&
|
||||
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:genpept:$GDE_HELP_DIR/BLAST/genpept
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
item:------------------------
|
||||
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p F -o T; /usr/local/bio/GDE/installBLASTDB.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: enter the file name
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: enter the name of the DB
|
||||
|
||||
menu:seq. datasets
|
||||
|
||||
item:-------------
|
||||
item:add a new dataset
|
||||
itemmethod:cp $file /usr/local/bio/GDE/db/ ;xterm -e /usr/local/bio/GDE/newDATASET.pl $name $file
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the dataset name ?
|
||||
|
||||
arg:file
|
||||
argtype:text
|
||||
arglabel:Enter the dataset file (in FASTA) ?
|
||||
|
||||
|
||||
#Menu for Protein
|
||||
menu:protein
|
||||
item:blastp
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM30; /usr/local/bio/blast/blastall -p blastp -d $BLASTDB -i in1.f -W $WORDLEN -M $Matrix > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1* PAM30)&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/bio/db/hiv17-08-01.PROT.fasta
|
||||
|
||||
arg:Matrix
|
||||
barglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
item:tblastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/bio/db/PAM??? .; tblastn $BLASTDB in1.f W=$WORDLEN M=$Matrix C=$CODE > in1.tmp; kedit in1.tmp; rm in1* PAM???)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:genbank:$GDE_HELP_DIR/BLAST/genbank
|
||||
argchoice:genbank update:$GDE_HELP_DIR/BLAST/genupdate
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
|
||||
item:Map View
|
||||
itemmethod:(mapview in1 -pbl $PBL -npp $NPP; /bin/rm -f in1)&
|
||||
itemhelp:mapview.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
arg:PBL
|
||||
arglabel:Pixel Between Lines
|
||||
argtype:slider
|
||||
argvalue:10
|
||||
argmin:1
|
||||
argmax:15
|
||||
|
||||
arg:NPP
|
||||
arglabel:Nucleotides Per Pixel
|
||||
argtype:slider
|
||||
argvalue:1
|
||||
argmin:1
|
||||
argmax:20
|
||||
|
||||
arg:LWIDTH
|
||||
arglabel:Line Thickness
|
||||
argtype:slider
|
||||
argvalue:2
|
||||
argmin:1
|
||||
argmax:5
|
||||
|
||||
item:--------------------------
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p T -o T; /usr/local/bio/GDE/installBLASTDBPROT.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: Enter the file (in FASTA)
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: Enter the name of the DB
|
||||
|
||||
menu:Phylogeny
|
||||
|
||||
|
||||
item:Phylip help
|
||||
itemmethod:(netscape /usr/local/bio/phylip/doc/$FILE)&
|
||||
|
||||
arg:FILE
|
||||
argtype:choice_list
|
||||
arglabel:Which program?
|
||||
argchoice:clique:clique.html
|
||||
argchoice:consense:consense.html
|
||||
argchoice:contchar:contchar.html
|
||||
argchoice:contml:contml.html
|
||||
argchoice:contrast:contrast.html
|
||||
argchoice:discrete:discrete.html
|
||||
argchoice:distance:distance.html
|
||||
argchoice:dnaboot:dnaboot.html
|
||||
argchoice:dnacomp:dnacomp.html
|
||||
argchoice:dnadist:dnadist.html
|
||||
argchoice:dnainvar:dnainvar.html
|
||||
argchoice:dnaml:dnaml.html
|
||||
argchoice:dnamlk:dnamlk.html
|
||||
argchoice:dnamove:dnamove.html
|
||||
argchoice:dnapars:dnapars.html
|
||||
argchoice:dnapenny:dnapenny.html
|
||||
argchoice:dollop:dollop.html
|
||||
argchoice:dolmove:dolmove.html
|
||||
argchoice:dolpenny:dolpenny.html
|
||||
argchoice:draw:draw.html
|
||||
argchoice:drawgram:drawgram.html
|
||||
argchoice:drawtree:drawtree.html
|
||||
argchoice:factor:factor.html
|
||||
argchoice:fitch:fitch.html
|
||||
argchoice:gendist:gendist.html
|
||||
argchoice:kitsch:kitsch.html
|
||||
argchoice:main:main.html
|
||||
argchoice:mix:mix.html
|
||||
argchoice:move:move.html
|
||||
argchoice:neighbor:neighbor.html
|
||||
argchoice:penny:penny.html
|
||||
argchoice:protpars:protpars.html
|
||||
argchoice:read.me.general:read.me.general.html
|
||||
argchoice:restml:restml.html
|
||||
argchoice:seqboot:seqboot.html
|
||||
argchoice:sequence:sequence.html
|
||||
|
||||
|
||||
|
||||
item:Phylip 3.5
|
||||
itemmethod:(rm -f outfile ; readseq -a -f12 in1 | sed "s/ YF//1" > infile;$PREEDIT /usr/bin/X11/xterm -e $PROGRAM;kedit outfile; treetool outtree; rm in1 )&
|
||||
|
||||
arg:PROGRAM
|
||||
argtype:choice_list
|
||||
arglabel:Which program to run?
|
||||
argchoice:DNAPARS:dnapars
|
||||
argchoice:DNABOOT:dnaboot
|
||||
argchoice:DNAPENNY:dnapenny
|
||||
argchoice:DNAML:dnaml
|
||||
argchoice:DNAMLK:dnamlk
|
||||
argchoice:DNACOMP:dnacomp
|
||||
argchoice:DNAMOVE:dnamove
|
||||
argchoice:DNAINVAR:dnainvar
|
||||
argchoice:PROTPARS:protpars
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
item:Phylip DNA Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 | sed "s/ YF//1" > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e dnadist;mv -f outfile infile; cp infile $DNA; /usr/bin/X11/xterm -e neighbor; cp outtree intree; cp outfile $NEI; $PROGRAM kedit outfile; cp outtree $TREE; treetool outtree; /bin/rm -f in1 infile outfile intree outtree)&
|
||||
|
||||
arg:EXPLAIN
|
||||
argtype:text
|
||||
arglabel:To produce a bootstraped tree choose DNADIST+NEIGHOR+CONSENSE
|
||||
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:DNADIST+NEIGHBOR:
|
||||
argchoice:DNADIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Run ?
|
||||
argtype:chooser
|
||||
argchoice:Run without Bootstrap:
|
||||
argchoice:Run with Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
|
||||
arg:DNA
|
||||
argtype:text
|
||||
arglabel:Name of DNADIST outfile?
|
||||
|
||||
arg:NEI
|
||||
argtype:text
|
||||
arglabel:Name of NEIGHBOR outfile?
|
||||
|
||||
arg:TREE
|
||||
argtype:text
|
||||
arglabel:Name of TREEFILE ?
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
item:Phylip PROTEIN Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e protdist;mv -f outfile infile; /usr/bin/X11/xterm -e neighbor; cp outtree intree; $PROGRAM kedit outfile;treetool outtree;/bin/rm -f in1 infile outfile)&
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:PROTDIST+NEIGHBOR:
|
||||
argchoice:PROTDIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
argchoice:No Bootstrap:
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
menu:On-Line Res.
|
||||
|
||||
item:GDE for Linux resources at Bioafrica.net
|
||||
itemmethod:netscape http://www.bioafrica.net &
|
||||
|
||||
item:-------------------------
|
||||
item:add a new website
|
||||
itemmethod:xterm -e /usr/local/bio/GDE/newURL.pl $name $url
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the site name
|
||||
|
||||
arg:url
|
||||
argtype:text
|
||||
arglabel:Enter the URL (including http://)
|
|
@ -0,0 +1,791 @@
|
|||
1menu:File
|
||||
|
||||
item:test cmask output
|
||||
itemmethod: kedit in1
|
||||
|
||||
in:in1
|
||||
informat:colormask
|
||||
|
||||
item:New sequence <meta N>
|
||||
itemmethod:echo "$Type$Name" > out1
|
||||
itemmeta:n
|
||||
itemhelp:new_sequence.help
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:New Sequence name?
|
||||
argtext:New
|
||||
|
||||
arg:Type
|
||||
argtype:choice_list
|
||||
arglabel:Type?
|
||||
argchoice:DNA/RNA:#
|
||||
argchoice:Amino Acid:%
|
||||
argchoice:Text:\"
|
||||
argchoice:Mask:@
|
||||
|
||||
out:out1
|
||||
outformat:flat
|
||||
|
||||
item:Import Foreign Format
|
||||
itemmethod:cp $INPUTFILE OUTFILE.tmp;readseq OUTFILE.tmp -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:INPUTFILE
|
||||
argtype:text
|
||||
arglabel:Name of foreign file?
|
||||
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:Export Foreign Format
|
||||
itemmethod:readseq INPUTFILE -a -f$FORMAT > $OUTPUTFILE
|
||||
itemhelp:readseq.help
|
||||
|
||||
arg:FORMAT
|
||||
argtype:choice_list
|
||||
argchoice:FASTA:8
|
||||
argchoice:NEXUS:17
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:IG/Stanford:1
|
||||
argchoice:GenBank:2
|
||||
argchoice:NBRF:3
|
||||
argchoice:EMBL:4
|
||||
argchoice:GCG:5
|
||||
argchoice:DNA Strider:6
|
||||
argchoice:Fitch:7
|
||||
argchoice:Pearson:8
|
||||
argchoice:Zuker:9
|
||||
argchoice:Olsen:10
|
||||
argchoice:Phylip v3.2:11
|
||||
argchoice:Phylip v3.3:12
|
||||
argchoice:Plain text:13
|
||||
|
||||
arg:OUTPUTFILE
|
||||
argtype:text
|
||||
arglabel:Save as?
|
||||
|
||||
in:INPUTFILE
|
||||
informat:genbank
|
||||
|
||||
|
||||
item:Save Selection
|
||||
itemmethod: cat $SAVE_FUNC > $Name
|
||||
itemhelp:save_selection.help
|
||||
|
||||
arg:SAVE_FUNC
|
||||
argtype:chooser
|
||||
arglabel:File format
|
||||
argchoice:Flat:in1
|
||||
argchoice:Genbank:in2
|
||||
argchoice:GDE/HGL:in3
|
||||
|
||||
arg:Name
|
||||
argtype:text
|
||||
arglabel:File name?
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
in:in2
|
||||
informat:genbank
|
||||
|
||||
in:in3
|
||||
informat:gde
|
||||
|
||||
item:Print Selection
|
||||
itemmethod:(PrintStrat in1 $SCALE > in1.tmp; $CMD -P$PRINTER in1.tmp; /bin/rm -f in1 in1.tmp)&
|
||||
itemhelp:print_alignment.help
|
||||
|
||||
arg:SCALE
|
||||
argtype:slider
|
||||
arglabel:Reduce printout by?
|
||||
argmin:1
|
||||
argmax:20
|
||||
argvalue:1
|
||||
|
||||
arg:CMD
|
||||
argtype:chooser
|
||||
argchoice:Lpr:lpr
|
||||
argchoice:Enscript Gaudy:enscript -G -q
|
||||
argchoice:Enscript Two column:enscript -2rG
|
||||
|
||||
arg:PRINTER
|
||||
argtype:text
|
||||
arglabel:Which printer?
|
||||
argtext:lp
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
menu:Edit
|
||||
|
||||
item:Sort
|
||||
itemmethod:(heapsortHGL in1 $PRIM_KEY $SEC_KEY > in1.tmp ; gde in1.tmp;/bin/rm -f in1*)&
|
||||
itemhelp:heapsortHGL.help
|
||||
|
||||
arg:PRIM_KEY
|
||||
argtype:choice_list
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Primary sort field?
|
||||
|
||||
arg:SEC_KEY
|
||||
argtype:choice_list
|
||||
argchoice:None:
|
||||
argchoice:Group:group-ID
|
||||
argchoice:type:type
|
||||
argchoice:name:name
|
||||
argchoice:Sequence ID:sequence-ID
|
||||
argchoice:creator:creator
|
||||
argchoice:offset:offset
|
||||
arglabel:Secondary sort field?
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:extract
|
||||
itemmethod:(gde in1;/bin/rm -f in1)&
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
menu:DNA/RNA
|
||||
|
||||
item:Translate...
|
||||
itemmethod:Translate -tbl $TBL -frame $FRAME -min_frame $MNFRM $LTRCODE in1 > out1
|
||||
|
||||
arg:FRAME
|
||||
argtype:chooser
|
||||
arglabel:Which reading frame?
|
||||
argchoice:First:1
|
||||
argchoice:Second:2
|
||||
argchoice:Third:3
|
||||
argchoice:All six:6
|
||||
|
||||
arg:MNFRM
|
||||
arglabel:Minimum length of AA sequence to translate?
|
||||
argtype:slider
|
||||
argmin:0
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
arg:LTRCODE
|
||||
argtype:chooser
|
||||
arglabel:Translate to:
|
||||
argchoice:Single letter codes:
|
||||
argchoice:Triple letter codes:-3
|
||||
|
||||
arg:TBL
|
||||
arglabel:Codon table?
|
||||
argtype:chooser
|
||||
argchoice:universal:1
|
||||
argchoice:mycoplasma:2
|
||||
argchoice:yeast:3
|
||||
argchoice:Vert. mito.:4
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
item:Dot plot
|
||||
itemmethod:(DotPlotTool in1 ; /bin/rm -f in1)&
|
||||
itemhelp:DotPlotTool.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
item:Clustal alignment
|
||||
itemmethod:(tr '%#' '>'<in1>clus_in;clustalw -quicktree -output=PIR -infile=clus_in -align > in1.rpt;sed "s/>DL;/#/g" < clus_in.pir> in1;$REPORT gde in1;/bin/rm -f clus_in* in1* )&
|
||||
|
||||
itemhelp:clustal_help
|
||||
|
||||
arg:KTUP
|
||||
argtype:slider
|
||||
arglabel:K-tuple size for pairwise search
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:2
|
||||
|
||||
arg:WIN
|
||||
argtype:slider
|
||||
arglabel:Window size
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:4
|
||||
|
||||
arg:Trans
|
||||
argtype:chooser
|
||||
arglabel:Transitions weighted?
|
||||
argchoice:Yes:/TRANSIT
|
||||
argchoice:No:
|
||||
|
||||
arg:FIXED
|
||||
argtype:slider
|
||||
arglabel:Fixed gap penalty
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:FLOAT
|
||||
arglabel:Floating gap penalty
|
||||
argtype:slider
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:10
|
||||
|
||||
arg:REPORT
|
||||
argtype:chooser
|
||||
arglabel:View assembly report?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit in1.rpt&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Variable Positions
|
||||
itemmethod:varpos $REV < in1 > out1
|
||||
|
||||
arg:REV
|
||||
argtype:chooser
|
||||
arglabel:Highlight (darken)
|
||||
argchoice:Conserved positions:
|
||||
argchoice:variable positions:-rev
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Phrap
|
||||
itemmethod:readseq in1 -a -f8 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp; phrap OUTPUTFILE; readseq -a -f2 OUTPUTFILE.contigs > out1;/bin/rm -rf OUTPUT*;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
|
||||
out:out1
|
||||
outformat:genbank
|
||||
|
||||
item:SNAP
|
||||
itemmethod: cat in1 > infile;/usr/local/biotools/GDE/bin/fasta2snap.pl > outfile; /usr/bin/X11/xterm -e /home/tulio/biotools/SNAP/SNAP.pl outfile; kedit backg*; kedit summ*; sheeltool /home/tulio/biotools/codons-xyplot.pl codons.*; kedit codon.data; /bin/rm -rf back* codon* summ*;
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
out:out1
|
||||
outformat:text
|
||||
|
||||
|
||||
|
||||
|
||||
item:Find all <meta-f>
|
||||
itemmethod:findall $SEARCH $PRCNT $CASE $UT -match $MAT -mismatch $MIS < in1 > out1;
|
||||
itemhelp:findall.help
|
||||
itemmeta:f
|
||||
|
||||
arg:SEARCH
|
||||
argtype:text
|
||||
arglabel:Search String
|
||||
|
||||
arg:PRCNT
|
||||
argtype:slider
|
||||
arglabel:Percent mismatch
|
||||
argmin:0
|
||||
argmax:75
|
||||
argvalue:10
|
||||
|
||||
arg:CASE
|
||||
argtype:chooser
|
||||
arglabel:Case
|
||||
argchoice:Upper equals lower:
|
||||
argchoice:Upper not equal lower:-case
|
||||
|
||||
arg:UT
|
||||
argtype:chooser
|
||||
arglabel:U equal T?
|
||||
argchoice:Yes:-u=t
|
||||
argchoice:No:
|
||||
argvalue:0
|
||||
|
||||
arg:MAT
|
||||
arglabel:Match color
|
||||
argtype:choice_list
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:2
|
||||
|
||||
arg:MIS
|
||||
argtype:choice_list
|
||||
arglabel:Mismatch color
|
||||
argchoice:yellow:1
|
||||
argchoice:violet:2
|
||||
argchoice:red:3
|
||||
argchoice:aqua:4
|
||||
argchoice:green:5
|
||||
argchoice:blue:6
|
||||
argchoice:grey:11
|
||||
argchoice:black:8
|
||||
argvalue:7
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
|
||||
out:out1
|
||||
outformat:colormask
|
||||
|
||||
item:Sequence Consensus
|
||||
itemmethod:(MakeCons in1 $METHOD $MASK > out1)
|
||||
itemhelp:MakeCons.help
|
||||
|
||||
arg:METHOD
|
||||
arglabel:Method
|
||||
argtype:chooser
|
||||
argchoice:IUPAC:-iupac
|
||||
argchoice:Majority:-majority $PERCENT
|
||||
|
||||
arg:MASK
|
||||
argtype:chooser
|
||||
arglabel:Create a new:
|
||||
argchoice:Sequence:
|
||||
argchoice:Selection Mask: | Consto01mask
|
||||
|
||||
arg:PERCENT
|
||||
arglabel:Minimum Percentage for Majority
|
||||
argtype:slider
|
||||
argmin:50
|
||||
argmax:100
|
||||
argvalue:75
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
|
||||
out:out1
|
||||
outformat:gde
|
||||
|
||||
|
||||
#Menu for DNA/RNA
|
||||
|
||||
item:blastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/biotools/blast/blastall -p blastn -d $BLASTDBDNA -i in1.f -W $WORDLEN -M $MATCH > in1.tmp; kedit in1.tmp; rm in1*)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV-1 Seq. Db.:/usr/local/biotools/db/DNA/hiv17-08-01.fasta2
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:MATCH
|
||||
argtype:slider
|
||||
arglabel:Match Score
|
||||
argmin:1
|
||||
argmax:10
|
||||
argvalue:5
|
||||
|
||||
arg:MMSCORE
|
||||
argtype:slider
|
||||
arglabel:Mismatch Score
|
||||
argmin:-10
|
||||
argmax:-1
|
||||
argvalue:-5
|
||||
|
||||
item:blastx
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; /usr/local/biotools/blast/blastall -p blastx -d $BLASTDB -i in1.f -W $WORDLEN -M PAM30 > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1*)&
|
||||
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBDNA
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/biotools/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:genpept:$GDE_HELP_DIR/BLAST/genpept
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
item:------------------------
|
||||
|
||||
item:Add a new DNA blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p F -o T; /usr/local/biotools/GDE/bin/installBLASTDB.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: enter the file name
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: enter the name of the DB
|
||||
|
||||
menu:seq. datasets
|
||||
item:tttt
|
||||
itemmethod:readseq /usr/local/biotools/GDE/db/ttttt -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:HIV1POLDNA.fasta
|
||||
itemmethod:readseq /usr/local/biotools/GDE/db/HIV1POLDNA.fasta -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:structure
|
||||
itemmethod:readseq /usr/local/biotools/GDE/db/structprot.fasta -a -f2 > OUTPUTFILE;/bin/rm -f OUTFILE.tmp
|
||||
out:OUTPUTFILE
|
||||
outformat:genbank
|
||||
|
||||
item:-------------
|
||||
item:add a new dataset
|
||||
itemmethod:mkdir db; cp $file db/ ;xterm -e /usr/local/biotools/GDE/newDATASET.pl $name $file
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the dataset name ?
|
||||
|
||||
arg:file
|
||||
argtype:text
|
||||
arglabel:Enter the dataset file (in FASTA) ?
|
||||
|
||||
|
||||
#Menu for Protein
|
||||
menu:protein
|
||||
item:blastp
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/biotools/db/PAM30; /usr/local/biotools/blast/blastall -p blastp -d $BLASTDBPROT -i in1.f -W $WORDLEN -M $Matrix > in1.tmp; /usr/openwin/bin/kedit in1.tmp; rm in1* PAM30)&
|
||||
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDBPROT
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:HIV Proteins:/usr/local/biotools/db/hiv17-08-01.PROT.fasta
|
||||
argchoice:ttttt:/usr/local/biotools/db/tttt
|
||||
argchoice:tytuiphn:/usr/local/biotools/db/yejhuh[9hp
|
||||
argchoice:yyyy:/usr/local/biotools/db/test
|
||||
|
||||
arg:Matrix
|
||||
barglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:1
|
||||
argmax:5
|
||||
argvalue:3
|
||||
|
||||
item:tblastn
|
||||
itemmethod:(sed "s/[#%]/>/" <in1 > in1.f; cp /usr/local/biotools/db/PAM??? .; tblastn $BLASTDB in1.f W=$WORDLEN M=$Matrix C=$CODE > in1.tmp; kedit in1.tmp; rm in1* PAM???)&
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
arg:BLASTDB
|
||||
argtype:choice_list
|
||||
arglabel:Which Database
|
||||
argchoice:genbank:$GDE_HELP_DIR/BLAST/genbank
|
||||
argchoice:genbank update:$GDE_HELP_DIR/BLAST/genupdate
|
||||
|
||||
arg:Matrix
|
||||
arglabel:Substitution Matrix:
|
||||
argtype:choice_list
|
||||
argchoice:PAM30:PAM30
|
||||
argchoice:PAM70:PAM70
|
||||
|
||||
arg:WORDLEN
|
||||
argtype:slider
|
||||
arglabel:Word Size
|
||||
argmin:4
|
||||
argmax:18
|
||||
argvalue:12
|
||||
|
||||
arg:CODE
|
||||
argtype:choice_list
|
||||
arglabel:Genetic Code
|
||||
argchoice:Standard or Universal:0
|
||||
argchoice:Vertebrate Mitochondrial:1
|
||||
argchoice:Yeast Mitochondrial:2
|
||||
argchoice:Mold Mitochondrial and Mycoplasma:3
|
||||
argchoice:Invertebrate Mitochondrial:4
|
||||
argchoice:Ciliate Macronuclear:5
|
||||
argchoice:Protozoan Mitochondrial:6
|
||||
argchoice:Plant Mitochondrial:7
|
||||
argchoice:Echinodermate Mitochondrial:8
|
||||
|
||||
|
||||
item:Map View
|
||||
itemmethod:(mapview in1 -pbl $PBL -npp $NPP; /bin/rm -f in1)&
|
||||
itemhelp:mapview.help
|
||||
|
||||
in:in1
|
||||
informat:gde
|
||||
insave:
|
||||
|
||||
arg:PBL
|
||||
arglabel:Pixel Between Lines
|
||||
argtype:slider
|
||||
argvalue:10
|
||||
argmin:1
|
||||
argmax:15
|
||||
|
||||
arg:NPP
|
||||
arglabel:Nucleotides Per Pixel
|
||||
argtype:slider
|
||||
argvalue:1
|
||||
argmin:1
|
||||
argmax:20
|
||||
|
||||
arg:LWIDTH
|
||||
arglabel:Line Thickness
|
||||
argtype:slider
|
||||
argvalue:2
|
||||
argmin:1
|
||||
argmax:5
|
||||
|
||||
item:--------------------------
|
||||
item:Add a new Protein blast db
|
||||
itemmethod:xterm -e formatdb -i $sourcefile -p T -o T; /usr/local/biotools/GDE/bin/installBLASTDBPROT.pl $sourcefile $menuname;
|
||||
|
||||
arg:sourcefile
|
||||
argtype:text
|
||||
arglabel: Enter the file (in FASTA)
|
||||
|
||||
arg:menuname
|
||||
argtype:text
|
||||
arglabel: Enter the name of the DB
|
||||
|
||||
menu:Phylogeny
|
||||
|
||||
|
||||
item:Phylip help
|
||||
itemmethod:(netscape /usr/local/biotools/phylip/doc/$FILE)&
|
||||
|
||||
arg:FILE
|
||||
argtype:choice_list
|
||||
arglabel:Which program?
|
||||
argchoice:clique:clique.html
|
||||
argchoice:consense:consense.html
|
||||
argchoice:contchar:contchar.html
|
||||
argchoice:contml:contml.html
|
||||
argchoice:contrast:contrast.html
|
||||
argchoice:discrete:discrete.html
|
||||
argchoice:distance:distance.html
|
||||
argchoice:dnaboot:dnaboot.html
|
||||
argchoice:dnacomp:dnacomp.html
|
||||
argchoice:dnadist:dnadist.html
|
||||
argchoice:dnainvar:dnainvar.html
|
||||
argchoice:dnaml:dnaml.html
|
||||
argchoice:dnamlk:dnamlk.html
|
||||
argchoice:dnamove:dnamove.html
|
||||
argchoice:dnapars:dnapars.html
|
||||
argchoice:dnapenny:dnapenny.html
|
||||
argchoice:dollop:dollop.html
|
||||
argchoice:dolmove:dolmove.html
|
||||
argchoice:dolpenny:dolpenny.html
|
||||
argchoice:draw:draw.html
|
||||
argchoice:drawgram:drawgram.html
|
||||
argchoice:drawtree:drawtree.html
|
||||
argchoice:factor:factor.html
|
||||
argchoice:fitch:fitch.html
|
||||
argchoice:gendist:gendist.html
|
||||
argchoice:kitsch:kitsch.html
|
||||
argchoice:main:main.html
|
||||
argchoice:mix:mix.html
|
||||
argchoice:move:move.html
|
||||
argchoice:neighbor:neighbor.html
|
||||
argchoice:penny:penny.html
|
||||
argchoice:protpars:protpars.html
|
||||
argchoice:read.me.general:read.me.general.html
|
||||
argchoice:restml:restml.html
|
||||
argchoice:seqboot:seqboot.html
|
||||
argchoice:sequence:sequence.html
|
||||
|
||||
|
||||
|
||||
item:Phylip 3.5
|
||||
itemmethod:(rm -f outfile ; readseq -a -f12 in1 | sed "s/ YF//1" > infile;$PREEDIT /usr/bin/X11/xterm -e $PROGRAM;kedit outfile; treetool outtree; rm in1 )&
|
||||
|
||||
arg:PROGRAM
|
||||
argtype:choice_list
|
||||
arglabel:Which program to run?
|
||||
argchoice:DNAPARS:dnapars
|
||||
argchoice:DNABOOT:dnaboot
|
||||
argchoice:DNAPENNY:dnapenny
|
||||
argchoice:DNAML:dnaml
|
||||
argchoice:DNAMLK:dnamlk
|
||||
argchoice:DNACOMP:dnacomp
|
||||
argchoice:DNAMOVE:dnamove
|
||||
argchoice:DNAINVAR:dnainvar
|
||||
argchoice:PROTPARS:protpars
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
item:Phylip DNA Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 | sed "s/ YF//1" > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e dnadist;mv -f outfile infile; cp infile $DNA; /usr/bin/X11/xterm -e neighbor; cp outtree intree; cp outfile $NEI; $PROGRAM kedit outfile; cp outtree $TREE; treetool outtree; /bin/rm -f in1 infile outfile intree outtree)&
|
||||
|
||||
arg:EXPLAIN
|
||||
argtype:text
|
||||
arglabel:To produce a bootstraped tree choose DNADIST+NEIGHOR+CONSENSE
|
||||
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:DNADIST+NEIGHBOR:
|
||||
argchoice:DNADIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Run ?
|
||||
argtype:chooser
|
||||
argchoice:Run without Bootstrap:
|
||||
argchoice:Run with Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
|
||||
arg:DNA
|
||||
argtype:text
|
||||
arglabel:Name of DNADIST outfile?
|
||||
|
||||
arg:NEI
|
||||
argtype:text
|
||||
arglabel:Name of NEIGHBOR outfile?
|
||||
|
||||
arg:TREE
|
||||
argtype:text
|
||||
arglabel:Name of TREEFILE ?
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
item:Phylip PROTEIN Distance methods
|
||||
itemmethod:(readseq -a -f12 in1 > infile ;$PROG mv -f outfile infile; /usr/bin/X11/xterm -e protdist;mv -f outfile infile; /usr/bin/X11/xterm -e neighbor; cp outtree intree; $PROGRAM kedit outfile;treetool outtree;/bin/rm -f in1 infile outfile)&
|
||||
|
||||
arg:PROGRAM
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:PROTDIST+NEIGHBOR:
|
||||
argchoice:PROTDIST+NEIGHOR+CONSENSE: /usr/bin/X11/xterm -e consense;
|
||||
|
||||
arg:PROG
|
||||
arglabel:Which method?
|
||||
argtype:chooser
|
||||
argchoice:Bootstrap: /usr/bin/X11/xterm -e seqboot;
|
||||
argchoice:No Bootstrap:
|
||||
|
||||
arg:PREEDIT
|
||||
argtype:chooser
|
||||
arglabel:Edit input before running?
|
||||
argchoice:No:
|
||||
argchoice:Yes:kedit infile;
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
inmask:
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
menu:On-Line Res.
|
||||
item:tytyt
|
||||
itemmethod:netscape hnu[phoph &
|
||||
item:SANBI
|
||||
itemmethod:netscape again &
|
||||
item:PlasmoDB
|
||||
itemmethod:netscape http://www.plasmodb.org &
|
||||
item:NCBI
|
||||
itemmethod:netscape http://www.ncbi.nlm.nih.gov &
|
||||
item:sanbi
|
||||
itemmethod:netscape http://www.sanbi.ac.za &
|
||||
item:SANBI
|
||||
itemmethod:netscape http://www.sanbi.ac.za &
|
||||
|
||||
item:GDE for Linux resources at Bioafrica.net
|
||||
itemmethod:netscape http://www.bioafrica.net &
|
||||
|
||||
item:-------------------------
|
||||
item:add a new website
|
||||
itemmethod:xterm -e /usr/local/biotools/GDE/newURL.pl $name $url
|
||||
|
||||
arg:name
|
||||
argtype:text
|
||||
arglabel:Enter the site name
|
||||
|
||||
arg:url
|
||||
argtype:text
|
||||
arglabel:Enter the URL (including http://)
|
|
@ -0,0 +1,890 @@
|
|||
#include <malloc.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/scrollbar.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/font.h>
|
||||
#include <xview/xv_xrect.h>
|
||||
#include <xview/cms.h>
|
||||
#include <xview/notice.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
|
||||
Panel menubar = (Panel)NULL;
|
||||
|
||||
/*
|
||||
BasicDisplay():
|
||||
Set up menus and primary display.
|
||||
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
Panel BasicDisplay(DataSet)
|
||||
NA_Alignment *DataSet;
|
||||
{
|
||||
int i,j,k;
|
||||
extern Panel menubar;
|
||||
extern int DisplayType;
|
||||
extern Gmenu menu[];
|
||||
extern Frame frame;
|
||||
extern int num_menus;
|
||||
|
||||
if(menubar == (Panel) NULL)
|
||||
{
|
||||
menubar = xv_create(frame,PANEL,
|
||||
0);
|
||||
/*
|
||||
* For all menus defined in the .GDEmenu file, create a corresponding
|
||||
* menu on the menu bar, and tie its XView object to the internal
|
||||
* menu structure.
|
||||
*/
|
||||
for(j=0;j<num_menus ;j++)
|
||||
{
|
||||
menu[j].button=xv_create(menubar,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,menu[j].label,
|
||||
PANEL_ITEM_MENU, menu[j].X,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine which type of display should be generated based on the
|
||||
* current view of the data set.
|
||||
*/
|
||||
MakeNAADisplay();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifdef SGI /* for exit button */
|
||||
void bailout()
|
||||
{
|
||||
if (xv_destroy_safe(frame) == XV_OK) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* exit by button on front panel
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void quit_main_proc(item, event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
bailout();
|
||||
}
|
||||
#endif /* sgi */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
GenMenu():
|
||||
Generate the menus described in the .GDEmenu file. Link menu items
|
||||
to their corresponding XView objects.
|
||||
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
GenMenu(type)
|
||||
int type;
|
||||
{
|
||||
int i,j,k;
|
||||
int curmenu,curitem,curarg,curinput,curoutput,curchoice;
|
||||
extern Gmenu menu[];
|
||||
extern Frame frame;
|
||||
extern int num_menus;
|
||||
Gmenu *thismenu;
|
||||
GmenuItem *thisitem;
|
||||
/*
|
||||
* For all menus...
|
||||
*/
|
||||
for(curmenu = 0;curmenu<num_menus;curmenu++)
|
||||
{
|
||||
thismenu = &(menu[curmenu]);
|
||||
thismenu->X = xv_create((Cms/* ??? rtm 18.III.98*/)NULL,MENU,0);
|
||||
if(strcmp(thismenu->label,"File")==0)
|
||||
{
|
||||
xv_set(thismenu->X,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Open...",
|
||||
MENU_NOTIFY_PROC,Open,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Save as...",
|
||||
MENU_NOTIFY_PROC,SaveAs,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Properties...",
|
||||
MENU_NOTIFY_PROC,ChangeDisplay,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Protections...<meta p>",
|
||||
MENU_NOTIFY_PROC,SetProtection,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Get info... <meta i>",
|
||||
MENU_NOTIFY_PROC,ModAttr,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
else if(strcmp(thismenu->label,"Edit")==0)
|
||||
{
|
||||
xv_set(thismenu->X,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Select All",
|
||||
MENU_NOTIFY_PROC,SelectAll,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Select by name...",
|
||||
MENU_NOTIFY_PROC,SelectBy,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Cut",
|
||||
MENU_NOTIFY_PROC,EditCut,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Copy",
|
||||
MENU_NOTIFY_PROC,EditCopy,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Paste",
|
||||
MENU_NOTIFY_PROC,EditPaste,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Group <meta g>",
|
||||
MENU_NOTIFY_PROC,Group,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Ungroup <meta u>",
|
||||
MENU_NOTIFY_PROC,Ungroup,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Compress",
|
||||
MENU_NOTIFY_PROC,CompressAlign,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Reverse",
|
||||
MENU_NOTIFY_PROC,RevSeqs,
|
||||
0,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Change case",
|
||||
MENU_NOTIFY_PROC,CaseChange,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
else if(strcmp(thismenu->label,"DNA/RNA")==0)
|
||||
{
|
||||
|
||||
xv_set(thismenu->X,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Complement",
|
||||
MENU_NOTIFY_PROC,CompSeqs,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
/*
|
||||
* For all menu items of the current menu...
|
||||
*/
|
||||
for(curitem = 0;curitem<thismenu->numitems;curitem++)
|
||||
{
|
||||
thisitem = &(thismenu->item[curitem]);
|
||||
xv_set(thismenu->X,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,thismenu->item[curitem].label,
|
||||
MENU_NOTIFY_PROC,HandleMenus,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
/*
|
||||
* Make the menu "pin"able
|
||||
*/
|
||||
xv_set(thismenu->X,
|
||||
MENU_GEN_PIN_WINDOW,frame,thismenu->label,
|
||||
0);
|
||||
}
|
||||
xv_set(menu[0].X,
|
||||
MENU_ITEM,
|
||||
MENU_STRING,"Quit",
|
||||
MENU_NOTIFY_PROC,QuitGDE,
|
||||
0,
|
||||
0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
MakeNAADisplay():
|
||||
Set up the generic display rectangle to be a DNA/RNA display.
|
||||
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
MakeNAADisplay()
|
||||
{
|
||||
extern Panel menubar;
|
||||
extern Canvas EditNameCan;
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan;
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Xv_singlecolor Default_Colors[];
|
||||
Scrollbar hscroll,vscroll;
|
||||
|
||||
GC gc;
|
||||
Cms colmap;
|
||||
XGCValues gcv;
|
||||
Display *dpy;
|
||||
Xv_font font;
|
||||
int j,fnt_siz,fnt_style,depth;
|
||||
|
||||
extern unsigned char *greys[];
|
||||
extern Pixmap grey_pm[];
|
||||
/*
|
||||
* The window will be scrollable in both X and Y
|
||||
*/
|
||||
xv_set(menubar,WIN_FIT_HEIGHT,0,0);
|
||||
/*
|
||||
* set up a window for the organism names on the left side of
|
||||
* the screen.
|
||||
*/
|
||||
|
||||
|
||||
EditNameCan = xv_create(frame,CANVAS,
|
||||
WIN_BELOW,menubar,
|
||||
WIN_WIDTH,150,
|
||||
CANVAS_AUTO_EXPAND,TRUE,
|
||||
CANVAS_AUTO_SHRINK,TRUE,
|
||||
CANVAS_RETAINED,FALSE,
|
||||
CANVAS_X_PAINT_WINDOW,TRUE,
|
||||
OPENWIN_ADJUST_FOR_HORIZONTAL_SCROLLBAR,TRUE,
|
||||
CANVAS_AUTO_CLEAR,FALSE,
|
||||
CANVAS_REPAINT_PROC,DummyRepaint,
|
||||
CANVAS_MIN_PAINT_WIDTH,150,
|
||||
#ifndef SGI
|
||||
WIN_INHERIT_COLORS,TRUE,
|
||||
#endif
|
||||
0);
|
||||
|
||||
(void)xv_set(canvas_paint_window(EditNameCan),
|
||||
WIN_EVENT_PROC,NANameEvents,
|
||||
WIN_CONSUME_EVENTS,
|
||||
WIN_MOUSE_BUTTONS,
|
||||
/*
|
||||
LOC_DRAG,
|
||||
*/
|
||||
LOC_WINENTER,
|
||||
WIN_ASCII_EVENTS,
|
||||
WIN_META_EVENTS,
|
||||
0,
|
||||
0);
|
||||
|
||||
|
||||
/*
|
||||
* Set up a window to hold the NA sequences.
|
||||
*/
|
||||
|
||||
EditCan=xv_create(frame,CANVAS,
|
||||
WIN_RIGHT_OF,EditNameCan,
|
||||
CANVAS_AUTO_SHRINK,TRUE,
|
||||
CANVAS_AUTO_EXPAND,TRUE,
|
||||
/*
|
||||
CANVAS_CMS_REPAINT,TRUE,
|
||||
*/
|
||||
CANVAS_X_PAINT_WINDOW,TRUE,
|
||||
CANVAS_AUTO_CLEAR,FALSE,
|
||||
CANVAS_RETAINED,FALSE,
|
||||
CANVAS_MIN_PAINT_WIDTH,150,
|
||||
OPENWIN_SPLIT,
|
||||
OPENWIN_SPLIT_INIT_PROC,InitEditSplit,
|
||||
OPENWIN_SPLIT_DESTROY_PROC,DestroySplit,
|
||||
NULL,
|
||||
WIN_INHERIT_COLORS,FALSE,
|
||||
WIN_BELOW,menubar,
|
||||
CANVAS_REPAINT_PROC,RepaintNACan,
|
||||
0);
|
||||
|
||||
/*
|
||||
* This causes resize events to occur even if the screen shrinks
|
||||
* in size.
|
||||
*/
|
||||
xv_set(canvas_paint_window(EditCan),
|
||||
WIN_BIT_GRAVITY,ForgetGravity,
|
||||
0);
|
||||
|
||||
|
||||
hscroll = xv_create(EditCan,SCROLLBAR,
|
||||
SCROLLBAR_DIRECTION,SCROLLBAR_HORIZONTAL,
|
||||
SCROLLBAR_SPLITTABLE,TRUE,
|
||||
SCROLLBAR_OVERSCROLL,0,
|
||||
0);
|
||||
|
||||
vscroll = xv_create(EditCan,SCROLLBAR,
|
||||
SCROLLBAR_DIRECTION,SCROLLBAR_VERTICAL,
|
||||
SCROLLBAR_SPLITTABLE,FALSE,
|
||||
SCROLLBAR_OVERSCROLL,0,
|
||||
0);
|
||||
|
||||
notify_interpose_event_func(
|
||||
xv_get(hscroll,SCROLLBAR_NOTIFY_CLIENT),
|
||||
EditCanScroll,NOTIFY_SAFE);
|
||||
|
||||
dpy = (Display *)xv_get(EditNameCan, XV_DISPLAY);
|
||||
|
||||
gc = DefaultGC(dpy,DefaultScreen(dpy));
|
||||
depth = xv_get(frame,WIN_DEPTH);
|
||||
if(depth>3)
|
||||
{
|
||||
colmap = (Cms)xv_find(frame,CMS,
|
||||
CMS_NAME,"GDE Palette",
|
||||
XV_AUTO_CREATE,FALSE,
|
||||
0);
|
||||
|
||||
|
||||
if(colmap == (Cms) NULL)
|
||||
colmap = (Cms)xv_create((Cms)NULL,CMS,
|
||||
CMS_TYPE,XV_STATIC_CMS,
|
||||
CMS_SIZE,16,
|
||||
CMS_COLORS,Default_Colors,
|
||||
#ifdef SGI /* a hack to try and keep the frame colored in split canvas */
|
||||
CMS_FRAME_CMS,TRUE,
|
||||
#endif
|
||||
|
||||
0);
|
||||
|
||||
xv_set(EditCan,
|
||||
WIN_CMS_NAME,"GDE Palette",
|
||||
WIN_CMS, colmap,
|
||||
WIN_FOREGROUND_COLOR,8,
|
||||
WIN_BACKGROUND_COLOR,15,
|
||||
#ifndef SGI
|
||||
WIN_INHERIT_COLORS,FALSE,
|
||||
#endif
|
||||
0);
|
||||
}
|
||||
|
||||
(void)xv_set(canvas_paint_window(EditCan),
|
||||
WIN_EVENT_PROC,NAEvents,
|
||||
WIN_CONSUME_EVENTS,
|
||||
WIN_MOUSE_BUTTONS,
|
||||
LOC_WINENTER,
|
||||
WIN_ASCII_EVENTS,
|
||||
WIN_META_EVENTS,
|
||||
0,
|
||||
0);
|
||||
|
||||
font = (Xv_font)xv_get(frame,XV_FONT);
|
||||
fnt_siz = (int)xv_get(font,FONT_SIZE);
|
||||
fnt_style = (int)xv_get(font,FONT_STYLE);
|
||||
font = (Xv_font)xv_find(frame,FONT,
|
||||
FONT_FAMILY,FONT_FAMILY_DEFAULT_FIXEDWIDTH,
|
||||
FONT_STYLE,fnt_style,
|
||||
FONT_SIZE,fnt_siz,
|
||||
0);
|
||||
|
||||
xv_set(frame,XV_FONT,font,0);
|
||||
|
||||
gcv.font = (Font)xv_get(font,XV_XID);
|
||||
|
||||
if(gcv.font != (Font)NULL)
|
||||
XChangeGC(dpy,gc,GCFont,&gcv);
|
||||
|
||||
for(j=0;j<16;j++)
|
||||
{
|
||||
grey_pm[j] = XCreatePixmapFromBitmapData(dpy,
|
||||
DefaultRootWindow(dpy), greys[j], grey_width,
|
||||
grey_height, 1, 0, 1);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
SetNADData()
|
||||
Fills in the display data structure for an initial monochrome display.
|
||||
All settings are simple defaults, and will need to be modified externally
|
||||
if otherwise. This routine passes back a new NA_DisplayData structure, which
|
||||
can be destroyed after use with a call to cfree().
|
||||
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
NA_DisplayData *SetNADData(aln,Can,NamCan)
|
||||
NA_Alignment *aln;
|
||||
Canvas Can,NamCan;
|
||||
{
|
||||
NA_DisplayData *ddata;
|
||||
Scrollbar hscroll,vscroll;
|
||||
Xv_window view;
|
||||
int j;
|
||||
|
||||
extern Frame frame;
|
||||
extern int Default_Color_LKUP[];
|
||||
extern DisplayAttr;
|
||||
|
||||
int reset_all;
|
||||
|
||||
if(aln->na_ddata == NULL)
|
||||
{
|
||||
ddata = (NA_DisplayData*)Calloc(1,sizeof(NA_DisplayData));
|
||||
reset_all = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ddata =(NA_DisplayData*)(aln->na_ddata);
|
||||
reset_all = FALSE;
|
||||
}
|
||||
|
||||
ddata -> font = (Xv_font)xv_get(frame,XV_FONT);
|
||||
ddata -> font_dx = xv_get(ddata->font,FONT_DEFAULT_CHAR_WIDTH);
|
||||
ddata -> font_dy = xv_get(ddata->font,FONT_DEFAULT_CHAR_HEIGHT);
|
||||
if(reset_all)
|
||||
{
|
||||
ddata -> wid = 0;
|
||||
ddata -> ht = 0;
|
||||
ddata -> position = 0;
|
||||
ddata -> depth = xv_get(frame,WIN_DEPTH);
|
||||
if(ddata -> depth >= 4)
|
||||
{
|
||||
ddata -> color_type = COLOR_LOOKUP;
|
||||
ddata -> num_colors = 16;
|
||||
ddata -> white = 15;
|
||||
ddata -> black = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
ddata -> color_type = COLOR_MONO;;
|
||||
ddata -> num_colors = 2;
|
||||
ddata -> white = 0;
|
||||
ddata -> black = 1;
|
||||
}
|
||||
ddata -> jtsize = 0;
|
||||
ddata -> aln = aln;
|
||||
ddata -> seq_x = xv_get(Can,XV_XID);
|
||||
ddata -> nam_x = xv_get(NamCan, XV_XID);
|
||||
ddata -> use_repeat = TRUE;
|
||||
}
|
||||
ddata -> seq_can = Can;
|
||||
ddata -> nam_can = NamCan;
|
||||
|
||||
for(j=0;j<xv_get(Can,OPENWIN_NVIEWS);j++)
|
||||
{
|
||||
view = (Xv_window)xv_get(Can,OPENWIN_NTH_VIEW,j,0);
|
||||
|
||||
hscroll = (Scrollbar)xv_get(Can,
|
||||
OPENWIN_HORIZONTAL_SCROLLBAR,view);
|
||||
vscroll = (Scrollbar)xv_get(Can,
|
||||
OPENWIN_VERTICAL_SCROLLBAR,view);
|
||||
|
||||
if(hscroll && vscroll)
|
||||
{
|
||||
xv_set(hscroll,SCROLLBAR_PIXELS_PER_UNIT,
|
||||
ddata->font_dx,0);
|
||||
xv_set(vscroll,SCROLLBAR_PIXELS_PER_UNIT,
|
||||
ddata->font_dy,0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the length and height of the alignment
|
||||
*/
|
||||
xv_set(hscroll,SCROLLBAR_OBJECT_LENGTH,aln->maxlen,0);
|
||||
xv_set(vscroll,SCROLLBAR_OBJECT_LENGTH,aln->numelements,0);
|
||||
|
||||
scrollbar_paint(vscroll);
|
||||
scrollbar_paint(hscroll);
|
||||
}
|
||||
|
||||
if(aln->numelements !=0)
|
||||
{
|
||||
xv_set(Can,
|
||||
WIN_HEIGHT,MIN(MAX_STARTUP_CANVAS_HEIGHT,
|
||||
ddata->font_dy * (aln->numelements+2)),
|
||||
CANVAS_RETAINED,FALSE,
|
||||
0);
|
||||
|
||||
xv_set(NamCan,
|
||||
WIN_HEIGHT,MIN(MAX_STARTUP_CANVAS_HEIGHT,
|
||||
ddata->font_dy * (aln->numelements+2)),
|
||||
0);
|
||||
}
|
||||
|
||||
(void)window_fit(NamCan);
|
||||
(void)window_fit(Can);
|
||||
(void)window_fit(frame);
|
||||
|
||||
return (ddata);
|
||||
}
|
||||
|
||||
|
||||
DummyRepaint(can,win,dpy,xwin,area)
|
||||
Canvas can;
|
||||
Xv_window win;
|
||||
Display *dpy;
|
||||
Window xwin;
|
||||
Xv_xrectlist *area;
|
||||
{
|
||||
DrawNANames(dpy,xwin);
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
DrawNANames(dpy,xwin)
|
||||
Display *dpy;
|
||||
Window xwin;
|
||||
{
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
NA_DisplayData *NAdd;
|
||||
NA_Alignment *aln;
|
||||
NA_Sequence *element;
|
||||
int maxseq,minseq,maxnoseq,i,j;
|
||||
unsigned long *pixels;
|
||||
char buffer[GBUFSIZ];
|
||||
int scrn = DefaultScreen(dpy);
|
||||
GC gc;
|
||||
|
||||
aln = DataSet;
|
||||
if(DataSet == NULL)
|
||||
return XV_OK;
|
||||
NAdd = (NA_DisplayData*)(DataSet)->na_ddata;
|
||||
gc = DefaultGC(dpy,DefaultScreen(dpy));
|
||||
|
||||
pixels = (unsigned long*)xv_get(EditCan,WIN_X_COLOR_INDICES);
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
XSetForeground(dpy,gc,BlackPixel(dpy,scrn));
|
||||
|
||||
minseq = NAdd->top_seq;
|
||||
maxseq = minseq + NAdd->ht;
|
||||
maxseq = MIN(maxseq+1,aln->numelements);
|
||||
|
||||
for(j=minseq;j<maxseq;j++)
|
||||
{
|
||||
element = &(aln->element[j]);
|
||||
if(element->groupid != 0)
|
||||
sprintf(buffer,"%d %s ",
|
||||
element->groupid,element->short_name);
|
||||
else
|
||||
sprintf(buffer,"%s ",
|
||||
element->short_name);
|
||||
|
||||
if(aln->element[j].selected)
|
||||
{
|
||||
XSetForeground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
XSetBackground(dpy,gc,BlackPixel(dpy,scrn));
|
||||
}
|
||||
|
||||
XDrawImageString(dpy,xwin,gc,5,
|
||||
NAdd->font_dy*(j-minseq+1),buffer,40);
|
||||
|
||||
if(aln->element[j].selected)
|
||||
{
|
||||
XSetForeground(dpy,gc,BlackPixel(dpy,scrn));
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
maxnoseq = xv_get(EditNameCan,XV_HEIGHT)/NAdd->font_dy;
|
||||
for(j=maxseq;j<maxnoseq;j++)
|
||||
XDrawImageString(dpy,xwin,gc,5,
|
||||
NAdd->font_dy*(j-minseq+1),
|
||||
" ",40);
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
|
||||
RepaintNACan(can,win,dpy,xwin,area)
|
||||
Canvas can;
|
||||
Xv_window win;
|
||||
Display *dpy;
|
||||
Window xwin;
|
||||
Xv_xrectlist *area;
|
||||
{
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Frame frame; /* rtm 18.III.98 */
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern int SCALE;
|
||||
Scrollbar hscroll,vscroll;
|
||||
NA_DisplayData *NAdd;
|
||||
Xv_window view;
|
||||
int maxseq,minseq,i,j,lpos,rpos,nviews;
|
||||
int start,end,top,bottom;
|
||||
GC gc;
|
||||
|
||||
int scrn = DefaultScreen(dpy);
|
||||
gc = DefaultGC(dpy,scrn);
|
||||
|
||||
if(DataSet == (NA_Alignment *) NULL || can == (Canvas) NULL)
|
||||
return XV_OK;
|
||||
|
||||
NAdd = (NA_DisplayData*)(DataSet)->na_ddata;
|
||||
if(NAdd == NULL)
|
||||
return XV_OK;
|
||||
for(;xv_get(can,CANVAS_RETAINED)==TRUE;)
|
||||
xv_set(can,CANVAS_RETAINED,FALSE,0);
|
||||
|
||||
XSetForeground(dpy,gc,BlackPixel(dpy,scrn));
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
|
||||
nviews = (int)xv_get(EditCan,OPENWIN_NVIEWS);
|
||||
for(j=0;j<nviews;j++)
|
||||
{
|
||||
view = (Xv_window)xv_get(EditCan,OPENWIN_NTH_VIEW,j);
|
||||
if(view)
|
||||
if(xv_get(view,CANVAS_VIEW_PAINT_WINDOW) == win)
|
||||
j=nviews;
|
||||
}
|
||||
|
||||
/*
|
||||
added to remove warnings on split screen
|
||||
*/
|
||||
hscroll = (Scrollbar)xv_get(EditCan,OPENWIN_HORIZONTAL_SCROLLBAR,view);
|
||||
vscroll = (Scrollbar)xv_get(EditCan,OPENWIN_VERTICAL_SCROLLBAR,view);
|
||||
|
||||
if(vscroll)
|
||||
{
|
||||
xv_set(vscroll,SCROLLBAR_OBJECT_LENGTH,
|
||||
(DataSet)-> numelements,0);
|
||||
minseq = (int)xv_get(vscroll,SCROLLBAR_VIEW_START);
|
||||
maxseq = (int)xv_get(vscroll,SCROLLBAR_VIEW_LENGTH);
|
||||
|
||||
if( NAdd->top_seq != minseq || NAdd->ht != maxseq)
|
||||
{
|
||||
NAdd->top_seq = minseq;
|
||||
NAdd->ht = maxseq;
|
||||
DrawNANames(dpy,xv_get(canvas_paint_window(EditNameCan),
|
||||
XV_XID));
|
||||
}
|
||||
|
||||
maxseq += minseq;
|
||||
maxseq = MIN(maxseq+1,DataSet->numelements);
|
||||
|
||||
top =(int)xv_get(vscroll,SCROLLBAR_VIEW_START);
|
||||
bottom = top +(int)xv_get(vscroll,SCROLLBAR_VIEW_LENGTH);
|
||||
for(;bottom-top>MAX_NA_DISPLAY_HEIGHT;)
|
||||
{
|
||||
top =(int)xv_get(vscroll,SCROLLBAR_VIEW_START);
|
||||
bottom= top +(int)xv_get(vscroll,SCROLLBAR_VIEW_LENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
if(hscroll)
|
||||
{
|
||||
xv_set(hscroll,SCROLLBAR_OBJECT_LENGTH, (DataSet)->maxlen,0);
|
||||
start =(int)xv_get(hscroll,SCROLLBAR_VIEW_START);
|
||||
end = start +(int)xv_get(hscroll,SCROLLBAR_VIEW_LENGTH);
|
||||
for(;end-start>MAX_NA_DISPLAY_WIDTH;)
|
||||
{
|
||||
start =(int)xv_get(hscroll,SCROLLBAR_VIEW_START);
|
||||
end = start +(int)xv_get(hscroll,SCROLLBAR_VIEW_LENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(i=0;(i<area->count) && hscroll && vscroll;i++)
|
||||
{
|
||||
lpos = start+((int)area->rect_array[i].x/NAdd->font_dx)*SCALE;
|
||||
rpos = (((int)area->rect_array[i].width/NAdd->font_dx)*SCALE +
|
||||
lpos);
|
||||
|
||||
/*
|
||||
rpos = MIN(NAdd->aln->maxlen,rpos + 1);
|
||||
*/
|
||||
rpos += 1;
|
||||
|
||||
minseq = top+(int)area->rect_array[i].y/NAdd->font_dy;
|
||||
maxseq = (int)area->rect_array[i].height/NAdd->font_dy+minseq;
|
||||
maxseq = MIN(DataSet->numelements-1,maxseq+1);
|
||||
|
||||
/*
|
||||
for(;rpos-lpos>MAX_NA_DISPLAY_WIDTH;)
|
||||
{
|
||||
lpos =(int)xv_get(hscroll,SCROLLBAR_VIEW_START)/SCALE;
|
||||
rpos = lpos+(int)xv_get(hscroll,SCROLLBAR_VIEW_LENGTH)*SCALE;
|
||||
}
|
||||
*/
|
||||
|
||||
for(j=minseq;j<=maxseq;j++)
|
||||
DrawNAColor(can,NAdd,xwin,start,top,j,lpos,rpos,dpy,gc,
|
||||
NAdd->color_type,FALSE);
|
||||
}
|
||||
SetNACursor(NAdd,can,win,xwin,dpy,gc);
|
||||
(void)window_fit(EditCan);
|
||||
(void)window_fit(EditNameCan);
|
||||
(void)window_fit(frame);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SetNACursor(NAdd,can,win,xwin,dpy,gc)
|
||||
NA_DisplayData *NAdd;
|
||||
Canvas can;
|
||||
Xv_window win;
|
||||
Window xwin;
|
||||
Display *dpy;
|
||||
GC gc;
|
||||
{
|
||||
extern int repeat_cnt,EditMode,SCALE;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern Frame frame;
|
||||
extern NA_Alignment *DataSet;
|
||||
|
||||
Scrollbar hscroll,vscroll;
|
||||
NA_Sequence *this_elem;
|
||||
|
||||
int xx,yy,j,dir=0,SubSel = FALSE;
|
||||
Xv_window view;
|
||||
|
||||
char buffer[GBUFSIZ];
|
||||
int x = ((NA_DisplayData*)(DataSet)->
|
||||
na_ddata)->cursor_x;
|
||||
int y = ((NA_DisplayData*)(DataSet)->
|
||||
na_ddata)->cursor_y;
|
||||
int position = ((NA_DisplayData*)(DataSet)->
|
||||
na_ddata)->position;
|
||||
|
||||
this_elem = &(DataSet->element[y]);
|
||||
dir = OrigDir(this_elem);
|
||||
|
||||
if(repeat_cnt > 0)
|
||||
sprintf(buffer,"[%s] pos:%d col:%d %s %s (repeat:%d)",
|
||||
EditMode==0?"Insert": "Check", position,((NA_DisplayData*)(
|
||||
DataSet)->na_ddata)->cursor_x+1+DataSet->rel_offset,(DataSet)->
|
||||
element[y].short_name,(dir == 1)?" -->":
|
||||
(dir == -1)?" <--":" ",MAX(repeat_cnt,1));
|
||||
else
|
||||
sprintf(buffer,"[%s] pos:%d col:%d %s %s",
|
||||
EditMode==0?"Insert": "Check",position,((NA_DisplayData*)(
|
||||
DataSet)->na_ddata)->cursor_x+1+DataSet->rel_offset,(DataSet)->
|
||||
element[y].short_name,(dir == 1)?" -->":
|
||||
(dir == -1)?" <--":" ");
|
||||
|
||||
xv_set(frame,FRAME_LEFT_FOOTER,buffer,0);
|
||||
xv_set(left_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].subselected)
|
||||
SubSel = TRUE;
|
||||
|
||||
for(j=0;j<xv_get(can,OPENWIN_NVIEWS) && !SubSel;j++)
|
||||
{
|
||||
view = xv_get(can,OPENWIN_NTH_VIEW,j);
|
||||
hscroll=(Scrollbar)xv_get(can,OPENWIN_HORIZONTAL_SCROLLBAR,view);
|
||||
vscroll=(Scrollbar)xv_get(can,OPENWIN_VERTICAL_SCROLLBAR,view);
|
||||
if(hscroll && vscroll)
|
||||
{
|
||||
yy = xv_get(vscroll,SCROLLBAR_VIEW_START);
|
||||
xx = xv_get(hscroll,SCROLLBAR_VIEW_START);
|
||||
xwin = (Window)xv_get
|
||||
(xv_get(view,CANVAS_VIEW_PAINT_WINDOW), XV_XID);
|
||||
DrawNAColor(can,NAdd,xwin,xx,yy,y,x,x,dpy,gc,COLOR_MONO,
|
||||
TRUE);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
UnsetNACursor(NAdd,can,win,xwin,dpy,gc)
|
||||
NA_DisplayData *NAdd;
|
||||
Canvas can;
|
||||
Xv_window win;
|
||||
Window xwin;
|
||||
Display *dpy;
|
||||
GC gc;
|
||||
{
|
||||
NA_DisplayData *ddata;
|
||||
NA_Alignment *aln;
|
||||
extern NA_Alignment *DataSet; /* rtm 18.III.98 */
|
||||
Scrollbar vscroll=(Scrollbar)NULL,hscroll=(Scrollbar)NULL;
|
||||
Xv_window view;
|
||||
extern int SCALE;
|
||||
int x,y,xx,yy,j;
|
||||
|
||||
if(DataSet == NULL)
|
||||
return;
|
||||
|
||||
aln = DataSet;
|
||||
x = ((NA_DisplayData*)(DataSet)->na_ddata)->cursor_x;
|
||||
y = ((NA_DisplayData*)(DataSet)->na_ddata)->cursor_y;
|
||||
|
||||
for(j=0;j<xv_get(can,OPENWIN_NVIEWS);j++)
|
||||
{
|
||||
view = xv_get(can,OPENWIN_NTH_VIEW,j);
|
||||
hscroll=(Scrollbar)xv_get(can,
|
||||
OPENWIN_HORIZONTAL_SCROLLBAR,view);
|
||||
vscroll=(Scrollbar)xv_get(can,
|
||||
OPENWIN_VERTICAL_SCROLLBAR,view);
|
||||
|
||||
yy = xv_get(vscroll,SCROLLBAR_VIEW_START);
|
||||
xx = xv_get(hscroll,SCROLLBAR_VIEW_START);
|
||||
xwin = (Window)xv_get(xv_get(view,CANVAS_VIEW_PAINT_WINDOW)
|
||||
,XV_XID);
|
||||
|
||||
DrawNAColor(can,NAdd,xwin,xx,yy,y,x,x,dpy,gc,NAdd->color_type,
|
||||
FALSE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ResizeNACan(canvas,wd,ht)
|
||||
Canvas canvas;
|
||||
int wd,ht;
|
||||
{
|
||||
extern NA_Alignment *DataSet; /* rtm 18.III.98 */
|
||||
int dy;
|
||||
if(DataSet == NULL)
|
||||
return(XV_OK);
|
||||
if(DataSet->na_ddata == NULL)
|
||||
return(XV_OK);
|
||||
|
||||
dy = (int)((NA_DisplayData*)(DataSet->na_ddata))->font_dy;
|
||||
if(ht > dy * (DataSet->numelements+2))
|
||||
{
|
||||
xv_set(canvas,XV_HEIGHT,dy * (DataSet->numelements+2),0);
|
||||
}
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
QuitGDE()
|
||||
{
|
||||
extern Frame frame;
|
||||
if( notice_prompt(frame,NULL,NOTICE_MESSAGE_STRINGS,
|
||||
"Are you sure you want to Quit?",NULL,
|
||||
NOTICE_BUTTON,"Confirm",1,
|
||||
NOTICE_BUTTON,"Cancel",2,
|
||||
0) == 1)
|
||||
{
|
||||
xv_destroy_safe(frame);
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
return(XV_OK);
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,658 @@
|
|||
/*
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Michael Maciukenas at the Center for Prokaryote
|
||||
Genome Analysis. Design and implementation guidance by Steven Smith, Carl
|
||||
Woese.
|
||||
*/
|
||||
/* File picker by Mike Maciukenas
|
||||
** Allows the user to search up and down the directory tree, and choose a
|
||||
** file.
|
||||
** "Open" descends down into a directory, or chooses a file (depending ** on what is selected). The user may also press return after choosing
|
||||
** a file or directory, to do the same thing.
|
||||
** "Up Dir" ascends to the parent directory.
|
||||
** "Cancel" cancels the operation.
|
||||
** The user may also type a directory into the "Directory:" field. When the
|
||||
** user presses return (or tab, or newline), the contents of the new directory
|
||||
** will be shown.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <xview/textsw.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/canvas.h>
|
||||
#include <xview/scrollbar.h>
|
||||
#include <xview/rectlist.h>
|
||||
#include <xview/notice.h>
|
||||
#include <xview/font.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
#define GBUFSIZ 1024 /* buffer size, remove when adding to Steve's code */
|
||||
|
||||
#define FL_VIEW_H 15 /* # of files to show in one page, originally */
|
||||
|
||||
|
||||
/* structure for a linked list that allows sorting of filenames */
|
||||
typedef struct namedata {char *FileN; /* file name */
|
||||
int type; /* flag: 1 if directory '/'
|
||||
** 2 if executable '*'
|
||||
** 3 if symbolic link '@'
|
||||
** 4 if socket '='
|
||||
** 0 if normal */
|
||||
struct namedata *Next; /* next in list */
|
||||
} NameData;
|
||||
|
||||
Frame fl_getframe = XV_NULL; /* frame, is set to XV_NULL by free_mem(),
|
||||
** load_file() checks this to see if it should
|
||||
** destroy an existing frame */
|
||||
Scrollbar fl_scroll; /* the scrollbar for the file list canvas */
|
||||
Canvas fl_FileList; /* the file list canvas */
|
||||
Panel_item fl_DirText; /* the text item that displays the directory */
|
||||
Panel fl_Getpanel; /* the panel, contains buttons, and DirText */
|
||||
GC fl_gc; /* gc to use for drawing file names, just the default GC with
|
||||
** the frame's font copied in. */
|
||||
int fl_current_picked, fl_current_len; /* the current item picked in the file
|
||||
** list, and the current number of items
|
||||
** in the file list */
|
||||
int fl_cell_h, fl_width, fl_ascent; /* the height of the font, the width of the
|
||||
** canvas, and the default ascent of the
|
||||
** font, all used for drawing into the file
|
||||
** list canvas */
|
||||
Xv_opaque data;
|
||||
|
||||
|
||||
|
||||
NameData *fl_start; /* the root node for the linked list of filenames */
|
||||
|
||||
Frame load_file(Parentframe, x, y, passdata)
|
||||
/* pick a file for loading. */
|
||||
Frame Parentframe;
|
||||
int x, y;
|
||||
Xv_opaque passdata;
|
||||
{
|
||||
|
||||
/* callback procedures */
|
||||
int fl_open_btn_lf(), fl_up_dir_btn(), lf_cancel_btn();
|
||||
void fl_show_list_lf();
|
||||
void fl_list_select_lf();
|
||||
Panel_setting fl_dir_typed();
|
||||
/* interposed destroy function */
|
||||
Notify_value fl_free_mem();
|
||||
|
||||
char dirname[GBUFSIZ];
|
||||
Display *display;
|
||||
Xv_screen screen;
|
||||
int screen_no;
|
||||
Xv_Font font;
|
||||
XFontStruct *font_data;
|
||||
|
||||
data=passdata;
|
||||
|
||||
/* create the frame */
|
||||
fl_getframe = xv_create(Parentframe, FRAME_CMD,
|
||||
FRAME_CMD_PUSHPIN_IN,TRUE,
|
||||
FRAME_LABEL, "Choose File",
|
||||
FRAME_SHOW_RESIZE_CORNER, FALSE,
|
||||
XV_X, x,
|
||||
XV_Y, y,
|
||||
NULL);
|
||||
notify_interpose_destroy_func(fl_getframe, fl_free_mem);
|
||||
|
||||
/* get font characteristics */
|
||||
font = xv_get(fl_getframe, XV_FONT);
|
||||
fl_cell_h = xv_get(font, FONT_DEFAULT_CHAR_HEIGHT);
|
||||
fl_width = 50*xv_get(font, FONT_DEFAULT_CHAR_WIDTH);
|
||||
font_data = (XFontStruct *)xv_get(font, FONT_INFO);
|
||||
fl_ascent = font_data->ascent;
|
||||
|
||||
/* create the panel and panel buttons */
|
||||
/*
|
||||
fl_Getpanel = xv_create(fl_getframe, PANEL,
|
||||
NULL);
|
||||
*/
|
||||
fl_Getpanel = xv_get(fl_getframe, FRAME_CMD_PANEL);
|
||||
(void) xv_create(fl_Getpanel, PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING, "Open",
|
||||
PANEL_NOTIFY_PROC, fl_open_btn_lf,
|
||||
NULL);
|
||||
(void) xv_create(fl_Getpanel, PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING, "Up Dir",
|
||||
PANEL_NOTIFY_PROC, fl_up_dir_btn,
|
||||
NULL);
|
||||
(void) xv_create(fl_Getpanel, PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING, "Cancel",
|
||||
PANEL_NOTIFY_PROC, lf_cancel_btn,
|
||||
NULL);
|
||||
/* create the "Directory:" field, initialized to the current working dir */
|
||||
getcwd(dirname, GBUFSIZ);
|
||||
fl_DirText = xv_create(fl_Getpanel, PANEL_TEXT,
|
||||
PANEL_LABEL_STRING,"Directory:",
|
||||
XV_X, xv_col(fl_Getpanel, 0),
|
||||
XV_Y, xv_row(fl_Getpanel, 1),
|
||||
PANEL_VALUE_STORED_LENGTH, GBUFSIZ,
|
||||
PANEL_VALUE_DISPLAY_LENGTH, 30,
|
||||
PANEL_VALUE, dirname,
|
||||
PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
|
||||
PANEL_NOTIFY_STRING, "\n\r\t",
|
||||
PANEL_NOTIFY_PROC, fl_dir_typed,
|
||||
NULL);
|
||||
|
||||
window_fit(fl_Getpanel);
|
||||
|
||||
/* create the file list canvas, below the above panel */
|
||||
fl_FileList = xv_create(fl_getframe, CANVAS,
|
||||
XV_X, 0,
|
||||
WIN_BELOW, fl_Getpanel,
|
||||
XV_WIDTH, fl_width,
|
||||
XV_HEIGHT, FL_VIEW_H*fl_cell_h+7,
|
||||
CANVAS_REPAINT_PROC, fl_show_list_lf,
|
||||
CANVAS_AUTO_EXPAND, FALSE,
|
||||
CANVAS_AUTO_SHRINK, FALSE,
|
||||
CANVAS_WIDTH, fl_width,
|
||||
CANVAS_HEIGHT, fl_cell_h,
|
||||
CANVAS_RETAINED, FALSE,
|
||||
OPENWIN_AUTO_CLEAR, FALSE,
|
||||
NULL);
|
||||
fl_scroll = xv_create(fl_FileList, SCROLLBAR,
|
||||
SCROLLBAR_DIRECTION, SCROLLBAR_VERTICAL,
|
||||
SCROLLBAR_PIXELS_PER_UNIT, fl_cell_h,
|
||||
SCROLLBAR_VIEW_LENGTH, fl_view_h(),
|
||||
SCROLLBAR_PAGE_LENGTH, fl_view_h(),
|
||||
NULL);
|
||||
xv_set(canvas_paint_window(fl_FileList),
|
||||
WIN_EVENT_PROC, fl_list_select_lf,
|
||||
WIN_CONSUME_EVENTS, WIN_MOUSE_BUTTONS, LOC_DRAG, WIN_ASCII_EVENTS, NULL,
|
||||
NULL);
|
||||
xv_set(fl_Getpanel, XV_WIDTH, xv_get(fl_FileList, XV_WIDTH), NULL);
|
||||
|
||||
/* set up the gc for drawing into the file list */
|
||||
display = (Display *)xv_get(fl_getframe, XV_DISPLAY);
|
||||
screen = (Xv_screen)xv_get(fl_getframe, XV_SCREEN);
|
||||
screen_no = (int)xv_get(screen, SCREEN_NUMBER);
|
||||
fl_gc = XCreateGC(display, RootWindow(display, screen_no),
|
||||
0, NULL);
|
||||
XCopyGC(display, DefaultGC(display, DefaultScreen(display)),
|
||||
0xFFFFFFFF, fl_gc);
|
||||
XSetFont(display, fl_gc, xv_get(font, XV_XID));
|
||||
/*
|
||||
* Added S.Smith 2/5/91
|
||||
*/
|
||||
XSetForeground(display,fl_gc,BlackPixel(display,DefaultScreen(display)));
|
||||
XSetBackground(display,fl_gc,WhitePixel(display,DefaultScreen(display)));
|
||||
|
||||
|
||||
/* set up the extra trailing node for the linked list, makes insertion
|
||||
** into the list easier */
|
||||
fl_start = (NameData *)calloc(1,1+sizeof(NameData));
|
||||
fl_start->FileN = (char *)NULL;
|
||||
fl_start->Next = NULL;
|
||||
|
||||
/* make the list, showing files in the application`s current directory
|
||||
*/
|
||||
(void) fl_make_list();
|
||||
|
||||
window_fit(fl_getframe);
|
||||
xv_set(fl_getframe, XV_SHOW, TRUE, NULL);
|
||||
return(fl_getframe);
|
||||
}
|
||||
|
||||
|
||||
int fl_open_btn_lf(item, event)
|
||||
/* callback procedure for the open button. If it's a directory, switch to
|
||||
** the new directory, otherwise return the filename
|
||||
*/
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
int i, end;
|
||||
char namebuf[GBUFSIZ], thestr[GBUFSIZ];
|
||||
NameData *current;
|
||||
|
||||
if(fl_current_picked != -1) /* then an item is selected. Work with it */
|
||||
{
|
||||
/* find item in list */
|
||||
current = fl_start;
|
||||
for(i=0; i<fl_current_picked; i++)
|
||||
current = current->Next;
|
||||
strcpy(namebuf, current->FileN);
|
||||
if(current->type == 1) /* then it's a directory, so switch to it */
|
||||
{
|
||||
if(fl_checkdir(namebuf))
|
||||
{
|
||||
chdir(namebuf);
|
||||
(void) fl_make_list();
|
||||
fl_set_dirtext(fl_DirText);
|
||||
return XV_OK;
|
||||
}
|
||||
}
|
||||
else /* it's a file name, so return it */
|
||||
{
|
||||
if(fl_checkdir(xv_get(fl_DirText, PANEL_VALUE))) /* then valid dir */
|
||||
{
|
||||
if(current->type != 0) /* then it's not a regular file, so strip off
|
||||
** the extra type character: *, =, /, or @ */
|
||||
namebuf[strlen(namebuf)-1]='\0';
|
||||
/* create the file string (with full directory path) */
|
||||
getcwd(thestr, GBUFSIZ);
|
||||
if(thestr[strlen(thestr)-1] != '/')
|
||||
strcat(thestr, "/");
|
||||
strcat(thestr, namebuf);
|
||||
act_on_it_lf(thestr, data); /* give filename to application */
|
||||
xv_destroy_safe(fl_getframe);
|
||||
return XV_OK;
|
||||
}
|
||||
else
|
||||
{ /* invalid directory, so show notice*/
|
||||
int result;
|
||||
Panel panel = (Panel)xv_get(fl_FileList, PANEL_PARENT_PANEL);
|
||||
|
||||
result = notice_prompt(panel, NULL,
|
||||
NOTICE_MESSAGE_STRINGS, "Invalid Directory specified.", NULL,
|
||||
NOTICE_FOCUS_XY, event_x(event), event_y(event),
|
||||
NOTICE_BUTTON_YES, "Change Directory",
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int fl_up_dir_btn(item, event)
|
||||
/* go up one directory */
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
char dirname[GBUFSIZ];
|
||||
|
||||
/* pretty simple, just go up, show it, and change the "Directory:" field */
|
||||
(void) chdir("..");
|
||||
(void) fl_make_list();
|
||||
fl_set_dirtext(fl_DirText);
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
Panel_setting fl_dir_typed(item, event)
|
||||
/* handle when user types return, newline, or tab in the "Directory:" field.
|
||||
** if it's a valid directory, it moves to it, otherwise, display a notice
|
||||
*/
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
int error;
|
||||
char dirname[GBUFSIZ];
|
||||
|
||||
switch (event_action(event))
|
||||
{
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '\t':
|
||||
{
|
||||
if(fl_checkdir(xv_get(fl_DirText, PANEL_VALUE)))
|
||||
{ /* valid directory, chdir to it and show it */
|
||||
chdir(xv_get(fl_DirText, PANEL_VALUE));
|
||||
fl_make_list();
|
||||
fl_set_dirtext(fl_DirText);
|
||||
}
|
||||
else
|
||||
{ /* invalid directory, so show notice */
|
||||
int result;
|
||||
Panel panel = (Panel)xv_get(fl_FileList, PANEL_PARENT_PANEL);
|
||||
|
||||
result = notice_prompt(panel, NULL,
|
||||
NOTICE_MESSAGE_STRINGS, "Invalid Directory specified.", NULL,
|
||||
NOTICE_FOCUS_XY, event_x(event), event_y(event),
|
||||
NOTICE_BUTTON_YES, "Change Directory",
|
||||
NULL);
|
||||
}
|
||||
return PANEL_NONE;
|
||||
};
|
||||
/* if it wasn't \n, \t, or \r, pass event on to standard
|
||||
** panel_text handler
|
||||
*/
|
||||
default:
|
||||
return(panel_text_notify(item, event));
|
||||
}
|
||||
}
|
||||
|
||||
int lf_cancel_btn(item, event)
|
||||
/* handle the cancel button. Just destroys the frame and returns
|
||||
*/
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
|
||||
act_on_it_lf(NULL);
|
||||
xv_destroy_safe(fl_getframe);
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
fl_readln(file, buf)
|
||||
FILE *file;
|
||||
char *buf;
|
||||
{
|
||||
int ic;
|
||||
int i = 0;
|
||||
|
||||
while (((ic=getc(file)) != EOF) && ((char)ic != '\n'))
|
||||
buf[i++]= (char)ic;
|
||||
buf[i] = '\0';
|
||||
}
|
||||
|
||||
int fl_make_list()
|
||||
/* Creates a list of files, out of the current working directory. It then
|
||||
** tells the file list canvas to refresh itself. The list sits attached to
|
||||
** fl_start, for reading by the show_list() routine.
|
||||
*/
|
||||
{
|
||||
FILE *dirp; /* for directory data */
|
||||
int i, list_len, cur_pos;
|
||||
char dirname[GBUFSIZ], tempbuf[GBUFSIZ];
|
||||
NameData *current, *temp; /* structures for reading
|
||||
** and sorting file names */
|
||||
int notdone;
|
||||
struct stat statbuf; /* for checking if a file
|
||||
** name is a directory */
|
||||
int pid = getpid(); /* for creation of temp
|
||||
** file for directory list */
|
||||
char tmpcmd[GBUFSIZ]; /* for holding ls command */
|
||||
char tmpname[GBUFSIZ]; /* for holding file names */
|
||||
|
||||
|
||||
getcwd(dirname, GBUFSIZ);
|
||||
sprintf(tmpcmd, "cd %s;ls -F > /usr/tmp/.svlffil%d", dirname, pid);
|
||||
sprintf(tmpname, "/usr/tmp/.svlffil%d", pid);
|
||||
system(tmpcmd);
|
||||
dirp = fopen(tmpname, "r");
|
||||
if (dirp == NULL) /* just a check to make sure */
|
||||
{
|
||||
fprintf(stderr, "fl_make_list was passed bad directory name\n");
|
||||
return(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* free up the old list, to build a new one */
|
||||
for(current = fl_start; current->FileN != (char *)NULL; i++)
|
||||
{
|
||||
temp = current;
|
||||
current = current->Next;
|
||||
free(temp->FileN);
|
||||
free(temp);
|
||||
};
|
||||
/* set up the linked list for sorting */
|
||||
fl_start = (NameData *)calloc(1, sizeof(NameData)+1);
|
||||
fl_start->FileN = (char *)NULL;
|
||||
fl_start->Next = NULL;
|
||||
/* read through the directory entries */
|
||||
list_len = 0;
|
||||
for(fl_readln(dirp, tempbuf); tempbuf[0] != '\0'; fl_readln(dirp, tempbuf))
|
||||
{
|
||||
/* don't include "." and ".." in the list */
|
||||
if((strcmp(tempbuf,"./")!=0)&&
|
||||
(strcmp(tempbuf,"../")!=0))
|
||||
{
|
||||
/* find the right spot in the list to insert the new name */
|
||||
current = fl_start;
|
||||
notdone = 1;
|
||||
while(notdone)
|
||||
if(current->FileN == NULL)
|
||||
notdone = 0;
|
||||
else if(strcmp(tempbuf, current->FileN)>0)
|
||||
current = current->Next;
|
||||
else
|
||||
notdone = 0;
|
||||
/* insert the new name */
|
||||
temp = (NameData *)calloc(1, sizeof(NameData)+1);
|
||||
temp->FileN = current->FileN;
|
||||
temp->type = current->type;
|
||||
temp->Next = current->Next;
|
||||
++list_len;
|
||||
current->Next = temp;
|
||||
/* set flag for file type */
|
||||
switch(tempbuf[strlen(tempbuf)-1])
|
||||
{
|
||||
case '/': /* directory */
|
||||
{
|
||||
current->type = 1;
|
||||
break;
|
||||
}
|
||||
case '@': /* symbolic link */
|
||||
{
|
||||
current->type = 3;
|
||||
break;
|
||||
}
|
||||
case '=': /* socket */
|
||||
{
|
||||
current->type = 4;
|
||||
break;
|
||||
}
|
||||
case '*': /* executable */
|
||||
{
|
||||
current->type = 2;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
current->type = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
current->FileN = (char *)calloc(1, 1+strlen(tempbuf));
|
||||
strcpy(current->FileN,tempbuf);
|
||||
};
|
||||
}
|
||||
fclose(dirp);
|
||||
sprintf(tmpcmd, "rm %s", tmpname);
|
||||
system(tmpcmd);
|
||||
|
||||
/* adjust the Canvas size, and refresh it */
|
||||
fl_current_len = list_len;
|
||||
cur_pos = xv_get(fl_scroll, SCROLLBAR_VIEW_START);
|
||||
xv_set(fl_FileList, CANVAS_HEIGHT,
|
||||
(list_len+fl_view_h()+1)*fl_cell_h,
|
||||
NULL);
|
||||
/* scrollbars bomb with zero-length objects */
|
||||
if(list_len == 0) ++list_len;
|
||||
/* reset scrollbar */
|
||||
xv_set(fl_scroll, SCROLLBAR_VIEW_START, 0,
|
||||
SCROLLBAR_OBJECT_LENGTH, list_len,
|
||||
NULL);
|
||||
/* refresh canvas */
|
||||
wmgr_refreshwindow(canvas_paint_window(fl_FileList));
|
||||
fl_current_picked = -1;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
fl_set_dirtext(fl_DirText)
|
||||
/* sets the "Directory:" field according to the current directory
|
||||
** fl_DirText is the Xview pointer to the fl_DirText Panel Item
|
||||
*/
|
||||
Panel_item fl_DirText;
|
||||
{
|
||||
char dirbuf[GBUFSIZ];
|
||||
|
||||
getcwd(dirbuf, GBUFSIZ);
|
||||
xv_set(fl_DirText, PANEL_VALUE, dirbuf, NULL);
|
||||
|
||||
}
|
||||
|
||||
int fl_checkdir(dirname)
|
||||
/* check if a directory can be opened. directory can be specified by
|
||||
** full root name or by current name. returns true if it can be opened.
|
||||
*/
|
||||
char *dirname;
|
||||
{
|
||||
DIR *dirp;
|
||||
|
||||
dirp = opendir(dirname);
|
||||
if(dirp == NULL) /* not available, user cannot enter */
|
||||
return(0);
|
||||
else
|
||||
{
|
||||
closedir(dirp); /* must close it */
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
void fl_show_list_lf(canvas, paint_window, repaint_area)
|
||||
/* repaint procedure for the file list canvas. Repaints all file names in
|
||||
** the damaged area */
|
||||
Canvas canvas;
|
||||
Xv_Window paint_window;
|
||||
Rectlist *repaint_area;
|
||||
{
|
||||
NameData *current;
|
||||
int i;
|
||||
int start_draw, end_draw;
|
||||
Display *dpy;
|
||||
Window xwin;
|
||||
|
||||
|
||||
/* make sure AUTO_CLEAR is off, this routine will do it itself */
|
||||
while(xv_get(fl_FileList, OPENWIN_AUTO_CLEAR)!=FALSE)
|
||||
{
|
||||
fprintf(stderr, "lf:found bug--OPENWIN_AUTO_CLEAR still TRUE");
|
||||
xv_set(fl_FileList, OPENWIN_AUTO_CLEAR, FALSE, NULL);
|
||||
}
|
||||
/* make sure RETAINED is off, this routine will repaint itself */
|
||||
while(xv_get(fl_FileList, CANVAS_RETAINED)!=FALSE)
|
||||
{
|
||||
fprintf(stderr, "lf:found bug--CANVAS_RETAINED still TRUE");
|
||||
xv_set(fl_FileList, CANVAS_RETAINED, FALSE, NULL);
|
||||
}
|
||||
/* get display and window */
|
||||
dpy = (Display *)xv_get(paint_window, XV_DISPLAY);
|
||||
xwin = (Window)xv_get(paint_window, XV_XID);
|
||||
|
||||
/* clear the area given us by Xview, for simplicity, we clear the
|
||||
** smallest rectangle that encloses all of the destroyed areas, the
|
||||
** rl_bound rectangle */
|
||||
XClearArea(dpy, xwin,
|
||||
repaint_area->rl_bound.r_left,
|
||||
repaint_area->rl_bound.r_top,
|
||||
repaint_area->rl_bound.r_width,
|
||||
repaint_area->rl_bound.r_height,
|
||||
0);
|
||||
/* the next 3 lines calculate which file names must be drawn, by where the
|
||||
** top and bottom of the rl_bound rectangle lie */
|
||||
start_draw = repaint_area->rl_bound.r_top;
|
||||
end_draw = (repaint_area->rl_bound.r_height + start_draw - 1) / fl_cell_h;
|
||||
start_draw = (start_draw - 1) / fl_cell_h;
|
||||
|
||||
/* find the first element to draw in the list */
|
||||
current = fl_start;
|
||||
for(i = 0; (i<start_draw) && (current->Next != NULL); i++)
|
||||
current = current->Next;
|
||||
/* now start drawing them */
|
||||
for(; (i<=end_draw) && (current->Next != NULL); i++)
|
||||
{
|
||||
XDrawString(dpy, xwin, fl_gc, 5, i*fl_cell_h+fl_ascent, current->FileN,
|
||||
strlen(current->FileN));
|
||||
/* add a box if we are drawing the currently picked one */
|
||||
if(i==fl_current_picked)
|
||||
{
|
||||
XDrawRectangle(dpy, xwin, fl_gc,
|
||||
2, i*fl_cell_h,
|
||||
xv_get(canvas, XV_WIDTH)-11-xv_get(fl_scroll, XV_WIDTH),
|
||||
fl_cell_h);
|
||||
}
|
||||
current = current->Next;
|
||||
}
|
||||
}
|
||||
|
||||
void fl_list_select_lf(paint_window, event)
|
||||
/* callback procedure for events that happen in the file list canvas. Checks
|
||||
** mouse button press or drag, and for when the user types return */
|
||||
Xv_window paint_window;
|
||||
Event *event;
|
||||
{
|
||||
int picked, cur_pos;
|
||||
Window xwin = (Window)xv_get(paint_window, XV_XID);
|
||||
Display *dpy;
|
||||
|
||||
dpy = (Display *)xv_get(paint_window, XV_DISPLAY);
|
||||
/* get the current position of the scrollbar for future reference */
|
||||
cur_pos = xv_get(fl_scroll, SCROLLBAR_VIEW_START);
|
||||
|
||||
/* first, check for user picking a file name */
|
||||
if((event_action(event) == ACTION_SELECT)||
|
||||
(event_action(event) == LOC_DRAG))
|
||||
{
|
||||
picked = (event_y(event) - 1) / fl_cell_h;
|
||||
/* make sure the file picked is on screen. if it is not,
|
||||
** we just ignore it. this avoids wierd stuff, like being
|
||||
** able to pick files that aren't shown on screen */
|
||||
if((picked >= cur_pos)&&
|
||||
(picked < cur_pos+fl_view_h())&&
|
||||
(picked < fl_current_len))
|
||||
{
|
||||
/* efficiency: ignore if it is already picked */
|
||||
if(picked != fl_current_picked)
|
||||
{
|
||||
#ifdef SGI /* added refresh to get rid of old boxes*/
|
||||
wmgr_refreshwindow(canvas_paint_window(fl_FileList));
|
||||
#endif /sgi */
|
||||
|
||||
XSetFunction(dpy, fl_gc, GXclear);
|
||||
XDrawRectangle(dpy, xwin, fl_gc,
|
||||
2, fl_current_picked*fl_cell_h,
|
||||
xv_get(fl_FileList, XV_WIDTH)-11-
|
||||
xv_get(fl_scroll, XV_WIDTH),
|
||||
fl_cell_h);
|
||||
XSetFunction(dpy, fl_gc, GXcopy);
|
||||
XDrawRectangle(dpy, xwin, fl_gc,
|
||||
2, picked*fl_cell_h,
|
||||
xv_get(fl_FileList, XV_WIDTH)-11-
|
||||
xv_get(fl_scroll, XV_WIDTH),
|
||||
fl_cell_h);
|
||||
fl_current_picked = picked;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* user may have pressed return, then just call the open button
|
||||
** callback procedure. PANEL_FIRST_ITEM gets the pointer to the
|
||||
** open button itself, since it happens to be the first item on
|
||||
** the panel. fl_open_btn doesn't really use this parameter, but
|
||||
** just in case it ever does, we include it. */
|
||||
else if((event_is_ascii(event))&&(event_action(event) == '\r'))
|
||||
fl_open_btn_lf(xv_get(fl_Getpanel, PANEL_FIRST_ITEM), event);
|
||||
else
|
||||
return;
|
||||
}
|
||||
int fl_view_h()
|
||||
/* returns the current height (in # of file names displayed) of the file list */
|
||||
{
|
||||
return (((int)xv_get(fl_FileList, XV_HEIGHT))/fl_cell_h);
|
||||
}
|
||||
|
||||
Notify_value
|
||||
fl_free_mem(client, status)
|
||||
/* clean up when the frame is destroyed. Frees up the memory used in the
|
||||
** linked list of file names, and sets the Frame variable (getframe) to null */
|
||||
Notify_client client;
|
||||
Destroy_status status;
|
||||
{
|
||||
NameData *current, *temp;
|
||||
int i;
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case DESTROY_CHECKING:
|
||||
return NOTIFY_DONE;
|
||||
case DESTROY_CLEANUP:
|
||||
{
|
||||
for(current = fl_start; current->FileN != (char *)NULL; i++)
|
||||
{
|
||||
temp = current;
|
||||
current = current->Next;
|
||||
free(temp->FileN);
|
||||
free(temp);
|
||||
};
|
||||
fl_getframe = XV_NULL;
|
||||
return notify_next_destroy_func(client, status);
|
||||
}
|
||||
default:
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,667 @@
|
|||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <strings.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/scrollbar.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/window.h>
|
||||
#include <xview/notice.h>
|
||||
#include <xview/textsw.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
/*
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
EditCut(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern NA_Alignment *DataSet,*Clipboard;
|
||||
char buffer[80];
|
||||
|
||||
int j,numselected=0,numshifted = 0;
|
||||
|
||||
if(TestSelection() == SELECT_REGION)
|
||||
return(EditSubCut(item,event));
|
||||
|
||||
for(j=0;j<Clipboard->numelements;j++)
|
||||
{
|
||||
FreeNASeq(Clipboard->element[j]);
|
||||
InitNASeq(&(Clipboard->element[j]),TEXT);
|
||||
}
|
||||
Clipboard->numelements = 0;
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].selected)
|
||||
{
|
||||
if(numselected >= Clipboard->maxnumelements-1)
|
||||
{
|
||||
Clipboard->maxnumelements += 10;
|
||||
Clipboard->element = (NA_Sequence*)Realloc
|
||||
(Clipboard->element,
|
||||
Clipboard->maxnumelements*sizeof(NA_Sequence));
|
||||
}
|
||||
Clipboard->element[(Clipboard->numelements)] =
|
||||
DataSet->element[j];
|
||||
/*
|
||||
* Map sequences back into their global positions, as we will
|
||||
* normailze the alignment after they are copied out.
|
||||
*/
|
||||
Clipboard->element[(Clipboard->numelements)++].offset+=
|
||||
DataSet->rel_offset;
|
||||
|
||||
numselected++;
|
||||
}
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].selected)
|
||||
numshifted++;
|
||||
else
|
||||
DataSet->element[j-numshifted] =
|
||||
DataSet->element[j];
|
||||
|
||||
DataSet->numelements -= numshifted;
|
||||
|
||||
NormalizeOffset(DataSet);
|
||||
|
||||
SetNADData(DataSet,EditCan,EditNameCan);
|
||||
|
||||
Regroup(DataSet);
|
||||
|
||||
RepaintAll(TRUE);
|
||||
sprintf(buffer,"%d sequence in Sequence Clipboard",numselected);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
EditCopy(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern NA_Alignment *DataSet,*Clipboard;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
char buffer[80];
|
||||
|
||||
int i,j,numselected=0,numshifted = 0,this;
|
||||
|
||||
if(TestSelection() == SELECT_REGION)
|
||||
return(EditSubCopy(item,event));
|
||||
|
||||
for(j=0;j<Clipboard->numelements;j++)
|
||||
{
|
||||
FreeNASeq(Clipboard->element[j]);
|
||||
InitNASeq(&(Clipboard->element[j]),TEXT);
|
||||
}
|
||||
Clipboard->numelements = 0;
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].selected)
|
||||
{
|
||||
this = Clipboard->numelements;
|
||||
if(numselected >= Clipboard->maxnumelements-1)
|
||||
{
|
||||
Clipboard->maxnumelements += 10;
|
||||
Clipboard->element = (NA_Sequence*)Realloc
|
||||
(Clipboard->element,
|
||||
Clipboard->maxnumelements*sizeof(NA_Sequence));
|
||||
InitNASeq(&(Clipboard->element
|
||||
[this]),
|
||||
DataSet->element[j].elementtype);
|
||||
}
|
||||
Clipboard->element[this] = DataSet->element[j];
|
||||
/*
|
||||
* Handle comments
|
||||
*/
|
||||
if(DataSet->element[j].comments)
|
||||
{
|
||||
Clipboard->element[this].comments = (char*)
|
||||
strdup(DataSet->element[j].comments);
|
||||
Clipboard->element[this].comments_maxlen =
|
||||
Clipboard->element[this].comments_len;
|
||||
}
|
||||
/*
|
||||
* And baggage
|
||||
*/
|
||||
if(DataSet->element[j].baggage)
|
||||
{
|
||||
Clipboard->element[this].baggage = (char*)
|
||||
strdup(DataSet->element[j].baggage);
|
||||
Clipboard->element[this].baggage_maxlen =
|
||||
Clipboard->element[this].baggage_len;
|
||||
}
|
||||
|
||||
Clipboard->element[this].cmask = NULL;
|
||||
Clipboard->element[this].sequence
|
||||
= (NA_Base*)Calloc(DataSet->element[j].seqmaxlen,
|
||||
sizeof(NA_Base));
|
||||
for(i=0;i<DataSet->element[j].seqlen;i++)
|
||||
Clipboard->element[Clipboard->numelements].
|
||||
sequence[i] = DataSet->element[j].sequence[i];
|
||||
|
||||
/*
|
||||
putelem(&(Clipboard->element[Clipboard->
|
||||
numelements]),i,
|
||||
getelem(&(DataSet->element[j]),i));
|
||||
*/
|
||||
/*
|
||||
* Map sequences back into their global positions, as we will
|
||||
* normailze the alignment after they are copied out.
|
||||
*/
|
||||
Clipboard->element[(Clipboard->numelements)].offset +=
|
||||
DataSet->rel_offset;
|
||||
|
||||
(Clipboard->numelements)++;
|
||||
numselected++;
|
||||
}
|
||||
sprintf(buffer,"%d sequence in Clipboard",numselected);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
EditPaste(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern NA_Alignment *DataSet,*Clipboard;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern TextClipSize;
|
||||
int j,last = -1;
|
||||
|
||||
if(TextClipSize != 0)
|
||||
{
|
||||
if(Clipboard->numelements == 0)
|
||||
return(EditSubPaste(item,event));
|
||||
else if(notice_prompt(frame,NULL,NOTICE_MESSAGE_STRINGS,
|
||||
"You have data in both clipboards, do you",
|
||||
"wish to paste from the...",
|
||||
NULL,
|
||||
NOTICE_BUTTON,"Sequence clipboard",1,
|
||||
NOTICE_BUTTON,"Text clipboard",2,
|
||||
0) == 2)
|
||||
return(EditSubPaste(item,event));
|
||||
}
|
||||
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].selected)
|
||||
last = j;
|
||||
|
||||
if(DataSet->maxnumelements <= DataSet->numelements+
|
||||
Clipboard->numelements)
|
||||
{
|
||||
DataSet->maxnumelements+=Clipboard->numelements;
|
||||
DataSet->element =(NA_Sequence*)Realloc(DataSet->element,
|
||||
DataSet->maxnumelements*sizeof(NA_Sequence));
|
||||
}
|
||||
|
||||
for(j=DataSet->numelements-1;j>=last+1;j--)
|
||||
DataSet->element[j+Clipboard->numelements] =
|
||||
DataSet->element[j];
|
||||
|
||||
for(j=0;j<Clipboard->numelements;j++)
|
||||
{
|
||||
DataSet->element[last+1+j] = Clipboard->element[j];
|
||||
/*
|
||||
* be sure to bring them back into alignment with the rest
|
||||
*/
|
||||
DataSet->element[last+1+j].offset -= DataSet->rel_offset;
|
||||
}
|
||||
DataSet->numelements += Clipboard->numelements;
|
||||
|
||||
/*
|
||||
for(j=0;j<Clipboard->numelements;j++)
|
||||
{
|
||||
FreeNASeq(Clipboard->element[j]);
|
||||
InitNASeq(&(Clipboard->element[j]),TEXT);
|
||||
}
|
||||
*/
|
||||
Clipboard->numelements = 0;
|
||||
|
||||
NormalizeOffset(DataSet);
|
||||
|
||||
SetNADData(DataSet,EditCan,EditNameCan);
|
||||
|
||||
Regroup(DataSet);
|
||||
|
||||
RepaintAll(TRUE);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,"Clipboard empty",0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,"Clipboard empty",0);
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
|
||||
Regroup(alignment)
|
||||
NA_Alignment *alignment;
|
||||
{
|
||||
|
||||
int j,group,last;
|
||||
|
||||
for(j=0;j<alignment->numelements;j++)
|
||||
{
|
||||
alignment->element[j].groupf = NULL;
|
||||
alignment->element[j].groupb = NULL;
|
||||
}
|
||||
|
||||
for(group = 1;group <= alignment->numgroups;group++)
|
||||
{
|
||||
last = -1;
|
||||
for(j=0;j<alignment->numelements;j++)
|
||||
if(alignment->element[j].groupid == group)
|
||||
{
|
||||
if(last != -1)
|
||||
{
|
||||
alignment->element[j].groupb =
|
||||
&(alignment->element[last]);
|
||||
alignment->element[last].groupf =
|
||||
&(alignment->element[j]);
|
||||
}
|
||||
last = j;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
EditSubCut(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern NA_Alignment *DataSet,*Clipboard;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern char **TextClip;
|
||||
extern int TextClipSize,TextClipLength;
|
||||
int blank_space = 0;
|
||||
|
||||
NA_Sequence *this_elem;
|
||||
char buffer[80];
|
||||
|
||||
int j,i,k,numselected=0,numshifted = 0,columns=0;
|
||||
|
||||
/*
|
||||
* Check how many columns selected
|
||||
*/
|
||||
|
||||
if(DataSet->selection_mask == NULL)
|
||||
return;
|
||||
|
||||
for(j=0;j<DataSet->maxlen;j++)
|
||||
if(DataSet->selection_mask[j] == '1')
|
||||
columns++;
|
||||
|
||||
if(columns == 0)
|
||||
return;
|
||||
/*
|
||||
* Free old Text clipboard
|
||||
*/
|
||||
if(SubCutViolate())
|
||||
{
|
||||
Warning("Cut violates current protections");
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
for(j=0;j<TextClipSize;j++)
|
||||
Cfree(TextClip[j]);
|
||||
TextClipSize = 0;
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].subselected)
|
||||
TextClipSize++;
|
||||
|
||||
if(TextClipSize == 0)
|
||||
return;
|
||||
|
||||
TextClip = (char**)Calloc(TextClipSize,sizeof(char*));
|
||||
|
||||
for(j=0;j<TextClipSize;j++)
|
||||
TextClip[j] = (char *)Calloc(columns,sizeof(char));
|
||||
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].subselected)
|
||||
{
|
||||
this_elem = &(DataSet->element[j]);
|
||||
/*
|
||||
* Need to check protections
|
||||
*/
|
||||
|
||||
for(i=0,blank_space = 0;i<this_elem->offset;i++)
|
||||
if(DataSet->selection_mask[i] == '1')
|
||||
TextClip[numselected][blank_space++] =
|
||||
(char)getelem(this_elem,i);
|
||||
|
||||
|
||||
for(i=0,k=0;i<this_elem->seqlen;i++)
|
||||
{
|
||||
if(DataSet->selection_mask[i+this_elem->offset]
|
||||
== '1')
|
||||
{
|
||||
if(this_elem->tmatrix)
|
||||
TextClip[numselected][k++] =
|
||||
this_elem->tmatrix[
|
||||
(char)getelem(this_elem,
|
||||
i+this_elem->offset)];
|
||||
else
|
||||
TextClip[numselected][k++] =
|
||||
(char)getelem(this_elem,
|
||||
i+this_elem->offset);
|
||||
}
|
||||
|
||||
if((k!=0) && (i<this_elem->seqlen-1))
|
||||
{
|
||||
this_elem->sequence[1+i-k] =
|
||||
this_elem->sequence[1+i];
|
||||
if(this_elem->cmask)
|
||||
{
|
||||
this_elem->cmask[1+i-k] =
|
||||
this_elem->cmask[1+i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
numselected++;
|
||||
this_elem->seqlen -= k;
|
||||
this_elem->offset -= blank_space;
|
||||
/*
|
||||
* This might cause problems later on if the selection mask is
|
||||
* not cleaned...Make sure you test for subselected, not just
|
||||
* for a non-0 mask.
|
||||
*/
|
||||
this_elem->subselected = FALSE;
|
||||
}
|
||||
|
||||
TextClipLength = columns;
|
||||
NormalizeOffset(DataSet);
|
||||
|
||||
SetNADData(DataSet,EditCan,EditNameCan);
|
||||
|
||||
Regroup(DataSet);
|
||||
|
||||
RepaintAll(TRUE);
|
||||
|
||||
sprintf(buffer,"%d bytes in Text Clipboard",numselected*columns);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
SubCutViolate()
|
||||
{
|
||||
int i,j;
|
||||
NA_Sequence *this_elem;
|
||||
extern NA_Alignment *DataSet;
|
||||
char base,tbase;
|
||||
int GAP=FALSE,UNAMB=FALSE,AMB=FALSE,prot;
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
{
|
||||
this_elem = &(DataSet->element[j]);
|
||||
prot = this_elem->protect;
|
||||
if((this_elem->subselected)&& (this_elem->elementtype!=TEXT))
|
||||
{
|
||||
for(i=0;i<DataSet->maxlen;i++)
|
||||
if(DataSet->selection_mask[i] == '1')
|
||||
{
|
||||
base = (char)getelem(this_elem,i);
|
||||
if(this_elem->tmatrix)
|
||||
tbase = (this_elem->tmatrix[base])|32;
|
||||
switch(this_elem->elementtype)
|
||||
{
|
||||
case DNA:
|
||||
case RNA:
|
||||
if((base&15) == 0)
|
||||
GAP=TRUE;
|
||||
else if(tbase == 'n')
|
||||
AMB=TRUE;
|
||||
else
|
||||
UNAMB = TRUE;
|
||||
break;
|
||||
case PROTEIN:
|
||||
if(base == '-' ||
|
||||
base == '~' ||
|
||||
base == ' ')
|
||||
GAP=TRUE;
|
||||
else if(base == 'X' ||
|
||||
base == 'x')
|
||||
AMB=TRUE;
|
||||
else
|
||||
UNAMB = TRUE;
|
||||
break;
|
||||
case MASK:
|
||||
if(base == '0')
|
||||
GAP = TRUE;
|
||||
else
|
||||
UNAMB = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(((prot & PROT_WHITE_SPACE)==0) && GAP)
|
||||
return(TRUE);
|
||||
else if(((prot & PROT_GREY_SPACE)==0) && AMB)
|
||||
return(TRUE);
|
||||
else if(((prot & PROT_BASE_CHANGES)==0) &&
|
||||
UNAMB)
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
EditSubPaste(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern NA_Alignment *DataSet,*Clipboard;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern char **TextClip;
|
||||
extern int TextClipSize,TextClipLength;
|
||||
int *temp_cmask,cursorx,cursory;
|
||||
|
||||
NA_Sequence *this_elem;
|
||||
char buffer[80];
|
||||
|
||||
int j,i,k,violate = FALSE;
|
||||
|
||||
if(DataSet->selection_mask == NULL)
|
||||
return(XV_OK);
|
||||
|
||||
if(TextClipSize == 0 || TextClipLength==0)
|
||||
return(XV_OK);
|
||||
|
||||
cursorx = ((NA_DisplayData*)(DataSet->na_ddata))->cursor_x;
|
||||
cursory = ((NA_DisplayData*)(DataSet->na_ddata))->cursor_y;
|
||||
|
||||
if(cursory + TextClipSize > DataSet->numelements)
|
||||
{
|
||||
Warning("Can't paste a block there.");
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
for(j=0;j<TextClipSize;j++)
|
||||
{
|
||||
this_elem = &(DataSet->element[j+cursory]);
|
||||
violate |= InsertViolate(DataSet,this_elem,
|
||||
TextClip[j],cursorx,TextClipLength);
|
||||
}
|
||||
if(violate == FALSE)
|
||||
{
|
||||
for(j=0;j<TextClipSize;j++)
|
||||
{
|
||||
this_elem = &(DataSet->element[j+cursory]);
|
||||
InsertNA(this_elem,TextClip[j],TextClipLength,cursorx);
|
||||
}
|
||||
}
|
||||
|
||||
RepaintAll(TRUE);
|
||||
sprintf(buffer,"%d bytes in Text Clipboard",TextClipLength *
|
||||
TextClipSize);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
EditSubCopy(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern Frame frame;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
extern NA_Alignment *DataSet,*Clipboard;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern char **TextClip;
|
||||
extern int TextClipSize,TextClipLength;
|
||||
int blank_space = 0;
|
||||
|
||||
NA_Sequence *this_elem;
|
||||
char buffer[80];
|
||||
|
||||
int j,i,k,numselected=0,numshifted = 0,columns=0;
|
||||
|
||||
/*
|
||||
* Check how many columns selected
|
||||
*/
|
||||
|
||||
if(DataSet->selection_mask == NULL)
|
||||
return;
|
||||
|
||||
for(j=0;j<DataSet->maxlen;j++)
|
||||
if(DataSet->selection_mask[j] == '1')
|
||||
columns++;
|
||||
|
||||
if(columns == 0)
|
||||
return;
|
||||
/*
|
||||
* Free old Text clipboard
|
||||
*/
|
||||
for(j=0;j<TextClipSize;j++)
|
||||
Cfree(TextClip[j]);
|
||||
TextClipSize = 0;
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].subselected)
|
||||
TextClipSize++;
|
||||
|
||||
if(TextClipSize == 0)
|
||||
return;
|
||||
|
||||
TextClip = (char**)Calloc(TextClipSize,sizeof(char*));
|
||||
|
||||
for(j=0;j<TextClipSize;j++)
|
||||
TextClip[j] = (char *)Calloc(columns,sizeof(char));
|
||||
|
||||
|
||||
for(j=0;j<DataSet->numelements;j++)
|
||||
if(DataSet->element[j].subselected)
|
||||
{
|
||||
this_elem = &(DataSet->element[j]);
|
||||
/*
|
||||
* Need to check protections
|
||||
*/
|
||||
|
||||
for(i=0,blank_space = 0;i<this_elem->offset;i++)
|
||||
if(DataSet->selection_mask[i] == '1')
|
||||
TextClip[numselected][blank_space++] =
|
||||
(char)getelem(this_elem,i);
|
||||
|
||||
|
||||
for(i=0,k=0;i<this_elem->seqlen;i++)
|
||||
{
|
||||
if(DataSet->selection_mask[i+this_elem->offset]
|
||||
== '1')
|
||||
{
|
||||
if(this_elem->tmatrix)
|
||||
TextClip[numselected][k++] =
|
||||
this_elem->tmatrix[
|
||||
(char)getelem(this_elem,
|
||||
i+this_elem->offset)];
|
||||
else
|
||||
TextClip[numselected][k++] =
|
||||
(char)getelem(this_elem,
|
||||
i+this_elem->offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
numselected++;
|
||||
this_elem->subselected = FALSE;
|
||||
}
|
||||
|
||||
TextClipLength = columns;
|
||||
|
||||
SetNADData(DataSet,EditCan,EditNameCan);
|
||||
|
||||
RepaintAll(TRUE);
|
||||
|
||||
sprintf(buffer,"%d bytes in Text Clipboard",numselected*columns);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
int TestSelection()
|
||||
{
|
||||
int j,select_mode = 0,selected = 0,subselected = 0;
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Frame frame;
|
||||
|
||||
for(j=0;j<((NA_Alignment*)DataSet)->numelements;j++)
|
||||
{
|
||||
selected|=((NA_Alignment*)DataSet)->element[j].selected;
|
||||
subselected|=((NA_Alignment*)DataSet)->element[j].subselected;
|
||||
}
|
||||
|
||||
if (!(selected || subselected))
|
||||
Warning("Warning, no sequences selected");
|
||||
|
||||
if(selected && !subselected)
|
||||
select_mode = SELECTED;
|
||||
|
||||
if(!selected && subselected)
|
||||
select_mode = SELECT_REGION;
|
||||
|
||||
if(selected && subselected)
|
||||
select_mode = notice_prompt(frame,NULL,NOTICE_MESSAGE_STRINGS,
|
||||
"Do you want to use the...",NULL,
|
||||
NOTICE_BUTTON,"Selected sequences",SELECTED,
|
||||
NOTICE_BUTTON,"Selected regions",SELECT_REGION,
|
||||
NULL);
|
||||
/*
|
||||
for(j=0;j<((NA_Alignment*)DataSet)->numelements;j++)
|
||||
{
|
||||
if(select_mode == SELECT_REGION)
|
||||
((NA_Alignment*)DataSet)->element[j].selected = FALSE;
|
||||
else
|
||||
((NA_Alignment*)DataSet)->element[j].subselected = FALSE;
|
||||
}
|
||||
*/
|
||||
|
||||
return(select_mode);
|
||||
}
|
||||
|
Binary file not shown.
|
@ -0,0 +1,356 @@
|
|||
#include <malloc.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/font.h>
|
||||
#include <xview/xv_xrect.h>
|
||||
#include <xview/cms.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
|
||||
/*
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
DrawNAColor(can,NAdd,xwin,left,top,indx,lpos,rpos,dpy,gc,mode,inverted)
|
||||
Canvas can;
|
||||
NA_DisplayData *NAdd;
|
||||
Window xwin;
|
||||
Display *dpy;
|
||||
int left,top,indx,lpos,rpos,mode,inverted;
|
||||
GC gc;
|
||||
{
|
||||
char buffer[MAX_NA_DISPLAY_WIDTH],map_chr;
|
||||
register int j,i,next_color,invrt = FALSE;
|
||||
int unselected_inverted = FALSE,dir;
|
||||
int pmin,wid,x,y,*tmat,fdx,fdy,pmax,first,used;
|
||||
register int seqposindx;
|
||||
register unsigned long *pixels;
|
||||
extern int SCALE, DisplayAttr;
|
||||
extern Pixmap grey_pm[];
|
||||
|
||||
int *color_mask,*colors,color,start_col,offset;
|
||||
int maxlen = 0,global_offset = 0;
|
||||
NA_Base base;
|
||||
NA_Sequence *elem;
|
||||
NA_Alignment *aln = NAdd->aln;
|
||||
int scrn = DefaultScreen(dpy);
|
||||
int dithered = FALSE;
|
||||
|
||||
colors = aln->element[indx].col_lut;
|
||||
/*
|
||||
* Just in case no characters need to be drawn...
|
||||
*/
|
||||
next_color = 13;
|
||||
XSetForeground(dpy,gc,BlackPixel(dpy,scrn));
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
|
||||
|
||||
pixels = (unsigned long*)xv_get(can,WIN_X_COLOR_INDICES);
|
||||
fdx = NAdd -> font_dx;
|
||||
fdy = NAdd -> font_dy;
|
||||
y=fdy * (indx+1-top);
|
||||
|
||||
elem = &(NAdd->aln->element[indx]);
|
||||
tmat = aln->element[indx].tmatrix;
|
||||
#ifdef HGL
|
||||
dir = OrigDir(elem);
|
||||
#else
|
||||
dir = (elem->attr & IS_PRIMARY)?1:
|
||||
(elem->attr & IS_SECONDARY)?-1:0;
|
||||
#endif
|
||||
|
||||
map_chr = (dir == 0)?'+':(dir == -1)?'<':'>';
|
||||
|
||||
wid = (rpos-lpos)/SCALE+1;
|
||||
|
||||
seqposindx=lpos;
|
||||
pmax = MIN(lpos+wid*SCALE,aln->element[indx].seqlen+
|
||||
aln->element[indx].offset);
|
||||
/*
|
||||
pmax = lpos+wid*SCALE;
|
||||
*/
|
||||
if(aln->element[indx].elementtype == TEXT)
|
||||
mode = COLOR_MONO;
|
||||
|
||||
if((inverted && ((DisplayAttr & INVERTED)==0)) ||
|
||||
((inverted==FALSE) && (DisplayAttr & INVERTED)))
|
||||
unselected_inverted = TRUE;
|
||||
else
|
||||
unselected_inverted = FALSE;
|
||||
if(NAdd->num_colors <16 && mode != COLOR_MONO )
|
||||
dithered = TRUE;
|
||||
|
||||
if(mode == COLOR_SEQ_MASK)
|
||||
{
|
||||
color_mask = elem->cmask;
|
||||
if(color_mask == NULL)
|
||||
mode = COLOR_LOOKUP;
|
||||
}
|
||||
if(mode == COLOR_ALN_MASK)
|
||||
{
|
||||
color_mask = NAdd->aln->cmask;
|
||||
global_offset = aln->cmask_offset - aln->rel_offset;
|
||||
maxlen = aln->maxlen;
|
||||
if(color_mask == NULL)
|
||||
mode = COLOR_LOOKUP;
|
||||
}
|
||||
if(mode == COLOR_LOOKUP && colors == NULL)
|
||||
mode = COLOR_MONO;
|
||||
|
||||
color = 9999;
|
||||
for(j=0;seqposindx<pmax;j++,seqposindx+=SCALE)
|
||||
{
|
||||
base = getelem(elem,seqposindx);
|
||||
offset = elem->offset;
|
||||
|
||||
switch(mode)
|
||||
{
|
||||
case COLOR_SEQ_MASK:
|
||||
next_color = ((seqposindx >= offset) &&
|
||||
(seqposindx<offset+elem->seqlen))?
|
||||
color_mask[seqposindx-offset]:13;
|
||||
break;
|
||||
case COLOR_LOOKUP:
|
||||
next_color = colors[base];
|
||||
break;
|
||||
case COLOR_ALN_MASK:
|
||||
next_color = ((seqposindx >= global_offset) &&
|
||||
(seqposindx-global_offset < aln->cmask_len))?
|
||||
color_mask[seqposindx-global_offset]:13;
|
||||
break;
|
||||
case COLOR_STRAND:
|
||||
if(((tmat?tmat[base]:base) == '-') ||
|
||||
((tmat?tmat[base]:base) == '~'))
|
||||
next_color = 13;
|
||||
#ifdef HGL
|
||||
else if(elem->attr & IS_ORIG_PRIMARY)
|
||||
next_color = 3;
|
||||
else if(elem->attr & IS_ORIG_SECONDARY)
|
||||
next_color = 6;
|
||||
#else
|
||||
else if(elem->attr & IS_PRIMARY)
|
||||
next_color = 3;
|
||||
else if(elem->attr & IS_SECONDARY)
|
||||
next_color = 6;
|
||||
#endif
|
||||
else
|
||||
next_color = NAdd->black;
|
||||
break;
|
||||
case COLOR_MONO:
|
||||
default:
|
||||
next_color = NAdd->black;
|
||||
break;
|
||||
}
|
||||
|
||||
if(elem->subselected)
|
||||
if(aln->selection_mask[seqposindx] == '1')
|
||||
next_color = 1000 + NAdd->black;
|
||||
/*
|
||||
Adding 1000 to a color signals that it is selected/inverted
|
||||
*/
|
||||
if( next_color == color)
|
||||
{
|
||||
buffer[j] = tmat?
|
||||
tmat[base]:base;
|
||||
/*
|
||||
* If in map view, set character to '>' '<' '+' or ' '
|
||||
*/
|
||||
if(SCALE > 1)
|
||||
{
|
||||
if(buffer[j] != '-' && buffer[j] != '~')
|
||||
buffer[j] = map_chr;
|
||||
else
|
||||
buffer[j] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
else if (color == 9999)
|
||||
{
|
||||
buffer[j] = tmat? tmat[base]:base;
|
||||
/*
|
||||
* If in map view, set character to '>' '<' '+' or ' '
|
||||
*/
|
||||
if(SCALE > 1)
|
||||
{
|
||||
if(buffer[j] != '-' && buffer[j] != '~')
|
||||
buffer[j] = map_chr;
|
||||
else
|
||||
buffer[j] = ' ';
|
||||
}
|
||||
color = next_color;
|
||||
start_col = (seqposindx - left)/SCALE * fdx;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(color > 999)
|
||||
{
|
||||
invrt = (unselected_inverted)?FALSE:TRUE;
|
||||
color -= 1000;
|
||||
}
|
||||
else
|
||||
invrt = unselected_inverted;
|
||||
if(invrt)
|
||||
{
|
||||
if(dithered)
|
||||
{
|
||||
XSetStipple(dpy,gc,grey_pm[15-color]);
|
||||
}
|
||||
else
|
||||
{
|
||||
XSetBackground(dpy,gc,pixels[color]);
|
||||
XSetForeground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(dithered)
|
||||
{
|
||||
XSetStipple(dpy,gc,grey_pm[color]);
|
||||
}
|
||||
else
|
||||
{
|
||||
XSetForeground(dpy,gc,pixels[color]);
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
if(dithered == FALSE)
|
||||
XDrawImageString(dpy,xwin,gc,
|
||||
start_col, y, buffer,j);
|
||||
else
|
||||
{
|
||||
XSetFillStyle(dpy,gc,FillOpaqueStippled);
|
||||
XFillRectangle(dpy,xwin,gc,start_col,y-fdy,
|
||||
j * fdx,fdy);
|
||||
XSetFillStyle(dpy,gc,FillSolid);
|
||||
XDrawString(dpy,xwin,gc,
|
||||
start_col, y, buffer,j);
|
||||
}
|
||||
|
||||
wid -= j;
|
||||
j=0;
|
||||
buffer[j] = tmat?
|
||||
tmat[base]:base;
|
||||
/*
|
||||
* If in map view, set character to '>' '<' '+' or ' '
|
||||
*/
|
||||
if(SCALE > 1)
|
||||
{
|
||||
if(buffer[j] != '-' && buffer[j] != '~')
|
||||
buffer[j] = map_chr;
|
||||
else
|
||||
buffer[j] = ' ';
|
||||
}
|
||||
color = next_color;
|
||||
start_col = (seqposindx - left)/SCALE * fdx;
|
||||
}
|
||||
}
|
||||
|
||||
if(color == 9999)
|
||||
color = 13;
|
||||
|
||||
if(color > 999)
|
||||
{
|
||||
invrt = (unselected_inverted)?FALSE:TRUE;
|
||||
color -= 1000;
|
||||
}
|
||||
else
|
||||
invrt = unselected_inverted;
|
||||
if(invrt)
|
||||
{
|
||||
if(dithered)
|
||||
XSetStipple(dpy,gc,grey_pm[15-color]);
|
||||
else
|
||||
{
|
||||
XSetBackground(dpy,gc,pixels[color]);
|
||||
XSetForeground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(dithered)
|
||||
XSetStipple(dpy,gc,grey_pm[color]);
|
||||
else
|
||||
{
|
||||
XSetForeground(dpy,gc,pixels[color]);
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
|
||||
if(dithered == FALSE)
|
||||
XDrawImageString(dpy,xwin,gc, start_col,y, buffer,j);
|
||||
else
|
||||
{
|
||||
XSetFillStyle(dpy,gc,FillOpaqueStippled);
|
||||
XFillRectangle(dpy,xwin,gc,start_col,y-fdy,
|
||||
j * fdx,fdy);
|
||||
XSetFillStyle(dpy,gc,FillSolid);
|
||||
XDrawString(dpy,xwin,gc, start_col,y, buffer,j);
|
||||
}
|
||||
|
||||
wid -= j;
|
||||
start_col = (seqposindx - left)/SCALE * fdx;
|
||||
for(j=0;j<wid;j++)
|
||||
{
|
||||
if(SCALE == 1 && elem->elementtype != TEXT)
|
||||
buffer[j] = '~';
|
||||
else
|
||||
buffer[j] = ' ';
|
||||
}
|
||||
invrt = unselected_inverted;
|
||||
|
||||
buffer[j] = '\0';
|
||||
switch(mode)
|
||||
{
|
||||
case COLOR_MONO:
|
||||
color = NAdd ->black;
|
||||
break;
|
||||
case COLOR_SEQ_MASK:
|
||||
case COLOR_ALN_MASK:
|
||||
case COLOR_LOOKUP:
|
||||
default:
|
||||
color = 13;
|
||||
break;
|
||||
}
|
||||
if(invrt)
|
||||
{
|
||||
if(dithered)
|
||||
XSetStipple(dpy,gc,grey_pm[15-color]);
|
||||
else
|
||||
{
|
||||
XSetBackground(dpy,gc,pixels[color]);
|
||||
XSetForeground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(dithered)
|
||||
XSetStipple(dpy,gc,grey_pm[color]);
|
||||
else
|
||||
{
|
||||
XSetForeground(dpy,gc,pixels[color]);
|
||||
XSetBackground(dpy,gc,WhitePixel(dpy,scrn));
|
||||
}
|
||||
}
|
||||
|
||||
if(dithered == FALSE)
|
||||
XDrawImageString(dpy,xwin,gc,start_col,y, buffer,j);
|
||||
else
|
||||
{
|
||||
XSetFillStyle(dpy,gc,FillOpaqueStippled);
|
||||
XFillRectangle(dpy,xwin,gc,start_col,y-fdy, j*fdx,fdy);
|
||||
XSetFillStyle(dpy,gc,FillSolid);
|
||||
XDrawString(dpy,xwin,gc,start_col,y, buffer,j);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,981 @@
|
|||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <strings.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/window.h>
|
||||
#include <xview/textsw.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
|
||||
/*
|
||||
HandleMenus():
|
||||
Callback routine for the menus. Determine what function was called,
|
||||
and perform the desired operation.
|
||||
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
void HandleMenus(m,mi)
|
||||
Menu m;
|
||||
Menu_item mi;
|
||||
{
|
||||
extern Gmenu menu[];
|
||||
extern GmenuItem *current_item;
|
||||
extern Frame frame,pframe;
|
||||
extern Panel popup;
|
||||
extern int num_menus,BlockInput;
|
||||
|
||||
int i,j,k,curmenu,curitem;
|
||||
Gmenu *thismenu;
|
||||
GmenuItem *thisitem;
|
||||
Panel choice;
|
||||
char *label1;
|
||||
|
||||
|
||||
/*
|
||||
* Find menu, and menu item by searching menu[] and menu[].item[]
|
||||
* for the called menu item.
|
||||
*/
|
||||
if(xv_get(pframe,WIN_SHOW))
|
||||
{
|
||||
/*
|
||||
* By returning after destroying the dialog box, a potential
|
||||
* problem with syncronization is avoided. To demonstrate, compile
|
||||
* without the following "return", and click on a menu item several
|
||||
* times quickly. The current solution is annoying in that if one
|
||||
* decides to change menu items without hitting <cancel>, they must
|
||||
* hit the menu button twice.
|
||||
*/
|
||||
DONT();
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Locate menu chosen...
|
||||
*/
|
||||
BlockInput = TRUE;
|
||||
for(j=0;j<num_menus;j++)
|
||||
if(menu[j].X == m)
|
||||
curmenu = j;
|
||||
|
||||
thismenu = &(menu[curmenu]);
|
||||
label1 = (char*)xv_get(mi,MENU_STRING);
|
||||
|
||||
/*
|
||||
* and menu item chosen.
|
||||
*/
|
||||
for(j=0;j<menu[curmenu].numitems;j++)
|
||||
if(strcmp(label1,thismenu->item[j].label) == 0)
|
||||
curitem = j;
|
||||
|
||||
thisitem = &(thismenu->item[curitem]);
|
||||
xv_set(popup,PANEL_LAYOUT,PANEL_VERTICAL,0);
|
||||
|
||||
|
||||
/*
|
||||
* Create a temporary dialog popup, and set all of the calling
|
||||
* arguements by dialog box returned values.
|
||||
*/
|
||||
|
||||
/*
|
||||
* For all needed arguments...
|
||||
*/
|
||||
for(j=0;j<thisitem->numargs;j++)
|
||||
{
|
||||
/*
|
||||
* Create a prompt for the argument
|
||||
*/
|
||||
switch (thisitem->arg[j].type)
|
||||
{
|
||||
case SLIDER:
|
||||
thisitem->arg[j].X=xv_create(popup,PANEL_SLIDER,
|
||||
PANEL_LAYOUT,PANEL_VERTICAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_MIN_VALUE,thisitem->arg[j].min,
|
||||
PANEL_MAX_VALUE,thisitem->arg[j].max,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
0);
|
||||
break;
|
||||
|
||||
case TEXTFIELD:
|
||||
thisitem->arg[j].X = xv_create(popup,PANEL_TEXT,
|
||||
PANEL_LAYOUT,PANEL_VERTICAL,
|
||||
PANEL_VALUE_DISPLAY_LENGTH,32,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_VALUE,thisitem->arg[j].textvalue,
|
||||
PANEL_NOTIFY_LEVEL,PANEL_ALL,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
0);
|
||||
break;
|
||||
|
||||
case CHOOSER:
|
||||
thisitem->arg[j].X=xv_create(popup,
|
||||
PANEL_CHOICE,
|
||||
PANEL_LAYOUT,PANEL_HORIZONTAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
PANEL_CHOICE_STRING,
|
||||
0,thisitem->arg[j].choice[0].label,
|
||||
0);
|
||||
for(i=1;i<thisitem->arg[j].numchoices;i++)
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_CHOICE_STRING, i,
|
||||
thisitem->arg[j].choice[i].label,
|
||||
0);
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
0);
|
||||
break;
|
||||
case CHOICE_LIST:
|
||||
thisitem->arg[j].X=xv_create(popup,
|
||||
PANEL_LIST,
|
||||
PANEL_LAYOUT, PANEL_VERTICAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_DISPLAY_ROWS,3,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
PANEL_LIST_STRING,
|
||||
0,thisitem->arg[j].choice[0].label,
|
||||
0);
|
||||
for(i=1;i<thisitem->arg[j].numchoices;i++)
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_LIST_STRING, i,
|
||||
thisitem->arg[j].choice[i].label,
|
||||
0);
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
0);
|
||||
break;
|
||||
case CHOICE_MENU:
|
||||
thisitem->arg[j].X=xv_create(popup,
|
||||
PANEL_CHOICE_STACK,
|
||||
PANEL_LAYOUT,PANEL_HORIZONTAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
PANEL_CHOICE_STRING,
|
||||
0,thisitem->arg[j].choice[0].label,
|
||||
0);
|
||||
for(i=1;i<thisitem->arg[j].numchoices;i++)
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_CHOICE_STRING, i,
|
||||
thisitem->arg[j].choice[i].label,
|
||||
0);
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
0);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
xv_set(pframe,FRAME_LABEL,thisitem->label,
|
||||
WIN_DESIRED_HEIGHT,1000,
|
||||
WIN_DESIRED_WIDTH,1000,
|
||||
/*
|
||||
I worry about this one, but a true dialog should not
|
||||
allow you to do anything other than respond to it.
|
||||
*/
|
||||
|
||||
WIN_GRAB_ALL_INPUT,TRUE,
|
||||
0);
|
||||
|
||||
current_item = thisitem;
|
||||
|
||||
/*
|
||||
* Fit it, and show it
|
||||
*/
|
||||
window_fit(popup);
|
||||
window_fit(pframe);
|
||||
if((thisitem->numargs >0) || (thisitem->help !=NULL))
|
||||
xv_set(pframe,WIN_SHOW,TRUE,0);
|
||||
else
|
||||
DO();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
HandleMenuItem():
|
||||
Callback routine for buttons etc. in the dialog box. Store the
|
||||
values returned from the dialog box so that they can be used for calling
|
||||
the external function.
|
||||
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
HandleMenuItem(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
int i,j,thisarg;
|
||||
extern GmenuItem *current_item;
|
||||
|
||||
Panel_setting ps;
|
||||
/*
|
||||
* Find which value was modified...
|
||||
*/
|
||||
for(j=0;j<current_item->numargs;j++)
|
||||
if(item == current_item->arg[j].X)
|
||||
thisarg = j;
|
||||
/*
|
||||
* and store the new value.
|
||||
*/
|
||||
switch(current_item->arg[thisarg].type)
|
||||
{
|
||||
case CHOICE_LIST:
|
||||
for(j=0;j < (int)xv_get(item,PANEL_LIST_NROWS);j++)
|
||||
{
|
||||
if((int)xv_get(item, PANEL_LIST_SELECTED, j) )
|
||||
current_item->arg[thisarg].value = j;
|
||||
}
|
||||
break;
|
||||
case CHOICE_MENU:
|
||||
current_item->arg[thisarg].value =
|
||||
(int)xv_get(item,PANEL_VALUE);
|
||||
break;
|
||||
case CHOOSER:
|
||||
current_item->arg[thisarg].value =
|
||||
(int)xv_get(item,PANEL_VALUE);
|
||||
break;
|
||||
case SLIDER:
|
||||
current_item->arg[thisarg].value =
|
||||
(int)xv_get(item,PANEL_VALUE);
|
||||
break;
|
||||
case TEXTFIELD:
|
||||
ps = panel_text_notify(item,event);
|
||||
strcpy(current_item->arg[thisarg].textvalue,
|
||||
(char*)xv_get(item,PANEL_VALUE));
|
||||
return(ps);
|
||||
break;
|
||||
default:
|
||||
Error("Menu argument type invalid");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
DO():
|
||||
Call external function.
|
||||
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
DO()
|
||||
{
|
||||
extern GmenuItem *current_item; /* rtm 18.III.98 */
|
||||
extern int BlockInput; /* rtm 18.III.98 */
|
||||
extern Frame pframe,frame;
|
||||
extern Panel popup;
|
||||
extern NA_Alignment *DataSet;
|
||||
extern char current_dir[];
|
||||
extern int OVERWRITE;
|
||||
|
||||
int i,j,k,flag,select_mode;
|
||||
static int fileindx = 0;
|
||||
char *Action,buffer[GBUFSIZ],temp[80];
|
||||
|
||||
|
||||
/*
|
||||
* Remove dialog.....
|
||||
*/
|
||||
flag = FALSE;
|
||||
for(j=0;j<current_item->numinputs;j++)
|
||||
if(current_item->input[j].format != STATUS_FILE)
|
||||
flag = TRUE;
|
||||
|
||||
if(flag && DataSet)
|
||||
select_mode = TestSelection();
|
||||
|
||||
/*
|
||||
Make sure that we are still in a writeable directory
|
||||
*/
|
||||
(void)chdir(current_dir);
|
||||
for(j=0;j<current_item->numinputs;j++)
|
||||
{
|
||||
sprintf(buffer,"gde%d_%d",getpid(),fileindx++);
|
||||
current_item->input[j].name = String(buffer);
|
||||
switch(current_item->input[j].format)
|
||||
{
|
||||
case COLORMASK:
|
||||
WriteCMask(DataSet,buffer,select_mode,
|
||||
current_item->input[j].maskable);
|
||||
break;
|
||||
case GENBANK:
|
||||
WriteGen(DataSet,buffer,select_mode,
|
||||
current_item->input[j].maskable);
|
||||
break;
|
||||
case NA_FLAT:
|
||||
WriteNA_Flat(DataSet,buffer,select_mode,
|
||||
current_item->input[j].maskable);
|
||||
break;
|
||||
case STATUS_FILE:
|
||||
WriteStatus(DataSet,buffer,select_mode);
|
||||
break;
|
||||
case GDE:
|
||||
WriteGDE(DataSet,buffer,select_mode,
|
||||
current_item->input[j].maskable);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for(j=0;j<current_item->numoutputs;j++)
|
||||
{
|
||||
sprintf(buffer,"gde%d_%d",getpid(),fileindx++);
|
||||
current_item->output[j].name = String(buffer);
|
||||
}
|
||||
|
||||
xv_destroy_safe(pframe);
|
||||
pframe = xv_create(frame,FRAME_CMD,
|
||||
FRAME_CMD_PUSHPIN_IN,TRUE,
|
||||
FRAME_DONE_PROC,FrameDone,
|
||||
FRAME_SHOW_RESIZE_CORNER,FALSE,
|
||||
WIN_DESIRED_HEIGHT,100,
|
||||
WIN_DESIRED_WIDTH,300,
|
||||
XV_X,300,
|
||||
XV_Y,150,
|
||||
WIN_SHOW,FALSE,
|
||||
0);
|
||||
|
||||
/*
|
||||
* Reset dialog for next call...
|
||||
*/
|
||||
|
||||
popup = xv_get(pframe,FRAME_CMD_PANEL);
|
||||
|
||||
xv_create (popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"HELP",
|
||||
PANEL_NOTIFY_PROC,HELP,
|
||||
0);
|
||||
|
||||
xv_create (popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"OK",
|
||||
PANEL_NOTIFY_PROC,DO,
|
||||
0);
|
||||
|
||||
xv_create(popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"Cancel",
|
||||
PANEL_NOTIFY_PROC,DONT,
|
||||
0);
|
||||
|
||||
/*
|
||||
* Create the command line for external the function call
|
||||
*/
|
||||
Action = (char*)strdup(current_item->method);
|
||||
if(Action == NULL)
|
||||
Error("DO(): Error in duplicating method string");
|
||||
for(j=0;j<current_item->numargs;j++)
|
||||
Action = ReplaceArgs(Action,current_item->arg[j]);
|
||||
|
||||
for(j=0;j<current_item->numinputs;j++)
|
||||
Action = ReplaceFile(Action,current_item->input[j]);
|
||||
|
||||
for(j=0;j<current_item->numoutputs;j++)
|
||||
Action = ReplaceFile(Action,current_item->output[j]);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* call and go...
|
||||
*/
|
||||
|
||||
xv_set(pframe,FRAME_BUSY,TRUE,0);
|
||||
xv_set(frame,FRAME_BUSY,TRUE,0);
|
||||
system(Action);
|
||||
cfree(Action);
|
||||
xv_set(pframe,FRAME_BUSY,FALSE,0);
|
||||
xv_set(frame,FRAME_BUSY,FALSE,0);
|
||||
BlockInput = FALSE;
|
||||
|
||||
for(j=0;j<current_item->numoutputs;j++)
|
||||
{
|
||||
if(current_item->output[j].overwrite)
|
||||
{
|
||||
if(current_item->output[j].format == GDE)
|
||||
OVERWRITE = TRUE;
|
||||
else
|
||||
Warning("Overwrite mode only available for GDE format");
|
||||
}
|
||||
switch(current_item->output[j].format)
|
||||
{
|
||||
/*
|
||||
* The LoadData routine must be reworked so that
|
||||
* OpenFileName uses it, and so I can remove the
|
||||
* major kluge in OpenFileName().
|
||||
*/
|
||||
case GENBANK:
|
||||
case NA_FLAT:
|
||||
case GDE:
|
||||
OpenFileName(current_item->output[j].name,NULL);
|
||||
break;
|
||||
case COLORMASK:
|
||||
ReadCMask(current_item->output[j].name);
|
||||
break;
|
||||
case STATUS_FILE:
|
||||
ReadStatus(current_item->output[j].name);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
OVERWRITE = FALSE;
|
||||
}
|
||||
for(j=0;j<current_item->numoutputs;j++)
|
||||
{
|
||||
if(!current_item->output[j].save)
|
||||
{
|
||||
sprintf(buffer,"/bin/rm -f %s",
|
||||
current_item->output[j].name);
|
||||
system(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
for(j=0;j<current_item->numinputs;j++)
|
||||
{
|
||||
if(!current_item->input[j].save)
|
||||
{
|
||||
sprintf(buffer,"/bin/rm -f %s",
|
||||
current_item->input[j].name);
|
||||
system(buffer);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
ReplaceArgs():
|
||||
Replace all command line arguements with the appropriate values
|
||||
stored for the chosen menu item.
|
||||
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
char *ReplaceFile(Action,file)
|
||||
char *Action;
|
||||
GfileFormat file;
|
||||
{
|
||||
char *symbol,*method,*temp;
|
||||
int i,j,newlen;
|
||||
symbol = file.symbol;
|
||||
method = file.name;
|
||||
|
||||
for(; (i=Find2(Action,symbol)) != -1;)
|
||||
{
|
||||
newlen = strlen(Action)-strlen(symbol) + strlen(method)+1;
|
||||
temp = calloc(newlen,1);
|
||||
if (temp == NULL)
|
||||
Error("ReplaceFile():Error in calloc");
|
||||
strncat(temp,Action,i);
|
||||
strncat(temp,method,strlen(method));
|
||||
strcat( temp,&(Action[i+strlen(symbol)]) );
|
||||
cfree(Action);
|
||||
Action = temp;
|
||||
}
|
||||
return(Action);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char *ReplaceArgs(Action,arg)
|
||||
char *Action;
|
||||
GmenuItemArg arg;
|
||||
{
|
||||
/*
|
||||
* The basic idea is to replace all of the symbols in the method
|
||||
* string with the values picked in the dialog box. The method
|
||||
* is the general command line structure. All arguements have three
|
||||
* parts, a label, a method, and a value. The method never changes, and
|
||||
* is used to represent '-flag's for a given function. Values are the
|
||||
* associated arguements that some flags require. All symbols that
|
||||
* require argvalue replacement should have a '$' infront of the symbol
|
||||
* name in the itemmethod definition. All symbols without the '$' will
|
||||
* be replaced by their argmethod. There is currently no way to do a label
|
||||
* replacement, as the label is considered to be for use in the dialog
|
||||
* box only. An example command line replacement would be:
|
||||
*
|
||||
* itemmethod=> "lpr arg1 $arg1 $arg2"
|
||||
*
|
||||
* arglabel arg1=> "To printer?"
|
||||
* argmethod arg1=> "-P"
|
||||
* argvalue arg1=> "lw"
|
||||
*
|
||||
* arglabel arg2=> "File name?"
|
||||
* argvalue arg2=> "foobar"
|
||||
* argmethod arg2=> ""
|
||||
*
|
||||
* final command line:
|
||||
*
|
||||
* lpr -P lw foobar
|
||||
*
|
||||
* At this point, the chooser dialog type only supports the arglabel and
|
||||
* argmethod field. So if an argument is of type chooser, and
|
||||
* its symbol is "this", then "$this" has no real meaning in the
|
||||
* itemmethod definition. Its format in the .GDEmenu file is slighty
|
||||
* different as well. A choice from a chooser field looks like:
|
||||
*
|
||||
* argchoice:Argument_label:Argument_method
|
||||
*
|
||||
*
|
||||
*/
|
||||
char *symbol,*method,*textvalue,buf1[GBUFSIZ],buf2[GBUFSIZ],*temp;
|
||||
int i,j,newlen,type;
|
||||
symbol = arg.symbol;
|
||||
method = arg.method;
|
||||
textvalue = arg.textvalue;
|
||||
type = arg.type;
|
||||
if(type == SLIDER)
|
||||
{
|
||||
textvalue = buf2;
|
||||
sprintf(buf2,"%d",arg.value);
|
||||
}
|
||||
else if((type == CHOOSER) || (type == CHOICE_MENU) || (type == CHOICE_LIST))
|
||||
{
|
||||
method = arg.choice[arg.value].method;
|
||||
textvalue = arg.choice[arg.value].method;
|
||||
}
|
||||
|
||||
if(textvalue == NULL)
|
||||
textvalue="";
|
||||
|
||||
if(method == NULL)
|
||||
method="";
|
||||
|
||||
if(symbol == NULL)
|
||||
symbol="";
|
||||
|
||||
for(; (i=Find2(Action,symbol)) != -1;)
|
||||
{
|
||||
if(i>0 && Action[i-1] =='$' )
|
||||
{
|
||||
newlen = strlen(Action)-strlen(symbol)
|
||||
+strlen(textvalue);
|
||||
temp = calloc(newlen,1);
|
||||
if (temp == NULL)
|
||||
Error("ReplaceArgs():Error in calloc");
|
||||
strncat(temp,Action,i-1);
|
||||
strncat(temp,textvalue,strlen(textvalue));
|
||||
strcat( temp,&(Action[i+strlen(symbol)]) );
|
||||
cfree(Action);
|
||||
Action = temp;
|
||||
}
|
||||
else
|
||||
{
|
||||
newlen = strlen(Action)-strlen(symbol)
|
||||
+strlen(method)+1;
|
||||
temp = calloc(newlen,1);
|
||||
if (temp == NULL)
|
||||
Error("ReplaceArgs():Error in calloc");
|
||||
strncat(temp,Action,i);
|
||||
strncat(temp,method,strlen(method));
|
||||
strcat( temp,&(Action[i+strlen(symbol)]) );
|
||||
cfree(Action);
|
||||
Action = temp;
|
||||
}
|
||||
}
|
||||
return(Action);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
DONT():
|
||||
Dont execute the command associated with the current dialog box.
|
||||
This function corresponds to the <cancel> button on the dialog box.
|
||||
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
DONT(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern Frame pframe,frame;
|
||||
extern Panel popup;
|
||||
extern int BlockInput;
|
||||
int i,j,k;
|
||||
|
||||
/*
|
||||
* Reset the dialog box, andf remove it.
|
||||
*/
|
||||
xv_destroy_safe(pframe);
|
||||
pframe = xv_create(frame,FRAME_CMD,
|
||||
FRAME_CMD_PUSHPIN_IN,TRUE,
|
||||
FRAME_DONE_PROC,FrameDone,
|
||||
FRAME_SHOW_RESIZE_CORNER,FALSE,
|
||||
WIN_DESIRED_HEIGHT,100,
|
||||
WIN_DESIRED_WIDTH,300,
|
||||
XV_X,300,
|
||||
XV_Y,150,
|
||||
WIN_SHOW,FALSE,
|
||||
0);
|
||||
|
||||
popup = xv_get(pframe,FRAME_CMD_PANEL);
|
||||
/*
|
||||
popup = xv_create(pframe,PANEL,
|
||||
PANEL_LAYOUT,PANEL_HORIZONTAL,
|
||||
0);
|
||||
*/
|
||||
|
||||
xv_create (popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"HELP",
|
||||
PANEL_NOTIFY_PROC,HELP,
|
||||
0);
|
||||
|
||||
xv_create (popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"OK",
|
||||
PANEL_NOTIFY_PROC,DO,
|
||||
0);
|
||||
|
||||
xv_create(popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"Cancel",
|
||||
PANEL_NOTIFY_PROC,DONT,
|
||||
0);
|
||||
|
||||
BlockInput = FALSE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
FrameDone(this_frame)
|
||||
Frame this_frame;
|
||||
{
|
||||
extern Frame pframe;
|
||||
if(this_frame == pframe)
|
||||
DONT(NULL,NULL);
|
||||
|
||||
return(XV_OK);
|
||||
}
|
||||
NANameEvents(win,event,arg)
|
||||
Xv_window win;
|
||||
Event *event;
|
||||
Notify_arg arg;
|
||||
{
|
||||
extern int EditMode;
|
||||
extern NA_Alignment *DataSet;
|
||||
NA_DisplayData *ddata;
|
||||
NA_Alignment *aln;
|
||||
NA_Sequence *this_seq;
|
||||
extern int first_select,BlockInput;
|
||||
int i,j,x,y,redraw = FALSE;
|
||||
|
||||
if(DataSet == NULL || BlockInput)
|
||||
return;
|
||||
|
||||
aln = (NA_Alignment*)DataSet;
|
||||
ddata = (NA_DisplayData*)(aln->na_ddata);
|
||||
|
||||
if(ddata == NULL)
|
||||
return;
|
||||
|
||||
x=event_x(event)/ddata->font_dx;
|
||||
y=event_y(event)/ddata->font_dy +
|
||||
ddata->top_seq;
|
||||
|
||||
y=MIN(y,aln->numelements - 1);
|
||||
y=MAX(y,0);
|
||||
|
||||
this_seq = &(aln->element[y]);
|
||||
|
||||
if (event_id(event) == LOC_WINENTER)
|
||||
win_set_kbd_focus(win,(Window)xv_get(win,XV_XID));
|
||||
else if(event_is_down(event) && event_is_ascii(event) &&
|
||||
event_meta_is_down(event))
|
||||
DoMeta(event_id(event));
|
||||
|
||||
else if(!event_is_up(event))
|
||||
{
|
||||
switch (event_action(event))
|
||||
{
|
||||
case ACTION_SELECT:
|
||||
if(!event_shift_is_down(event))
|
||||
{
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
aln->element[j].
|
||||
selected = FALSE;
|
||||
redraw = TRUE;
|
||||
}
|
||||
|
||||
if(x<=strlen(this_seq->short_name))
|
||||
{
|
||||
redraw = TRUE;
|
||||
first_select = y;
|
||||
}
|
||||
else
|
||||
first_select = -1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(first_select != -1)
|
||||
switch (event_action(event))
|
||||
{
|
||||
case ACTION_SELECT:
|
||||
if(!event_shift_is_down(event))
|
||||
{
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
aln->element[j].selected
|
||||
= FALSE;
|
||||
}
|
||||
if(x<=strlen(this_seq->short_name))
|
||||
{
|
||||
for(j=MIN(first_select,y);
|
||||
j<=MAX(first_select,y);j++)
|
||||
aln->element[j].selected =
|
||||
aln->element[j].selected ?
|
||||
FALSE:TRUE;
|
||||
redraw = TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(redraw)
|
||||
DrawNANames(xv_get(win,XV_DISPLAY),xv_get(win,XV_XID));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
DoMeta(Code)
|
||||
int Code;
|
||||
{
|
||||
|
||||
int k,j;
|
||||
extern int num_menus;
|
||||
extern Gmenu menu[];
|
||||
|
||||
for(j=0;j<num_menus;j++)
|
||||
for(k=0;k<menu[j].numitems;k++)
|
||||
{
|
||||
if(((menu[j].item[k].meta|32) ==(char)(Code|32)) &&
|
||||
(char)Code !='\0')
|
||||
{
|
||||
HandleMeta(j,k);
|
||||
k=menu[j].numitems;
|
||||
j=num_menus;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
HandleMeta():
|
||||
Callback routine for the menus. Determine what function was called,
|
||||
and perform the desired operation.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
HandleMeta(curmenu,curitem)
|
||||
int curitem,curmenu;
|
||||
{
|
||||
extern Gmenu menu[];
|
||||
extern GmenuItem *current_item;
|
||||
extern Frame frame,pframe;
|
||||
extern Panel popup;
|
||||
extern int num_menus;
|
||||
|
||||
int i,j,k;
|
||||
Gmenu *thismenu;
|
||||
GmenuItem *thisitem;
|
||||
Panel choice;
|
||||
char *label1;
|
||||
|
||||
if(xv_get(pframe,WIN_SHOW))
|
||||
{
|
||||
DONT();
|
||||
return;
|
||||
}
|
||||
|
||||
thismenu = &(menu[curmenu]);
|
||||
thisitem = &(thismenu->item[curitem]);
|
||||
xv_set(popup,PANEL_LAYOUT,PANEL_VERTICAL,0);
|
||||
|
||||
for(j=0;j<thisitem->numargs;j++)
|
||||
{
|
||||
/*
|
||||
* Create a prompt for the argument
|
||||
*/
|
||||
switch (thisitem->arg[j].type)
|
||||
{
|
||||
case SLIDER:
|
||||
thisitem->arg[j].X=xv_create(popup,PANEL_SLIDER,
|
||||
PANEL_LAYOUT,PANEL_VERTICAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_MIN_VALUE,thisitem->arg[j].min,
|
||||
PANEL_MAX_VALUE,thisitem->arg[j].max,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
PANEL_TICKS,10,
|
||||
0);
|
||||
break;
|
||||
|
||||
case TEXTFIELD:
|
||||
thisitem->arg[j].X = xv_create(popup,PANEL_TEXT,
|
||||
PANEL_LAYOUT,PANEL_VERTICAL,
|
||||
PANEL_VALUE_DISPLAY_LENGTH,32,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_VALUE,thisitem->arg[j].textvalue,
|
||||
PANEL_NOTIFY_LEVEL,PANEL_ALL,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
0);
|
||||
break;
|
||||
|
||||
case CHOOSER:
|
||||
thisitem->arg[j].X=xv_create(popup,
|
||||
PANEL_CHOICE,
|
||||
PANEL_LAYOUT,PANEL_HORIZONTAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
PANEL_CHOICE_STRING,
|
||||
0,thisitem->arg[j].choice[0].label,
|
||||
0);
|
||||
for(i=1;i<thisitem->arg[j].numchoices;i++)
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_CHOICE_STRING, i,
|
||||
thisitem->arg[j].choice[i].label,
|
||||
0);
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
0);
|
||||
break;
|
||||
case CHOICE_MENU:
|
||||
thisitem->arg[j].X=xv_create(popup,
|
||||
PANEL_CHOICE_STACK,
|
||||
PANEL_LAYOUT,PANEL_VERTICAL,
|
||||
PANEL_LABEL_STRING,thisitem->arg[j].label,
|
||||
PANEL_NOTIFY_PROC, HandleMenuItem,
|
||||
PANEL_CHOICE_STRING,
|
||||
0,thisitem->arg[j].choice[0].label,
|
||||
0);
|
||||
for(i=1;i<thisitem->arg[j].numchoices;i++)
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_CHOICE_STRING, i,
|
||||
thisitem->arg[j].choice[i].label,
|
||||
0);
|
||||
xv_set(thisitem->arg[j].X,
|
||||
PANEL_VALUE,thisitem->arg[j].value,
|
||||
0);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
xv_set(pframe,FRAME_LABEL,thisitem->label,
|
||||
WIN_DESIRED_HEIGHT,1000,
|
||||
WIN_DESIRED_WIDTH,1000,
|
||||
WIN_GRAB_ALL_INPUT,TRUE,
|
||||
0);
|
||||
|
||||
current_item = thisitem;
|
||||
|
||||
/*
|
||||
* Fit it, and show it
|
||||
*/
|
||||
window_fit(popup);
|
||||
window_fit(pframe);
|
||||
if(thisitem->numargs >0)
|
||||
xv_set(pframe,WIN_SHOW,TRUE,0);
|
||||
else
|
||||
DO();
|
||||
return;
|
||||
}
|
||||
|
||||
HELP(item,event)
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
extern GmenuItem *current_item;
|
||||
extern Frame pframe;
|
||||
extern Panel popup;
|
||||
FILE *file;
|
||||
char help_file[1024];
|
||||
|
||||
if(current_item->help == NULL)
|
||||
{
|
||||
Warning("Cannot open help file");
|
||||
return;
|
||||
}
|
||||
strncpy(help_file,current_item->help,1023);
|
||||
file = fopen(help_file,"r");
|
||||
if((file == NULL) && (getenv("GDE_HELP_DIR") != NULL))
|
||||
{
|
||||
strncpy(help_file,getenv("GDE_HELP_DIR"),1023);
|
||||
strncat(help_file,"/",1023 - strlen(help_file));
|
||||
strncat(help_file,current_item->help,1023 - strlen(help_file));
|
||||
}
|
||||
|
||||
file = fopen(help_file,"r");
|
||||
|
||||
if(file == NULL)
|
||||
{
|
||||
Warning("Cannot find help file");
|
||||
return;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
window_fit( xv_create(pframe,TEXTSW,
|
||||
WIN_INHERIT_COLORS,TRUE,
|
||||
WIN_BELOW,popup,
|
||||
TEXTSW_READ_ONLY,TRUE,
|
||||
XV_HEIGHT,180,
|
||||
XV_WIDTH,80*8,
|
||||
TEXTSW_FILE,help_file,
|
||||
0)
|
||||
);
|
||||
window_fit(pframe);
|
||||
xv_set(item,PANEL_INACTIVE,TRUE,0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,76 @@
|
|||
#include <stdio.h>
|
||||
#include <xview/defaults.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/window.h>
|
||||
#include <xview/icon.h>
|
||||
#include <pixrect/pixrect.h>
|
||||
#include <malloc.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
/*
|
||||
FreeNASeq():
|
||||
Destroy a nucleic acid sequence structure, and free its memory usage.
|
||||
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
FreeNASeq(seq)
|
||||
NA_Sequence *seq;
|
||||
{
|
||||
if(seq->sequence)
|
||||
Cfree(seq->sequence);
|
||||
if(seq->mask)
|
||||
Cfree(seq->mask);
|
||||
if(seq->cmask)
|
||||
Cfree(seq->cmask);
|
||||
if(seq->baggage)
|
||||
Cfree(seq->baggage);
|
||||
if(seq->comments)
|
||||
Cfree(seq->comments);
|
||||
|
||||
if(seq->groupf != NULL && seq->groupb != NULL)
|
||||
{
|
||||
((NA_Sequence*)(seq->groupf))->groupb = seq->groupb;
|
||||
((NA_Sequence*)(seq->groupb))->groupf = seq->groupf;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
FreeNAAln(aln)
|
||||
NA_Alignment*aln;
|
||||
{
|
||||
Cfree(aln->id);
|
||||
Cfree(aln->description);
|
||||
Cfree(aln->authority);
|
||||
Cfree(aln->cmask);
|
||||
Cfree(aln->mask);
|
||||
if(aln->na_ddata != NULL)
|
||||
{
|
||||
((NA_DisplayData *)(aln->na_ddata))->aln = NULL;
|
||||
FreeNADD(aln->na_ddata);
|
||||
}
|
||||
Cfree(aln);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
FreeNADD(nadd)
|
||||
NA_DisplayData *nadd;
|
||||
{
|
||||
Cfree(nadd->jumptbl);
|
||||
Cfree(nadd);
|
||||
|
||||
return;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,465 @@
|
|||
#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
/*
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
all rights reserved.
|
||||
|
||||
Copyright (c) 1993, Steven Smith, all rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
ReadGen(filename,dataset,type)
|
||||
char *filename;
|
||||
NA_Alignment *dataset;
|
||||
int type;
|
||||
{
|
||||
register int done = FALSE,len = 0, j=0;
|
||||
int count,IS_REALLY_AA = FALSE;
|
||||
char Inline[GBUFSIZ],c;
|
||||
char *buffer,*gencomments = NULL,fields[8][GBUFSIZ];
|
||||
int buflen = 0,genclen = 0,curelem = 0,n = 0,flag = 0;
|
||||
int start_col = -1;
|
||||
|
||||
NA_Sequence *this_elem;
|
||||
FILE *file;
|
||||
extern int Default_DNA_Trans[], Default_RNA_Trans[];
|
||||
extern int Default_NA_RTrans[];
|
||||
extern int Default_PROColor_LKUP[],Default_NAColor_LKUP[];
|
||||
|
||||
ErrorOut("No such file",file = fopen(filename,"r"));
|
||||
|
||||
for(;fgets(Inline,GBUFSIZ,file) != 0;)
|
||||
{
|
||||
if(Inline[strlen(Inline)-1] == '\n')
|
||||
Inline[strlen(Inline)-1] = '\0';
|
||||
if(Find(Inline,"LOCUS"))
|
||||
{
|
||||
curelem = dataset->numelements++;
|
||||
if(curelem == 0)
|
||||
{
|
||||
dataset->element=(NA_Sequence*)
|
||||
Calloc(5,sizeof(NA_Sequence));
|
||||
dataset->maxnumelements = 5;
|
||||
}
|
||||
else if (curelem==dataset->maxnumelements)
|
||||
{
|
||||
(dataset->maxnumelements) *= 2;
|
||||
dataset->element =(NA_Sequence*)
|
||||
Realloc(dataset->element,
|
||||
dataset->maxnumelements * sizeof(NA_Sequence));
|
||||
}
|
||||
this_elem = &(dataset->element[curelem]);
|
||||
n = sscanf(Inline,"%s %s %s %s %s %s %s %s",
|
||||
fields[0],fields[1],fields[2],fields[3],fields[4],
|
||||
fields[5],fields[6],fields[7]);
|
||||
if(IS_REALLY_AA)
|
||||
{
|
||||
InitNASeq(this_elem,PROTEIN);
|
||||
}
|
||||
else if(Find(Inline,"DNA"))
|
||||
{
|
||||
InitNASeq(this_elem,DNA);
|
||||
}
|
||||
else if(Find(Inline,"RNA"))
|
||||
{
|
||||
InitNASeq(this_elem,RNA);
|
||||
}
|
||||
else if(Find(Inline,"MASK"))
|
||||
{
|
||||
InitNASeq(this_elem,MASK);
|
||||
}
|
||||
else if(Find(Inline,"TEXT"))
|
||||
{
|
||||
InitNASeq(this_elem,TEXT);
|
||||
}
|
||||
else if(Find(Inline,"PROT"))
|
||||
{
|
||||
InitNASeq(this_elem,PROTEIN);
|
||||
}
|
||||
else
|
||||
InitNASeq(this_elem,DNA);
|
||||
|
||||
strncpy(this_elem->short_name,fields[1],31);
|
||||
AsciiTime(&(this_elem->t_stamp.origin),fields[n-1]);
|
||||
this_elem->attr = DEFAULT_X_ATTR;
|
||||
|
||||
if( Find(Inline, "Circular") )
|
||||
this_elem->attr |= IS_CIRCULAR;
|
||||
|
||||
gencomments = NULL;
|
||||
genclen = 0;
|
||||
}
|
||||
else if(Find(Inline,"DEFINITION"))
|
||||
strncpy(this_elem->description,&(Inline[12]),79);
|
||||
|
||||
else if(Find(Inline,"AUTHOR"))
|
||||
strncpy(this_elem->authority,&(Inline[12]),79);
|
||||
|
||||
else if(Find(Inline," ORGANISM"))
|
||||
strncpy(this_elem->seq_name,&(Inline[12]),79);
|
||||
|
||||
else if(Find(Inline,"ACCESSION"))
|
||||
strncpy(this_elem->id,&(Inline[12]),79);
|
||||
|
||||
else if(Find(Inline,"ORIGIN"))
|
||||
{
|
||||
done = FALSE;
|
||||
len = 0;
|
||||
for(;done == FALSE && fgets(Inline,GBUFSIZ,file) != 0;)
|
||||
{
|
||||
if(Inline[0] != '/')
|
||||
{
|
||||
if(buflen == 0)
|
||||
{
|
||||
buflen = GBUFSIZ;
|
||||
buffer = Calloc(sizeof(char) ,
|
||||
buflen);
|
||||
}
|
||||
|
||||
else if (len+strlen(Inline) >= buflen)
|
||||
{
|
||||
buflen += GBUFSIZ;
|
||||
buffer = Realloc(buffer,
|
||||
sizeof(char)*buflen);
|
||||
for(j=buflen-GBUFSIZ
|
||||
;j<buflen;j++)
|
||||
buffer[j] = '\0';
|
||||
}
|
||||
/*
|
||||
* Search for the fist column of data (whitespace-number-whitespace)data
|
||||
*/
|
||||
if(start_col == -1)
|
||||
{
|
||||
for(start_col=0; Inline[start_col] == ' ' ||
|
||||
Inline[start_col] == '\t';start_col++);
|
||||
|
||||
for(start_col++;strchr("1234567890",
|
||||
Inline[start_col]) != NULL;start_col++);
|
||||
|
||||
for(start_col++; Inline[start_col] == ' ' ||
|
||||
Inline[start_col] == '\t';start_col++);
|
||||
|
||||
}
|
||||
for(j=start_col;(c = Inline[j]) != '\0';j++)
|
||||
{
|
||||
if((c != '\n') &&
|
||||
((j-start_col + 1) % 11 !=0))
|
||||
buffer[len++] = c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AppendNA(buffer,len,&(dataset->
|
||||
element[curelem]));
|
||||
for(j=0;j<len;j++)
|
||||
buffer[j] = '\0';
|
||||
len = 0;
|
||||
done = TRUE;
|
||||
dataset->element[curelem].comments
|
||||
= gencomments;
|
||||
dataset->element[curelem].comments_len=
|
||||
genclen - 1;
|
||||
dataset->element[curelem].
|
||||
comments_maxlen = genclen;
|
||||
|
||||
gencomments = NULL;
|
||||
genclen = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Test if sequence should be converted by the translation table
|
||||
* If it looks like a protein...
|
||||
*/
|
||||
if(dataset->element[curelem].rmatrix &&
|
||||
IS_REALLY_AA == FALSE)
|
||||
{
|
||||
IS_REALLY_AA = CheckType(dataset->element[curelem].
|
||||
sequence,dataset->element[curelem].seqlen);
|
||||
|
||||
if(IS_REALLY_AA == FALSE)
|
||||
Ascii2NA(dataset->element[curelem].sequence,
|
||||
dataset->element[curelem].seqlen,
|
||||
dataset->element[curelem].rmatrix);
|
||||
else
|
||||
/*
|
||||
* Force the sequence to be AA
|
||||
*/
|
||||
{
|
||||
dataset->element[curelem].elementtype = PROTEIN;
|
||||
dataset->element[curelem].rmatrix = NULL;
|
||||
dataset->element[curelem].tmatrix = NULL;
|
||||
dataset->element[curelem].col_lut =
|
||||
Default_PROColor_LKUP;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Find(Inline,"ZZZZZ"))
|
||||
{
|
||||
Cfree(gencomments);
|
||||
genclen = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gencomments == NULL)
|
||||
{
|
||||
gencomments = String(Inline);
|
||||
genclen = strlen(gencomments)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
genclen += strlen(Inline)+1;
|
||||
gencomments = Realloc(gencomments,genclen *
|
||||
sizeof(char));
|
||||
strncat(gencomments,Inline,GBUFSIZ);
|
||||
strncat(gencomments,"\n",GBUFSIZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
Cfree(buffer);
|
||||
fclose(file);
|
||||
for(j=0;j<dataset->numelements;j++)
|
||||
dataset->maxlen = MAX(dataset->maxlen,
|
||||
dataset->element[j].seqlen+dataset->element[j].offset);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef struct mya {
|
||||
int yy;
|
||||
int mm;
|
||||
int dd;
|
||||
int hr;
|
||||
int mn;
|
||||
int sc;
|
||||
} sA;
|
||||
|
||||
AsciiTime(sA *a,char *asciitime)
|
||||
{
|
||||
int j;
|
||||
char temp[GBUFSIZ];
|
||||
extern char month[12][6];
|
||||
|
||||
a->dd = 0;
|
||||
a->yy = 0;
|
||||
a->mm = 0;
|
||||
sscanf(asciitime,"%d%5c%d",&(a->dd),temp,&(a->yy));
|
||||
temp[5] = '\0';
|
||||
for(j=0;j<12;j++)
|
||||
if(strcmp(temp,month[j]) == 0)
|
||||
a->mm = j+1;
|
||||
if(a->dd <0 || a->dd > 31 || a->yy < 0 || a->mm > 11)
|
||||
SetTime(a);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WriteGen(aln,filename,method,maskable)
|
||||
NA_Alignment *aln;
|
||||
char *filename;
|
||||
int method,maskable;
|
||||
{
|
||||
int i,j,k,mask = -1;
|
||||
FILE *file;
|
||||
NA_Sequence *this_elem;
|
||||
extern char month[12][6];
|
||||
char c;
|
||||
if(aln == NULL)
|
||||
return;
|
||||
if(aln->na_ddata == NULL)
|
||||
return;
|
||||
|
||||
file = fopen(filename,"w");
|
||||
if(file == NULL)
|
||||
{
|
||||
Warning("Cannot open file for output");
|
||||
return(1);
|
||||
}
|
||||
|
||||
if(maskable && method != SELECT_REGION)
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
if(aln->element[j].elementtype == MASK &&
|
||||
aln->element[j].selected)
|
||||
mask = j;
|
||||
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
{
|
||||
if((aln->element[j].selected && j!=mask && method != SELECT_REGION)
|
||||
||(aln->element[j].subselected && method == SELECT_REGION)
|
||||
|| (method == ALL))
|
||||
{
|
||||
this_elem = &(aln->element[j]);
|
||||
fprintf(file,
|
||||
"LOCUS %10s%8d bp %4s %10s %2d%5s%4d\n",
|
||||
this_elem->short_name,this_elem->seqlen+this_elem->offset,
|
||||
(this_elem->elementtype == DNA) ? "DNA":
|
||||
(this_elem->elementtype ==RNA)?"RNA":
|
||||
(this_elem->elementtype == MASK)?"MASK":
|
||||
(this_elem->elementtype == PROTEIN)?"PROT":"TEXT",
|
||||
this_elem->attr & IS_CIRCULAR?"Circular":"",
|
||||
this_elem->t_stamp.origin.dd,
|
||||
month[this_elem->t_stamp.origin.mm-1],
|
||||
this_elem->t_stamp.origin.yy>1900?this_elem->t_stamp.origin.yy:
|
||||
this_elem->t_stamp.origin.yy+1900);
|
||||
if(this_elem->description[0])
|
||||
fprintf(file,"DEFINITION %s\n",this_elem->description);
|
||||
if(this_elem->seq_name[0])
|
||||
fprintf(file," ORGANISM %s\n",this_elem->seq_name);
|
||||
if(this_elem->id[0])
|
||||
fprintf(file," ACCESSION %s\n",this_elem->id);
|
||||
if(this_elem->authority[0])
|
||||
fprintf(file," AUTHORS %s\n",this_elem->authority);
|
||||
if(this_elem->comments)
|
||||
fprintf(file,"%s\n",this_elem->comments);
|
||||
fprintf(file,"ORIGIN");
|
||||
if(this_elem->tmatrix)
|
||||
{
|
||||
if(mask == -1)
|
||||
{
|
||||
for(i=0,k=0;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
{
|
||||
if(method == SELECT_REGION)
|
||||
{
|
||||
if(aln->selection_mask[k] == '1')
|
||||
{
|
||||
if(i%60 == 0)
|
||||
fprintf(file,"\n%9d",i+1);
|
||||
if(i%10 == 0)
|
||||
fprintf(file," ");
|
||||
fprintf(file,"%c",this_elem->tmatrix
|
||||
[getelem(this_elem,k)]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(i%60 == 0)
|
||||
fprintf(file,"\n%9d",i+1);
|
||||
if(i%10 == 0)
|
||||
fprintf(file," ");
|
||||
fprintf(file,"%c",this_elem->tmatrix
|
||||
[getelem(this_elem,k)]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(k=0;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
{
|
||||
c =(char)getelem(&(aln->element[mask]),k);
|
||||
if(c != '0' && c!= '-')
|
||||
{
|
||||
if(k%60 == 0)
|
||||
fprintf(file,"\n%9d",k+1);
|
||||
if(k%10 == 0)
|
||||
fprintf(file," ");
|
||||
fprintf(file,"%c",this_elem->tmatrix
|
||||
[getelem(this_elem,k)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mask == -1)
|
||||
{
|
||||
for(i=0,k=0;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
{
|
||||
if(method == SELECT_REGION)
|
||||
{
|
||||
if(aln->selection_mask[k] == '1')
|
||||
{
|
||||
if(i%60 == 0)
|
||||
fprintf(file,"\n%9d",i+1);
|
||||
if(i%10 == 0)
|
||||
fprintf(file," ");
|
||||
fprintf(file,"%c", getelem(this_elem,k));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(i%60 == 0)
|
||||
fprintf(file,"\n%9d",i+1);
|
||||
if(i%10 == 0)
|
||||
fprintf(file," ");
|
||||
fprintf(file,"%c",getelem(this_elem,k));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(k=0;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
{
|
||||
c =(char)getelem(&(aln->element[mask]),k);
|
||||
if(c != '0' && c!= '-')
|
||||
{
|
||||
if(k%60 == 0)
|
||||
fprintf(file,"\n%9d",k+1);
|
||||
if(k%10 == 0)
|
||||
fprintf(file," ");
|
||||
fprintf(file,"%c",getelem(this_elem,k));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fprintf(file,"\n//\n");
|
||||
}
|
||||
}
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SetTime(sA *a)
|
||||
{
|
||||
struct tm *tim,*localtime();
|
||||
long clock;
|
||||
|
||||
clock = time(0);
|
||||
tim = localtime(&clock);
|
||||
|
||||
a->yy = tim->tm_year;
|
||||
a->mm = tim->tm_mon+1;
|
||||
a->dd = tim->tm_mday;
|
||||
a->hr = tim->tm_hour;
|
||||
a->mn = tim->tm_min;
|
||||
a->sc = tim->tm_sec;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* CheckType: Check base composition to see if the sequence
|
||||
* appears to be an amino acid sequence. If it is, pass back
|
||||
* TRUE, else FALSE.
|
||||
*/
|
||||
CheckType(seq,len)
|
||||
char *seq;
|
||||
int len;
|
||||
{
|
||||
|
||||
int j,count1 = 0,count2 = 0;
|
||||
|
||||
for(j=0;j<len;j++)
|
||||
if(((seq[j]|32) < 'z') && ((seq[j]|32) > 'a'))
|
||||
{
|
||||
count1++;
|
||||
if(index("ACGTUNacgtun",seq[j]) == NULL)
|
||||
count2++;
|
||||
}
|
||||
|
||||
return( (count2 > count1/4)?TRUE:FALSE);
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,799 @@
|
|||
#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
/*
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
ReadGDE(filename,dataset,type)
|
||||
char *filename;
|
||||
NA_Alignment *dataset;
|
||||
int type;
|
||||
{
|
||||
register int done = FALSE,len = 0, j=0;
|
||||
int success,count,temp = 0;
|
||||
char Inline[GBUFSIZ],c;
|
||||
char *buffer,*line,*gencomments = NULL,fields[8][GBUFSIZ];
|
||||
int buflen = GBUFSIZ,genclen = 0,curelem = 0,n = 0,flag = 0;
|
||||
NA_Sequence *this_elem = NULL,temp_elem;
|
||||
FILE *file;
|
||||
extern int Default_DNA_Trans[], Default_RNA_Trans[];
|
||||
extern int OVERWRITE,Default_NA_RTrans[], Default_PROColor_LKUP[];
|
||||
|
||||
ErrorOut("No such file",file = fopen(filename,"r"));
|
||||
|
||||
for(;fgets(Inline,GBUFSIZ,file) != 0;)
|
||||
{
|
||||
for(line = Inline;line[0]==' ' || line[0] == '\t';line++);
|
||||
|
||||
if(Find2(line,"{")==0)
|
||||
{
|
||||
this_elem = &temp_elem;
|
||||
InitNASeq(this_elem,DNA);
|
||||
this_elem->offset = -(dataset->rel_offset);
|
||||
}
|
||||
else if(Find2(line,"type")==0)
|
||||
{
|
||||
if(Find(line,"DNA"))
|
||||
{
|
||||
this_elem->elementtype = DNA;
|
||||
this_elem->tmatrix = Default_DNA_Trans;
|
||||
this_elem->rmatrix = Default_NA_RTrans;
|
||||
}
|
||||
else if(Find(line,"RNA"))
|
||||
{
|
||||
this_elem->elementtype = RNA;
|
||||
this_elem->tmatrix = Default_RNA_Trans;
|
||||
this_elem->rmatrix = Default_NA_RTrans;
|
||||
}
|
||||
else if(Find(line,"MASK"))
|
||||
{
|
||||
this_elem->elementtype = MASK;
|
||||
this_elem->rmatrix = NULL;
|
||||
this_elem->tmatrix = NULL;
|
||||
this_elem->col_lut = NULL;
|
||||
}
|
||||
else if(Find(line,"TEXT"))
|
||||
{
|
||||
this_elem->elementtype = TEXT;
|
||||
this_elem->rmatrix = NULL;
|
||||
this_elem->tmatrix = NULL;
|
||||
this_elem->col_lut = NULL;
|
||||
}
|
||||
else if(Find(line,"PROT"))
|
||||
{
|
||||
this_elem->elementtype = PROTEIN;
|
||||
this_elem->rmatrix = NULL;
|
||||
this_elem->tmatrix = NULL;
|
||||
this_elem->col_lut = Default_PROColor_LKUP;
|
||||
}
|
||||
/*
|
||||
this_elem->attr = DEFAULT_X_ATTR;
|
||||
*/
|
||||
}
|
||||
else if(Find2(line,"circular")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&temp);
|
||||
if(temp == 1)
|
||||
{
|
||||
this_elem->attr |= IS_CIRCULAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
this_elem->attr &= ~IS_CIRCULAR;
|
||||
}
|
||||
}
|
||||
else if(Find2(line,"orig_direction")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&temp);
|
||||
if(temp == 1)
|
||||
{
|
||||
this_elem->attr |= IS_ORIG_5_TO_3;
|
||||
this_elem->attr &= ~IS_ORIG_3_TO_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
this_elem->attr |= IS_ORIG_3_TO_5;
|
||||
this_elem->attr &= ~IS_ORIG_5_TO_3;
|
||||
}
|
||||
}
|
||||
else if(Find2(line,"direction")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&temp);
|
||||
if(temp == 1)
|
||||
{
|
||||
this_elem->attr |= IS_5_TO_3;
|
||||
this_elem->attr &= ~IS_3_TO_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
this_elem->attr |= IS_3_TO_5;
|
||||
this_elem->attr &= ~IS_5_TO_3;
|
||||
}
|
||||
}
|
||||
else if(Find2(line,"orig_strand")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&temp);
|
||||
if(temp == 1)
|
||||
{
|
||||
this_elem->attr |= IS_ORIG_PRIMARY;
|
||||
this_elem->attr &= ~IS_ORIG_SECONDARY;
|
||||
}
|
||||
else
|
||||
{
|
||||
this_elem->attr |= IS_ORIG_SECONDARY;
|
||||
this_elem->attr &= ~IS_ORIG_PRIMARY;
|
||||
}
|
||||
}
|
||||
else if(Find2(line,"strandedness")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&temp);
|
||||
if(temp == 1)
|
||||
{
|
||||
this_elem->attr |= IS_PRIMARY;
|
||||
this_elem->attr &= ~IS_SECONDARY;
|
||||
}
|
||||
else
|
||||
{
|
||||
this_elem->attr |= IS_SECONDARY;
|
||||
this_elem->attr &= ~IS_PRIMARY;
|
||||
}
|
||||
}
|
||||
else if(Find2(line,"creator")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->authority);
|
||||
RemoveQuotes(this_elem->authority);
|
||||
}
|
||||
else if(Find2(line,"longname")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->seq_name);
|
||||
RemoveQuotes(this_elem->seq_name);
|
||||
}
|
||||
else if(Find2(line,"descrip")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->description);
|
||||
RemoveQuotes(this_elem->description);
|
||||
}
|
||||
else if(Find2(line,"name")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->short_name);
|
||||
RemoveQuotes(this_elem->short_name);
|
||||
}
|
||||
else if(Find2(line,"group-ID")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&(this_elem->groupid));
|
||||
dataset->numgroups =
|
||||
MAX(this_elem->groupid, dataset->numgroups);
|
||||
}
|
||||
else if(Find2(line,"sequence-ID")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->id);
|
||||
RemoveQuotes(this_elem->id);
|
||||
}
|
||||
else if(Find2(line,"barcode")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->barcode);
|
||||
RemoveQuotes(this_elem->barcode);
|
||||
}
|
||||
else if(Find2(line,"membrane")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->membrane);
|
||||
RemoveQuotes(this_elem->membrane);
|
||||
}
|
||||
else if(Find2(line,"contig")==0)
|
||||
{
|
||||
sscanf(line,"%*s %[^\n]",this_elem->contig);
|
||||
RemoveQuotes(this_elem->contig);
|
||||
}
|
||||
else if(Find2(line,"creation-date")==0)
|
||||
{
|
||||
sscanf(line,"%*s %2d%*c%2d%*c%2d%*c%2d%*c%2d%*c%2d\n",
|
||||
&(this_elem->t_stamp.origin.mm),
|
||||
&(this_elem->t_stamp.origin.dd),
|
||||
&(this_elem->t_stamp.origin.yy),
|
||||
&(this_elem->t_stamp.origin.hr),
|
||||
&(this_elem->t_stamp.origin.mn),
|
||||
&(this_elem->t_stamp.origin.sc));
|
||||
}
|
||||
else if(Find2(line,"offset")==0)
|
||||
{
|
||||
sscanf(line,"%*s %d",&(this_elem->offset));
|
||||
this_elem->offset -= dataset->rel_offset;
|
||||
}
|
||||
else if(Find2(line,"comments")==0)
|
||||
{
|
||||
if(this_elem->comments_maxlen ==0)
|
||||
buflen = 2048;
|
||||
else
|
||||
buflen = this_elem->comments_maxlen;
|
||||
|
||||
done = FALSE;
|
||||
len = this_elem->comments_len;
|
||||
|
||||
for(;line[0] != '"';line++)
|
||||
if(line[0] == '\0')
|
||||
ErrorOut(0,"Error in input file");
|
||||
line++;
|
||||
buffer = Calloc(buflen,sizeof(char));
|
||||
for(;!done;)
|
||||
{
|
||||
for(j=0;j<strlen(line);j++)
|
||||
{
|
||||
if(len+strlen(line) >= buflen)
|
||||
{
|
||||
buflen *=2;
|
||||
buffer = Realloc(buffer,
|
||||
buflen*sizeof(char));
|
||||
}
|
||||
if(line[j] == '"') done = TRUE;
|
||||
|
||||
else
|
||||
buffer[len++] = line[j];
|
||||
}
|
||||
/*
|
||||
* Check pad with null
|
||||
*/
|
||||
buffer[len] = '\0';
|
||||
if(!done)
|
||||
{
|
||||
if(fgets(Inline,GBUFSIZ,file) == 0)
|
||||
done = TRUE;
|
||||
line = Inline;
|
||||
}
|
||||
}
|
||||
this_elem->comments = buffer;
|
||||
this_elem->comments_len = strlen(buffer);
|
||||
this_elem->comments_maxlen = buflen;
|
||||
RemoveQuotes(this_elem->comments);
|
||||
}
|
||||
else if(Find2(line,"sequence")==0)
|
||||
{
|
||||
buflen = GBUFSIZ;
|
||||
done = FALSE;
|
||||
len = 0;
|
||||
|
||||
buffer = Calloc(buflen,sizeof(char));
|
||||
for(;line[0] != '"';line++)
|
||||
if(line[0] == '\0')
|
||||
ErrorOut(0,"Error in input file");
|
||||
|
||||
line++;
|
||||
for(;!done;)
|
||||
{
|
||||
for(j=0;j<strlen(line);j++)
|
||||
{
|
||||
if(len+strlen(line) >= buflen)
|
||||
{
|
||||
buflen *=2;
|
||||
buffer = Realloc(buffer,
|
||||
buflen*sizeof(char));
|
||||
}
|
||||
if(line[j] == '"') done = TRUE;
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
* If not text, ignore spaces...
|
||||
*/
|
||||
if(this_elem->elementtype !=TEXT)
|
||||
{
|
||||
if(line[j]!=' ' && line[j] !=
|
||||
'\t' && line[j] != '\n')
|
||||
buffer[len++] = line[j];
|
||||
}
|
||||
else
|
||||
if(line[j] != '\t' && line[j] != '\n')
|
||||
buffer[len++] = line[j];
|
||||
}
|
||||
}
|
||||
if(!done)
|
||||
{
|
||||
if(fgets(Inline,GBUFSIZ,file) == 0)
|
||||
done = TRUE;
|
||||
line = Inline;
|
||||
}
|
||||
}
|
||||
if(this_elem->rmatrix)
|
||||
for(j=0;j<len;j++)
|
||||
buffer[j]=this_elem->rmatrix[buffer[j]];
|
||||
this_elem->sequence =(NA_Base*)buffer;
|
||||
this_elem->seqlen = len;
|
||||
this_elem->seqmaxlen = buflen;
|
||||
}
|
||||
|
||||
else if (Find2(line,"}")==0)
|
||||
{
|
||||
if(this_elem->id[0] == '\0')
|
||||
strncpy(this_elem->id,uniqueID(),79);
|
||||
if(this_elem->short_name[0] == '\0')
|
||||
strncpy(this_elem->short_name,this_elem->id,79);
|
||||
if(this_elem->seqlen == 0)
|
||||
this_elem->protect=
|
||||
PROT_BASE_CHANGES+
|
||||
PROT_GREY_SPACE+
|
||||
PROT_WHITE_SPACE+
|
||||
PROT_TRANSLATION;
|
||||
genclen = 0;
|
||||
/*
|
||||
* Make a new sequence entry...
|
||||
*/
|
||||
|
||||
success = -1;
|
||||
if(OVERWRITE)
|
||||
success = OverWrite(this_elem,dataset);
|
||||
|
||||
if(success == -1)
|
||||
{
|
||||
curelem = dataset->numelements++;
|
||||
if(curelem == 0)
|
||||
{
|
||||
dataset->element=(NA_Sequence*)
|
||||
Calloc(5,sizeof(NA_Sequence));
|
||||
dataset->maxnumelements = 5;
|
||||
}
|
||||
else if (curelem==dataset->maxnumelements)
|
||||
{
|
||||
(dataset->maxnumelements) *= 2;
|
||||
dataset->element =(NA_Sequence*)
|
||||
Realloc(dataset->element,
|
||||
dataset->maxnumelements * sizeof(NA_Sequence));
|
||||
}
|
||||
dataset->element[curelem] = *this_elem;
|
||||
}
|
||||
}
|
||||
else if(this_elem != NULL)
|
||||
{
|
||||
if (this_elem->baggage == NULL)
|
||||
{
|
||||
this_elem->baggage = String(line);
|
||||
this_elem->baggage_maxlen =
|
||||
this_elem->baggage_len =
|
||||
strlen(this_elem->baggage)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this_elem->baggage_len += strlen(line)+1;
|
||||
this_elem->baggage = Realloc(
|
||||
this_elem->baggage,this_elem->baggage_len *
|
||||
sizeof(char));
|
||||
this_elem->baggage_maxlen =
|
||||
this_elem->baggage_len;
|
||||
|
||||
strncat(this_elem->baggage,line,GBUFSIZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
NormalizeOffset(dataset);
|
||||
Regroup(dataset);
|
||||
AdjustGroups(dataset);
|
||||
return;
|
||||
}
|
||||
|
||||
WriteGDE(aln,filename,method,maskable)
|
||||
NA_Alignment *aln;
|
||||
char *filename;
|
||||
int method,maskable;
|
||||
{
|
||||
int i,j,k,mask = -1;
|
||||
FILE *file;
|
||||
NA_Sequence *this_elem;
|
||||
extern char month[12][6];
|
||||
|
||||
if(aln == NULL)
|
||||
return;
|
||||
if(aln->na_ddata == NULL)
|
||||
return;
|
||||
|
||||
file = fopen(filename,"w");
|
||||
if(file == NULL)
|
||||
{
|
||||
Warning("Cannot open file for output");
|
||||
return(1);
|
||||
}
|
||||
|
||||
if(maskable && method != SELECT_REGION)
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
if(aln->element[j].elementtype == MASK &&
|
||||
aln->element[j].selected)
|
||||
mask = j;
|
||||
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
{
|
||||
if((aln->element[j].selected && j!=mask && method!=SELECT_REGION)
|
||||
|| (method == ALL)
|
||||
|| (aln->element[j].subselected && method == SELECT_REGION))
|
||||
{
|
||||
this_elem = &(aln->element[j]);
|
||||
SeqNorm(this_elem);
|
||||
fprintf(file,"{\n");
|
||||
if(this_elem->short_name[0])
|
||||
fprintf(file,"name \"%s\"\n",this_elem->short_name);
|
||||
switch(this_elem->elementtype)
|
||||
{
|
||||
case DNA:
|
||||
fprintf(file,"type \"DNA\"\n");
|
||||
break;
|
||||
case RNA:
|
||||
fprintf(file,"type \"RNA\"\n");
|
||||
break;
|
||||
case PROTEIN:
|
||||
fprintf(file,"type \"PROTEIN\"\n");
|
||||
break;
|
||||
case MASK:
|
||||
fprintf(file,"type \"MASK\"\n");
|
||||
break;
|
||||
case TEXT:
|
||||
fprintf(file,"type \"TEXT\"\n");
|
||||
break;
|
||||
}
|
||||
if(this_elem->seq_name[0])
|
||||
fprintf(file,"longname %s\n",this_elem->seq_name);
|
||||
|
||||
if(this_elem->id[0])
|
||||
fprintf(file,"sequence-ID \"%s\"\n",this_elem->id);
|
||||
RemoveQuotes(this_elem->barcode);
|
||||
RemoveQuotes(this_elem->contig);
|
||||
|
||||
if(this_elem->barcode[0])
|
||||
fprintf(file,"barcode \"%s\"\n",this_elem->barcode);
|
||||
if(this_elem->membrane[0])
|
||||
fprintf(file,"membrane \"%s\"\n",this_elem->membrane);
|
||||
if(this_elem->contig[0])
|
||||
fprintf(file,"contig \"%s\"\n",this_elem->contig);
|
||||
if(this_elem->description[0])
|
||||
fprintf(file,"descrip \"%s\"\n",this_elem->description);
|
||||
if(this_elem->authority[0])
|
||||
fprintf(file,"creator \"%s\"\n",this_elem->authority);
|
||||
if(this_elem->groupid)
|
||||
fprintf(file,"group-ID %d\n",
|
||||
this_elem->groupid);
|
||||
if(this_elem->offset+aln->rel_offset && method!=SELECT_REGION)
|
||||
fprintf(file,"offset %d\n",this_elem->offset+aln->rel_offset);
|
||||
if(method == SELECT_REGION)
|
||||
{
|
||||
/*
|
||||
* If selecting a region, the offset should be moved to the first
|
||||
* non-'0' space in the mask.
|
||||
*/
|
||||
for(k=this_elem->offset;k<aln->selection_mask_len &&
|
||||
aln->selection_mask[k] == '0';k++);
|
||||
fprintf(file,"offset %d\n", aln->rel_offset+k);
|
||||
}
|
||||
if(this_elem->t_stamp.origin.mm != 0)
|
||||
fprintf(file,
|
||||
"creation-date %2d/%2d/%2d %2d:%2d:%2d\n",
|
||||
this_elem->t_stamp.origin.mm,
|
||||
this_elem->t_stamp.origin.dd,
|
||||
(this_elem->t_stamp.origin.yy)>1900?
|
||||
(this_elem->t_stamp.origin.yy-1900):
|
||||
(this_elem->t_stamp.origin.yy),
|
||||
this_elem->t_stamp.origin.hr,
|
||||
this_elem->t_stamp.origin.mn,
|
||||
this_elem->t_stamp.origin.sc);
|
||||
if((this_elem->attr & IS_ORIG_5_TO_3) &&
|
||||
((this_elem->attr & IS_ORIG_3_TO_5) == 0))
|
||||
fprintf(file,"orig_direction 1\n");
|
||||
|
||||
if((this_elem->attr & IS_CIRCULAR) )
|
||||
fprintf(file,"circular 1\n");
|
||||
|
||||
if((this_elem->attr & IS_5_TO_3) &&
|
||||
((this_elem->attr & IS_3_TO_5) == 0))
|
||||
fprintf(file,"direction 1\n");
|
||||
|
||||
if((this_elem->attr & IS_ORIG_3_TO_5) &&
|
||||
((this_elem->attr & IS_ORIG_5_TO_3) == 0))
|
||||
fprintf(file,"orig_direction -1\n");
|
||||
|
||||
if((this_elem->attr & IS_3_TO_5) &&
|
||||
((this_elem->attr & IS_5_TO_3) == 0))
|
||||
fprintf(file,"direction -1\n");
|
||||
|
||||
if((this_elem->attr & IS_ORIG_PRIMARY) &&
|
||||
((this_elem->attr & IS_ORIG_SECONDARY) == 0))
|
||||
fprintf(file,"orig_strand 1\n");
|
||||
|
||||
if((this_elem->attr & IS_PRIMARY) &&
|
||||
((this_elem->attr & IS_SECONDARY) == 0))
|
||||
fprintf(file,"strandedness 1\n");
|
||||
|
||||
if(((this_elem->attr & IS_ORIG_PRIMARY) == 0) &&
|
||||
(this_elem->attr & IS_ORIG_SECONDARY))
|
||||
fprintf(file,"orig_strand 2\n");
|
||||
|
||||
if(((this_elem->attr & IS_PRIMARY) == 0) &&
|
||||
(this_elem->attr & IS_SECONDARY))
|
||||
fprintf(file,"strandedness 2\n");
|
||||
|
||||
if(this_elem->comments != NULL)
|
||||
{
|
||||
StripSpecial(this_elem->comments);
|
||||
fprintf(file,"comments \"%s\"\n",this_elem->comments);
|
||||
}
|
||||
if(this_elem->baggage != NULL)
|
||||
{
|
||||
if(this_elem->
|
||||
baggage[strlen(this_elem->baggage)-1] == '\n')
|
||||
fprintf(file,"%s",this_elem->baggage);
|
||||
else
|
||||
fprintf(file,"%s\n",this_elem->baggage);
|
||||
}
|
||||
fprintf(file,"sequence \"");
|
||||
if(this_elem->tmatrix)
|
||||
{
|
||||
if(mask == -1)
|
||||
{
|
||||
for(k=this_elem->offset;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
{
|
||||
if(k%60 == 0)
|
||||
putc('\n',file);
|
||||
if(method == SELECT_REGION)
|
||||
{
|
||||
if(aln->selection_mask[k] == '1')
|
||||
putc(this_elem->tmatrix[getelem(this_elem,k)],
|
||||
file);
|
||||
}
|
||||
else
|
||||
putc(this_elem->tmatrix[getelem(this_elem,k)],
|
||||
file);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0,k=this_elem->offset;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
if(aln->element[mask].seqlen+this_elem->offset>k)
|
||||
if((char)getelem(&(aln->element[mask]),k) != '0'
|
||||
&& ((char)getelem(&(aln->element[mask]),k) != '-'))
|
||||
{
|
||||
if(i%60 == 0)
|
||||
putc('\n',file);
|
||||
putc(this_elem->tmatrix[getelem(this_elem,k)],
|
||||
file);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
fprintf(file,"\"\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mask == -1)
|
||||
{
|
||||
for(k=this_elem->offset;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
{
|
||||
if(k%60 == 0)
|
||||
putc('\n',file);
|
||||
if(method == SELECT_REGION)
|
||||
{
|
||||
if(aln->selection_mask[k] == '1')
|
||||
putc(getelem(this_elem,k),file);
|
||||
}
|
||||
else
|
||||
putc(getelem(this_elem,k),file);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0,k=this_elem->offset;k<this_elem->seqlen+this_elem->offset;k++)
|
||||
if(((aln->element[mask].seqlen)+(aln->element[mask].
|
||||
offset)) > k)
|
||||
if((char)getelem(&(aln->element[mask]),k) == '1')
|
||||
{
|
||||
if(i%60 == 0)
|
||||
putc('\n',file);
|
||||
putc(getelem(this_elem,k),file);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
fprintf(file,"\"\n");
|
||||
}
|
||||
fprintf(file,"}\n");
|
||||
}
|
||||
}
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
StripSpecial(string)
|
||||
char *string;
|
||||
{
|
||||
register int i,j,len;
|
||||
|
||||
len = strlen(string);
|
||||
for(j=0;j<len;j++)
|
||||
{
|
||||
if(string[j] == '"')
|
||||
string[j] = '`';
|
||||
else if(string[j] == '{')
|
||||
string[j] = '(';
|
||||
else if(string[j] == '}')
|
||||
string[j] = ')';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
RemoveQuotes(string)
|
||||
char *string;
|
||||
{
|
||||
register int i,j,len;
|
||||
|
||||
len = strlen(string);
|
||||
for(j=0;j<len;j++)
|
||||
if(string[j] == '"')
|
||||
string[j] = ' ';
|
||||
|
||||
for(j=0;string[j]==' ' && j<strlen(string);j++);
|
||||
|
||||
len = strlen(string);
|
||||
for(i=0;i<len - j;i++)
|
||||
string[i] = string[i+j];
|
||||
|
||||
for(j=strlen(string)-1;j>=0 && (string[j]=='\n'||string[j]==' '); j--)
|
||||
string[j] = '\0';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Normalize seq (remove leading indels in the sequence;
|
||||
*/
|
||||
void SeqNorm(seq)
|
||||
NA_Sequence *seq;
|
||||
{
|
||||
int len,j,shift_width,trailer;
|
||||
char *sequence;
|
||||
len = seq->seqlen;
|
||||
|
||||
sequence =(char*)seq->sequence;
|
||||
|
||||
if(len == 0) return;
|
||||
|
||||
if(seq->tmatrix)
|
||||
for(shift_width=0; (shift_width<len) &&
|
||||
((sequence[shift_width]&15) == '\0'); shift_width++);
|
||||
else
|
||||
for(shift_width=0; (shift_width<len) &&
|
||||
(sequence[shift_width] == '-'); shift_width++);
|
||||
|
||||
for(j=0;j<len-shift_width;j++)
|
||||
sequence[j] = sequence[j+shift_width];
|
||||
|
||||
seq->seqlen -= shift_width;
|
||||
seq->offset += shift_width;
|
||||
for(trailer=seq->seqlen-1;(sequence[trailer] =='-' ||
|
||||
sequence[trailer] == '\0') && trailer>=0;
|
||||
trailer--)
|
||||
sequence[trailer] = '\0';
|
||||
seq->seqlen = trailer+1;
|
||||
return;
|
||||
}
|
||||
|
||||
/* ALWAYS COPY the result from uniqueID() to a char[32],
|
||||
* (strlen(hostname)+1+10). Memory is lost when the function
|
||||
* is finished.
|
||||
*/
|
||||
char vname[32];
|
||||
char *uniqueID()
|
||||
{
|
||||
char hname[32]; /* ,vname[32]; rtm 18.III.98 */
|
||||
int hnamelen = 32;
|
||||
time_t *tp;
|
||||
static cnt = 0;
|
||||
|
||||
tp = (time_t *)Calloc(1, sizeof(time_t));
|
||||
|
||||
if(gethostname(hname, 10) == -1)
|
||||
{
|
||||
fprintf(stderr, "UniqueID(): Failed to get host name.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
time(tp);
|
||||
sprintf(vname, "%s:%d:%ld", hname, cnt, *tp);
|
||||
cnt++;
|
||||
Cfree(tp);
|
||||
return(vname);
|
||||
}
|
||||
|
||||
/*
|
||||
* OverWrite(), overwrite all non-default data from a sequence entry
|
||||
* onto any entry with the same ID or short name.
|
||||
*/
|
||||
OverWrite(this,aln)
|
||||
NA_Sequence *this;
|
||||
NA_Alignment *aln;
|
||||
{
|
||||
int j,indx = -1;
|
||||
NA_Sequence *that;
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
{
|
||||
if(Find2(this->id,aln->element[j].id) != -1)
|
||||
if(Find2(aln->element[j].id,this->id) != -1)
|
||||
indx = j;
|
||||
}
|
||||
if(indx == -1)
|
||||
for(j=0;j<aln->numelements;j++)
|
||||
{
|
||||
if(Find2(this->short_name,aln->element[j].short_name)!= -1)
|
||||
if(Find2(aln->element[j].short_name,this->short_name)!= -1)
|
||||
indx = j;
|
||||
}
|
||||
if(indx != -1)
|
||||
{
|
||||
that = &(aln->element[indx]);
|
||||
if(this->seq_name[0])
|
||||
strcpy(that->seq_name,this->seq_name);
|
||||
if(this->barcode[0])
|
||||
strcpy(that->barcode,this->barcode);
|
||||
if(this->contig[0])
|
||||
strcpy(that->contig,this->contig);
|
||||
if(this->membrane[0])
|
||||
strcpy(that->membrane,this->membrane);
|
||||
if(this->authority[0])
|
||||
strcpy(that->authority,this->authority);
|
||||
if(this->short_name[0])
|
||||
strcpy(that->short_name,this->short_name);
|
||||
if(this->description[0])
|
||||
strcpy(that->description,this->description);
|
||||
if(this->sequence)
|
||||
{
|
||||
cfree(that->sequence);
|
||||
that->sequence = this->sequence;
|
||||
that->seqlen = this->seqlen;
|
||||
that->seqmaxlen = this->seqmaxlen;
|
||||
}
|
||||
if(this->baggage)
|
||||
{
|
||||
that->baggage_len += this->baggage_len;
|
||||
that->baggage_maxlen += this->baggage_maxlen;
|
||||
if(that->baggage)
|
||||
that->baggage =
|
||||
Realloc(that->baggage,that->baggage_maxlen*sizeof(char));
|
||||
else
|
||||
that->baggage = Calloc(that->baggage_maxlen,sizeof(char));
|
||||
strncat(that->baggage,this->baggage,that->baggage_maxlen);
|
||||
}
|
||||
if(this->comments)
|
||||
{
|
||||
that->comments_len += this->comments_len;
|
||||
that->comments_maxlen += this->comments_maxlen;
|
||||
if(that->comments)
|
||||
that->comments =
|
||||
Realloc(that->comments,that->comments_maxlen*sizeof(char));
|
||||
else
|
||||
that->comments = Calloc(that->comments_maxlen,sizeof(char));
|
||||
strncat(that->comments,this->comments,that->comments_maxlen);
|
||||
}
|
||||
if(this->cmask)
|
||||
{
|
||||
cfree(that->cmask);
|
||||
that->cmask = this->cmask;
|
||||
}
|
||||
if(this->offset != that->offset)
|
||||
that->offset = this->offset;
|
||||
if(this->attr != 0)
|
||||
that->attr = this->attr;
|
||||
if(this->groupid != 0)
|
||||
{
|
||||
that->groupid = this->groupid;
|
||||
}
|
||||
that->groupb = NULL;
|
||||
that->groupf = NULL;
|
||||
}
|
||||
/*
|
||||
NormalizeOffset(aln);
|
||||
Regroup(aln);
|
||||
AdjustGroups(aln);
|
||||
*/
|
||||
return(indx);
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,60 @@
|
|||
OBJS= ParseMenu.o main.o BasicDisplay.o EventHandler.o FileIO.o \
|
||||
DrawNA.o Free.o BuiltIn.o Edit.o Genbank.o Scroll.o ChooseFile.o \
|
||||
CutCopyPaste.o HGLfile.o
|
||||
SRCS= ParseMenu.c main.c BasicDisplay.c EventHandler.c FileIO.c \
|
||||
DrawNA.c Free.c BuiltIn.c Edit.c Genbank.c Scroll.c ChooseFile.c \
|
||||
CutCopyPaste.c HGLfile.c
|
||||
|
||||
LIBS= -lm -lxview -lolgx -lX11
|
||||
CFLAGS= -g -L/usr/openwin/lib -I/usr/openwin/include
|
||||
CC = cc
|
||||
# Possible defines, SUN4 SGI DEC HGL
|
||||
DEFINES = -DLINUX
|
||||
|
||||
GLOBAL_DEPENDS= defines.h menudefs.h
|
||||
|
||||
gde: $(OBJS)
|
||||
$(CC) -o $@ $(OBJS) $(LIBS) $(CFLAGS) $(DEFINES)
|
||||
|
||||
ParseMenu.o: ParseMenu.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c ParseMenu.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
main.o: main.c $(GLOBAL_DEPENDS) globals.h
|
||||
$(CC) -c main.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
BasicDisplay.o: BasicDisplay.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c BasicDisplay.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
EventHandler.o: EventHandler.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c EventHandler.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
FileIO.o: FileIO.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c FileIO.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
DrawNA.o: DrawNA.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c DrawNA.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
Edit.o: Edit.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c Edit.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
Free.o: Free.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c Free.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
BuiltIn.o: BuiltIn.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c BuiltIn.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
Genbank.o: Genbank.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c Genbank.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
Scroll.o: Scroll.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c Scroll.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
ChooseFile.o: ChooseFile.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c ChooseFile.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
CutCopyPaste.o: CutCopyPaste.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c CutCopyPaste.c $(CFLAGS) $(DEFINES)
|
||||
|
||||
HGLfile.o: HGLfile.c $(GLOBAL_DEPENDS)
|
||||
$(CC) -c HGLfile.c $(CFLAGS) $(DEFINES)
|
||||
|
|
@ -0,0 +1,566 @@
|
|||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
/*
|
||||
ParseMenus(): Read in the menu config file, and generate the internal
|
||||
menu structures used by the window system.
|
||||
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
extern Gmenu menu[];
|
||||
int num_menus;
|
||||
|
||||
ParseMenu()
|
||||
{
|
||||
int j,curmenu = -1,curitem = 0;
|
||||
int curchoice = 0 ,curarg = 0,curinput = 0, curoutput = 0;
|
||||
char Inline[GBUFSIZ],temp[GBUFSIZ],head[GBUFSIZ];
|
||||
char tail[GBUFSIZ],*home;
|
||||
Gmenu *thismenu;
|
||||
GmenuItem *thisitem;
|
||||
GmenuItemArg *thisarg;
|
||||
GfileFormat *thisinput,*thisoutput;
|
||||
FILE *file;
|
||||
char *resize;
|
||||
|
||||
/*
|
||||
* Open the menu configuration file ".GDEmenus"
|
||||
* First search the local directory, then the home directory.
|
||||
*/
|
||||
file=fopen(".GDEmenus","r");
|
||||
if(file == NULL)
|
||||
{
|
||||
home = (char*)getenv("HOME");
|
||||
strcpy(temp,home);
|
||||
strcat(temp,"/.GDEmenus");
|
||||
|
||||
file=fopen(temp,"r");
|
||||
if(file == NULL)
|
||||
{
|
||||
home = (char*)getenv("GDE_HELP_DIR");
|
||||
if(home != NULL)
|
||||
{
|
||||
strcpy(temp,home);
|
||||
strcat(temp,"/.GDEmenus");
|
||||
file=fopen(temp,"r");
|
||||
}
|
||||
if(file == NULL)
|
||||
Error(
|
||||
".GDEmenus file not in the home, local, or $GDE_HELP_DIR directory");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the .GDEmenus file, and assemble an internal representation
|
||||
* of the menu/menu-item hierarchy.
|
||||
*/
|
||||
|
||||
for(;getline(file,Inline) != EOF;)
|
||||
{
|
||||
/*
|
||||
* menu: chooses menu to use
|
||||
*/
|
||||
if(Inline[0] == '#');
|
||||
else if(Find(Inline,"menu:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
curmenu = -1;
|
||||
for(j=0;j<num_menus;j++)
|
||||
if(Find(temp,menu[j].label))
|
||||
curmenu=j;
|
||||
/*
|
||||
* If menu not found, make a new one
|
||||
*/
|
||||
if(curmenu == -1)
|
||||
{
|
||||
curmenu = num_menus++;
|
||||
thismenu = &menu[curmenu];
|
||||
thismenu->label =
|
||||
(char*)calloc(strlen(temp)+1,sizeof(char));
|
||||
|
||||
if(thismenu->label == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thismenu->label,temp);
|
||||
thismenu->numitems = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* item: chooses menu item to use
|
||||
*/
|
||||
else if(Find(Inline,"item:"))
|
||||
{
|
||||
curarg = -1;
|
||||
curinput = -1;
|
||||
curoutput = -1;
|
||||
crop(Inline,head,temp);
|
||||
curitem = thismenu->numitems++;
|
||||
/*
|
||||
* Resize the item list for this menu (add one item);
|
||||
*/
|
||||
if(curitem == 0)
|
||||
resize = (char*)calloc(1,sizeof(GmenuItem));
|
||||
else
|
||||
resize = realloc(thismenu->item,
|
||||
thismenu -> numitems*sizeof(GmenuItem) );
|
||||
|
||||
if(resize == NULL)
|
||||
Error ("Calloc");
|
||||
thismenu->item =(GmenuItem*)resize;
|
||||
|
||||
thisitem = &(thismenu->item[curitem]);
|
||||
thisitem->label = (char*)calloc(strlen(temp)+1,
|
||||
sizeof(char));
|
||||
thisitem->meta = '\0';
|
||||
thisitem->numinputs = 0;
|
||||
thisitem->numoutputs = 0;
|
||||
thisitem->numargs = 0;
|
||||
thisitem->X = 0;
|
||||
thisitem->help = NULL;
|
||||
|
||||
/*
|
||||
* Create new item
|
||||
*/
|
||||
|
||||
if(thisitem->label == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thisitem->label,temp);
|
||||
}
|
||||
|
||||
/*
|
||||
* itemmethod: generic command line generated by this item
|
||||
*/
|
||||
else if(Find(Inline,"itemmethod:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
thisitem->method =
|
||||
(char*)calloc(strlen(temp)+1,sizeof(char));
|
||||
if(thisitem->method == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thisitem->method,temp);
|
||||
}
|
||||
/*
|
||||
* Help file
|
||||
*/
|
||||
else if(Find(Inline,"itemhelp:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
thisitem->help =
|
||||
(char*)calloc(strlen(temp)+1,sizeof(char));
|
||||
if(thisitem->method == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thisitem->help,temp);
|
||||
}
|
||||
/*
|
||||
* Meta key equiv
|
||||
*/
|
||||
else if(Find(Inline,"itemmeta:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
thisitem->meta = temp[0];
|
||||
}
|
||||
/*
|
||||
* arg: defines the symbol for a command line arguement.
|
||||
* this is used for substitution into the itemmethod
|
||||
* definition.
|
||||
*/
|
||||
|
||||
else if(Find(Inline,"arg:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
curarg=thisitem->numargs++;
|
||||
if(curarg == 0)
|
||||
resize = (char*)calloc(1,sizeof(GmenuItemArg));
|
||||
else
|
||||
resize = realloc(thisitem->arg,
|
||||
thisitem->numargs*sizeof(GmenuItemArg) );
|
||||
|
||||
|
||||
if(resize == NULL)
|
||||
Error("arg: Realloc");
|
||||
|
||||
(thisitem->arg) = (GmenuItemArg*)resize;
|
||||
thisarg = &(thisitem->arg[curarg]);
|
||||
thisarg->symbol = (char*)calloc(strlen(temp)+1,
|
||||
sizeof(char));
|
||||
if(thisarg->symbol == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thisarg->symbol,temp);
|
||||
thisarg->optional = FALSE;
|
||||
thisarg->type = 0;
|
||||
thisarg->min = 0;
|
||||
thisarg->max = 0;
|
||||
thisarg->numchoices = 0;
|
||||
thisarg->choice = NULL;
|
||||
thisarg->textvalue = NULL;
|
||||
thisarg->value = 0;
|
||||
}
|
||||
/*
|
||||
* argtype: Defines the type of argument (menu,chooser, text, slider)
|
||||
*/
|
||||
else if(Find(Inline,"argtype:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
if(strcmp(temp,"text")==0)
|
||||
{
|
||||
thisarg->type=TEXTFIELD;
|
||||
thisarg->textvalue =
|
||||
(char*)calloc(GBUFSIZ,sizeof(char));
|
||||
if(thisarg->textvalue == NULL)
|
||||
Error("Calloc");
|
||||
}
|
||||
else if(strcmp(temp,"choice_list")==0)
|
||||
thisarg->type=CHOICE_LIST;
|
||||
else if(strcmp(temp,"choice_menu")==0)
|
||||
thisarg->type=CHOICE_MENU;
|
||||
else if(strcmp(temp,"chooser")==0)
|
||||
thisarg->type=CHOOSER;
|
||||
else if(strcmp(temp,"slider")==0)
|
||||
thisarg->type=SLIDER;
|
||||
else
|
||||
Error(sprintf(head,"Unknown argtype %s",temp));
|
||||
}
|
||||
/*
|
||||
* argtext: The default text value of the symbol.
|
||||
* $argument is replaced by this value if it is not
|
||||
* changed in the dialog box by the user.
|
||||
*/
|
||||
else if(Find(Inline,"argtext:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
(void)strcpy(thisarg->textvalue,temp);
|
||||
}
|
||||
/*
|
||||
* arglabel: Text label displayed in the dialog box for
|
||||
* this argument. It should be a discriptive label.
|
||||
*/
|
||||
else if(Find(Inline,"arglabel:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
thisarg->label=(char*)calloc(strlen(temp)+1,
|
||||
sizeof(char));
|
||||
if(thisarg->label == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thisarg->label,temp);
|
||||
}
|
||||
/*
|
||||
* Argument choice values use the following notation:
|
||||
*
|
||||
* argchoice:Displayed value:Method
|
||||
*
|
||||
* Where "Displayed value" is the label displayed in the dialog box
|
||||
* and "Method" is the value passed back on the command line.
|
||||
*/
|
||||
else if(Find(Inline,"argchoice:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
crop(temp,head,tail);
|
||||
curchoice = thisarg->numchoices++;
|
||||
if(curchoice == 0)
|
||||
resize = (char*)calloc(1,sizeof(GargChoice));
|
||||
else
|
||||
resize = realloc(thisarg->choice,
|
||||
thisarg->numchoices*sizeof(GargChoice));
|
||||
|
||||
if(resize == NULL)
|
||||
Error("argchoice: Realloc");
|
||||
thisarg->choice = (GargChoice*)resize;
|
||||
|
||||
(thisarg->choice[curchoice].label) = NULL;
|
||||
(thisarg->choice[curchoice].method) = NULL;
|
||||
|
||||
(thisarg->choice[curchoice].label) =
|
||||
(char*)calloc(strlen(head)+1,sizeof(char));
|
||||
|
||||
(thisarg->choice[curchoice].method) =
|
||||
(char*)calloc(strlen(tail)+1,sizeof(char));
|
||||
|
||||
if(thisarg->choice[curchoice].method == NULL ||
|
||||
thisarg->choice[curchoice].label == NULL)
|
||||
Error("Calloc");
|
||||
|
||||
(void)strcpy(thisarg->choice[curchoice].label,head);
|
||||
(void)strcpy(thisarg->choice[curchoice].method,tail);
|
||||
}
|
||||
/*
|
||||
* argmin: Minimum value for a slider
|
||||
*/
|
||||
else if(Find(Inline,"argmin:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
(void)sscanf(temp,"%d",&(thisarg->min));
|
||||
}
|
||||
/*
|
||||
* argmax: Maximum value for a slider
|
||||
*/
|
||||
else if(Find(Inline,"argmax:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
(void)sscanf(temp,"%d",&(thisarg->max));
|
||||
}
|
||||
/*
|
||||
* argmethod: Command line flag associated with this argument.
|
||||
* Replaces argument in itemmethod description.
|
||||
*/
|
||||
else if(Find(Inline,"argmethod:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
thisarg->method = (char*)calloc(GBUFSIZ,strlen(temp));
|
||||
if(thisarg->method == NULL)
|
||||
Error("Calloc");
|
||||
(void)strcpy(thisarg->method,tail);
|
||||
}
|
||||
/*
|
||||
* argvalue: default value for a slider
|
||||
*/
|
||||
else if(Find(Inline,"argvalue:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
if(thisarg->type == TEXT)
|
||||
strcpy(thisarg->textvalue,temp);
|
||||
else
|
||||
(void)sscanf(temp,"%d",&(thisarg->value));
|
||||
}
|
||||
/*
|
||||
* argoptional: Flag specifying that an arguement is optional
|
||||
*/
|
||||
else if(Find(Inline,"argoptional:"))
|
||||
thisarg->optional = TRUE;
|
||||
/*
|
||||
* in: Input file description
|
||||
*/
|
||||
else if(Find(Inline,"in:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
curinput = (thisitem->numinputs)++;
|
||||
if(curinput == 0)
|
||||
resize = (char*)calloc(1,sizeof(GfileFormat));
|
||||
else
|
||||
resize = realloc(thisitem->input,
|
||||
(thisitem->numinputs)*sizeof(GfileFormat));
|
||||
|
||||
if(resize == NULL)
|
||||
Error("in: Realloc");
|
||||
thisitem->input = (GfileFormat*)resize;
|
||||
thisinput = &(thisitem->input)[curinput];
|
||||
thisinput->save = FALSE;
|
||||
thisinput->overwrite = FALSE;
|
||||
thisinput->maskable = FALSE;
|
||||
thisinput->format = 0;
|
||||
thisinput->symbol = String(temp);
|
||||
thisinput->name = NULL;
|
||||
thisinput->select = SELECTED;
|
||||
}
|
||||
|
||||
/*
|
||||
* out: Output file description
|
||||
*/
|
||||
|
||||
else if(Find(Inline,"out:"))
|
||||
{
|
||||
crop(Inline,head,temp);
|
||||
curoutput = (thisitem->numoutputs)++;
|
||||
if(curoutput == 0)
|
||||
resize = (char*)calloc(1,sizeof(GfileFormat));
|
||||
else
|
||||
resize = realloc(thisitem->output,
|
||||
(thisitem->numoutputs)*sizeof(GfileFormat));
|
||||
|
||||
if(resize == NULL)
|
||||
Error("out: Realloc");
|
||||
thisitem->output = (GfileFormat*)resize;
|
||||
thisoutput = &(thisitem->output)[curoutput];
|
||||
thisitem->output = (GfileFormat*)resize;
|
||||
thisoutput = &(thisitem->output)[curoutput];
|
||||
thisoutput->save = FALSE;
|
||||
thisoutput->overwrite = FALSE;
|
||||
thisoutput->format = 0;
|
||||
thisoutput->symbol= String(temp);
|
||||
thisoutput->name = NULL;
|
||||
}
|
||||
else if(Find(Inline,"informat:"))
|
||||
{
|
||||
if(thisinput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
crop(Inline,head,tail);
|
||||
if(Find(tail,"genbank"))
|
||||
thisinput->format = GENBANK;
|
||||
else if(Find(tail,"gde"))
|
||||
thisinput->format = GDE;
|
||||
else if(Find(tail,"na_flat"))
|
||||
thisinput->format = NA_FLAT;
|
||||
else if(Find(tail,"colormask"))
|
||||
thisinput->format = COLORMASK;
|
||||
else if(Find(tail,"flat"))
|
||||
thisinput->format = NA_FLAT;
|
||||
else if(Find(tail,"status"))
|
||||
thisinput->format = STATUS_FILE;
|
||||
else fprintf(stderr,"Warning, unknown file format %s\n"
|
||||
,tail);
|
||||
}
|
||||
else if(Find(Inline,"insave:"))
|
||||
{
|
||||
if(thisinput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
thisinput->save = TRUE;
|
||||
}
|
||||
else if(Find(Inline,"inselect:"))
|
||||
{
|
||||
if(thisinput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
crop(Inline,head,tail);
|
||||
if(Find(tail,"one"))
|
||||
thisinput->select = SELECT_ONE;
|
||||
else if(Find(tail,"region"))
|
||||
thisinput->select = SELECT_REGION;
|
||||
else if(Find(tail,"all"))
|
||||
thisinput->select = ALL;
|
||||
}
|
||||
else if(Find(Inline,"inmask:"))
|
||||
{
|
||||
if(thisinput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
thisinput->maskable = TRUE;
|
||||
}
|
||||
else if(Find(Inline,"outformat:"))
|
||||
{
|
||||
if(thisoutput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
crop(Inline,head,tail);
|
||||
if(Find(tail,"genbank"))
|
||||
thisoutput->format = GENBANK;
|
||||
else if(Find(tail,"gde"))
|
||||
thisoutput->format = GDE;
|
||||
else if(Find(tail,"na_flat"))
|
||||
thisoutput->format = NA_FLAT;
|
||||
else if(Find(tail,"flat"))
|
||||
thisoutput->format = NA_FLAT;
|
||||
else if(Find(tail,"status"))
|
||||
thisoutput->format = STATUS_FILE;
|
||||
else if(Find(tail,"colormask"))
|
||||
thisoutput->format = COLORMASK;
|
||||
else fprintf(stderr,"Warning, unknown file format %s\n"
|
||||
,tail);
|
||||
}
|
||||
else if(Find(Inline,"outsave:"))
|
||||
{
|
||||
if(thisoutput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
thisoutput->save = TRUE;
|
||||
}
|
||||
else if(Find(Inline,"outoverwrite:"))
|
||||
{
|
||||
if(thisoutput == NULL)
|
||||
Error("Problem with .GDEmenus");
|
||||
thisoutput->overwrite = TRUE;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Find(): Search the target string for the given key
|
||||
*/
|
||||
Find(target,key)
|
||||
char *key,*target;
|
||||
{
|
||||
int i,j,len1,dif,flag = FALSE;
|
||||
dif = (strlen(target)) - (len1 = strlen(key)) +1;
|
||||
|
||||
if(len1>0)
|
||||
for(j=0;j<dif && flag == FALSE;j++)
|
||||
{
|
||||
flag = TRUE;
|
||||
for(i=0;i<len1 && flag;i++)
|
||||
flag = (key[i] == target[i+j])?TRUE:FALSE;
|
||||
|
||||
}
|
||||
return(flag);
|
||||
}
|
||||
|
||||
|
||||
Find2(target,key)
|
||||
char *key,*target;
|
||||
/*
|
||||
* Like find, but returns the index of the leftmost
|
||||
* occurence, and -1 if not found.
|
||||
*/
|
||||
{
|
||||
int i,j,len1,dif,flag = FALSE;
|
||||
dif = (strlen(target)) - (len1 = strlen(key)) +1;
|
||||
|
||||
if(len1>0)
|
||||
for(j=0;j<dif && flag == FALSE;j++)
|
||||
{
|
||||
flag = TRUE;
|
||||
for(i=0;i<len1 && flag;i++)
|
||||
flag = (key[i] == target[i+j])?TRUE:FALSE;
|
||||
|
||||
}
|
||||
return(flag?j-1:-1);
|
||||
}
|
||||
|
||||
|
||||
Error(msg)
|
||||
char *msg;
|
||||
{
|
||||
(void)fprintf(stderr,"%s\n",msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
int getline(file,string)
|
||||
FILE *file;
|
||||
char string[];
|
||||
{
|
||||
char c;
|
||||
int i;
|
||||
for(i=0;((c=getc(file))!='\n') && (c!=EOF);i++)
|
||||
string[i]=c;
|
||||
string[i] = '\0';
|
||||
if (i==0 && c==EOF) return (EOF);
|
||||
else return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
Crop():
|
||||
Split "this:that[:the_other]"
|
||||
into: "this" and "that[:the_other]"
|
||||
*/
|
||||
|
||||
crop(input,head,tail)
|
||||
char input[],head[],tail[];
|
||||
{
|
||||
/*
|
||||
* Crop needs to be fixed so that whitespace is compressed off the end
|
||||
* of tail
|
||||
*/
|
||||
int offset,end,i,j,length;
|
||||
|
||||
length=strlen(input);
|
||||
for(offset=0;offset<length && input[offset] != ':';offset++)
|
||||
head[offset]=input[offset];
|
||||
head[offset++] = '\0';
|
||||
for(;offset<length && input[offset] == ' ';offset++);
|
||||
for(end=length-1;input[end] ==' ' && end>offset;end--);
|
||||
|
||||
for(j=0,i=offset;i<=end;i++,j++)
|
||||
tail[j]=input[i];
|
||||
tail[j] = '\0';
|
||||
return;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,292 @@
|
|||
#include <malloc.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/scrollbar.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/font.h>
|
||||
#include <xview/xv_xrect.h>
|
||||
#include <xview/cms.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
|
||||
/*
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
InitEditSplit(oldview, newview, pos)
|
||||
Xv_Window oldview, newview;
|
||||
int pos;
|
||||
{
|
||||
Xv_Window view, win;
|
||||
extern Frame frame;
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Canvas EditCan;
|
||||
extern int SCALE;
|
||||
Scrollbar hsc,vsc;
|
||||
int j;
|
||||
|
||||
if(DataSet == (NA_Alignment *) NULL || EditCan == (Canvas) NULL)
|
||||
return ;
|
||||
|
||||
for(j=0;j<xv_get(EditCan,OPENWIN_NVIEWS);j++)
|
||||
{
|
||||
view = (Xv_window)xv_get(EditCan,OPENWIN_NTH_VIEW,j);
|
||||
|
||||
hsc = (Scrollbar)xv_get(EditCan,
|
||||
OPENWIN_HORIZONTAL_SCROLLBAR,view);
|
||||
|
||||
vsc = (Scrollbar)xv_get(EditCan,
|
||||
OPENWIN_VERTICAL_SCROLLBAR,view);
|
||||
|
||||
xv_set(hsc,
|
||||
SCROLLBAR_VIEW_START,0,
|
||||
SCROLLBAR_OBJECT_LENGTH,((NA_Alignment*)DataSet)->
|
||||
maxlen,0);
|
||||
|
||||
xv_set(vsc,
|
||||
SCROLLBAR_VIEW_START,0,
|
||||
SCROLLBAR_OBJECT_LENGTH,((NA_Alignment*)DataSet)->
|
||||
numelements,0);
|
||||
|
||||
if (view == newview)
|
||||
{
|
||||
/*
|
||||
* Get the paint window associated, and set it up the same as in
|
||||
* BasicDisplay:
|
||||
*/
|
||||
|
||||
(void)xv_set(xv_get(view,CANVAS_VIEW_PAINT_WINDOW),
|
||||
WIN_EVENT_PROC,NAEvents,
|
||||
WIN_CONSUME_EVENTS, WIN_MOUSE_BUTTONS,
|
||||
LOC_DRAG, LOC_WINENTER, WIN_ASCII_EVENTS,
|
||||
WIN_META_EVENTS, 0,
|
||||
0);
|
||||
|
||||
notify_interpose_event_func(
|
||||
xv_get(hsc,SCROLLBAR_NOTIFY_CLIENT),
|
||||
EditCanScroll,NOTIFY_SAFE);
|
||||
|
||||
xv_set(hsc,
|
||||
SCROLLBAR_OBJECT_LENGTH,((NA_Alignment*)DataSet)->
|
||||
maxlen,SCROLLBAR_VIEW_START,0,
|
||||
0);
|
||||
|
||||
xv_set(vsc,
|
||||
SCROLLBAR_OBJECT_LENGTH,((NA_Alignment*)DataSet)->
|
||||
numelements,0);
|
||||
}
|
||||
}
|
||||
RepaintAll(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Notify_value EditCanScroll(client,event,arg,type)
|
||||
Notify_client client;
|
||||
Event *event;
|
||||
Notify_arg arg;
|
||||
Notify_event_type type;
|
||||
{
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Canvas EditCan;
|
||||
extern Panel_item left_foot,right_foot;
|
||||
extern int DisplayAttr,SCALE;
|
||||
|
||||
Notify_client parent;
|
||||
Drawable draw;
|
||||
GC gc;
|
||||
Display *dpy;
|
||||
Xv_xrectlist area;
|
||||
|
||||
Xv_window win,view;
|
||||
Scrollbar hsc,vsc;
|
||||
extern Frame frame;
|
||||
int lastx,currentx,deltax,j;
|
||||
int lasty,currenty,deltay;
|
||||
int dx,dy;
|
||||
char buffer[80];
|
||||
|
||||
hsc=(Scrollbar)xv_get(EditCan,OPENWIN_HORIZONTAL_SCROLLBAR, client);
|
||||
vsc=(Scrollbar)xv_get(EditCan,OPENWIN_VERTICAL_SCROLLBAR, client);
|
||||
/*
|
||||
test for hsc && vsc attempts to fix warnings at split
|
||||
*/
|
||||
|
||||
if(event_id(event) == SCROLLBAR_REQUEST && hsc && vsc)
|
||||
{
|
||||
win=(Xv_window)xv_get(client,
|
||||
CANVAS_VIEW_PAINT_WINDOW);
|
||||
|
||||
dx=((NA_DisplayData*)(((NA_Alignment*)DataSet)->
|
||||
na_ddata))-> font_dx;
|
||||
|
||||
dy=((NA_DisplayData*)(((NA_Alignment*)DataSet)->
|
||||
na_ddata))-> font_dy;
|
||||
|
||||
lastx=(int)xv_get(hsc,
|
||||
SCROLLBAR_LAST_VIEW_START);
|
||||
|
||||
currentx=(int)xv_get(hsc,SCROLLBAR_VIEW_START)/SCALE;
|
||||
deltax=(int)xv_get(hsc,SCROLLBAR_VIEW_LENGTH);
|
||||
|
||||
lasty=(int)xv_get(vsc,
|
||||
SCROLLBAR_LAST_VIEW_START);
|
||||
|
||||
currenty=(int)xv_get(vsc,SCROLLBAR_VIEW_START);
|
||||
deltay=(int)xv_get(vsc,SCROLLBAR_VIEW_LENGTH);
|
||||
|
||||
area.count=1;
|
||||
area.rect_array[0].x=0;
|
||||
area.rect_array[0].y=0;
|
||||
area.rect_array[0].width=(short)(deltax*dx);
|
||||
area.rect_array[0].height=(short)(deltay*dy);
|
||||
|
||||
RepaintNACan(EditCan,win,xv_get(client,
|
||||
XV_DISPLAY),
|
||||
(Window)xv_get(win,XV_XID),&area);
|
||||
|
||||
sprintf(buffer,"Columns %d - %d shown",currentx,
|
||||
currentx+deltax*SCALE);
|
||||
if(DisplayAttr & VSCROLL_LOCK)
|
||||
{
|
||||
DisplayAttr &= (unsigned int)(255 - VSCROLL_LOCK);
|
||||
for(j=0;j<xv_get(EditCan,OPENWIN_NVIEWS);j++)
|
||||
{
|
||||
view = xv_get(EditCan,OPENWIN_NTH_VIEW,j);
|
||||
if(view != client)
|
||||
{
|
||||
if(view)
|
||||
{
|
||||
vsc=(Scrollbar)xv_get(EditCan,
|
||||
OPENWIN_VERTICAL_SCROLLBAR, view);
|
||||
if(vsc)
|
||||
xv_set(vsc,SCROLLBAR_VIEW_START,
|
||||
currenty, SCROLLBAR_VIEW_LENGTH,deltay,
|
||||
0);
|
||||
}
|
||||
}
|
||||
}
|
||||
DisplayAttr |= VSCROLL_LOCK;
|
||||
}
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
xv_set(right_foot,PANEL_LABEL_STRING,buffer,0);
|
||||
return(XV_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
test for hsc && vsc attempts to fix warnings at split
|
||||
*/
|
||||
else if ((event_action(event) == ACTION_SPLIT_HORIZONTAL ||
|
||||
event_action(event) == ACTION_SPLIT_VERTICAL ) &&
|
||||
hsc && vsc)
|
||||
{
|
||||
xv_set(hsc,SCROLLBAR_VIEW_START,0,0);
|
||||
xv_set(vsc,SCROLLBAR_VIEW_START,0,0);
|
||||
return(notify_next_event_func(client,event,arg,type));
|
||||
}
|
||||
else
|
||||
return(notify_next_event_func(client,event,arg,type));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void JumpTo(view,x,y)
|
||||
Xv_window view;
|
||||
int x,y;
|
||||
{
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Canvas EditCan;
|
||||
Scrollbar hsc,vsc;
|
||||
int j,dx,dy;
|
||||
Xv_xrectlist area;
|
||||
Xv_window win;
|
||||
|
||||
hsc = (Scrollbar)xv_get(EditCan,OPENWIN_HORIZONTAL_SCROLLBAR,view);
|
||||
vsc = (Scrollbar)xv_get(EditCan,OPENWIN_VERTICAL_SCROLLBAR,view);
|
||||
win = (Xv_window)xv_get(view,CANVAS_VIEW_PAINT_WINDOW);
|
||||
|
||||
(void)xv_set(hsc,SCROLLBAR_VIEW_START,MIN(x,
|
||||
xv_get(hsc,SCROLLBAR_OBJECT_LENGTH)-xv_get(hsc,SCROLLBAR_VIEW_LENGTH)),
|
||||
0);
|
||||
(void)xv_set(vsc,SCROLLBAR_VIEW_START,MIN(y,
|
||||
xv_get(vsc,SCROLLBAR_OBJECT_LENGTH)-xv_get(vsc,SCROLLBAR_VIEW_LENGTH)),
|
||||
0);
|
||||
(void)xv_set(hsc,SCROLLBAR_OBJECT_LENGTH,DataSet->maxlen,0);
|
||||
(void)xv_set(vsc,SCROLLBAR_OBJECT_LENGTH,DataSet->numelements,0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
RepaintAll(Names)
|
||||
int Names;
|
||||
{
|
||||
extern NA_Alignment *DataSet;
|
||||
extern Canvas EditCan,EditNameCan;
|
||||
Xv_xrectlist area;
|
||||
Xv_window win,view;
|
||||
Scrollbar hsc,vsc;
|
||||
extern int SCALE;
|
||||
extern Frame frame;
|
||||
int lastx,currentx,deltax;
|
||||
int lasty,currenty,deltay;
|
||||
int dx,dy,j;
|
||||
char buffer[80];
|
||||
|
||||
if(DataSet == NULL)
|
||||
return;
|
||||
|
||||
if((NA_DisplayData*)(((NA_Alignment*)DataSet)->na_ddata == NULL))
|
||||
return;
|
||||
|
||||
for(j=0;j<xv_get(EditCan,OPENWIN_NVIEWS);j++)
|
||||
{
|
||||
view = (Xv_window)xv_get(EditCan,OPENWIN_NTH_VIEW,j);
|
||||
win = (Xv_window)xv_get(view,CANVAS_VIEW_PAINT_WINDOW);
|
||||
dx = ((NA_DisplayData*)(((NA_Alignment*)DataSet)->na_ddata))->
|
||||
font_dx ;
|
||||
dy = ((NA_DisplayData*)(((NA_Alignment*)DataSet)->na_ddata))->
|
||||
font_dy;
|
||||
hsc=(Scrollbar)xv_get(EditCan,OPENWIN_HORIZONTAL_SCROLLBAR,
|
||||
view);
|
||||
vsc=(Scrollbar)xv_get(EditCan,OPENWIN_VERTICAL_SCROLLBAR, view);
|
||||
|
||||
lastx = (int)xv_get(hsc,SCROLLBAR_LAST_VIEW_START);
|
||||
currentx = (int)xv_get(hsc,SCROLLBAR_VIEW_START);
|
||||
deltax = (int)xv_get(hsc,SCROLLBAR_VIEW_LENGTH);
|
||||
|
||||
lasty = (int)xv_get(vsc,SCROLLBAR_LAST_VIEW_START);
|
||||
currenty = (int)xv_get(vsc,SCROLLBAR_VIEW_START);
|
||||
deltay = (int)xv_get(vsc,SCROLLBAR_VIEW_LENGTH);
|
||||
|
||||
area.count = 1;
|
||||
area.rect_array[0].x = 0;
|
||||
area.rect_array[0].y = 0;
|
||||
area.rect_array[0].width = (short)(deltax*dx);
|
||||
area.rect_array[0].height = (short)(deltay*dy);
|
||||
|
||||
RepaintNACan(EditCan,win,xv_get(view, XV_DISPLAY),
|
||||
(Window)xv_get(win,XV_XID),&area);
|
||||
|
||||
sprintf(buffer,"%d - %d",currentx/SCALE,
|
||||
currentx/SCALE+deltax*SCALE);
|
||||
xv_set(frame,FRAME_RIGHT_FOOTER,buffer,0);
|
||||
}
|
||||
if(Names)
|
||||
DrawNANames(xv_get(view, XV_DISPLAY),
|
||||
(Window)xv_get(xv_get(EditNameCan,
|
||||
CANVAS_NTH_PAINT_WINDOW,0), XV_XID));
|
||||
return;
|
||||
}
|
||||
|
||||
DestroySplit(view)
|
||||
Xv_window view;
|
||||
{}
|
Binary file not shown.
|
@ -0,0 +1,274 @@
|
|||
/*
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
#include <xview/font.h>
|
||||
#include <xview/scrollbar.h>
|
||||
#include <xview/xview.h>
|
||||
|
||||
#define TRUTH 1
|
||||
#define JUSTICE 2
|
||||
#define BEAUTY 3
|
||||
|
||||
/*
|
||||
* Edit modes
|
||||
*/
|
||||
|
||||
#define INSERT 0
|
||||
#define CHECK 1
|
||||
|
||||
/*
|
||||
* Cursor directions
|
||||
*/
|
||||
#define RIGHT 1
|
||||
#define LEFT 0
|
||||
#define UP 0
|
||||
#define DOWN 1
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#define GBUFSIZ 512
|
||||
#define MAX_NA_DISPLAY_WIDTH 1024
|
||||
#define MAX_NA_DISPLAY_HEIGHT 1024
|
||||
#define MAX_STARTUP_CANVAS_HEIGHT 512
|
||||
#define grey_height 8
|
||||
#define grey_width 8
|
||||
|
||||
/*
|
||||
* Definable dialog types
|
||||
*/
|
||||
#define TEXTFIELD 0x1
|
||||
#define SLIDER 0x2
|
||||
#define CHOOSER 0x3
|
||||
#define CHOICE_MENU 0x4
|
||||
#define CHOICE_LIST 0x5
|
||||
|
||||
/*
|
||||
* File Formats
|
||||
*/
|
||||
#define GDE 0x100
|
||||
#define GENBANK 0x101
|
||||
#define NA_FLAT 0x102
|
||||
#define COLORMASK 0x103
|
||||
#define STATUS_FILE 0x104
|
||||
|
||||
/*
|
||||
* Protection bits
|
||||
*/
|
||||
|
||||
#define PROT_BASE_CHANGES 0x1 /* Allow base changes */
|
||||
#define PROT_GREY_SPACE 0x2 /* Allow greyspace modification */
|
||||
#define PROT_WHITE_SPACE 0x4 /* Allow whitespace modification */
|
||||
#define PROT_TRANSLATION 0x8 /* Allow translation */
|
||||
#define PROT_REORIENTATION 0x10 /* Allow reorientation */
|
||||
|
||||
|
||||
/*
|
||||
* File loading methods (must be 'OR/AND' able)
|
||||
*/
|
||||
|
||||
#define NONE 0x0
|
||||
#define DESTROY 0x1
|
||||
#define LOAD 0x2
|
||||
#define SAVE 0x4
|
||||
#define SELECTED 0x8
|
||||
#define ALL 0x10
|
||||
#define SELECT_REGION 0x20
|
||||
#define SELECT_ONE 0x30
|
||||
|
||||
/*
|
||||
* Sequence DISPLAY Types
|
||||
*/
|
||||
#define NASEQ_ALIGN 0x201
|
||||
#define NASEQ 0x202
|
||||
|
||||
/*
|
||||
* Sequence Data Types
|
||||
*/
|
||||
#define DNA 0x300
|
||||
#define RNA 0x301
|
||||
#define TEXT 0x302
|
||||
#define MASK 0x303
|
||||
#define PROTEIN 0x304
|
||||
/*
|
||||
* extended sequence attributes (true/false)
|
||||
*/
|
||||
|
||||
#define IS_5_TO_3 0x01 /* 5prime to 3 prime */
|
||||
#define IS_3_TO_5 0x02 /* 3 prime to 5 prime */
|
||||
#define IS_CIRCULAR 0x04 /* circular dna */
|
||||
#define IS_PRIMARY 0x10 /* on the primary strand */
|
||||
#define IS_SECONDARY 0x20 /* on the secondary strand */
|
||||
#define IS_MODIFIED 0x40 /* modification flag */
|
||||
#define IS_ORIG_PRIMARY 0x80 /* Original sequence was primary */
|
||||
#define IS_ORIG_SECONDARY 0x100 /* Original sequence was secondary */
|
||||
#define IS_ORIG_5_TO_3 0x200 /* Original sequence was 5_to_3 */
|
||||
#define IS_ORIG_3_TO_5 0x400 /* Original sequence was 3_to_5 */
|
||||
|
||||
#ifdef HGL
|
||||
#define DEFAULT_X_ATTR 0
|
||||
#else
|
||||
#define DEFAULT_X_ATTR IS_5_TO_3+IS_PRIMARY;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Other display attributed
|
||||
*/
|
||||
#define INVERTED 1
|
||||
#define VSCROLL_LOCK 2
|
||||
#define KEYCLICKS 4
|
||||
#define GDE_MESSAGE_PANEL 8
|
||||
|
||||
/*
|
||||
* Coloring Methods
|
||||
*/
|
||||
#define COLOR_MONO 0x40 /* no color, simple black and white */
|
||||
#define COLOR_LOOKUP 0x41 /* Use a simple value->color lookup */
|
||||
#define COLOR_ALN_MASK 0x42 /* The alignment has a column by column color
|
||||
mask associated with it */
|
||||
#define COLOR_SEQ_MASK 0x43 /* Each sequence has a color mask*/
|
||||
#define COLOR_STRAND 0x44 /* Color based on original strandedness*/
|
||||
|
||||
|
||||
/*
|
||||
* Data types
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int *valu;
|
||||
} NumList;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
int yy;
|
||||
int mm;
|
||||
int dd;
|
||||
int hr;
|
||||
int mn;
|
||||
int sc;
|
||||
} origin,modify;
|
||||
} TimeStamp;
|
||||
|
||||
typedef unsigned char NA_Base;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
int type;
|
||||
NumList *list;
|
||||
int listlen;
|
||||
int maxlen;
|
||||
} GMask;
|
||||
|
||||
|
||||
typedef struct NA_SeqStruct
|
||||
{
|
||||
char id[80]; /* sequence id (ACCESSION)*/
|
||||
char seq_name[80]; /* Sequence name (ORGANISM) */
|
||||
char short_name[32]; /* Name (LOCUS) */
|
||||
char barcode[80];
|
||||
char contig[80];
|
||||
char membrane[80];
|
||||
char description[80]; /* Description (DEFINITION)*/
|
||||
char authority[80]; /* Author (or creator) */
|
||||
char *comments; /* Stuff we can't parse */
|
||||
int comments_len, comments_maxlen;
|
||||
|
||||
NA_Base *sequence; /* List of bases */
|
||||
TimeStamp t_stamp; /* Time stamp of origin/modification */
|
||||
Mask *mask; /* List of masks(analysis/display) */
|
||||
int offset; /* offset into alignment (left white)
|
||||
space */
|
||||
int seqlen; /* Number of elements in sequence[] */
|
||||
int seqmaxlen; /* Size sequence[] (for mem alloc) */
|
||||
unsigned int protect; /* Protection mask */
|
||||
int attr; /* Extended attributes */
|
||||
int groupid; /* group id */
|
||||
int *col_lut; /* character to color LUT */
|
||||
struct NA_SeqStruct *groupb; /* Group link backward */
|
||||
struct NA_SeqStruct *groupf; /* Group link forward */
|
||||
int *cmask; /* color mask */
|
||||
int selected; /* Selection flag */
|
||||
int subselected; /* Sub selection flag */
|
||||
int format; /* default file format */
|
||||
int elementtype; /* what type of data are being aligned*/
|
||||
char *baggage; /* unformatted comments*/
|
||||
int baggage_len,
|
||||
baggage_maxlen;
|
||||
int *tmatrix; /* translation matrix (code->char) */
|
||||
int *rmatrix; /* reverse translation matrix
|
||||
(char->code)*/
|
||||
} NA_Sequence;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *id; /* Alignment ID */
|
||||
char *description; /* Description of the alignment*/
|
||||
char *authority; /* Who generated the alignment*/
|
||||
int *cmask; /* color mask */
|
||||
int cmask_offset; /* color mask offset */
|
||||
int cmask_len; /* color mask length */
|
||||
int ref; /* reference sequence */
|
||||
int numelements; /* number of data elements */
|
||||
int maxnumelements; /* maximum number of data elements */
|
||||
int nummasks; /* number of masks */
|
||||
int maxlen; /* Maximum length of alignment */
|
||||
int rel_offset; /* add this to every sequence offset */
|
||||
/* to orient it back to 0 */
|
||||
Mask *mask; /* masks */
|
||||
NA_Sequence *element; /* alignment elements */
|
||||
int numgroups; /* number of groups */
|
||||
NA_Sequence **group; /* link to array of pointers into
|
||||
each group */
|
||||
char *na_ddata; /* display data */
|
||||
int format; /* default file format */
|
||||
char *selection_mask; /* Sub sequence selection mask */
|
||||
int selection_mask_len; /* Sub selection mask length */
|
||||
int min_subselect; /* Leftmost coord of selection mask */
|
||||
} NA_Alignment;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int font_dx; /* width of a character in this font*/
|
||||
int font_dy; /* height of a character in this font*/
|
||||
int wid,ht; /* width and height of edit win (in
|
||||
characters */
|
||||
int top_seq; /* Top sequence index shown */
|
||||
int lft_pos; /* Leftmost column (in alignment
|
||||
position coords) */
|
||||
int color_type; /* Method of manipulating colors
|
||||
(See above) */
|
||||
int depth; /* number of color bits available */
|
||||
int num_colors; /* Actual number of colors used */
|
||||
int *palette; /* palette for display */
|
||||
int *col_lut; /* character to color LUT */
|
||||
int black,white; /* color indicies for blk,wht */
|
||||
int cursor_x,cursor_y; /* Current cursor positions */
|
||||
int position; /* Current position minus whitespace */
|
||||
int *jumptbl; /* the jump table for fast access
|
||||
into the sequence data */
|
||||
int jtsize; /* its length */
|
||||
NA_Alignment *aln; /* Pointer to the actual data set
|
||||
(the alignment */
|
||||
Xv_font font; /* The default font */
|
||||
Canvas seq_can,nam_can; /* ties to the canvas for screen
|
||||
updates. */
|
||||
Window seq_x,nam_x; /* X versions of the above */
|
||||
int use_repeat; /* Number keys set repeat count*/
|
||||
|
||||
} NA_DisplayData;
|
||||
|
||||
|
||||
#define getcmask(a,b) (b < ((a)->offset))?0:((a)->cmask[(b-(a)->offset)])
|
||||
|
||||
#include "functions.h"
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
========================[ Feb 1, 2002 1:57 PM ]========================
|
||||
NOTE: CoreLib [002.003] FileOpen("HIV1POLDNA.fasta","r") failed
|
||||
Cannot open input database file. Formating failed...
|
||||
|
||||
========================[ Feb 1, 2002 7:27 PM ]========================
|
||||
NOTE: CoreLib [002.003] FileOpen("SIVPOLPRO.fasta","r") failed
|
||||
Cannot open input database file. Formating failed...
|
|
@ -0,0 +1,90 @@
|
|||
int AdjustGroups();
|
||||
int CaseChange();
|
||||
int Cfree();
|
||||
int ChAttr();
|
||||
int ChAttrType();
|
||||
int ChColor();
|
||||
int ChDisAttr();
|
||||
int ChDisplayDone();
|
||||
int ChEditDir();
|
||||
int ChEditMode();
|
||||
int ChFontSize();
|
||||
int ChangeDisplay();
|
||||
int CheckType();
|
||||
int CompSeqs();
|
||||
int CompressAlign();
|
||||
int DONT();
|
||||
int DO();
|
||||
int DestroySplit();
|
||||
int DoMeta();
|
||||
int DrawNAColor();
|
||||
int DummyRepaint();
|
||||
int EditCopy();
|
||||
int EditCut();
|
||||
int EditPaste();
|
||||
int EditSubCut();
|
||||
int EditSubPaste();
|
||||
int Find();
|
||||
int Find2();
|
||||
int FrameDone();
|
||||
int Group();
|
||||
int HELP();
|
||||
int HandleMenuItem();
|
||||
int InitEditSplit();
|
||||
int InitNASeq();
|
||||
int LoadData();
|
||||
int ModAttr();
|
||||
int ModAttrDone();
|
||||
int NAEvents();
|
||||
int NANameEvents();
|
||||
int New();
|
||||
int NormalizeOffset();
|
||||
Notify_value EditCanScroll();
|
||||
Notify_value SaveComments();
|
||||
int Open();
|
||||
int OpenFileName();
|
||||
int OrigDir();
|
||||
int OverWrite();
|
||||
Panel BasicDisplay();
|
||||
int Prot();
|
||||
int QuitGDE();
|
||||
int ReadCMask();
|
||||
int ReadStatus();
|
||||
int Regroup();
|
||||
int RemoveQuotes();
|
||||
int RepaintAll();
|
||||
int RepaintNACan();
|
||||
int ResizeNACan();
|
||||
int RevSeqs();
|
||||
int SaveAs();
|
||||
int SaveAsFileName();
|
||||
int SaveFormat();
|
||||
int SelectAll();
|
||||
int SelectBy();
|
||||
int SelectByName();
|
||||
int SetFilename();
|
||||
NA_DisplayData *SetNADData();
|
||||
int SetProtection();
|
||||
int SetScale();
|
||||
int SetTime();
|
||||
int StripSpecial();
|
||||
int TestSelection();
|
||||
int Ungroup();
|
||||
int Warning();
|
||||
int WriteGDE();
|
||||
int WriteGen();
|
||||
int WriteNA_Flat();
|
||||
int WriteCMask();
|
||||
int WriteStatus();
|
||||
char *Calloc();
|
||||
char *ReplaceArgs();
|
||||
char *ReplaceFile();
|
||||
char *Realloc();
|
||||
char *String();
|
||||
char *uniqueID();
|
||||
int TestSelection();
|
||||
int hnorm();
|
||||
int vnorm();
|
||||
void HandleMenus();
|
||||
void JumpTo();
|
||||
void SeqNorm();
|
|
@ -0,0 +1,201 @@
|
|||
#include <xview/cms.h>
|
||||
int DataType;
|
||||
int FileFormat,first_select = FALSE;
|
||||
int Dirty,OldEditMode,EditMode = INSERT, EditDir = RIGHT;
|
||||
int DisplayAttr = 0,OVERWRITE = FALSE;
|
||||
int SCALE = 1;
|
||||
int BlockInput = FALSE;
|
||||
#ifdef SeeAlloc
|
||||
int TotalCalloc = 0;
|
||||
int TotalRealloc = 0;
|
||||
#endif
|
||||
char FileName[80];
|
||||
char current_dir[1024];
|
||||
|
||||
/*
|
||||
* Months of the year
|
||||
*/
|
||||
char month[12][6] =
|
||||
{
|
||||
"-JAN-","-FEB-","-MAR-","-APR-","-MAY-","-JUN-",
|
||||
"-JUL-","-AUG-","-SEP-","-OCT-","-NOV-","-DEC-"
|
||||
};
|
||||
|
||||
/*
|
||||
* Tables for DNA/RNA <--> ASCII translation
|
||||
*/
|
||||
|
||||
int Default_RNA_Trans[128] =
|
||||
{
|
||||
'-','A','C','M','G','R','S','V','U','W','Y','H','K','D','B','N',/*Upper*/
|
||||
'~','a','c','m','g','r','s','v','u','w','y','h','k','d','b','n',/*lower*/
|
||||
'-','A','C','M','G','R','S','V','U','W','Y','H','K','D','B','N',/*Upper select*/
|
||||
'~','a','c','m','g','r','s','v','u','w','y','h','k','d','b','n',/*lwr select*/
|
||||
'-','A','C','M','G','R','S','V','U','W','Y','H','K','D','B','N',/*extended*/
|
||||
'~','a','c','m','g','r','s','v','u','w','y','h','k','d','b','n',/*extended*/
|
||||
'-','A','C','M','G','R','S','V','U','W','Y','H','K','D','B','N',/*extended*/
|
||||
'~','a','c','m','g','r','s','v','u','w','y','h','k','d','b','n',/*extended*/
|
||||
};
|
||||
|
||||
int Default_DNA_Trans[128]={
|
||||
'-','A','C','M','G','R','S','V','T','W','Y','H','K','D','B','N',/*Upper*/
|
||||
'~','a','c','m','g','r','s','v','t','w','y','h','k','d','b','n',/*lower*/
|
||||
'-','A','C','M','G','R','S','V','T','W','Y','H','K','D','B','N',/*Upper select*/
|
||||
'~','a','c','m','g','r','s','v','t','w','y','h','k','d','b','n',/*lwr select*/
|
||||
'-','A','C','M','G','R','S','V','T','W','Y','H','K','D','B','N',/*extended*/
|
||||
'~','a','c','m','g','r','s','v','t','w','y','h','k','d','b','n',/*extended*/
|
||||
'-','A','C','M','G','R','S','V','T','W','Y','H','K','D','B','N',/*extended*/
|
||||
'~','a','c','m','g','r','s','v','t','w','y','h','k','d','b','n',/*extended*/
|
||||
};
|
||||
|
||||
int Default_NA_RTrans[128]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
/* Upper case alpha */
|
||||
0x01,0xe,0x02,0x0d,0,0,0x04,0x0b,0,0,0x0c,0,0x03,0x0f,0,0,0,0x05,0x06,0x08,
|
||||
0x08,0x07,0x09,0x0f,0xa,0,0,0,0,0,0,0,
|
||||
/* Lower case alpha */
|
||||
0x11,0x1e,0x12,0x1d,0,0,0x14,0x1b,0,0,0x1c,0,0x13,0x1f,0,0,0,0x15,0x16,0x18,
|
||||
0x18,0x17,0x19,0x1f,0x1a,0,0,0,0,0x10,0
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* RGB values for the simple palette
|
||||
*/
|
||||
|
||||
Xv_singlecolor Default_Colors[16]= {
|
||||
{0,128,0},
|
||||
{255,192,0},
|
||||
{255,0,255},
|
||||
{225,0,0},
|
||||
{0,192,192},
|
||||
{0,192,0},
|
||||
{0,0,255},
|
||||
{128,0,255},
|
||||
{0,0,0},
|
||||
{36,36,36},
|
||||
{72,72,72},
|
||||
{109,109,109},
|
||||
{145,145,145},
|
||||
{182,182,182},
|
||||
{218,218,218},
|
||||
{255,255,255}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Character->color lookup table
|
||||
*/
|
||||
|
||||
int Default_NAColor_LKUP[128] =
|
||||
{
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13,
|
||||
13,3,6,13,8,13,13,13,5,13,13,13,13,13,13,13
|
||||
};
|
||||
|
||||
int Default_PROColor_LKUP[128] =
|
||||
{
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,2,8,3,8,8,6,2,4,5,12,4,5,5,8,12,2,
|
||||
8,4,2,2,12,5,6,12,6,8,12,12,12,12,12,12,
|
||||
2,8,3,8,8,6,2,4,5,12,4,5,5,8,12,2,
|
||||
8,4,2,2,12,5,6,12,6,8,12,12,12,12,12
|
||||
};
|
||||
|
||||
char vert_mito[512][4] =
|
||||
{
|
||||
"AAA","Lys", "AAC","Asn", "AAG","Lys", "AAT","Asn", "ACA","Thr",
|
||||
"ACC","Thr", "ACG","Thr", "ACT","Thr", "AGA","Ter", "AGC","Ser",
|
||||
"AGG","Ter", "AGT","Ser", "ATA","Met", "ATC","Ile", "ATG","Met",
|
||||
"ATT","Ile", "CAA","Gln", "CAC","His", "CAG","Gln", "CAT","His",
|
||||
"CCA","Pro", "CCC","Pro", "CCG","Pro", "CCT","Pro", "CGA","Arg",
|
||||
"CGC","Arg", "CGG","Arg", "CGT","Arg", "CTA","Leu", "CTC","Leu",
|
||||
"CTG","Leu", "CTT","Leu", "GAA","Glu", "GAC","Asp", "GAG","Glu",
|
||||
"GAT","Asp", "GCA","Ala", "GCC","Ala", "GCG","Ala", "GCT","Ala",
|
||||
"GGA","Gly", "GGC","Gly", "GGG","Gly", "GGT","Gly", "GTA","Val",
|
||||
"GTC","Val", "GTG","Val", "GTT","Val", "TAA","Ter", "TAC","Tyr",
|
||||
"TAG","Ter", "TAT","Tyr", "TCA","Ser", "TCC","Ser", "TCG","Ser",
|
||||
"TCT","Ser", "TGA","Trp", "TGC","Cys", "TGG","Trp", "TGT","Cys",
|
||||
"TTA","Leu", "TTC","Phe", "TTG","Leu", "TTT","Phe"
|
||||
},
|
||||
mycoplasma[512][4] =
|
||||
{
|
||||
"AAA","Lys", "AAC","Asn", "AAG","Lys", "AAT","Asn", "ACA","Thr",
|
||||
"ACC","Thr", "ACG","Thr", "ACT","Thr", "AGA","Arg", "AGC","Ser",
|
||||
"AGG","Arg", "AGT","Ser", "ATA","Ile", "ATC","Ile", "ATG","Met",
|
||||
"ATT","Ile", "CAA","Gln", "CAC","His", "CAG","Gln", "CAT","His",
|
||||
"CCA","Pro", "CCC","Pro", "CCG","Pro", "CCT","Pro", "CGA","Arg",
|
||||
"CGC","Arg", "CGG","Arg", "CGT","Arg", "CTA","Leu", "CTC","Leu",
|
||||
"CTG","Leu", "CTT","Leu", "GAA","Glu", "GAC","Asp", "GAG","Glu",
|
||||
"GAT","Asp", "GCA","Ala", "GCC","Ala", "GCG","Ala", "GCT","Ala",
|
||||
"GGA","Gly", "GGC","Gly", "GGG","Gly", "GGT","Gly", "GTA","Val",
|
||||
"GTC","Val", "GTG","Val", "GTT","Val", "TAA","Ter", "TAC","Tyr",
|
||||
"TAG","Ter", "TAT","Tyr", "TCA","Ser", "TCC","Ser", "TCG","Ser",
|
||||
"TCT","Ser", "TGA","Trp", "TGC","Cys", "TGG","Trp", "TGT","Cys",
|
||||
"TTA","Leu", "TTC","Phe", "TTG","Leu", "TTT","Phe" },
|
||||
universal[512][4] =
|
||||
{
|
||||
"AAA","Lys", "AAC","Asn", "AAG","Lys", "AAT","Asn", "ACA","Thr",
|
||||
"ACC","Thr", "ACG","Thr", "ACT","Thr", "AGA","Arg", "AGC","Ser",
|
||||
"AGG","Arg", "AGT","Ser", "ATA","Ile", "ATC","Ile", "ATG","Met",
|
||||
"ATT","Ile", "CAA","Gln", "CAC","His", "CAG","Gln", "CAT","His",
|
||||
"CCA","Pro", "CCC","Pro", "CCG","Pro", "CCT","Pro", "CGA","Arg",
|
||||
"CGC","Arg", "CGG","Arg", "CGT","Arg", "CTA","Leu", "CTC","Leu",
|
||||
"CTG","Leu", "CTT","Leu", "GAA","Glu", "GAC","Asp", "GAG","Glu",
|
||||
"GAT","Asp", "GCA","Ala", "GCC","Ala", "GCG","Ala", "GCT","Ala",
|
||||
"GGA","Gly", "GGC","Gly", "GGG","Gly", "GGT","Gly", "GTA","Val",
|
||||
"GTC","Val", "GTG","Val", "GTT","Val", "TAA","Ter", "TAC","Tyr",
|
||||
"TAG","Ter", "TAT","Tyr", "TCA","Ser", "TCC","Ser", "TCG","Ser",
|
||||
"TCT","Ser", "TGA","Ter", "TGC","Cys", "TGG","Trp", "TGT","Cys",
|
||||
"TTA","Leu", "TTC","Phe", "TTG","Leu", "TTT","Phe" },
|
||||
yeast[512][4] =
|
||||
{
|
||||
"AAA","Lys", "AAC","Asn", "AAG","Lys", "AAT","Asn", "ACA","Thr",
|
||||
"ACC","Thr", "ACG","Thr", "ACT","Thr", "AGA","Arg", "AGC","Ser",
|
||||
"AGG","Arg", "AGT","Ser", "ATA","Met", "ATC","Ile", "ATG","Met",
|
||||
"ATT","Ile", "CAA","Gln", "CAC","His", "CAG","Gln", "CAT","His",
|
||||
"CCA","Pro", "CCC","Pro", "CCG","Pro", "CCT","Pro", "CGA","Arg",
|
||||
"CGC","Arg", "CGG","Arg", "CGT","Arg", "CTA","Thr", "CTC","Thr",
|
||||
"CTG","Thr", "CTT","Thr", "GAA","Glu", "GAC","Asp", "GAG","Glu",
|
||||
"GAT","Asp", "GCA","Ala", "GCC","Ala", "GCG","Ala", "GCT","Ala",
|
||||
"GGA","Gly", "GGC","Gly", "GGG","Gly", "GGT","Gly", "GTA","Val",
|
||||
"GTC","Val", "GTG","Val", "GTT","Val", "TAA","Ter", "TAC","Tyr",
|
||||
"TAG","Ter", "TAT","Tyr", "TCA","Ser", "TCC","Ser", "TCG","Ser",
|
||||
"TCT","Ser", "TGA","Trp", "TGC","Cys", "TGG","Trp", "TGT","Cys",
|
||||
"TTA","Leu", "TTC","Phe", "TTG","Leu", "TTT","Phe"
|
||||
};
|
||||
|
||||
|
||||
char three_to_one[23][5] = {
|
||||
"AlaA", "ArgR", "AsnN", "AspD",
|
||||
"AsxB", "CysC", "GlnQ", "GluE",
|
||||
"GlxZ", "GlyG", "HisH", "IleI",
|
||||
"LeuL", "LysK", "MetM", "PheF",
|
||||
"ProP", "SerS", "ThrT", "TrpW",
|
||||
"TyrY", "ValV", "Ter*"
|
||||
};
|
||||
|
||||
|
||||
|
||||
static unsigned char grey0[] = {0,0,0,0,0,0,0,0};
|
||||
static unsigned char grey1[] = {138,0,0,0,138,0,0,0};
|
||||
static unsigned char grey2[] = {138,0,34,0,138,0,34,0};
|
||||
static unsigned char grey3[] = {138,85,34,85,138,85,34,85};
|
||||
static unsigned char grey4[] = {117,170,221,170,117,170,221,170};
|
||||
static unsigned char grey5[] = {117,255,221,255,117,255,221,255};
|
||||
static unsigned char grey6[] = {117,255,255,255,117,255,255,255};
|
||||
static unsigned char grey7[] = {255,255,255,255,255,255,255,255};
|
||||
|
||||
unsigned char *greys[] = {grey1,grey3,grey3,grey1,grey2,grey3,grey0,grey3,
|
||||
grey0,grey1,grey2,grey3,grey4,grey5,grey6,grey7};
|
||||
Pixmap *grey_pm[16];
|
|
@ -0,0 +1,66 @@
|
|||
/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
|
||||
*/
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x000F,0xE000,0x0000,0x0000,
|
||||
0x0030,0x1800,0x0000,0x0000,
|
||||
0x007F,0xFC00,0x0000,0x0000,
|
||||
0x0180,0x0300,0x0000,0x0000,
|
||||
0x0100,0x0100,0x0000,0x0000,
|
||||
0x0201,0x80FF,0xFFFF,0xFE00,
|
||||
0x0402,0x0040,0x0000,0x0100,
|
||||
0x043A,0x1840,0x0000,0x0080,
|
||||
0x0812,0x2020,0x0000,0x0040,
|
||||
0x0811,0xA820,0xE0E0,0xE020,
|
||||
0x0810,0x2831,0x1111,0x1020,
|
||||
0x0890,0x1831,0x1111,0x1020,
|
||||
0x0940,0x0031,0x1111,0x0020,
|
||||
0x09C0,0x072E,0x0E0E,0x0020,
|
||||
0x0940,0x0220,0x0000,0x0040,
|
||||
0x0540,0x0240,0x0000,0x0080,
|
||||
0x0400,0x0240,0x0000,0x0100,
|
||||
0x0200,0x00FF,0xFFFF,0xFE00,
|
||||
0x0100,0x0100,0x0000,0x0000,
|
||||
0x0180,0x0300,0x0000,0x0000,
|
||||
0x007F,0xFE00,0x0000,0x0000,
|
||||
0x0030,0x1E00,0x0000,0x0000,
|
||||
0x000F,0xFD00,0x1E1F,0x07E0,
|
||||
0x0000,0x5B00,0x3319,0x8600,
|
||||
0x0000,0x3680,0x6018,0xC600,
|
||||
0x0000,0x2D80,0x6018,0xC600,
|
||||
0x0000,0x1B40,0x6018,0xC7C0,
|
||||
0x0000,0x16C0,0x6318,0xC600,
|
||||
0x0000,0x0DA0,0x6318,0xC600,
|
||||
0x0000,0x0B60,0x3319,0x8600,
|
||||
0x0000,0x06F0,0x1F1F,0x07E0,
|
||||
0x0000,0x05F0,0x0000,0x0000,
|
||||
0x0000,0x03E0,0x0000,0x0000,
|
||||
0x0000,0x03C0,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000
|
|
@ -0,0 +1,191 @@
|
|||
10 916
|
||||
contig GGGnnGGnGn GGnnnGnnGn nnnGGnnnnn nnnTnTGTnT GnnGGnAGGG
|
||||
W22140 AAAAANGCCC NNTTCNAAGN GGGGGGGGGG GGGGGGGATA TTTTGCNNAG
|
||||
R.C.W27436 GGGNNNNGNN NNNNNNNNNN NNNNNNAANN NNNNNNNNNN NNNNNNNNNN
|
||||
R.C.W27652 GGNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
W28762 TCTTGACATT TGTCTCCATT TCAGCAAAAC GANACCTGTG GTGAAGGGAT
|
||||
#10005_2 2 GGnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn
|
||||
R.C.W27652 GGNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
W28762 ---------- ---------- ---------- ---------- ----------
|
||||
W28762(165 GGGNNGGNGN GGNNNGNNGN NNNGGNNNNN NNNTNTGTNT GNNGGNAGGG
|
||||
#10005_2 2 GGGnnGGnGn GGnnnGnnGn nnnGGnnnnn nnnTnTGTnT GnnGGnAGGG
|
||||
nnTnTnAnnn nnTTnTAnAG TnAAAGnTTG GTnnnnGTnn nTTTGAnGAA
|
||||
GGGGGCATGA TGNNGAGANC NAAAGAAAGN NCNGGGNGGG AAAAAAGAAG
|
||||
NNNANNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
TTGTGTGCTG GCACTG---- ---------- ---------- ----------
|
||||
nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn
|
||||
NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
NNTNTNANNN NNTTNTANAG TNAAAGNTTG GTNNNNGTNN NTTTGANGAA
|
||||
nnTnTnAnnn nnTTnTAnAG TnAAAGnTTG GTnnnnGTnn nTTTGAnGAA
|
||||
GnTCAAnnTG GGGnnnAnAn nnGnnnTTGA nTGAAAATGG GGnAAnCCCC
|
||||
GAGGNCCCTG GNGGGAGGGG GGNNCGNNTT TNNTGCNCCG GATGGAGGGN
|
||||
NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
NNNNNNNNGN AANNNNNNNN NNNNNNNNNN NNNNNNNNNT TGAAAACTGT
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
nnnnnnnnGn AAnnnnnnnn nnnnnnnnnn nnnnnnnnnT TGAAAACTGT
|
||||
NNNNNNNNGN AANNNNNNNN NNNNNNNNNN NNNNNNNNNT TGAAAACTGT
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
GNTCAANNTG GGGNNNANAN NNGNNNTTGA NTGAAAATGG GGNAANCCCC
|
||||
GnTCAAnnTG GGGnnnAnAn nnGnnnTTGA nTGAAAATGG GGnAAnCCCC
|
||||
CnTTTTnCCA GTCAnCTGGT AAGTCCAAGC TGAA-n--Tc TACT---CCG
|
||||
GGGGNTTTTN AAGNNTGTTT NTTTANAAGN AAGAGGGGGA NAAAATTTTT
|
||||
NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
TANCCAANTG GAATCCTAAG ACAATTTTCT TCCAANCCAC CCAACCGAAA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
TAnCCAAnTG GAATCCTAAG ACAATTTTCT -cCAwTTCA- sCAAC-CGAA
|
||||
TANCCAANTG GAATCCTAAG ACAATTTTCT TCCAANCCAC CCAAC-CGAA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
CNTTTTNCCA GTCANCTGGT AAGTCCAAGC TGAA-N--TC TACTC--C-G
|
||||
CnTTTTnCCA GTCAnCTGGT AAGTCCAAGC Tgaa----Tc TACTC--C-G
|
||||
CATGTAA-CC C-AAAAGAGm TGTCCAGAGC CAAGGCTTCT ACCTTCATTG
|
||||
TTNNTTCTNT NNCTNGNNNG GGGGGGGGGG GGGGCCCCCA ATAAGNNNTT
|
||||
NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
CCCTGTGGTG GAGGGAATTN CGTTCTTGGC NCTTCAGACT NCAGGGCAGG
|
||||
---------- ---------- ---------- ----CAGACT GCAGGGNAGG
|
||||
ACCCTGTGGT GrAGGGATTT GTGTGCT-GG CACTGCAGAC TGCAGGGCAG
|
||||
ACCCTGTGGT GGAGGGAATT NCGTTCTTGG CNCTTCAGAC TNCAGGGCAG
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
CATGTAACCC C-NAAAGAGT TGTCCAGAGC CAAGGCTTCT ACCTTCATTG
|
||||
CATGTAa-CC C-AAAAGAGm TGTCCAGAGC CAAGGCTTCT ACCTTCATTG
|
||||
TCCCTCTCTG TGCTCAAGGA GTTCCATTCC AGGAGGAAGA GATCTATACC
|
||||
GNGCNCAGAA NNAGGGGGGG GNGGGGGGGC CCCTTTNCTC CNAAAAATTT
|
||||
NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN NNNNNNNNNN
|
||||
AA-------- ---------- ---------- ---------- ----------
|
||||
AA-------- ---------- ---------- ---------- ----------
|
||||
GAAAGGGCTA GGGCCCAGGG GCTGGGAmAT GCATGAGGT- gCTCGGAGGA
|
||||
GAAAGGGCTA GGGCCCAGGG GCTGGGAAAT GCATGAGGTT GCTCGGAGGA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
TCCCTCTCTG TGCTCAAGGA GTTCCATTCC AGGAGGAAGA GATCTATACC
|
||||
TCCCTCTCTG TGCTCAAGGA GTTCCATTCC AGGAGGAAGA GATCTATACC
|
||||
CTaAGCAGAT AGCAAAGaAG ATaATGGAGG AgCAATTGGT CATGGCCtTG
|
||||
CCCCCCNTTT TGGGNAAGGG TGGGGGAAAN NNTTTGGGCA AANAGGGGAA
|
||||
NNNNNNNNNN NNNAANNAGG GCTAGGGCCC AGGGGCTGGG ACATGCATGA
|
||||
---------- -------AGG GCTAGGGCCC AGGGGCTGGG AAATGCATGA
|
||||
---------- -------AGG GCTAGGGCCC AGGGGCTGGG ACATGCATGA
|
||||
GCCTGGCTAA ATCCAAGCAC CAGCACCTGT GAGTCTGCTC TCTTCTCAGC
|
||||
GCCTGGCTAA ATCCAAGCAC CAGCACCTGT GAGTCTGCTC TCTTCTCAGC
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
CTAAGCAGAT AGCAAAGNAG ATNATGGAGG ANCAATTGGT CATGGCCNTG
|
||||
CTAAGCAGAT AGCAAAGAAG ATAATGGAGG AGCAATTGGT CATGGCCTTG
|
||||
GTTTCCCTCk AAACaACgCT GCAGATTTAT CTGCACAAAC ATCTCCACTT
|
||||
AAAAAAAGNG GGGGGGGGCG GNTTCCANAA AANAANAAAG GGTNCACCCN
|
||||
GG-TTCTNGG NGGAGCCTGG CTAAANCCAA GCACCAGCAC CTGTGAGTCT
|
||||
GGTTGCTCGG AGGAGCCTGG CTAAATCCAA GCACCAGCAC CTGTGAGTCT
|
||||
GG-TGCTCGG AGGAGCCTGG NTAAATCCAA GCACCAGCAC CTGTGAGTCT
|
||||
TGGCTCCCAA GTAAACCTGT AGCTTTGCCT CTTCTCCCAG CTCTCGTGCC
|
||||
TGGCTCCCAA GTAAACCTGT AGCTTTGCCT CTTCTCCCAG CTCTCGTGCC
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
GTTTCCCTCC AAACNACNCT GCAGATTTAT CTGCACAAAC ATCTCCACTT
|
||||
GTTTCCCTCk AAACAACGCT GCAGATTTAT CTGCACAAAC ATCTCCACTT
|
||||
tmGGGGGAAA GGTGGGTAGA TTCCAGTTCC CTGGACTACC TTCAGGAGGC
|
||||
TNGGGGGNCN CCCCCCCCNC NNGNAAATCN TCCCTTTTTT TGANGGGCNA
|
||||
GCTCTCTTCT CAGCTGGCTC CCAAGTAAAC CTGTAGCTTT NCCTCTTCTC
|
||||
GCTCTCTTCT CAGCTGGCTC CCAAGTAAAC CTGTAGCTTT GCCTCTTCTC
|
||||
GCTCTCTTCT CAGCTGGCTC CCAAGTAAAC CTGTAGCTTT GCCTCTTCTC
|
||||
TCCTGAAGGT AGTCCAGGGA ACTGGAATCT ACCCACCTTT CCCCCAAAAG
|
||||
TCCTGAAGGT AGTCCAGGGA ACTGGAATCT ACCCACCTTT CCCCCCNAAG
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
TTGGGGGAAA GGTGGGTAGA TTCCAGTTCC CTGGACTACC TTCAGGAGGC
|
||||
TTGGGGGAAA GGTGGGTAGA TTCCAGTTCC CTGGACTACC TTCAGGAGGC
|
||||
ACGAGAGCTG GGAGAAGAGG cAAAGCTACA GGTTTACTTG GGAGCCAGCT
|
||||
ANNNCATTTN CTTGNCCTTG AAGATTGACC NTGACTGCTC TGGCAAGAAG
|
||||
CCAGCTCTCG TGCCTCCTGA AGGTAGTCCA GGGAACTGGA ATCTACCCAC
|
||||
CCAGCTCTCG TGCCTCCTGA AGGTAGTCCA GGGAACTGGA ATCTACCCAC
|
||||
CCAGCTCTCG TGCCTCCTGA AGGTAGTCCA GGGAACTGGA ATCTACCCAC
|
||||
TGGAGATGTT TGTGCAGATA AATCTGCAGC GTTGTTTkGA GGGAAACCAA
|
||||
TGGAGATGTT TGTGCAGATA AATCTGCAGC GTTGTTTTGA GGGAAACCAA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
ACGAGAGCTG GGAGAAGAGG CAAAGCTACA GGTTTACTTG GGAGCCAGCT
|
||||
ACGAGAGCTG GGAGAAGAGG CAAAGCTACA GGTTTACTTG GGAGCCAGCT
|
||||
GAGAAGAGAG CAGACTCACA GGTGCTGGTG CTTGGaTTTA gCCAGGCTCC
|
||||
AAGAGGTGTC CTTACAGAGA CCTCTTTACT GACCAACTGA AGNATAGACT
|
||||
CTTTCCCCCN AAAGTGGAGA TGTTTGTGCA GATAAATCTG CAGCGTTGTT
|
||||
CTTTCCCCCC NAAGTGGAGA TGTTTGTGCA GATAAATCTG CAGCGTTGTT
|
||||
CTTTCCCCCA AAAGTGGAGA TGTTTGTGCA GATAAATCTG CAGNGTNGTT
|
||||
GGCCATGACC AATTGCTCCT CCATTATCTT CTTTGCTATC TGCTTAGGGT
|
||||
GGCCATGACC AATTGCTCCT CCATTATCTT CTTTGCTATC TGCTTAGGGT
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
GAGAAGAGAG CAGACTCACA GGTGCTGGTG CTTGGATTTA NCCAGGCTCC
|
||||
GAGAAGAGAG CAGACTCACA GGTGCTGGTG CTTGGATTTA GCCAGGCTCC
|
||||
tCCgAGkA-- CCTCATGCAT mTCCCAGCCC CTGGGCCCTA GCCCT-----
|
||||
TACTGCTGGA CAATCTGCAT GGGCATCACC CCTCCCCGCA TGTAACCC-A
|
||||
TTGAGGGAAA CCAAGGCCAT GACCAATTGC TCCTCCATTA TCTTCTTTGC
|
||||
TTGAGGGAAA CCAAGGCCAT GACCAATTGC TCCTCCATTA TCTTCTTTGC
|
||||
TGGAGGGAAA CCANGGCCAT GACCAATTGN TCCTCCATNA TCTNCTTTGC
|
||||
ATAGATCTCT TCCTCCTGGA ATGGAACTCC TTGAGCACAG AGAGGGACAA
|
||||
ATAGATCTCT TCCTCCTGGA ATGGAACTCC TTGAGCACAG AGAGGGACAA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
TCCGAGC--A CCTCATGCAT GTCCCAGCCC CTGGGCCCTA GCCCT-----
|
||||
TCCGAGc--A CCTCATGCAT mTCCCAGCCC CTGGGCCCTA GCCCT-----
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
AAAGAGGTGT CCAGAGCCAA GGCTTCTACC TTCATTGTCC CTCTCTGTGC
|
||||
TATCTGCTNA GAGNANNCAA NNNAANNNA- ---------- ----------
|
||||
TATCTGCTTA GGGTATAGAT CTCTTCCTCC TGGAATGGAA CTCCTTGAGC
|
||||
TATCTGCTTA GGGTATAGAT CTCTTCCTCC TGGAATGGAA CTCCTTGAGC
|
||||
TGAAGGTAGA AGCCTTGGCT CTGGACAmCT CTTTTGGG-t TACATGCG--
|
||||
TGAAGGTAGA AGCCTTGGCT CTGGACACCT CTTTTGGG-T TACATGCGGT
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- TTCCTgCCCT GcAGTCTGAA GnGCCAAG-A -ACGnAATTC
|
||||
TCAAGGAGTT CCATTCCAGG AGGAAGAGAT CTATACCCT- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
ACAGAGAGGG ACAATGAAGG TAGAAGCCTT GGCTCTGGAC ACCTCTTTT-
|
||||
ACAGAGAGGG ACAATGAAGG TAGAAGCCTT GGCTCTGGAC AACTCTTTNG
|
||||
GAGTAgA-tt cAGCTTGGAC TTACCAGnTG ACTGGnAAAA nGGGGGnTTn
|
||||
GAGTANA-NN NA-------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- TTCCTNCCCT GCAGTCTGCA GTGCC-AGCA CACA-AAT-C
|
||||
---------- TTCCTGCCCT GCAGTCTGCA GTGCC-AGCA CACA-AAT-C
|
||||
CCTCCACCAC AGGGTTTCG- GTTGGGTGGn TTGGAAGA-A AATTGTCTTA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
GGGTTACATG CGGTGAGTAN ANNNA----- ---------- ----------
|
||||
GGGTTACATG CGG--AGTAG ANTTCAGCTT GGACTTACCA GNTGACTGGN
|
||||
CCCCATTTTC AnTCAAnnnC nnnTnTnnnC CCCAnnTTGA nCTTCnTCAA
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
CCTTCACCAC A-GGTNTCGT TTTGC-TGAA ATGG-AGACA AAT-GTCa-a
|
||||
CCTrCACCAC AGGGTTTCG- GTTGs-TGAA wTGg-AGA-A AATTGTCTTA
|
||||
GGATTCCAnT TGGnTAACAG TTTTCAAnnn nnnnnnnnnn nnnnnnnnnn
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
AAAANGGGGG NTTNCCCCAT TTTCANTCAA NNNCNNNTNT NNNCCCCANN
|
||||
AnnnACnnnn ACCAAnCTTT nACTnTAnAA nnnnnTnAnA nnCCCTnCCn
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
g-a------- ---------- ---------- ---------- ----------
|
||||
GGATTCCAnT TGGnTAACAG TTTTCAAnnn nnnnnnnnnn nnnnnnnnnn
|
||||
nnnnTTnCnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
TTGANCTTCN TCAAANNNAC NNNNACCAAN CTTTNACTNT ANAANNNNNT
|
||||
nCAnACAnAn nnnnnnnCCn nnnCnnCnnn CCnCnCCnnC CC--------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
nnnnTTnCnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn
|
||||
nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
NANANNCCCT NCCNNCANAC ANANNNNNNN NCCNNNNCNN CNNNCCNCNC
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
---------- ---------- ---------- ---------- ----------
|
||||
nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn
|
||||
nnnnnnnnnn nnnnCC
|
||||
---------- ------
|
||||
---------- ------
|
||||
---------- ------
|
||||
CNNCCC---- ------
|
||||
---------- ------
|
||||
---------- ------
|
||||
---------- ------
|
||||
---------- ------
|
||||
nnnnnnnnnn nnnnCC
|
|
@ -0,0 +1,2 @@
|
|||
make
|
||||
cp gde ../bin
|
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
my $newFileName;
|
||||
my $line;
|
||||
|
||||
my $sourceFile = shift;
|
||||
my $menuName = shift;
|
||||
|
||||
print("mv -f ./$sourceFile.* /usr/local/bio/db/\n");
|
||||
print("cp -f ./$sourceFile /usr/local/bio/db/\n");
|
||||
|
||||
|
||||
|
||||
print system("mv -f ./$sourceFile.* /usr/local/bio/db/");
|
||||
# or die ("cannot copy files\n");
|
||||
print system("cp -f ./$sourceFile /usr/local/bio/db/") ;
|
||||
#or die ("cannot copy file\n");
|
||||
|
||||
|
||||
open(MENUFILE, "/usr/local/bio/GDE/CORE/.GDEmenus")
|
||||
or die "cannot open menu file, sorry\n";
|
||||
$newFileName = "/usr/local/bio/GDE/CORE/.GDEmenusNew";
|
||||
open(NEWFILE, ">$newFileName");
|
||||
READLOOP:
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
if (/^arg:BLASTDBDNA/){
|
||||
print "FOUND\n";
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
if (/^argchoice:/){
|
||||
print NEWFILE "argchoice:$menuName:/usr/local/bio/db/$sourceFile\n";
|
||||
last READLOOP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
}
|
||||
close(NEWFILE);
|
||||
close(MENUFILE);
|
||||
system("mv $newFileName /usr/local/bio/GDE/CORE/.GDEmenus")
|
||||
or die "cannot replace old menu file\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
my $newFileName;
|
||||
my $line;
|
||||
|
||||
my $sourceFile = shift;
|
||||
my $menuName = shift;
|
||||
|
||||
print("mv -f ./$sourceFile.* /usr/local/bio/db/\n");
|
||||
print("cp -f ./$sourceFile /usr/local/bio/db/\n");
|
||||
|
||||
|
||||
|
||||
print system("mv -f ./$sourceFile.* /usr/local/bio/db/");
|
||||
# or die ("cannot copy files\n");
|
||||
print system("cp -f ./$sourceFile /usr/local/bio/db/") ;
|
||||
#or die ("cannot copy file\n");
|
||||
|
||||
|
||||
open(MENUFILE, "/usr/local/bio/GDE/CORE/.GDEmenus")
|
||||
or die "cannot open menu file, sorry\n";
|
||||
$newFileName = "/usr/local/bio/GDE/CORE/.GDEmenusNew";
|
||||
open(NEWFILE, ">$newFileName");
|
||||
READLOOP:
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
if (/^arg:BLASTDBPROT/){
|
||||
print "FOUND\n";
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
if (/^argchoice:/){
|
||||
print NEWFILE "argchoice:$menuName:/usr/local/bio/db/$sourceFile\n";
|
||||
last READLOOP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
}
|
||||
close(NEWFILE);
|
||||
close(MENUFILE);
|
||||
system("mv $newFileName /usr/local/bio/GDE/CORE/.GDEmenus")
|
||||
or die "cannot replace old menu file\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,178 @@
|
|||
#include <stdio.h>
|
||||
#include <xview/defaults.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/window.h>
|
||||
#include <xview/icon.h>
|
||||
#include <pixrect/pixrect.h>
|
||||
#include <malloc.h>
|
||||
#include "menudefs.h"
|
||||
#include "defines.h"
|
||||
#include "globals.h"
|
||||
|
||||
/*
|
||||
Main()
|
||||
|
||||
Copyright (c) 1989, University of Illinois board of trustees. All rights
|
||||
reserved. Written by Steven Smith at the Center for Prokaryote Genome
|
||||
Analysis. Design and implementation guidance by Dr. Gary Olsen and Dr.
|
||||
Carl Woese.
|
||||
|
||||
|
||||
Copyright (c) 1990,1991,1992 Steven Smith at the Harvard Genome Laboratory.
|
||||
All rights reserved.
|
||||
|
||||
*/
|
||||
|
||||
Gmenu menu[100];
|
||||
int num_menus = 0,repeat_cnt = 0;
|
||||
Frame frame,pframe,infoframe;
|
||||
Panel popup,infopanel;
|
||||
Panel_item left_foot,right_foot;
|
||||
Canvas EditCan,EditNameCan;
|
||||
int DisplayType;
|
||||
GmenuItem *current_item;
|
||||
NA_Alignment *DataSet = NULL;
|
||||
NA_Alignment *Clipboard = NULL;
|
||||
char **TextClip;
|
||||
int TextClipSize = 0,TextClipLength = 0;
|
||||
|
||||
/*
|
||||
* Icon structure (pixmap dependent)
|
||||
*/
|
||||
|
||||
|
||||
static short GDEicon[258]={
|
||||
#include "icon_gde"
|
||||
};
|
||||
|
||||
mpr_static(iconpr,64,64,1,GDEicon);
|
||||
|
||||
main(argc,argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
|
||||
Icon tool_icon; /* obvious */
|
||||
extern char FileName[],current_dir[];
|
||||
|
||||
int type = GENBANK; /* default file type */
|
||||
DataSet = NULL;
|
||||
Clipboard = (NA_Alignment*)Calloc(1,sizeof(NA_Alignment));
|
||||
DisplayType = NASEQ_ALIGN; /* default data type */
|
||||
Clipboard->maxnumelements = 5;
|
||||
Clipboard->element =(NA_Sequence*)Calloc(Clipboard->maxnumelements,
|
||||
sizeof(NA_Sequence));
|
||||
|
||||
/*
|
||||
* Connect to server, and set up initial XView data types
|
||||
* that are common to ALL display types
|
||||
*/
|
||||
xv_init(XV_INIT_ARGC_PTR_ARGV, &argc,argv,0);
|
||||
|
||||
|
||||
/*
|
||||
* Main frame (primary window);
|
||||
*/
|
||||
|
||||
frame = xv_create((int) NULL,FRAME,
|
||||
FRAME_NO_CONFIRM,FALSE,
|
||||
FRAME_LABEL, "Genetic Data Environment 2.2",
|
||||
FRAME_INHERIT_COLORS,TRUE,
|
||||
XV_WIDTH,700,
|
||||
XV_HEIGHT,500,
|
||||
FRAME_SHOW_FOOTER,TRUE,
|
||||
0);
|
||||
|
||||
/*
|
||||
* Popup frame (dialog box window), and default settings in
|
||||
* the dialog box. These are changed to fit each individual
|
||||
* command's needs in EventHandler().
|
||||
*/
|
||||
infoframe = xv_create(frame,FRAME_CMD,
|
||||
FRAME_LABEL,"Messages",
|
||||
WIN_DESIRED_HEIGHT,100,
|
||||
WIN_DESIRED_WIDTH,300,
|
||||
FRAME_SHOW_RESIZE_CORNER,TRUE,
|
||||
FRAME_INHERIT_COLORS,TRUE,
|
||||
FRAME_CLOSED,FALSE,
|
||||
WIN_SHOW,FALSE,
|
||||
0);
|
||||
|
||||
pframe = xv_create(frame,FRAME_CMD,
|
||||
FRAME_CMD_PUSHPIN_IN,TRUE,
|
||||
FRAME_DONE_PROC,FrameDone,
|
||||
XV_HEIGHT,100,
|
||||
XV_WIDTH,300,
|
||||
FRAME_SHOW_RESIZE_CORNER,FALSE,
|
||||
FRAME_CLOSED,FALSE,
|
||||
XV_X,300,
|
||||
XV_Y,150,
|
||||
WIN_SHOW,FALSE,
|
||||
0);
|
||||
|
||||
infopanel = xv_get(infoframe,FRAME_CMD_PANEL);
|
||||
xv_set(infopanel, PANEL_LAYOUT,PANEL_VERTICAL,
|
||||
XV_WIDTH,300,
|
||||
XV_HEIGHT,50,
|
||||
0);
|
||||
|
||||
left_foot = xv_create(infopanel,PANEL_MESSAGE,0);
|
||||
right_foot = xv_create(infopanel,PANEL_MESSAGE,0);
|
||||
|
||||
window_fit(infoframe);
|
||||
|
||||
/*
|
||||
popup = xv_create(pframe,PANEL,
|
||||
PANEL_LAYOUT,PANEL_HORIZONTAL,
|
||||
0);
|
||||
*/
|
||||
popup = xv_get(pframe,FRAME_CMD_PANEL);
|
||||
|
||||
xv_create(popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"HELP",
|
||||
PANEL_NOTIFY_PROC,HELP,
|
||||
0);
|
||||
|
||||
xv_create(popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"OK",
|
||||
PANEL_NOTIFY_PROC,DO,
|
||||
0);
|
||||
|
||||
xv_create(popup,PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING,"Cancel",
|
||||
PANEL_NOTIFY_PROC,DONT,
|
||||
0);
|
||||
|
||||
/*
|
||||
* Keep original directory where program was started
|
||||
*/
|
||||
(void)getwd(current_dir);
|
||||
|
||||
ParseMenu();
|
||||
GenMenu(type);
|
||||
if(argc>1)
|
||||
LoadData(argv[1]);
|
||||
|
||||
/*
|
||||
* Set up the basics of the displays, and off to the main loop.
|
||||
*/
|
||||
BasicDisplay(DataSet);
|
||||
|
||||
if(DataSet != NULL)
|
||||
((NA_Alignment*)DataSet)->na_ddata = (char*)SetNADData
|
||||
((NA_Alignment*)DataSet,EditCan,EditNameCan);
|
||||
|
||||
tool_icon = xv_create((int) NULL,ICON,
|
||||
ICON_IMAGE,&iconpr,
|
||||
ICON_LABEL,strlen(FileName)>0?FileName:"GDE",
|
||||
0);
|
||||
|
||||
xv_set(frame,
|
||||
FRAME_ICON,tool_icon,
|
||||
0);
|
||||
|
||||
window_main_loop(frame);
|
||||
exit(0);
|
||||
}
|
||||
|
Binary file not shown.
|
@ -0,0 +1,56 @@
|
|||
typedef struct GargChoicetype
|
||||
{
|
||||
char *label; /* name for display in dialog box */
|
||||
char *method; /* value (if null, return choice number) */
|
||||
} GargChoice;
|
||||
|
||||
typedef struct GmenuItemArgtype
|
||||
{
|
||||
int optional; /* is this optional? */
|
||||
int type; /* TEXT, SLIDER, CHOOSER, etc. */
|
||||
int min; /* minimum range value */
|
||||
int max; /* maximum range value */
|
||||
int value; /* default numeric value(or choice) */
|
||||
int numchoices; /* number of choices */
|
||||
char *textvalue; /* default text value */
|
||||
char *label; /* description of arg function */
|
||||
char *symbol; /* internal symbol table mapping */
|
||||
char *method; /* commandline interpretation */
|
||||
GargChoice *choice; /* choices */
|
||||
Panel_item X; /* Xview menu item entry */
|
||||
} GmenuItemArg;
|
||||
|
||||
typedef struct GfileFormattype
|
||||
{
|
||||
int save; /* how should file be saved */
|
||||
int overwrite; /* how should file be loaded */
|
||||
int format; /* what format is each field */
|
||||
int maskable; /* Can a write through mask be used? */
|
||||
int select; /* what type of selection */
|
||||
char *symbol; /* internal symbol table mapping */
|
||||
char *name; /* file name */
|
||||
} GfileFormat;
|
||||
|
||||
typedef struct GmenuItemtype
|
||||
{
|
||||
int numargs; /* number of agruments to cmnd */
|
||||
int numoutputs; /* number of outputs from cmnd */
|
||||
int numinputs; /* number of input files to cmnd */
|
||||
char *label; /* item name */
|
||||
char *method; /* commandline produced */
|
||||
GfileFormat *input; /* input definitions */
|
||||
GfileFormat *output; /* output definitions */
|
||||
GmenuItemArg *arg; /* arguement definitions */
|
||||
char meta; /* Meta character for function */
|
||||
char *help; /* commandline help */
|
||||
Panel_item X; /* Xview panel */
|
||||
} GmenuItem;
|
||||
|
||||
typedef struct Gmenutype
|
||||
{
|
||||
int numitems; /* number of items in menu */
|
||||
char *label; /* menu heading */
|
||||
GmenuItem *item; /* menu items */
|
||||
Panel_item button; /* Button to activate menu */
|
||||
Menu X; /* XView menu structure */
|
||||
} Gmenu;
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
my $newFileName;
|
||||
my $line;
|
||||
|
||||
my $urlname = shift;
|
||||
my $url = shift;
|
||||
|
||||
open(MENUFILE, "/usr/local/biotools/GDE/CORE/.GDEmenus")
|
||||
or die "cannot open menu file, sorry\n";
|
||||
$newFileName = "/usr/local/biotools/GDE/CORE/.GDEmenusNew";
|
||||
open(NEWFILE, ">$newFileName");
|
||||
READLOOP:
|
||||
while (<MENUFILE>){
|
||||
print NEWFILE;
|
||||
if (/^menu:Online/){
|
||||
print "FOUND\n";
|
||||
print NEWFILE "item:$urlname\n";
|
||||
print NEWFILE "itemmethod:netscape $url\n";
|
||||
last READLOOP;
|
||||
|
||||
}
|
||||
}
|
||||
close(NEWFILE);
|
||||
close(MENUFILE);
|
||||
system("mv $newFileName /usr/local/biotools/GDE/CORE/.GDEmenus")
|
||||
or die "cannot replace old menu file\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,259 @@
|
|||
Blastn (Nucleic Acid)
|
||||
itemmethod:(echo PROGRAM blastn > in1.tmp; echo DATALIB $DBASE >> in1.tmp; echo HISTOGRAM $PLOT >> in1.tmp; echo ALIGNMENTS $SCORE >> in1.tmp; echo SPLIT 100000 >> in1.tmp; echo BEGIN >> in1.tmp; readseq -i1 -p -f8 in1 >> in1.tmp; cat in1.tmp | /bin/mail blast@ncbi.nlm.nih.gov; rm in1 in1.tmp) &
|
||||
|
||||
arg:DBASE
|
||||
argtype:choice_menu
|
||||
arglabel:Which Database?
|
||||
argchoice:Non-redundant database:nr
|
||||
argchoice:GenBank DNA sequence database:genbank
|
||||
argchoice:GenBank update (cumulative daily updates):gbupdate
|
||||
argchoice:EMBL DNA sequence database:embl
|
||||
argchoice:EMBL update (cumulative weekly updates):emblu
|
||||
argchoice:Vector subset of GenBank:vector
|
||||
argchoice:Database of Expressed Sequence Tags (ESTs):dbest
|
||||
argchoice:Eukaryotic promoterdatabase:epd
|
||||
argchoice:Kabat's database of immunological interest:kabatnuc
|
||||
|
||||
arg:PLOT
|
||||
argtype:chooser
|
||||
arglabel:Display Histogram?
|
||||
argvalue:1
|
||||
argchoice:Yes:yes
|
||||
argchoice:No:no
|
||||
|
||||
arg:SCORE
|
||||
argtype:slider
|
||||
arglabel:Number of High Scoring Pairs Displayed?
|
||||
argmin:1
|
||||
argmax:250
|
||||
argvalue:5
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
insave:
|
||||
|
||||
item:Blastp (Protein)
|
||||
itemmethod:(echo PROGRAM blastp >in1.tmp; echo DATALIB $DBASE >> in1.tmp; echo HISTOGRAM $PLOT >> in1.tmp; echo ALIGNMENTS $SCORE >> in1.tmp; echo MATRIX $MATRX >> in1.tmp; echo SPLIT 100000 >> in1.tmp; echo BEGIN >> in1.tmp; readseq -i1 -p -f8 in1 >> in1.tmp; cat in1.tmp | /bin/mail blast@ncbi.nlm.nih.gov; rm in1 in1.tmp) &
|
||||
|
||||
arg:DBASE
|
||||
argtype:choice_menu
|
||||
arglabel:Which Database?
|
||||
argchoice:Non-redundant protein database:nr
|
||||
argchoice:Swiss-Prot protein database:swissprot
|
||||
argchoice:PIR protein database:pir
|
||||
argchoice:Cumulative update to Swiss-Prot major release:spupdate
|
||||
argchoice:GenPept (translated GenBank):genpept
|
||||
argchoice:GenPept update (cumulative daily updates):gpupdate
|
||||
argchoice:Brookhaven PDB:pdb
|
||||
argchoice:Kabat's database of immunological interest:kabatnuc
|
||||
argchoice:Transcription Factors Database:tfd
|
||||
argchoice:6-frame translations of human Alu repeats:palu
|
||||
|
||||
arg:PLOT
|
||||
argtype:chooser
|
||||
arglabel:Display Histogram?
|
||||
argvalue:1
|
||||
argchoice:Yes:yes
|
||||
argchoice:No:no
|
||||
|
||||
arg:SCORE
|
||||
argtype:slider
|
||||
arglabel:Number of High Scoring Pairs Displayed
|
||||
argmin:1
|
||||
argmax:250
|
||||
argvalue:5
|
||||
|
||||
arg:Matrx
|
||||
argtype:chooser
|
||||
arglabel:Weighting matrix
|
||||
argchoice:PAM 250:PAM250
|
||||
argchoice:PAM 120:PAM10
|
||||
argchoice:PAM 40:PAM40
|
||||
argchoice:BLOSUM62:BLOSUM62
|
||||
|
||||
|
||||
in:in1
|
||||
informat:genbank
|
||||
insave:
|
||||
|
||||
item:Fasta (Nucleic Acid)
|
||||
itemmethod:(echo LIB $DBASE > in1.tmp; echo WORD $KPL >> in1.tmp; echo LIST $TOP >> in1.tmp; echo ALIGN $ALNG >> in1.tmp; echo ONE >> in1.tmp; echo SEQ >> in1.tmp; sed "s/-//g" < in1 | tr '@%#' '>' >> in1.tmp;Mail FASTA@EMBL-Heidelberg.de < in1.tmp; rm in1 in1.tmp) &
|
||||
|
||||
arg:DBASE
|
||||
argtype:choice_menu
|
||||
arglabel:Which Database?
|
||||
argchoice:GenBank Qrtly & Updates:GBALL
|
||||
argchoice:GenBank Updates:GBNEW
|
||||
argchoice:Entries only in GenBank, not in EMBL:GBONLY
|
||||
argchoice:GenBank and EMBL entries (latest releases):GENEMBL
|
||||
argchoice:New EMBL entries (Since latest release):EMNEW
|
||||
argchoice:All EMBL entries (latest release + new ones):EMALL
|
||||
argchoice:EMBL fungi division only:EFUN
|
||||
argchoice:EMBL invertebrates division only:EINV
|
||||
argchoice:EMBL mammals division only:EMAM
|
||||
argchoice:EMBL organelles division only:EORG
|
||||
argchoice:EMBL phages division only:EPHG
|
||||
argchoice:EMBL plants division only:EPLN
|
||||
argchoice:EMBL primates division only:EPRI
|
||||
argchoice:EMBL prokaryotes division only:EPRO
|
||||
argchoice:EMBL rodents division only:EROD
|
||||
argchoice:EMBL synthetic sequences division only:ESYN
|
||||
argchoice:EMBL unannotated division only:EUNA
|
||||
argchoice:EMBL viruses division only:EVRL
|
||||
argchoice:EMBL vertebrates division only:EVRT
|
||||
|
||||
|
||||
|
||||
arg:KPL
|
||||
argtype:slider
|
||||
arglabel:K-tuple window
|
||||
argmin:3
|
||||
argmax:6
|
||||
argvalue:4
|
||||
|
||||
arg:TOP
|
||||
argtype:slider
|
||||
arglabel:Scores Displayed?
|
||||
argmin:1
|
||||
argmax:200
|
||||
argvalue:100
|
||||
|
||||
arg:ALNG
|
||||
argtype:slider
|
||||
arglabel:# Alignments Displayed?
|
||||
argmin:1
|
||||
argmax:200
|
||||
argvalue:20
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Fasta (Protein)
|
||||
itemmethod:(echo LIB $DBASE > in1.tmp; echo WORD $TPL >> in1.tmp; echo LIST $SCRS >> in1.tmp; echo ALIGN $ALNMNTS >> in1.tmp; echo PROT >> in1.tmp; echo SEQ >> in1.tmp; sed "s/-//g" < in1 | tr '@%#$' '>' >> in1.tmp; Mail FASTA@EMBL-Heidelberg.de < in1.tmp; rm in1 in1.tmp) &
|
||||
|
||||
arg:DBASE
|
||||
argtype:choice_menu
|
||||
arglabel:Which Protein Database?
|
||||
argchoice:Swiss-Protein (latest release + new ones):SWALL
|
||||
argchoice:Swiss-Protein (since latest release):SWNEW
|
||||
argchoice:Swiss-Protein (latest release):SW
|
||||
argchoice:NBRF/PIR (latest release):NBRF
|
||||
argchoice:NBRF/PIR (not Swiss-Prot):PIRONLY
|
||||
argchoice:All Swiss-Prot and NBRF/PIR entries:SWISSPIRALL
|
||||
argchoice:PDB structure entries:BROOKHAVEN
|
||||
argchoice:PDB structure entries (NBRF version):NRL
|
||||
|
||||
arg:TPL
|
||||
argtype:slider
|
||||
arglabel:K-TUP window
|
||||
argmin:1
|
||||
argmax:2
|
||||
argvalue:1
|
||||
|
||||
arg:SCRS
|
||||
argtype:slider
|
||||
arglabel:# Scores Displayed?
|
||||
argmin:1
|
||||
argmax:200
|
||||
argvalue:100
|
||||
|
||||
arg:ALNMNTS
|
||||
argtype:slider
|
||||
arglabel:# Alignments Displayed?
|
||||
argmin:1
|
||||
argmax:200
|
||||
argvalue:20
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:GeneID
|
||||
itemmethod:($REPRINT > in1.tmp; echo Genomic Sequence >> in1.tmp; sed "s/-//g" < in1 | tr '@%#' '>' >> in1.tmp; Mail geneid@darwin.bu.edu < in1.tmp; rm in1 in1.tmp) &
|
||||
|
||||
arg:REPRINT
|
||||
argtype:chooser
|
||||
arglabel:Do you want a GENEID reprint?
|
||||
argchoice:YES:echo "Preprint Request" >> in1.tmp
|
||||
argchoice:NO
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
item:Sequence Retrieval
|
||||
itemmethod:(echo DATALIB $DBASE>> in1.tmp; echo MAXDOCS $NDOC >> in1.tmp;echo MAXLINES 100000 >> in1.tmp; echo BEGIN >> in1.tmp; echo $REGEXP >> in1.tmp; Mail retrieve@ncbi.nlm.nih.gov < in1.tmp; rm in1.tmp) &
|
||||
|
||||
arg:DBASE
|
||||
argtype:choice_menu
|
||||
arglabel:Which Database?
|
||||
argchoice:GenBank DNA sequence database:genbank
|
||||
argchoice:GenBank update (cumulative daily updates):gbupdate
|
||||
argchoice:EMBL DNA sequence database:embl
|
||||
argchoice:EMBL update (cumulative weekly updates):emblu
|
||||
argchoice:Vector subset of GenBank:vector
|
||||
argchoice:Database of Expressed Sequence Tags (ESTs):dbest
|
||||
argchoice:Swiss-Prot protein database:swissprot
|
||||
argchoice:PIR protein database:pir
|
||||
argchoice:GenPept (translated GenBank):genpept
|
||||
argchoice:GenPept update (cumulative daily updates):gpupdate
|
||||
argchoice:Transcription Factors Database:tfd
|
||||
|
||||
arg:NDOC
|
||||
argtype:slider
|
||||
arglabel:Number of Sequences Retrieved?
|
||||
argmin:1
|
||||
argmax:100
|
||||
argvalue:20
|
||||
|
||||
|
||||
arg:REGEXP
|
||||
argtype:text
|
||||
arglabel:key words, sequence IDs, boolean connectors
|
||||
|
||||
item:Grail
|
||||
itemmethod:(echo Sequences $TOTALSEQS $ID > in1.tmp; sed "s/-//g" < in1 | tr '@%#' '>' >> in1.tmp; Mail grail@ornl.gov <in1.tmp; rm in1 in1.tmp) &
|
||||
|
||||
arg:REGISTER
|
||||
argtype:chooser
|
||||
arglabel:Have you previously registered for Grail services?
|
||||
argchoice:YES
|
||||
argchoice:NO:echo "YOU MUST REGISTER"
|
||||
|
||||
arg:TOTALSEQS
|
||||
argtype:text
|
||||
arglabel:Number of Sequences Being Sent to Grail?
|
||||
|
||||
arg:ID
|
||||
argtype:text
|
||||
arglabel:User ID (MUST HAVE PREVIOUSLY REGISTERED)
|
||||
|
||||
in:in1
|
||||
informat:flat
|
||||
insave:
|
||||
|
||||
item:Grail Registration
|
||||
itemmethod:(echo Register > in1.tmp; echo $NAME >> in1.tmp; echo $ADDRESS >> in1.tmp; echo $PHONE >> in1.tmp; echo $EMAIL >> in1.tmp; Mail grail@ornl.gov < in1.tmp; rm in1.tmp)
|
||||
|
||||
arg:NAME
|
||||
argtype:text
|
||||
arglabel:Your Name
|
||||
|
||||
arg:ADDRESS
|
||||
argtype:text
|
||||
arglabel:Your Address
|
||||
|
||||
arg:PHONE
|
||||
argtype:text
|
||||
arglabel:Your Phone Number
|
||||
|
||||
arg:EMAIL
|
||||
argtype:text
|
||||
arglabel:Your E-Mail Address
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
DNA parsimony algorithm, version 3.51c
|
||||
|
||||
|
||||
One most parsimonious tree found:
|
||||
|
||||
|
||||
|
||||
|
||||
+-----------------------#10005_2 2
|
||||
!
|
||||
! +--------------------W28762(165
|
||||
+--9 !
|
||||
! ! ! +--R.C.W27652
|
||||
! ! ! +-----------6
|
||||
! ! ! ! +--#10005_2 2
|
||||
! +--8 !
|
||||
! ! +--5 +--W28762
|
||||
! ! ! ! +--7
|
||||
--1 ! ! ! +--4 +--W28762
|
||||
! ! ! ! ! !
|
||||
! +--2 +-----3 +-----R.C.W27652
|
||||
! ! !
|
||||
! ! +--------R.C.W27436
|
||||
! !
|
||||
! +-----------------W22140
|
||||
!
|
||||
+--------------------------contig
|
||||
|
||||
remember: this is an unrooted tree!
|
||||
|
||||
|
||||
requires a total of 2453.000
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
((#10005_2_2,(W28762(165,(((R.C.W27652,#10005_2_2),(((W28762,W28762),
|
||||
R.C.W27652),R.C.W27436)),W22140))),contig);
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,25 @@
|
|||
;---------------------------------------------------------------------------
|
||||
; FEATURES/GDE Accession File Instructions
|
||||
;
|
||||
; 1. Type in one or more GenBank Accession #'s below,
|
||||
; or
|
||||
; Place cursor at end of this file and choose 'Include File' in the FILE
|
||||
; menu to read in a file of numbers.
|
||||
;
|
||||
; (NOTE: File can not contain LOCUS names.)
|
||||
;
|
||||
; 2. Choose 'Save Current File' in the File menu
|
||||
; 3. Quit this window
|
||||
;
|
||||
; FEATURES will then extract the appropriate sequences . YOU DON'T NEED TO EDIT
|
||||
; OUT THESE COMMENT LINES.
|
||||
;
|
||||
; NOTE: Put each accession # on a separate line
|
||||
; SAMPLE ACCESSION FILE:
|
||||
;
|
||||
; M18249
|
||||
; X13383
|
||||
; J03680
|
||||
;
|
||||
;---------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
clu2ig update 3 Feb 94
|
||||
|
||||
NAME
|
||||
clu2ig
|
||||
|
||||
SYNOPSIS
|
||||
clu2ig clustalfile > igfile
|
||||
|
||||
DESCRIPTION
|
||||
Converts interleaved .aln output from Clustal V into
|
||||
sequential .ig (IntelliGenetics) format for use by MASE.
|
||||
|
||||
clustalfile:
|
||||
CLUSTAL V multiple sequence alignment
|
||||
|
||||
name1 AACTTTCG
|
||||
name2 ATCTTTCG
|
||||
* ******
|
||||
|
||||
name1 CCTGCT
|
||||
name2 CCCGCT
|
||||
** ***
|
||||
|
||||
igfile:
|
||||
;
|
||||
name1
|
||||
AACTTTCG
|
||||
CCTGCT
|
||||
:
|
||||
name2
|
||||
ATCTTTCG
|
||||
CCCGCT
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,36 @@
|
|||
dbstat update 3 Feb 94
|
||||
|
||||
NAME
|
||||
dbstat - calculates amino acid frequencies in a protein
|
||||
database
|
||||
|
||||
SYNOPSIS
|
||||
dbstat
|
||||
|
||||
DESCRIPTION
|
||||
dbstat reads a file of one or more nucleic acid sequences
|
||||
and calculates the amino acid frequencies, both in terms of
|
||||
absolute numbers, and as a fraction of the total.
|
||||
|
||||
input - The input file is the standard .wrp (Pearson) format,
|
||||
such as that produced by getob:
|
||||
|
||||
>name
|
||||
; one or more comment lines (optional)
|
||||
sequence lines
|
||||
|
||||
Comments begin either with semicolon (;) or right arrow (>)
|
||||
characters.
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,30 @@
|
|||
;---------------------------------------------------------------------------
|
||||
; FEATURES/GDE Expression File Instructions 8/7/95
|
||||
;
|
||||
; 1. Type in one or more GenBank expressions below,
|
||||
; or
|
||||
; Place cursor at end of this file and choose 'Include File' in the FILE
|
||||
; menu to read in a file of feature keys.
|
||||
; or
|
||||
; Copy expressions from another window and Paste into this window.
|
||||
; 2. Choose 'Save Current File' in the File menu
|
||||
; 3. Quit this window
|
||||
;
|
||||
; NOTES:
|
||||
; 1) FEATURES will then extract the appropriate sequences.
|
||||
; YOU DON'T NEED TO EDIT OUT THESE COMMENT LINES.
|
||||
; 2) All expressions referring to GenBank entries must begin with a '@'
|
||||
; Literals (ie. sequences to be embedded in the final output)
|
||||
; do NOT begin with a '@'.
|
||||
; 3) Put each expression on a separate line.
|
||||
;
|
||||
; SAMPLE EXPRESSION FILE:
|
||||
;
|
||||
; @J05635:83..1813
|
||||
; ; EcoRI/NotI adaptor {this is a comment line}
|
||||
; AATTGCGGCCGC
|
||||
; @J05635:/product="flagellin A"
|
||||
; @x17548:singed_trans
|
||||
;
|
||||
;---------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
;---------------------------------------------------------------------------
|
||||
; FEATURES/GDE Feature Key File Instructions
|
||||
;
|
||||
; 1. Type in one or more GenBank FEATURE Table feature keys below,
|
||||
; or
|
||||
; Place cursor at end of this file and choose 'Include File' in the FILE
|
||||
; menu to read in a file of feature keys.
|
||||
;
|
||||
; 2. Choose 'Save Current File' in the File menu
|
||||
; 3. Quit this window
|
||||
;
|
||||
; FEATURES will then extract the appropriate sequences . YOU DON'T NEED TO EDIT
|
||||
; OUT THESE COMMENT LINES.
|
||||
;
|
||||
; NOTE: Put each feature key on a separate line
|
||||
; SAMPLE FEATURE KEY FILE:
|
||||
;
|
||||
; mRNA
|
||||
; CDS
|
||||
; mat_peptide
|
||||
;
|
||||
;---------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,407 @@
|
|||
|
||||
FEATURES.DOC update 7 Feb 94
|
||||
|
||||
|
||||
NAME
|
||||
FEATURES - extracts features from GenBank entries
|
||||
|
||||
SYNOPSIS
|
||||
features
|
||||
features expression
|
||||
features [-f featurekey | -F keyfile]
|
||||
[-n name |-a accession | -e expression |
|
||||
-N namefile |-A accfile | -E expfile]
|
||||
[-u dbfile | -U dbfile | -g ]
|
||||
features -h
|
||||
|
||||
DESCRIPTION
|
||||
FEATURES extracts sequence objects from GenBank entries, using
|
||||
the Features Table language. Features can be retrieved either by
|
||||
specifying keywords (eg. CDS, mRNA, exon, intron etc.) or by
|
||||
evaluating expressions. In practical terms, FEATURES is actually
|
||||
a user interface for GETOB, which actually performs the parsing
|
||||
and extraction of sequence objects. FEATURES can be run either as
|
||||
an interactive program or with command line arguments.
|
||||
|
||||
'features' with no arguments runs the program interactively.
|
||||
'features' followed by an expression retrieves the data directly
|
||||
from GenBank and evaluates the expression. The third form of
|
||||
features requires all arguments to be accompanied by their
|
||||
respective option flags. Finally, 'features -h' prints the
|
||||
SYNOPSIS.
|
||||
|
||||
|
||||
INTERACTIVE EXECUTION
|
||||
FEATURES executed with no arguments runs interactively. An example of the
|
||||
FEATURES menu is shown below:
|
||||
|
||||
___________________________________________________________________
|
||||
FEATURES - Version 7 FEB 94
|
||||
Please cite: Fristensky (1993) Nucl. Acids Res. 21:5997-6003
|
||||
___________________________________________________________________
|
||||
Features: tRNA
|
||||
Entries: EPFCPCG
|
||||
Dataset:
|
||||
___________________________________________________________________
|
||||
Parameter Description Value
|
||||
-------------------------------------------------------------------
|
||||
1).................... FEATURES TO EXTRACT ....................> f
|
||||
f:Type a feature at the keyboard
|
||||
F:Read a list of features from a file
|
||||
2)....................ENTRIES TO BE PROCESSED (choose one).....> n
|
||||
Keyboard input - n:name a:accession # e:expression
|
||||
File input - N:name(s) A:accession #(s) E:expression(s)
|
||||
3)....................WHERE TO GET IT .........................> g
|
||||
u:Genbank dataset g:complete GenBank database
|
||||
U: same as u, but all entries
|
||||
4)....................WHERE TO SEND IT ........................> a
|
||||
s:Each feature to a separate file a:All output to same file
|
||||
---------------------------------------------------------------
|
||||
Type number of your choice or 0 to continue:
|
||||
0
|
||||
Messages will be written to EPFCPCG.msg
|
||||
Final sequence output will be written to EPFCPCG.out
|
||||
Expressions will be written to EPFCPCG.exp
|
||||
Extracting features...
|
||||
|
||||
In the example, FEATURES was instructed to retrieve all tRNAs from
|
||||
the GenBank entry EPFCPCG, which contains the Epifagus plastid
|
||||
genome. By default, the GenBank database was the source of the
|
||||
sequence. Messages indicate the progress of the job. A log describing
|
||||
the extraction of each feature is written to EPFCPCG.msg, while the
|
||||
extracted features themselves are written to EPFCPCG.out. Feature
|
||||
expressions which could be used by FEATURES to reconstruct the .out
|
||||
file, are written to EPFCPCG.exp.
|
||||
|
||||
The first step is to retrieve the EPFCPCG entry from GenBank, which is
|
||||
accomplished by calling FETCH. Next, FEATURES extracts the specified
|
||||
features from the entry.
|
||||
|
||||
An excerpt from EPFCPCG.msg is shown below, describing the extraction
|
||||
of the fifth tRNA found in this entry. To create this tRNA, two exons
|
||||
had to be joined. The qualifier line associated with this feature
|
||||
indicates that it is an Isoleucine tRNA with a gat anticodon.
|
||||
|
||||
|
||||
EPFCPCG:anticodon gtg
|
||||
complement
|
||||
(
|
||||
join
|
||||
(
|
||||
70023 70028
|
||||
|
||||
1 69
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
/product="transfer RNA-His"
|
||||
/gene="His-tRNA"
|
||||
/label=anticodon gtg
|
||||
/note="anticodon gtg"
|
||||
//----------------------------------------------
|
||||
|
||||
|
||||
The actual sequence for this feature, as written to EPFCPCG.out, is
|
||||
written with each exon beginning a new line:
|
||||
|
||||
>EPFCPCG:anticodon gtg
|
||||
ggcggatgtagccaaatggatcaaggtagtggattgtgaatccaacatat
|
||||
gcgggttcaattcccgtcg
|
||||
ttcgcc
|
||||
|
||||
Finally, the expression that was evaluated to create this feature is
|
||||
written to EPFCPCG.exp:
|
||||
|
||||
>EPFCPCG:anticodon gtg
|
||||
@M81884:anticodon gtg
|
||||
|
||||
If EPFCPCG.exp was used as an expression file in option 2 (E) of FEATURES,
|
||||
EPFCPCG.out would be recreated.
|
||||
|
||||
OPTIONS
|
||||
1) FEATURES - choosing f will cause FEATURES to prompt for
|
||||
a feature to extract. If you wish to extract several types of
|
||||
features simultaneously (ie. F), you must construct a file listing the
|
||||
feature keywords. The following example would retrieve both tRNA and
|
||||
rRNA sequences:
|
||||
|
||||
OBJECTS
|
||||
tRNA
|
||||
rRNA
|
||||
SITES
|
||||
|
||||
The words 'OBJECTS' and 'SITES' must enclose the feature keywords,
|
||||
and each keyword must be on a separate line. For a rigorous
|
||||
definition of the input file format, see the GETOB manual pages
|
||||
(getob.doc).
|
||||
|
||||
In the menu shown above, f was chosen, and the user entered tRNA at
|
||||
the prompt. Thus tRNA is now displayed on the Features: line. If
|
||||
features had been specified from a file (suboption F) then the
|
||||
filename containing the feature keywords would be displayed instead.
|
||||
A complete list of legal feature keywords can be found in the GenBank
|
||||
Release notes (gbrel.txt) under the subheading 'Feature Key Names'.
|
||||
|
||||
2) ENTRIES
|
||||
n User is prompted for the name of an entry from which the
|
||||
feature is to be extracted. The name of the entry will appear
|
||||
on the 'Entries' line of the menu.
|
||||
|
||||
N User is prompted for a filename containing one or more
|
||||
entry names. Each name must be on a separate line. The filename
|
||||
will be displayed on the 'Entries' menu line.
|
||||
|
||||
a User is prompted for an accession number, which will appear
|
||||
on the 'Entries' line of the menu.
|
||||
|
||||
A User is prompted for a filename for accession numbers. The filename
|
||||
will appear on the 'Entries:' line.
|
||||
|
||||
e User is prompted for a GenBank Features expression of the
|
||||
form accession:location.'accession' refers to a GenBank
|
||||
accession number, while 'location' is any legal feature location.
|
||||
A brief description of location syntax can be found under the
|
||||
subheading "Feature Location" in the GenBank release notes
|
||||
(gbrel.txt). See "The DDBJ/EMBL/GenBank Feature Table:
|
||||
Definition" Version 1.04 for a complete definition.
|
||||
E User is prompted for a filename containing one or more Feature
|
||||
expressions. EACH EXPRESSION MUST BEGIN A '@'. All lines beginning
|
||||
with '@' are processed as expressions, and all other lines are
|
||||
copied to the output file unchanged.
|
||||
|
||||
Examples:
|
||||
|
||||
The tRNA shown above could have been extracted by choosing
|
||||
suboption e and entering either of the following expressions:
|
||||
|
||||
M81884:complement(join(70023..70028,1..69))
|
||||
M81884:anticodon gtg
|
||||
|
||||
In the first example, the feature line from the original entry
|
||||
is used as the location. In the second example, the feature is
|
||||
found by its qualifier line, which also appeared in the
|
||||
original entry. It must be noted that the qualifier line must
|
||||
be unique from others in the same entry in its first 15
|
||||
characters after the = .
|
||||
|
||||
The flaL protein coding region of B. licheniformis is described
|
||||
in GenBank entry BLIFALA, accession number M60287 in the
|
||||
following feature:
|
||||
|
||||
CDS 305..640
|
||||
/note="flaD (sin) homologue"
|
||||
/gene="flaL"
|
||||
/label=ORF2
|
||||
/codon_start=1
|
||||
|
||||
This feature could be retrieved using any of the following
|
||||
expressions:
|
||||
|
||||
M60287:305..640
|
||||
M60287:ORF2
|
||||
M60287:/label=ORF2
|
||||
M60287:/gene="flaL"
|
||||
M60287:/note="flaD (sin) homologue"
|
||||
|
||||
Note that the /label= qualifier is special, in that labels are
|
||||
specifically intented as unique tags on an feature. For labels,
|
||||
only the label itself is need be specified. Thus, /label=ORF2 is
|
||||
equivalent to ORF2. For other qualifiers, the qualifier keyword
|
||||
(eg. /note=) must be included.
|
||||
|
||||
3) DATABASE (WHERE TO GET IT) - By default, all entries processed will
|
||||
be automatically retrieved from GenBank using FETCH. Specifying 'u'
|
||||
(User-defined database subset) makes it possible to extract features
|
||||
from GenBank subsets created by the user. Usually, retrieval of
|
||||
features is much faster with a User-defined subset, so if you
|
||||
frequently work with sets of genes, it is best to retrieve them
|
||||
en-masse using FETCH, and work with them directly. For example, if
|
||||
you had retrieved a set of Beta-globin sequences into a file called
|
||||
'globin.gen', you could directly extract features from these entries
|
||||
by specifying 'globin' or 'globin.gen' as your User-defined database.
|
||||
If the file extension is '.gen', FEATURES will automatically create
|
||||
temporary files called globin.ano, globin.wrp and globin.ind,
|
||||
containing annotation, sequence, and an index, respectively. These
|
||||
files will be read during feature extraction, and then discarded. If
|
||||
you have already created such files using SPLITDB, simply specify
|
||||
any of 'globin', 'globin.ano', etc. ie. anything, as long as it does
|
||||
not have the .gen file extension.
|
||||
|
||||
'U' rather than 'u' causes ALL entries in the user-defined
|
||||
database to be subset. This means that it is unnecessary to
|
||||
specify entry options (eg -n, -N etc.), as these will be
|
||||
ignored, if given.
|
||||
|
||||
One consequence of these conventions is that the individual GenBank
|
||||
divisions can be processed directly. For example, suppose you were only
|
||||
interested in rodent globins. You could directly access the rodent
|
||||
division of GenBank by specifying the base name of that file division
|
||||
(eg. /home/psgendb/GenBank/gbrod) as your user-defined database. In
|
||||
this case, the files gbrod.ano, gbrod.wrp and gbrod.ind already
|
||||
exist. Again, this approach is faster, since FEATURES would not have
|
||||
to find and retrieve the sequences, but can read directly from the
|
||||
database files. Finally, if you wanted to process all of the entries
|
||||
in the database division, simply use -U. The user is warned that a
|
||||
GenBank division is a huge amount of data, and processing every entry
|
||||
could take a long time.
|
||||
|
||||
4) WHERE TO SEND IT - By default (a), the output for all entries goes
|
||||
to a single set of files, whose names are chosen by FEATURES,
|
||||
depending on the setting of option 2, Entries. If a single name (n) or
|
||||
accession number (a) has been chosen, that will be used as
|
||||
the raw filename. For example, if you were processing the entry
|
||||
WHTCAB, the output files would be WHTCAB.msg and WHTCAB.out. If names
|
||||
(N), accession numbers (A) or expressions (E) were read from a file,
|
||||
the raw name of that file would be used eg. cellulase.nam would result
|
||||
in cellulase.msg and cellulase.out. Finally, if a single expression
|
||||
is processed (e), then the primary accession number in that
|
||||
expression will be used for the filenames. In all cases, FEATURES
|
||||
will tell you the names of the files being written.
|
||||
|
||||
Choosing suboption s, you can specify that the features created for
|
||||
each entry be sent to separate files. In this case, each file will
|
||||
have the name of that entry, with the extension .obj. However, all
|
||||
messages and expressions will still go to a single files. While this
|
||||
can be a convenient way of creating separate files when you need them,
|
||||
this option still has the limitation of writing all features for a
|
||||
given entry (if there are more than one) to the same file. Also,
|
||||
successive resolution of features (anything requiring 'getob -r')
|
||||
will not work with this option. This may be corrected in future
|
||||
versions.
|
||||
|
||||
|
||||
COMMAND LINE EXECUTION
|
||||
|
||||
There are two ways of running FEATURES from the command line. If only one
|
||||
argument is supplied, that argument is interpreted as an expression, and
|
||||
the result of that expression (ie. a sequence ) is written to the
|
||||
standard output. .msg, .out and .exp files are NOT created. For example,
|
||||
GenBank entry BACFLALA (M60287) contains the following feature:
|
||||
|
||||
CDS 95..271
|
||||
/label=LORF-
|
||||
/codon_start=1
|
||||
/translation="MNKDKNEKEELDEEWTELIKHALEQGISPDDIRIFLNLGKKSSK
|
||||
PSASIERSHSINPF"
|
||||
Any of
|
||||
|
||||
features M60287:LORF-
|
||||
features M60287:95..271
|
||||
features M60287:/label=LORF-
|
||||
|
||||
would write the open reading frame to the standard output:
|
||||
|
||||
atgaataaagataaaaatgagaaagaagaattggatgaggagtggacaga
|
||||
actgattaaacacgctcttgaacaaggcattagtccagacgatatacgta
|
||||
tttttctcaatttgggtaagaagtcttcaaaaccttccgcatcaattgaa
|
||||
agaagtcattcaataaatcctttctga
|
||||
|
||||
This form of FEATURES is provided to make it easy to pipe output to
|
||||
other programs for further processing. For example
|
||||
|
||||
features M60287:LORF- |ribosome >LORF.protein
|
||||
|
||||
would write the translation of the open reading frame to a file called
|
||||
LORF.protein.
|
||||
|
||||
The full functionality of the FEATURES can be accessed using arguments on
|
||||
the command line. In particular, when there are multiple entries to be
|
||||
processed, or multiple features within entries, it is much faster to
|
||||
supply FEATURES with lists of entries, feature keys or expressions.
|
||||
Command line options are similar to suboptions in menu items 1-3 above:
|
||||
|
||||
Feature keys:
|
||||
-f key {feature key}
|
||||
-F filename {file of feature keys}
|
||||
|
||||
Entries:
|
||||
-n name {GenBank LOCUS name}
|
||||
-N filename {file of GenBank LOCUS names}
|
||||
-a accession {GenBank ACCESSION number}
|
||||
-A filename {file of GenBank ACCESSION numbers}
|
||||
-e expression {Feature Table expression}
|
||||
-E filename {file of Feature Table expressions, each begin-
|
||||
ning with '@'}
|
||||
|
||||
Databases:
|
||||
-u filename {GenBank dataset}
|
||||
-U filename { " " " " " " ,
|
||||
process all entries ie. -nNaAeE options
|
||||
will be ignored}
|
||||
-g {GenBank}
|
||||
|
||||
Examples:
|
||||
|
||||
features -f tRNA -n EPFCPCG
|
||||
|
||||
retrieves all tRNAs from GenBank entry EPFCPCG and writes .msg, .out,
|
||||
and .exp files.
|
||||
|
||||
features -e M60287:LORF-
|
||||
|
||||
would retrieve the same open reading frame as in the earlier example.
|
||||
|
||||
|
||||
Since most time-consuming operation in FEATURES is sequence retrieval,
|
||||
it is often best to retrieve frequently-used sequences as database
|
||||
subsets. For example, a set GenBank entries for chlorophyl a/b binding
|
||||
protein genes might be stored in a file called CAB.gen.
|
||||
|
||||
features -f CDS -N CAB.nam -u CAB.gen
|
||||
|
||||
would generate the files CAB.msg, CAB.out and CAB.exp containing output
|
||||
for all CDS features in the entries listed in the file CAB.nam.
|
||||
|
||||
features -E CAB.exp -u CAB.gen
|
||||
|
||||
would re-create the output file CAB.out.
|
||||
|
||||
|
||||
|
||||
BUGS
|
||||
FEATURES does no preliminary error checking for syntax of
|
||||
GenBank expressions prior to their evaluation. Expressions that can
|
||||
not be evaluated will be flagged by GETOB in the .msg file.
|
||||
|
||||
At present, little checking is done to test for the presence or
|
||||
correctness of input files. Some errors may cause the program to
|
||||
crash.
|
||||
|
||||
For User-defined datasets, filename expansion is not performed.
|
||||
|
||||
FILES
|
||||
Temporary files:
|
||||
X.term X.ano X.wrp X.ind X.gen {X is raw filename, see 4) }
|
||||
UNRESOLVED.fea UNRESOLVED.out
|
||||
FEA.inf FEA.nam FEA.gen FEA.ano FEA.wrp FEA.ind FEA.msg FEA.out
|
||||
|
||||
SEE ALSO
|
||||
grep(1V) fetch getob splitdb
|
||||
|
||||
TRANSPORTATION NOTES
|
||||
It should be fairly easy to get FEATURES to work even on systems
|
||||
in which GenBank has not been formatted for the XYLEM package.
|
||||
This is because FEATURES does not work directly on the database, but
|
||||
rather retrieves all necessary sequences by calling FETCH. Thus,
|
||||
statements like 'fetch FEA.nam FEA.gen' could be replaced with any
|
||||
command that, given a file containing names or accession numbers,
|
||||
returns a file containing GenBank entries. In principle, you
|
||||
could even implement this sort of command to retrieve entries from
|
||||
the email server (retrieve@ncbi.nlm.nih.gov) at NCBI, although
|
||||
such a setup would undoubtedly be quite slow.
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,320 @@
|
|||
|
||||
FETCH.DOC update 24 Feb 96
|
||||
|
||||
|
||||
NAME
|
||||
fetch - retrieves database entries by name or accession number
|
||||
|
||||
SYNOPSIS
|
||||
fetch {interactive mode}
|
||||
fetch [options] namefile [output file] {batch mode}
|
||||
|
||||
DESCRIPTION
|
||||
fetch retrieves one or more entries from a database.
|
||||
|
||||
Interactive mode: fetch prompts the user to set search parameters,
|
||||
using an interactive menu:
|
||||
___________________________________________________________________
|
||||
FETCH - Version 7 Feb 94
|
||||
Please cite: Fristensky (1993) Nucl. Acids Res. 21:5997-6003
|
||||
___________________________________________________________________
|
||||
Namefile:
|
||||
Outfile:
|
||||
Database:
|
||||
-------------------------------------------------------------------
|
||||
Parameter Description Value
|
||||
|
||||
1) Name/Acc Name or Accession sequence to get
|
||||
2) Namefile Get list of sequences from Namefile
|
||||
3) WhatToGet a:annotation s:sequence b:both b
|
||||
4) Database g:GenBank p:PIR v:VecBase l:LiMB g
|
||||
G:GenBank dataset P:PIR dataset
|
||||
5) Outfile Send all output to a single file (Outfile)
|
||||
6) Files f:Send each entry to a separate file f
|
||||
-------------------------------------------------------------
|
||||
Type number of your choice or 0 to continue:
|
||||
|
||||
After all parameters have been set, type 0 to commence the search.
|
||||
Messages regarding the progress of the search will be printed.
|
||||
|
||||
(1,2) Which entries to get?
|
||||
If you want to get a single entry, option 1 lets you type in the
|
||||
name of that entry, without having to create a namefile. To get
|
||||
more than one entry, choose option 2, and specify the name of a
|
||||
file containing sequence names or accession numbers.
|
||||
|
||||
namefile is a file containing one or more sequence names or
|
||||
accession numbers, each on a separate line. Names and accession
|
||||
numbers can even be interspersed, in upper or lowercase, and in
|
||||
any order. For example, the namefile prp.nam might contain
|
||||
|
||||
; plant pathogenesis related proteins
|
||||
; (these are sample comment lines)
|
||||
; note that any line containing a semicolon is ignored
|
||||
x06362
|
||||
x05454
|
||||
TOBPR1A1
|
||||
; comments can be interspersed with names.
|
||||
PUMPR13
|
||||
tobpr1ar
|
||||
|
||||
Options 1 & 2 are mutually exclusive. Setting one will negate the
|
||||
other. If option 2 is chosen, the name of the namefile will appear
|
||||
at the top of the menu.
|
||||
|
||||
(3) WhatToGet
|
||||
Use this option to specify whether to get annotation, sequence,
|
||||
or both (default=both).
|
||||
|
||||
(4) Database
|
||||
Use this option to select the database. (default=GenBank).
|
||||
G and P select user-created database subsets containing GenBank
|
||||
or PIR entries, respectively. It is assumed that the database
|
||||
has been split into .ano, .wrp and .ind files using splitdb.
|
||||
For example, if you had created a database subset called PR1.pir,
|
||||
splitdb would create PR1.ano, PR1.wrp and PR1.ind. These are
|
||||
the files actually read by FETCH. When prompted for the name
|
||||
of the database, simply type "PR1", without a file extension.
|
||||
(If you do type a file extension, it will be ignored).
|
||||
|
||||
(5, 6) Where to send output
|
||||
By default, option 6 is set to f, and each entry will be written to
|
||||
a separate file, where the name of the file is the name of the
|
||||
entry, followed by a file extension. If a complete entry is
|
||||
retrieved, the file extension will indicate the type of database
|
||||
(GenBank: .gen; PIR: .pir, Vecbase: .vec; LiMB: .LiMB). If only
|
||||
annotation or sequence are retrieved, the file extensions will be
|
||||
.ano or .wrp, respectively. Using the default, the namefile above
|
||||
would create the following files:
|
||||
|
||||
PUMPR13.gen
|
||||
TOBPR1A1.gen
|
||||
TOBPR1AR.gen
|
||||
TOBPR1CR.gen
|
||||
TOBPR1PS.gen
|
||||
|
||||
By choosing option 5, you can specify the name of an output file
|
||||
for all entries to go to. This filename will appear at the top
|
||||
of the menu. Obviously, options 5 & 6 are mutually exclusive.
|
||||
Note entries retrieved are writen in alphabetical order (sorting by
|
||||
ASCII values), not the order in which they appeared in namefile.
|
||||
|
||||
(Note for remote users only: -f will only work for a single
|
||||
name/accession supplied in 1). -f IS NOT ENABLED FOR NAMEFILES
|
||||
specified in 2).)
|
||||
|
||||
Batch mode:
|
||||
Although it is transparent to the user, all fetch really does
|
||||
is call getloc, saving the user the trouble of knowing which
|
||||
database files to retrieve sequences from, or of having to
|
||||
execute getloc multiple times to retrieve sequences from
|
||||
different database files. Thus, the options are identical to those
|
||||
for getloc:
|
||||
|
||||
-a Write annotation portions of entries only, terminated by '//'.
|
||||
-s Write sequence data only, in Pearson (.wrp) format.
|
||||
-f Write each entry to a separate file.
|
||||
-g GenBank (default)
|
||||
-e EMBL {not implemented}
|
||||
-p PIR (NBRF)
|
||||
-v Vecbase
|
||||
-l LiMB
|
||||
-G GenBank_dataset
|
||||
-P PIR_dataset
|
||||
|
||||
If -f is not specified, outfile must be specified.
|
||||
|
||||
-L force execution of findkey on local host even if
|
||||
$XYLEM_RHOST is set. See "REMOTE EXECUTION" below
|
||||
|
||||
|
||||
PIR_dataset
|
||||
GenBank_dataset
|
||||
This can be either a file of PIR entries, a file of GenBank entries,
|
||||
or a XYLEM dataset created by splitdb. A file of PIR entries must
|
||||
have the file extension ".pir". A file of GenBank entries must have
|
||||
the file extension ".gen". A XYLEM dataset contains PIR entries split
|
||||
among three files by splitdb: annotation (.ano), sequence (.wrp)
|
||||
and index (.ind). These file extensions must be used!
|
||||
|
||||
When specifying a split dataset, only the base name needs to be
|
||||
used. For example given a XYLEM dataset consisting of the files
|
||||
myset.ano, myset.wrp and myset.ind, the following two commands
|
||||
are equivalent:
|
||||
|
||||
fetch -P myset something.nam something.pir
|
||||
fetch -P myset.ano something.nam something.pir
|
||||
|
||||
If the original .pir file had been used, the command would have
|
||||
been
|
||||
|
||||
fetch -P myset.pir something.nam something.pir
|
||||
|
||||
The ability to work directly with .gen or .pir files is quite
|
||||
convenient. However, since FETCH needs to work with a split
|
||||
FETCH automatically splits .pir or .gen files into .ano, .wrp
|
||||
and .ind files, which are removed when finished. This requires
|
||||
extra disk space and execution time, which could be significant
|
||||
for large datasets.
|
||||
|
||||
EXAMPLES
|
||||
Batch example:
|
||||
fetch -f chitinase.nam
|
||||
will retrieve annotation and sequence for sequences listed in
|
||||
chitinase.nam from GenBank, writing each entry to a separate file
|
||||
with the extension .gen.
|
||||
|
||||
fetch -s -v pbr.nam pbr.wrp
|
||||
will retrieve sequence data only for the entries listed in pbr.nam,
|
||||
from VecBase, and write all sequences to a Pearson format file
|
||||
(ie. readable by fasta) with the name pbr.wrp.
|
||||
|
||||
fetch -G sample sample.nam new.gen
|
||||
fetch -G sample.ano sample.nam new.gen
|
||||
Assumes that a set of GenBank entries has been split by splitdb
|
||||
into sample.ano sample.wrp and sample.ind. The entries listed in
|
||||
sample.nam are written to new.gen.
|
||||
|
||||
|
||||
FILES
|
||||
Database files:
|
||||
The directories for database files are specified by the environment
|
||||
variables $GB (GenBank) $PIR (PIR/NBRF) $VEC(Vecbase) and $LIMB
|
||||
(LiMB).
|
||||
|
||||
Index files are $GB/gbacc.idx for GenBank (this file is supplied
|
||||
with each GenBank release), while the other databases
|
||||
use .ind files generated by splitdb. Split database files MUST
|
||||
have the following file extensions: .ano {annotation}, .wrp
|
||||
{sequence} and .ind {index}. Thus, when creating database files
|
||||
for pir1.dat with splitdb, the output files should be pir1.ano,
|
||||
pir1.wrp and pir1.ind.
|
||||
|
||||
Temporary files:
|
||||
NAMEFILE.fetch
|
||||
PRELIMINARY.fetch
|
||||
TMP.fetch
|
||||
FOUND.fetch
|
||||
FETCHDIR {temporary directory}
|
||||
|
||||
REMOTE EXECUTION
|
||||
Where the databases can not be stored locally, FETCH can call
|
||||
FETCH on another system and retrieve the results. To run
|
||||
FETCH remotely, your .cshrc file should contain the following
|
||||
lines:
|
||||
|
||||
setenv XYLEM_RHOST remotehostname
|
||||
setenv XYLEM_USERID remoteuserid
|
||||
|
||||
where remotehostname is the name of the host on which the
|
||||
databases reside (in XYLEM split format) and remoteuserid
|
||||
is your userid on the remote system. When run remotely,
|
||||
your local copy of FETCH will generate the following
|
||||
commands:
|
||||
|
||||
rcp filename $XYLEM_USERID@$XYLEM_HOST:filename
|
||||
rsh $XYLEM_RHOST -l $XYLEM_USERID fetch ...
|
||||
rcp $XYLEM_USERID@$XYLEM_HOST:outputfilename outputfilename
|
||||
rsh $XYLEM_RHOST -l $XYLEM_USERID $RM temporary_files
|
||||
|
||||
Because FETCH uses rsh and rcp, your home directory on both
|
||||
the local and remote systems must have a world-readable
|
||||
file called .rhosts, containing the names of trusted remote
|
||||
hosts and your userid on each host. Before trying to get
|
||||
FETCH to work remotely, make sure that you can rcp and
|
||||
rsh to the remote host.
|
||||
|
||||
Obviously, remote execution of FETCH implies that FETCH
|
||||
must already be installed on the remote host. When FETCH
|
||||
runs another copy of FETCH remotely, it uses the -L option
|
||||
(findkey -L) to insure that the remote FETCH job executes,
|
||||
rather than calling yet another FETCH on another host.
|
||||
|
||||
|
||||
---------- Remote execution on more than 1 host -----------
|
||||
If more than 1 remote host is available for running FINDKEY
|
||||
(say, in a clustered environment where many servers mount
|
||||
a common filesystem) the choice of a host can be determined
|
||||
by the csh script choosehost, such that execution of
|
||||
choosehost returns the name of a remote server. To use this
|
||||
approach, the following script, called 'choosehost' should
|
||||
be in your bin directory:
|
||||
|
||||
#!/bin/csh
|
||||
# choosehost - choose a host to use for a remote job.
|
||||
# This script rotates among servers listed in .rexhosts,
|
||||
# by choosing the host at the top of the list and moving
|
||||
# it to the bottom.
|
||||
|
||||
#Rotate the list, putting the current host to the bottom.
|
||||
set HOST = `head -1 $home/.rexhosts`
|
||||
set JOBID = $$
|
||||
tail +2 $home/.rexhosts > /tmp/.rexhosts.$JOBID
|
||||
echo $HOST >> /tmp/.rexhosts.$JOBID
|
||||
/usr/bin/mv /tmp/.rexhosts.$JOBID $home/.rexhosts
|
||||
|
||||
# Write out the current host name
|
||||
echo $HOST
|
||||
|
||||
You must also have a file in your home directory called
|
||||
.rexhosts, listing remote hosts, such as
|
||||
|
||||
graucho.cc.umanitoba.ca
|
||||
harpo.cc.umanitoba.ca
|
||||
chico.cc.umanitoba.ca
|
||||
zeppo.cc.umanitoba.ca
|
||||
|
||||
Each time choosehost is called, choosehost will rotate the
|
||||
names in the file. For example, starting with the .rexhosts
|
||||
as shown, it will move graucho.cc.umanitoba.ca to the bottom
|
||||
of the file, and write the line 'graucho.cc.umanitoba.ca'
|
||||
to the standard output. The next time choosehosts is
|
||||
run, it would write 'harpo.cc.umanitoba.ca', and so on.
|
||||
|
||||
Depending on your local configuration, you may wish to
|
||||
rewrite choosehosts. All that is really necessary is that
|
||||
echo `choosehost` should return the name of a valid host.
|
||||
|
||||
Once you have installed choosehost and tested it, you can
|
||||
get FINDKEY to use choosehost simply by setting
|
||||
|
||||
setenv XYLEM_RHOST choosehost
|
||||
|
||||
in your .cshrc file.
|
||||
|
||||
--------------- Remote filesystems -----------------------
|
||||
Finally, an alternative to remote execution is to remotely mount
|
||||
the file system containing the databases across the network.
|
||||
This has the advantage of simplicity, and means that the
|
||||
databases are available for ALL programs on your local
|
||||
workstation. However, it may still be advantageous to run
|
||||
FETCH remotely, since that will shift much of the computational
|
||||
load to another host.
|
||||
|
||||
BUGS
|
||||
When retrieving entries directly from GenBank, FETCH uses the
|
||||
Accession Number index file gbacc.idx. In this case, FETCH
|
||||
can retrieve all entries containing a given accession number.
|
||||
This capability makes it possible to retrieve an entry using a
|
||||
secondary accession number. However if more than one entry
|
||||
share a secondary accession number, all of those entries will
|
||||
be retrieved. While this behavior might be a bit of an
|
||||
annoyance at times, it can also be useful because it alerts
|
||||
the user to the presence of other, related entries that might
|
||||
be of interest.
|
||||
|
||||
SEE ALSO
|
||||
getloc features
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,365 @@
|
|||
|
||||
FINDKEY.DOC update 13 Mar 97
|
||||
|
||||
|
||||
NAME
|
||||
findkey - finds database entries containg one or more keywords
|
||||
|
||||
SYNOPSIS
|
||||
findkey
|
||||
findkey [-pvbmgrdutielnsaxzL] keywordfile [namefile findfile]
|
||||
findkey [-P PIR_dataset] keywordfile [namefile findfile]
|
||||
findkey [-G GenBank_dataset] keywordfile [namefile findfile]
|
||||
|
||||
DESCRIPTION
|
||||
findkey uses the grep family of commands to find lines in database
|
||||
annotation files containing one or more keywords. Next, identify
|
||||
is called to create a .nam file, containing the names of entries
|
||||
containing the keywords, and a .fnd file, containing the actual
|
||||
lines from each entry containing hits. A PIR or GenBank dataset is
|
||||
either a file containing one or more GenBank or PIR entries, or
|
||||
the name of a XYLEM dataset created by splitdb. See FILES below
|
||||
for a more detailed description.
|
||||
|
||||
INTERACTIVE USE
|
||||
findkey prompts the user to set search parameters, using an interactive
|
||||
menu:
|
||||
|
||||
___________________________________________________________________
|
||||
FINDKEY - Version 12 Aug 94
|
||||
Please cite: Fristensky (1993) Nucl. Acids Res. 21:5997-6003
|
||||
___________________________________________________________________
|
||||
Keyfile:
|
||||
Dataset:
|
||||
-------------------------------------------------------------------
|
||||
Parameter Description Value
|
||||
-------------------------------------------------------------------
|
||||
1) Keyword Keyword to find thionin
|
||||
2) Keyfile Get list of keywords from Keyfile
|
||||
3) WhereToLook p:PIR v:VecBase p
|
||||
GenBank - b:bacterial i:invertebrate
|
||||
m:mamalian e:expressed seq. tag
|
||||
g:phage l:plant
|
||||
r:primate n:rna
|
||||
d:rodent s:synthetic
|
||||
u:unannotated a:viral
|
||||
t:vertebrate x:patented
|
||||
z:STS
|
||||
G: GenBank dataset P: PIR dataset
|
||||
-------------------------------------------------------------
|
||||
Type number of your choice or 0 to continue:
|
||||
0
|
||||
Searching /home/psgendb/PIR/pir1.ano...
|
||||
Sequence names will be written to thionin~pir.nam
|
||||
Lines containing keyword(s) will be written to thionin~pir.fnd
|
||||
Searching /home/psgendb/PIR/pir2.ano...
|
||||
Sequence names will be written to thionin~pir.nam
|
||||
Lines containing keyword(s) will be written to thionin~pir.fnd
|
||||
Searching /home/psgendb/PIR/pir3.ano...
|
||||
Sequence names will be written to thionin~pir.nam
|
||||
Lines containing keyword(s) will be written to thionin~pir.fnd
|
||||
|
||||
As shown in the example above, the keyword thionin was specified
|
||||
as the keyword to search for. By default, option 3 is set to p,
|
||||
and the PIR protein database is searched. Messages describe the
|
||||
progress of the search. Since PIR is broken up into two divisions
|
||||
(new and protein) both are searched, but all output is written to
|
||||
thionin.pir.nam and thionin.pir.fnd
|
||||
|
||||
OPTIONS
|
||||
(1,2) Which keywords to search for?
|
||||
If you want to search for a single keyword, option 1 lets you type
|
||||
the keyword, without having to create a file. To search for more
|
||||
than one keyword, choose option 2, and specify the name of a
|
||||
file containing the keywords. For example, entries containing
|
||||
genes for antibiotic resistance might be found using the
|
||||
following keyword file:
|
||||
|
||||
ampicillin
|
||||
chloramphenicol
|
||||
kanamycin
|
||||
neomycin
|
||||
tetracycline
|
||||
|
||||
Note: keyword searches are case insensitive.
|
||||
|
||||
As you might expect, it takes longer to search for multiple
|
||||
keywords than a single keyword.
|
||||
|
||||
Options 1 & 2 are mutually exclusive. Setting one will negate the
|
||||
other. If option 2 is chosen, the name of the keyword file will
|
||||
appear at the top of the menu.
|
||||
|
||||
Finally, it is probably not a good idea to search GenBank
|
||||
entries using very short keywords consisting only of letters.
|
||||
This is because GenBank entries now include a /translation
|
||||
field containing the amino acid sequence of each protein
|
||||
coding sequence. Consequently, 3 or 4 letter keywords
|
||||
consisting of legal amino acid symbols (eg. CAP, recA) will
|
||||
turn up fairly often in protein translations.
|
||||
|
||||
(3) WhereToLook
|
||||
Use this option to specify the database to be searched In the
|
||||
case of GenBank, only one division at a time may be searched.
|
||||
User-created database subsets containing PIR (P) or GenBank (G)
|
||||
entries may also be searched. User-created database subsets
|
||||
must be in the .ano/.wrp/.ind form created by splitdb.
|
||||
|
||||
OUTPUT
|
||||
The output filenames take the following form:
|
||||
|
||||
name_ex1.ex2
|
||||
|
||||
The 'name' part of the filename is either the keyword searched for,
|
||||
if option 1 was chosen, or the name of the keyword file,if option 2
|
||||
obtains. 'ex1' indicates the database division that was searched. For
|
||||
PIR and VecBase, ex1 is 'pir' and 'vec', respectively. For GenBank,
|
||||
ex1 is as follows:
|
||||
|
||||
bct - bacterial
|
||||
inv - invertebrate
|
||||
mam - other mamalian
|
||||
est - expressed sequence tag
|
||||
phg - phage
|
||||
pln - plant (includes fungi)
|
||||
pri - primate
|
||||
rna - structural RNAs
|
||||
rod - rodent
|
||||
syn - synthetic sequences
|
||||
sts - sequence tagged sites
|
||||
una - unannotated (new) sequences
|
||||
vrl - viral
|
||||
vrt - other vertebrate
|
||||
|
||||
'ex2' distinguishes the files containing the names of entries
|
||||
containing keywords (.nam) and the files containing the lines found
|
||||
in each entry (.fnd).
|
||||
|
||||
The .nam file can be used directly as a namefile for fetch, getloc,
|
||||
or getob.
|
||||
|
||||
COMMAND LINE USE
|
||||
|
||||
OPTIONS
|
||||
p search PIR (default)
|
||||
P PIR dataset search dbfile, containing PIR entries
|
||||
v search VecBase
|
||||
b search Genbank bacterial division
|
||||
m search Genbank mamalian division
|
||||
g search Genbank phage division
|
||||
r search Genbank primate division
|
||||
d search Genbank rodent division
|
||||
u search Genbank unannotated division
|
||||
t search Genbank vertebrate division
|
||||
i search Genbank invertebrate division
|
||||
l search Genbank plant division
|
||||
n search Genbank rna division
|
||||
s search Genbank synthetic division
|
||||
a search Genbank viral division
|
||||
x search Genbank patented division
|
||||
e search Genbank exp.seq.tag division
|
||||
z search GenBank STS division
|
||||
S search GenBank Genom. Survey division
|
||||
h search GenBank High Thrput. division
|
||||
G GenBank dataset search dbfile, containing GenBank entries
|
||||
|
||||
L force execution of findkey on local host
|
||||
even if $XYLEM_RHOST is set. See "REMOTE
|
||||
EXECUTION" below
|
||||
|
||||
FILES
|
||||
|
||||
keywordfile - contains keywords to search for
|
||||
|
||||
namefile - LOCUS names of hits are written to this file
|
||||
|
||||
findfile - for each hit, a report listing the LOCUS name and the
|
||||
lines matching the keyword if written to this file.
|
||||
|
||||
If namefile and findfile are not specified on the command line,
|
||||
filenames will be created as described above for interactive
|
||||
use.
|
||||
|
||||
PIR_dataset
|
||||
GenBank_dataset
|
||||
This can be either a file of PIR entries, a file of GenBank entries,
|
||||
or a XYLEM dataset created by splitdb. A file of PIR entries must
|
||||
have the file extension ".pir". A file of GenBank entries must have
|
||||
the file extension ".gen". A XYLEM dataset contains PIR entries split
|
||||
among three files by splitdb: annotation (.ano), sequence (.wrp)
|
||||
and index (.ind). These file extensions must be used!
|
||||
|
||||
When specifying a split dataset, only the base name needs to be
|
||||
used. For example given a XYLEM dataset consisting of the files
|
||||
myset.ano, myset.wrp and myset.ind, the following two commands
|
||||
are equivalent:
|
||||
|
||||
findkey -P myset something.kw
|
||||
findkey -P myset.ano something.kw
|
||||
|
||||
If the original .pir file had been used, the command would have
|
||||
been
|
||||
|
||||
findkey -P myset.pir something.kw
|
||||
|
||||
The ability to work directly with .gen or .pir files is quite
|
||||
convenient. However, since FINDKEY needs to work with a split
|
||||
FINDKEY automatically splits .pir or .gen files into .ano, .wrp
|
||||
and .ind files, which are removed when finished. This requires
|
||||
extra disk space and execution time, which could be significant
|
||||
for large datasets.
|
||||
|
||||
EXAMPLES
|
||||
If the list of antibiotics shown above was stored in the file
|
||||
antibiotic.kw, and option 3 was set to 'b', then the annotation
|
||||
portion of the GenBank bacterial division would be searched, and
|
||||
all lines containing any of these keywords would be written to
|
||||
antibiotic~bac.fnd. The corresponding GenBank entry names would
|
||||
appear in antibiotic~bac.nam.
|
||||
|
||||
The same keyword file could be used to search other database files.
|
||||
If VecBase was searched, the output files would be antibiotic~vec.fnd
|
||||
and antibiotic~vec.nam. These filename conventions make it easy
|
||||
to search different database divisions, and to keep track of where
|
||||
data came from.
|
||||
|
||||
Command line examples:
|
||||
|
||||
findkey thionin.kw
|
||||
|
||||
would be equivalent to the interactive example shown above. In
|
||||
this case, the file thionin.kw contains the word 'thionin'.
|
||||
(Note that since PIR is the default, -p need not be supplied.)
|
||||
|
||||
findkey -b antibiotic.kw drugs.nam drugs.fnd
|
||||
|
||||
would search the GenBank bacterial division for the keywords
|
||||
contained in antibiotic.kw, and write the output to drugs.nam
|
||||
and drugs.kw.
|
||||
|
||||
FILES
|
||||
Database files:
|
||||
The directories for database files are specified by the environment
|
||||
variables $GB (GenBank) $PIR (PIR/NBRF) and $VEC(Vecbase).
|
||||
Annotation (.ano) and index (.ind) are those generated by splitdb.
|
||||
|
||||
Temporary files:
|
||||
$jobid.fnd
|
||||
$jobid.nam
|
||||
$jobid.grep
|
||||
|
||||
where $jobid is a unique jobid generated by the shell
|
||||
|
||||
REMOTE EXECUTION
|
||||
Where the databases can not be stored locally, FINDKEY can call
|
||||
FINDKEY on another system and retrieve the results. To run
|
||||
FINDKEY remotely, your .cshrc file should contain the following
|
||||
lines:
|
||||
|
||||
setenv XYLEM_RHOST remotehostname
|
||||
setenv XYLEM_USERID remoteuserid
|
||||
|
||||
where remotehostname is the name of the host on which the
|
||||
databases reside (in XYLEM split format) and remoteuserid
|
||||
is your userid on the remote system. When run remotely,
|
||||
your local copy of FINDKEY will generate the following
|
||||
commands:
|
||||
|
||||
rcp filename $XYLEM_USERID@$XYLEM_HOST:filename
|
||||
rsh $XYLEM_RHOST -l $XYLEM_USERID findkey ...
|
||||
rcp $XYLEM_USERID@$XYLEM_HOST:outputfilename outputfilename
|
||||
rsh $XYLEM_RHOST -l $XYLEM_USERID rm temporary_files
|
||||
|
||||
Because FINDKEY uses rsh and rcp, your home directory on both
|
||||
the local and remote systems must have a world-readable
|
||||
file called .rhosts, containing the names of trusted remote
|
||||
hosts and your userid on each host. Before trying to get
|
||||
FINDKEY to work remotely, make sure that you can rcp and
|
||||
rsh to the remote host.
|
||||
|
||||
Obviously, remote execution of FINDKEY implies that FINDKEY
|
||||
must already be installed on the remote host. When FINDKEY
|
||||
runs another copy of FINDKEY remotely, it uses the -L option
|
||||
(findkey -L) to insure that the remote FINDKEY job executes,
|
||||
rather than calling yet another FINDKEY on another host.
|
||||
|
||||
---------- Remote execution on more than 1 host -----------
|
||||
If more than 1 remote host is available for running FINDKEY
|
||||
(say, in a clustered environment where many servers mount
|
||||
a common filesystem) the choice of a host can be determined
|
||||
by the csh script choosehost, such that execution of
|
||||
choosehost returns the name of a remote server. To use this
|
||||
approach, the following script, called 'choosehost' should
|
||||
be in your bin directory:
|
||||
|
||||
#!/bin/csh
|
||||
# choosehost - choose a host to use for a remote job.
|
||||
# This script rotates among servers listed in .rexhosts,
|
||||
# by choosing the host at the top of the list and moving
|
||||
# it to the bottom.
|
||||
|
||||
#Rotate the list, putting the current host to the bottom.
|
||||
set HOST = `head -1 $home/.rexhosts`
|
||||
set JOBID = $$
|
||||
tail +2 $home/.rexhosts > /tmp/.rexhosts.$JOBID
|
||||
echo $HOST >> /tmp/.rexhosts.$JOBID
|
||||
/usr/bin/mv /tmp/.rexhosts.$JOBID $home/.rexhosts
|
||||
|
||||
# Write out the current host name
|
||||
echo $HOST
|
||||
|
||||
You must also have a file in your home directory called
|
||||
.rexhosts, listing remote hosts, such as
|
||||
|
||||
graucho.cc.umanitoba.ca
|
||||
harpo.cc.umanitoba.ca
|
||||
chico.cc.umanitoba.ca
|
||||
zeppo.cc.umanitoba.ca
|
||||
|
||||
Each time choosehost is called, choosehost will rotate the
|
||||
names in the file. For example, starting with the .rexhosts
|
||||
as shown, it will move graucho.cc.umanitoba.ca to the bottom
|
||||
of the file, and write the line 'graucho.cc.umanitoba.ca'
|
||||
to the standard output. The next time choosehosts is
|
||||
run, it would write 'harpo.cc.umanitoba.ca', and so on.
|
||||
|
||||
Depending on your local configuration, you may wish to
|
||||
rewrite choosehosts. All that is really necessary is that
|
||||
echo `choosehost` should return the name of a valid host.
|
||||
|
||||
Once you have installed choosehost and tested it, you can
|
||||
get FINDKEY to use choosehost simply by setting
|
||||
|
||||
setenv XYLEM_RHOST choosehost
|
||||
|
||||
in your .cshrc file.
|
||||
|
||||
--------------- Remote filesystems -----------------------
|
||||
Finally, an alternative to remote execution is to remotely mount
|
||||
the file system containing the databases across the network.
|
||||
This has the advantage of simplicity, and means that the
|
||||
databases are available for ALL programs on your local
|
||||
workstation. However, it may still be advantageous to run
|
||||
XYLEM remotely, since that will shift much of the computational
|
||||
load to another host.
|
||||
|
||||
|
||||
BUGS
|
||||
At present, regular expression characters cannot be used for
|
||||
keyword searches.
|
||||
|
||||
SEE ALSO
|
||||
grep(1V) identify splitdb
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
GETLOC.DOC update 30 May 95
|
||||
|
||||
|
||||
NAME
|
||||
getloc - retrieve database entries listed in namefile to outfile.
|
||||
|
||||
SYNOPSIS
|
||||
getloc [-asfcgepvl] namefile [anofile] [seqfile] indfile outfile
|
||||
|
||||
DESCRIPTION
|
||||
getloc reads a list of names from namefile and recreates
|
||||
entries by combining the annotation and sequence portions of each
|
||||
entry from anofile and seqfile. getloc will work most quickly
|
||||
when the namefile is in alphabetical order, but it will also
|
||||
work on unsorted lists. The following options affect the output:
|
||||
|
||||
a Write annotation portions of entries only, terminated by '//'.
|
||||
seqfile is not included on command line.
|
||||
|
||||
s Write sequence data only, in Pearson (.wrp) format.
|
||||
anofile is not included on commandline.
|
||||
|
||||
f Write each entry to a separate file. The filename will
|
||||
consist of the LOCUS name, followed by .ano for annotation
|
||||
only, .wrp for sequence only, or gen for complete GenBank
|
||||
format.
|
||||
|
||||
c namefile contains accession numbers, rather than names
|
||||
|
||||
The following options identify the type of database being read:
|
||||
|
||||
g GenBank (default)
|
||||
e EMBL
|
||||
p PIR (NBRF)
|
||||
v Vecbase
|
||||
l LiMB
|
||||
|
||||
namefile consists of an alphabetically ordered list of LOCUS names,
|
||||
each on a separate line. Indfile could be used to create a
|
||||
namefile by simply editing out some subset of names. (This can also
|
||||
be done using the Unix comm command.) If the entire indfile was
|
||||
used, the entire database would be recreated, minus the header
|
||||
information that might have been present in the original, but
|
||||
deleted by splitdb.
|
||||
|
||||
NOTE
|
||||
Getloc automatically expands leading blanks that have been
|
||||
compressed using splitdb -c. See splitdb.doc for more information.
|
||||
|
||||
SEE ALSO
|
||||
splitdb, comm(1).
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,327 @@
|
|||
|
||||
GETOB 21 Dec 94
|
||||
|
||||
|
||||
NAME
|
||||
getob - Get an object from GenBank
|
||||
|
||||
SYNOPSIS
|
||||
getob [-frcn] infile namefile anofile seqfile indfile message
|
||||
[outfile] expfile
|
||||
|
||||
DESCRIPTION
|
||||
getob extracts 'objects' (subsequences) from GenBank entries, using
|
||||
the features table, and writes them to outfile (.out). A log
|
||||
describing the construction of each object is written to message
|
||||
(.msg). If -r is not set, a list of expressions that would recreate
|
||||
the .out file if evaluated by getob -r, is written to expfile (.exp)
|
||||
|
||||
The following options are available:
|
||||
|
||||
f Write each entry to a separate file. The name will consist
|
||||
of the entry name, and the extension '.obj'.
|
||||
|
||||
r Resolve expressions from namefile into objects.
|
||||
Expressions take the form:
|
||||
|
||||
@[<database>::]<accession>:<location>
|
||||
|
||||
In effect, r makes it possible to use getob to resolve
|
||||
features that span more than one entry, such as segmented
|
||||
files. In the first run of the program, features that require
|
||||
data from outside the entry in which they are defined will be
|
||||
written to outfile with those externally-defined parts rep-
|
||||
resented using the '@' notation described above. During a
|
||||
subsequent run, the outfile from the previous run is used as
|
||||
namefile. When r is set, all lines not beginning with '@' (ie.
|
||||
name lines and sequence lines) are simply copied to the new
|
||||
outfile. When an '@' is encountered, the expression is parsed
|
||||
into accession number and location. The entry with the
|
||||
specified accession number is located in indfile, and read from
|
||||
anofile and seqfile. It is then evaluated, and the result
|
||||
written to outfile in place of the '@' expression.
|
||||
|
||||
getob can also be used to get specific labeled objects from
|
||||
a given entry. Examples:
|
||||
|
||||
@k30576:polyprotein
|
||||
@k30576:/label=polyprotein
|
||||
@x10345:/product="hsp70"
|
||||
@j00879:group(1..2200,mutation_37)
|
||||
|
||||
The first two constructs given above are equivalent. Both
|
||||
will extract the feature called polyprotein. The third
|
||||
construct shows that any feature label can be specified. If
|
||||
none is specified, as in the first example, then /label= is
|
||||
assumed. One limitation, however, is that the label sought
|
||||
must be unique within the entry in its first 15 characters
|
||||
including double quotes ("). Otherwise, only the first
|
||||
matching label expression will be evaluated. Finally, the
|
||||
last example shows that a mutant sequence can be constructed
|
||||
by first specifying an expression that evaluates to a
|
||||
sequence (ie. 1..2200) and then a labeled expression that
|
||||
upon evaluation, uses replace() to modify that sequence. The
|
||||
usage shown in examples 3 & 4 above represent extensions to
|
||||
the DDBJ/EMBL/GenBank Features Table Format.
|
||||
|
||||
As touched on briefly above, the r option makes it possible
|
||||
to construct objects that include recursive references to
|
||||
other entries (eg. segmented files) by iterative calls to
|
||||
getob. The 'features' command automates this process. The basic
|
||||
algorithm is as follows:
|
||||
|
||||
getob infile namefile anofile seqfile indfile ...
|
||||
|
||||
#Pull out all lines containing indirect references
|
||||
grep '@' outfile > unresolved.grep
|
||||
|
||||
while (unresolved.grep is not empty)
|
||||
|
||||
#extract accession numbers to be retrieved
|
||||
cut -c2-7 unresolved.grep > unresolved.nam
|
||||
|
||||
#retrieve the sequences into a new file, and create
|
||||
#a database subset to be used by getob
|
||||
fetch unresolved.nam new.gen
|
||||
splitdb new.gen new.ano new.wrp new.ind
|
||||
|
||||
#run getob again to resolve indirect references
|
||||
getob -r infile outfile new.ano new.wrp new.ind ...
|
||||
|
||||
#Pull out all lines containing indirect references
|
||||
grep '@' outfile > unresolved.grep
|
||||
end
|
||||
|
||||
c NAMEFILE contains accession numbers, rather than locus names
|
||||
|
||||
n By default, the qualifier 'codon_start' is used to determine
|
||||
how many n's, if necessary, must be added to the 5' end of
|
||||
CDS, mat_peptide, or sig_peptide, to preserve the reading
|
||||
frame. To turn OFF this feature, -n must be set. -n must be set
|
||||
for GenBank Releases 67.0 and earlier.
|
||||
|
||||
infile contains commands indicating what data is to be pulled from
|
||||
each entry. Two types of output may be presented, GenBank or
|
||||
OBJECTS. These are described below:
|
||||
|
||||
1) GenBank output - If the word 'GENBANK' is the first line in
|
||||
infile, a pseudo-GenBank entry will be recreated. This option
|
||||
is only intended for debugging purposes and will probably be
|
||||
removed in later releases.
|
||||
|
||||
2) Object format - This option instructs getob to write part or
|
||||
all of each sequence, along with site annotation, by specifying
|
||||
feature key names. The syntax for infile is shown below:
|
||||
|
||||
Backus-Naur format: Example:
|
||||
----------------------------------------------------------
|
||||
OBJECTS OBJECTS
|
||||
<feature key> tRNA
|
||||
{<feature key> rRNA
|
||||
. . . SITES
|
||||
<feature key>} stem_loop
|
||||
SITES
|
||||
{<feature key>
|
||||
. . .
|
||||
<feature key>}
|
||||
|
||||
In the example above, getob is instructed to extract all tRNA or
|
||||
rRNA sequences from each entry, and annotate the position of each
|
||||
stem/loop structure. Note that the SITES coordinates written to the
|
||||
file tell the positions of those SITES relative to the start of the
|
||||
object, rather than the original location in the sequence. As above,
|
||||
each word begins a separate line.
|
||||
|
||||
While the -r option does not use infile, at least a dummy infile
|
||||
must be included in the command line. This dummy file need only
|
||||
contain two lines:
|
||||
|
||||
OBJECTS
|
||||
SITES
|
||||
|
||||
NOTE: SITES IS NOT YET IMPLEMENTED! Although inclusion of SITES in
|
||||
the input file will have no effect, the word SITES must still be
|
||||
present after the last feature key.
|
||||
|
||||
|
||||
namefile
|
||||
namefile consists of a list of LOCUS names or accession numbers,
|
||||
each on a separate line. Names or accession numbers should appear
|
||||
in the order in which they appear in the database file. Unordered
|
||||
namefiles will slow the progress of the search. Since only the
|
||||
first non-blank field of each line in namefile is read, indfile
|
||||
could be used to create a namefile. If the entire indfile was
|
||||
used, the entire database file would be processed. A sample
|
||||
namefile requesting four sequences by LOCUS name is shown below:
|
||||
|
||||
POTPR1A
|
||||
POTPSTH2
|
||||
POTPSTH21
|
||||
POTSTHA
|
||||
|
||||
anofile, seqfile, and indfile
|
||||
The database subset containing GenBank entries must be divided
|
||||
among annotation, sequence and an index by splitdb.
|
||||
|
||||
message
|
||||
message contains a log describing the parsing of each object.
|
||||
For annotative purposes, qualifier lines from the object are
|
||||
included in along with the location expression being parsed.
|
||||
The beginning of a typical message file is shown below:
|
||||
|
||||
GETOB Version 0.962 14 May 1992
|
||||
|
||||
POTPR1A:CDS1
|
||||
join
|
||||
(
|
||||
295 603
|
||||
|
||||
1011 1355
|
||||
|
||||
)
|
||||
|
||||
|
||||
/note="pathogenesis-related protein (prp1)"
|
||||
/codon_start=1
|
||||
/translation="MAEVKLLGLRYSPFSHRVEWALKIKGVKYEFIEEDLQNKSPLLL
|
||||
QSNPIHKKIPVLIHNGKCICESMVILEYIDEAFEGPSILPKDPYDRALARFWAKYVED
|
||||
KGAAVWKSFFSKGEEQEKAKEEAYEMLKILDNEFKDKKCFVGDKFGFADIVANGAALY
|
||||
LGILEEVSGIVLATSEKFPNFCAWRDEYCTQNEEYFPSRDELLIRYRAYIQPVDASK"
|
||||
//----------------------------------------------
|
||||
|
||||
In the example above, getob was instructed to retrieve all CDS
|
||||
features from the database subset. The message for the entry
|
||||
POTPR1A is shown, along with a reconstruction of the location
|
||||
expression that was evaluated to create the object. In this
|
||||
case, protien coding sequences from two exons had to be joined
|
||||
to create the object.
|
||||
|
||||
outfile
|
||||
outfile contains the actual objects constructed, consisting of
|
||||
sites found and sequences. The beginning of a typical output file
|
||||
is shown below:
|
||||
|
||||
>POTPR1A:CDS1
|
||||
atggcagaagtgaagttgcttggtctaaggtatagtccttttagccatag
|
||||
agttgaatgggctctaaaaattaagggagtgaaatatgaatttatagagg
|
||||
aagatttacaaaataagagccctttacttcttcaatctaatccaattcac
|
||||
aagaaaattccagtgttaattcacaatggcaagtgcatttgtgagtctat
|
||||
ggtcattcttgaatacattgatgaggcatttgaaggcccttccattttgc
|
||||
ctaaagacccttatgatcgcgctttagcacgattttgggctaaatacgtc
|
||||
gaagataag
|
||||
ggggcagcagtgtggaaaagtttcttttcgaaaggagaggaacaagagaa
|
||||
agctaaagaggaagcttatgagatgttgaaaattcttgataatgagttca
|
||||
aggacaagaagtgctttgttggtgacaaatttggatttgctgatattgtt
|
||||
gcaaatggtgcagcactttatttgggaattcttgaagaagtatctggaat
|
||||
tgttttggcaacaagtgaaaaatttccaaatttttgtgcttggagagatg
|
||||
aatattgcacacaaaacgaggaatattttccttcaagagatgaattgctt
|
||||
atccgttaccgagcctacattcagcctgttgatgcttcaaaatga
|
||||
|
||||
In the example, the CDS from entry POTPR1A has been written in
|
||||
two chunks, corresponding to the two exon portions of the coding
|
||||
sequence. Each location retrieved in constructing the object is
|
||||
written as a separate block of sequence. By comparing message file
|
||||
to outfile, it is possible to verify the correctness of the
|
||||
operation.
|
||||
|
||||
Numbers are appended to the sequence names to indicate
|
||||
which CDS in the entry has been retrieved. Thus, if two CDS
|
||||
features were present, the second one would be named >POTPR1A:2.
|
||||
For compatiblility with the FASTA programs of Pearson, the name line
|
||||
begins with a '>'.
|
||||
|
||||
expfile
|
||||
The expression evaluated to create this feature is written
|
||||
to expfile:
|
||||
|
||||
>POTPR1A:CDS1
|
||||
@J03679:join(295..603,1011..1355)
|
||||
|
||||
expfile is only created if -r is not set. It is itended as a way
|
||||
of automating the creation of a feature expression file for use
|
||||
in generating customized datasets. Expressions in expfile can be
|
||||
deleted or modified, or new expressions added, to tailor the
|
||||
dataset to individual needs. To generate a dataset from expfile:
|
||||
|
||||
getob -r infile expfile anofile seqfile indfile message outfile
|
||||
|
||||
EXTENSIONS TO THE FEATURE TABLE LANGUAGE
|
||||
|
||||
1) poly(<absolute_location>|<literal>|<feature_name>,x)
|
||||
|
||||
This operator evaluates an absolute location, literal, or
|
||||
feature name (ie. any location not containing functional
|
||||
operators) and writes it x times. The most obvious
|
||||
application of poly is to create spacers to represent regions
|
||||
of unknown sequence between sequences that are known. For
|
||||
example, the restriction map of a 4kb EcoR1 fragment with a
|
||||
Hind3 site 1000 bp from one end could be represented as follows:
|
||||
|
||||
join("gaattc",poly("n",1000),"aagctt",poly("n",3000),"gaattc")
|
||||
|
||||
2) The following feature keys are recognized by GETOB, although
|
||||
not included in the language definition. While they will not
|
||||
appear in GenBank entries, they could be used in user-created
|
||||
GenBank-format files:
|
||||
|
||||
contig
|
||||
This feature key is meant to be used to assemble large
|
||||
sequence segments from smaller segments, possibly using the
|
||||
poly() operator.
|
||||
|
||||
chromosome
|
||||
Intended to annotate the complete sequence of a chromosome. This
|
||||
feature may be constructed by a join of two or more contigs.
|
||||
|
||||
Use of these keywords is illustrated in the features table
|
||||
shown below, which could be used to construct a model of part
|
||||
of the E.coli chromosome, spanning map units 763.4 to 1031.4 kb:
|
||||
|
||||
contig join(J01619:1..13063,poly("n",7140),
|
||||
J03939:1..1363,poly("n",14380),
|
||||
X02306:complement(1..1622),poly("n",14710),
|
||||
J04423:1..5793,poly("n",22500),
|
||||
X03722:1..2400,poly("n",123750),
|
||||
one-of(X05017:complement(1..1854),X05017:1..1854))
|
||||
/label=Eco_contig8
|
||||
/map=763.4-950.6kb
|
||||
contig join(V00352:1..2412,poly("n",28800),M15273:1..3409)
|
||||
/label=Eco_contig9
|
||||
/map=972.9-1001.7kb
|
||||
contig join(X02826:1..1357,poly("n",13540),
|
||||
J01654:complement(1..2270))
|
||||
/label=Eco_contig10
|
||||
/map=1016.5-1031.4kb
|
||||
chromosome join(Eco_contig8,poly("n",22300),
|
||||
Eco_contig9,poly("n",14800),
|
||||
Eco_contig10)
|
||||
/label=Ecoli_chromosome
|
||||
|
||||
NOTES
|
||||
1) If the const DEBUG is set to true in the Pascal source code, getob
|
||||
writes messages to the standard output, indicating the progress of
|
||||
processing for each entry read in. By default, DEBUG=false.
|
||||
This feature is solely for debugging purposes and will be removed in
|
||||
later releases.
|
||||
|
||||
2) GETOB automatically expands leading blanks that have been
|
||||
compressed using splitdb -c. See splitdb.doc for more information.
|
||||
|
||||
SEE ALSO
|
||||
features, splitdb, getloc
|
||||
The DDBJ/EMBL/GenBank Feature Table: Definition, Version 1.04
|
||||
September 1, 1992
|
||||
GenBank Release Notes for Release 79.0.
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,83 @@
|
|||
|
||||
IDENTIFY update 3 Feb 94
|
||||
|
||||
|
||||
NAME
|
||||
identify - creates a file of locus names corresponding to lines
|
||||
found by grep in a GenBank annotation file.
|
||||
|
||||
SYNOPSIS
|
||||
identify grepfile indfile namefile findfile
|
||||
|
||||
DESCRIPTION
|
||||
grepfile is created using the Unix grep command to search a .ano
|
||||
file created by splitgb. For example, to find all lines containing
|
||||
the word 'chlorophyll' in plant.ano, use
|
||||
|
||||
grep -n -i 'chlorophyll' plant.ano > plant.grep
|
||||
|
||||
In the example shown, the -n option causes each line written to
|
||||
plant.grep to be preceeded by the number of that line in plant.ano.
|
||||
(The -i option causes grep to ignore case.) Identify can use the
|
||||
indfile do determine which entry a given numbered line was found
|
||||
in, and writes the corresponding LOCUS name to namefile. In
|
||||
addition, all lines found in a given entry are re-written to
|
||||
findfile without the line numbers, and preceeded by the LOCUS name
|
||||
for that entry.
|
||||
|
||||
EXAMPLES
|
||||
Suppose you wanted to obtain a list of names for all plant
|
||||
sequences which code for proteins. The task is complicated by the
|
||||
fact that many fungal sequences are included in the GenBank plant
|
||||
file. You could begin by searching plant.ano (containing all
|
||||
GenBank plant entries) for the word 'Planta':
|
||||
|
||||
grep -n 'Planta' plant.ano > Planta.grep
|
||||
|
||||
However, we want to eliminate all fungal sequences, as well as all
|
||||
sequences for RNAs other than mRNAs. If we create the file
|
||||
bad.str containing the keywords
|
||||
|
||||
Mycophyta
|
||||
tRNA
|
||||
rRNA
|
||||
uRNA
|
||||
|
||||
we can then type
|
||||
|
||||
grep -n -f bad.str plant.ano > bad.grep
|
||||
|
||||
bad.grep now contains all lines containing the offending keywords.
|
||||
We next use identify to find the names of the entries found by
|
||||
grep.
|
||||
|
||||
identify Planta.grep plant.ind Planta.nam Planta.fnd
|
||||
identify bad.grep plant.ind bad.nam bad.fnd
|
||||
|
||||
Next, we can use the Unix comm command to compare the two .nam
|
||||
files and produce an output file containing only names which are
|
||||
present in Planta.nam but not bad.nam:
|
||||
|
||||
comm -23 Planta.nam bad.nam > plants.nam
|
||||
|
||||
The file plants.nam now contains names of either plant cDNA or
|
||||
genomic sequences which do not code for structural RNAs.
|
||||
At this point, getloc could to create a sub-database containing
|
||||
only those entries listed in planta.nam. See documentation for
|
||||
getloc for a more detailed discussion.
|
||||
|
||||
SEE ALSO
|
||||
grep, fgrep, egrep, ngrep, comm, splitgb, getloc
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,23 @@
|
|||
;---------------------------------------------------------------------------
|
||||
; FINDKEY/GDE Keyword File Instructions
|
||||
;
|
||||
; 1. Type in one or more keywords below,
|
||||
; or
|
||||
; Place cursor at end of this file and choose 'Include File' in the FILE
|
||||
; menu to read in a file of keywords.
|
||||
;
|
||||
; 2. Choose 'Save Current File' in the File menu
|
||||
; 3. Quit this window
|
||||
;
|
||||
; FINDKEY will then perform the keyword search. YOU DON'T NEED TO EDIT
|
||||
; OUT THESE COMMENT LINES.
|
||||
;
|
||||
; NOTE: Put each keyword on a separate line
|
||||
; SAMPLE KEYWORD FILE:
|
||||
;
|
||||
; maize
|
||||
; corn
|
||||
; Z.mays
|
||||
; Zea
|
||||
;---------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
;---------------------------------------------------------------------------
|
||||
; FETCH/GDE Name/Accession File Instructions
|
||||
;
|
||||
; 1. Type in one or more LOCUS names or Accession #'s below,
|
||||
; or
|
||||
; Place cursor at end of this file and choose 'Include File' in the FILE
|
||||
; menu to read in a file of names or accession #'s.
|
||||
; or
|
||||
; Copy names or accession #'s from another window and Paste into this window.
|
||||
;
|
||||
; 2. Choose 'Save Current File' in the File menu
|
||||
; 3. Quit this window
|
||||
;
|
||||
; FETCH will then retrieve the data. YOU DON'T NEED TO EDIT
|
||||
; OUT THESE COMMENT LINES.
|
||||
;
|
||||
; NOTE: Put each name on a separate line
|
||||
; SAMPLE NAME/ACCESSION FILE:
|
||||
;
|
||||
; X30412
|
||||
; PSDRR1
|
||||
; PEADRRG
|
||||
;
|
||||
;---------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
;---------------------------------------------------------------------------
|
||||
; FEATURES/GDE Name File Instructions
|
||||
;
|
||||
; 1. Type in one or more GenBank LOCUS names below,
|
||||
; or
|
||||
; Place cursor at end of this file and choose 'Include File' in the FILE
|
||||
; menu to read in a file of names.
|
||||
;
|
||||
; (NOTE: File can not contain accession numbers.)
|
||||
;
|
||||
; 2. Choose 'Save Current File' in the File menu
|
||||
; 3. Quit this window
|
||||
;
|
||||
; FEATURES will then extract the appropriate sequences . YOU DON'T NEED TO EDIT
|
||||
; OUT THESE COMMENT LINES.
|
||||
;
|
||||
; NOTE: Put each name on a separate line
|
||||
; SAMPLE NAME FILE:
|
||||
;
|
||||
; PEADRRA
|
||||
; PSDRR1
|
||||
; PEADRRG
|
||||
;
|
||||
;---------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
printdoc update 3 Feb 94
|
||||
|
||||
NAME
|
||||
printdoc - prints documentation files
|
||||
|
||||
SYNOPSIS
|
||||
printdoc filename
|
||||
|
||||
DESCRIPTION
|
||||
printdoc uses the file extension to decide how to print a
|
||||
documentation file. If necessary, a filter such as pr or nroff
|
||||
is used to format the file before sending to the appropriate
|
||||
printer. A list of file extensions recognized by printdoc is
|
||||
given below. If no file extension is given, or the extension is
|
||||
not in the list, printdoc assumes .doc.
|
||||
|
||||
.doc - (default) Uses pr to print the text, using the default
|
||||
settings provided by pr (56 text lines per page plus a 5 line
|
||||
header and footer). Printing is at 12 cpi, front only. This works
|
||||
reasonbly well for most unformatted documentation files,
|
||||
provided that the line length doesn't exceed 80 char. This
|
||||
option assumes that a half-inch left margin is automatically
|
||||
provided by the printer.
|
||||
|
||||
.tex - Assumes that document is already pre-formatted. Thus,
|
||||
no headers or footers are provided, and it is assumed that
|
||||
the top and bottom of pages are padded with blanks or header/
|
||||
footer lines as needed. Form-feed characters (^L) may be
|
||||
included in the text to force page breaks.
|
||||
|
||||
.ps - Assumes file is in PostScript format. Sends it to the
|
||||
PostScript printer.
|
||||
|
||||
.nroff - Assumes file is formatted for use by nroff, using the
|
||||
standard macro set (nroff -ms).
|
||||
|
||||
.nroff.me - Assumes file is formatted for use by nroff, using the
|
||||
e macro set (nroff -me).
|
||||
|
||||
TRANSPORTATION NOTES
|
||||
For reasons which should be obvious, this script needs major
|
||||
rewriting at each site, since the available printers will
|
||||
be of different types and have different names.
|
||||
|
||||
SEE ALSO
|
||||
pr, pr(V), xlp, nroff
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
prot2nuc update 10 Aug 94
|
||||
|
||||
NAME
|
||||
prot2nuc - reverse translates protein into nucleic acid
|
||||
|
||||
SYNOPSIS
|
||||
prot2nuc [-ln -gn] < input > output
|
||||
|
||||
DESCRIPTION
|
||||
prot2nuc reads a file containing an amino acid sequence
|
||||
and writes the corresponding reverse translated nucleic acid
|
||||
sequence, using the standard IUPAC-IUB ambiguity codes to output.
|
||||
The amino acid sequence may contain internal stop '*' characters.
|
||||
That is, all legal amino acid characters will be processed.
|
||||
|
||||
-ln print n amino acids/codons per line. (default = 25)
|
||||
|
||||
-gn number the amino acid sequence every n amino acids/codons.
|
||||
(defalut = 5)
|
||||
|
||||
If l is not evenly divisible by g, the defaults are used.
|
||||
|
||||
input - If the first line of the file begins with '>' or ';',
|
||||
input will be read as the standard .wrp (Pearson) format,
|
||||
such as that produced by getob:
|
||||
|
||||
>name
|
||||
sequence lines
|
||||
|
||||
|
||||
Otherwise, it will be assumed that the file ONLY contains
|
||||
sequence, and all legal IUPAC/IUB DNA characters will be
|
||||
read as sequence.
|
||||
|
||||
output - The output begins with a header, listing the both
|
||||
1 and 3 letter amino acid codes [J. Biol. Chem. 243, 3557-3559
|
||||
(1968)], as well as the nucleic acid ambiguity codes [Cornish-
|
||||
Bowden (1985) Nucl. Acids Res. 13:3021-3030.]. The amino acid
|
||||
sequence, along with its reverse translation, are then printed on
|
||||
lines of l amino acids/codons, numbering every g amino acids/codons.
|
||||
Non-ambiguous nucleotides appear capitalized, while ambiguous
|
||||
nucleotides are in lowercase. A sample output file appears below:
|
||||
|
||||
PROT2NUC Version 8/10/94
|
||||
|
||||
IUPAC-IUP AMINO ACID SYMBOLS
|
||||
[J. Biol. Chem. 243, 3557-3559 (1968)]
|
||||
|
||||
Phe F Leu L Ile I
|
||||
Met M Val V Ser S
|
||||
Pro P Thr T Ala A
|
||||
Tyr Y His H Gln Q
|
||||
Asn N Lys K Asp D
|
||||
Glu E Cys C Trp W
|
||||
Arg R Gly G STOP *
|
||||
Asx B Glx Z UNKNOWN X
|
||||
|
||||
|
||||
IUPAC-IUB SYMBOLS FOR NUCLEOTIDE NOMENCLATURE
|
||||
[Cornish-Bowden (1985) Nucl. Acids Res. 13: 3021-3030.]
|
||||
|
||||
Symbol Meaning | Symbol Meaning
|
||||
------------------------------------+---------------------------------
|
||||
G Guanine | k G or T
|
||||
A Adenine | s G or C
|
||||
C Cytosine | w A or T
|
||||
T Thymine | h A or C or T
|
||||
U Uracil | b G or T or C
|
||||
r Purine (A or G) | v G or C or A
|
||||
y Pyrimidine (C or T) | d G or T or A
|
||||
m A or C | n G or A or T or C
|
||||
|
||||
pI39
|
||||
5 10 15 20
|
||||
M E K K S L A A L S F L L L L V L F V A
|
||||
ATGGArAArAArTCnCTnGCnGCnCTnTCnTTyCTnCTnCTnCTnGTnCTnTTyGTnGCn
|
||||
AGyTTr TTrAGy TTrTTrTTrTTr TTr
|
||||
|
||||
25 30 35 40
|
||||
Q E I V V T E A N T C E H L A D T Y R G
|
||||
CArGArAThGTnGTnACnGArGCnAAyACnTGyGArCAyCTnGCnGAyACnTAyCGnGGn
|
||||
TTr AGr
|
||||
|
||||
45 50 55 60
|
||||
V C F T N A S C D D H C K N K A H L I S
|
||||
GTnTGyTTyACnAAyGCnTCnTGyGAyGAyCAyTGyAArAAyAArGCnCAyCTnAThTCn
|
||||
AGy TTr AGy
|
||||
|
||||
65 70
|
||||
G T C H D W K C F C T Q N C
|
||||
GGnACnTGyCAyGAyTGGAArTGyTTyTGyACnCArAAyTGy
|
||||
|
||||
|
||||
With the Universal Genetic code, ambiguity symbols make it possible
|
||||
to represent all possible codons for an amino acid using two output
|
||||
lines. It is important to realize that the ambiguities on each line
|
||||
can not be combined. For example, CTn and TTr represent all codons for
|
||||
Leucine. However, attempting to combine them into a single triplet,
|
||||
yTn, would be incorrect. For example, TTT and TTC are codons for
|
||||
Phenylalanine, not Leucine.
|
||||
|
||||
FUTURE PLANS
|
||||
1. It wouldn't be hard to have the output printed as nucleic acid
|
||||
sequences in Perason format, so that the output could be read back
|
||||
into GDE. I don't know why you would want to do this, but it could
|
||||
be done.
|
||||
2. Right now, only the Universal Genetic Code is used, but it should
|
||||
be possible to read in alternative genetic codes, have prot2nuc
|
||||
figure out the ambiguity rules (as is already done in ribosome) and
|
||||
print out the appropriate ambiguous codons.
|
||||
3. It might be useful to have each possible codon printed out, rather
|
||||
than ambiguous codons. This would take up a lot more space and
|
||||
wouldn't be as pretty. If there's a lot of demand I could do this.
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
reform update 3 Feb 94
|
||||
|
||||
NAME
|
||||
reform - reformats multiply-aligned sequences for printing.
|
||||
|
||||
SYNOPSIS
|
||||
reform [-gpcnm] [-fx] [-sn] [-ln] [file {ralign only}]
|
||||
or
|
||||
ralign file parameters | reform [-gpcn] [-sn] [-ln] file
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
g Gaps are to be represented by dashes (-).
|
||||
p Bases which agree with the consensus are
|
||||
represented by periods (.).
|
||||
c Positions at which all sequences agree are
|
||||
capitalized in the consensus.
|
||||
n Sequence data is nucleic acid. Protein default
|
||||
fx Specify input file format, where x is
|
||||
r:RALIGN (default) p:PEARSON i:MBCRR-MASE (Intelligenetics)
|
||||
m Input file contains multiline format sequences already aligned,
|
||||
as opposed to ralign output. This option is obsolete, and is
|
||||
equivalent to -fp.
|
||||
ln The output linelength is set to n.
|
||||
Default is 70.
|
||||
sn numbering starts with n (default=0)
|
||||
|
||||
file Sequence file as described in ralign docu-
|
||||
mentation. reform needs to re-read the
|
||||
sequence file read by ralign to get the
|
||||
names of the sequences, which ralign ignores.
|
||||
This filename is only included for ralign output.
|
||||
If -m is set, file is ignored, and sequence names
|
||||
must be read from the input.
|
||||
|
||||
Note that positions in the consensus at which no nucleotide is in the
|
||||
majority are represented by n's (for nucleic acids) or x's (for proteins),
|
||||
rather than periods, as in ralign.
|
||||
|
||||
Gaps in the input sequences may be represented by either blanks or dashes.
|
||||
|
||||
INPUT FILE FORMATS
|
||||
|
||||
(a) ralign (default, -fr)
|
||||
As described in ralign documentation, the input file (which is assumed to
|
||||
be ralign output) must have each sequence on a single long line. All
|
||||
characters on a given line will be included in the alignment. All lines
|
||||
must be exactly the same length. For example, if ralign had been read
|
||||
sequence from a file called 'allcab.seq' and written output to 'allcab.ral',
|
||||
the following command might be used:
|
||||
|
||||
reform allcab.seq <allcab.ralign >allcab.ref
|
||||
|
||||
(b) Pearson (-fp, -m)
|
||||
Compatible with sequence files used by Pearson's fasta programs as shown:
|
||||
>name1
|
||||
sequence1
|
||||
>name2
|
||||
sequence2
|
||||
...
|
||||
>namen
|
||||
sequencen
|
||||
|
||||
Sequences may run over many lines and line length does not have to be
|
||||
uniform. However, both dashes ('-') and blanks (' ') will be read in
|
||||
as gaps in the alignment. A right arrow (>) at the beginning of a line
|
||||
indicates the name line at the beginning of a new sequence.
|
||||
|
||||
Any line beginning with a semicolon (';') will be considered a comment,
|
||||
and will be ignored.
|
||||
|
||||
(c) MBCRR-MASE (Intelligenetics) (-fi)
|
||||
Compatible with .mase files produced by MBCRR's mase and pima programs,
|
||||
which use the Intelligenetics format as shown:
|
||||
|
||||
;one or more comment lines
|
||||
name1
|
||||
sequence1
|
||||
;one or more comment lines
|
||||
name2
|
||||
sequence2
|
||||
...
|
||||
;one or more comment lines
|
||||
namen
|
||||
sequencen
|
||||
|
||||
Sequences may run over many lines and line length does not have to be
|
||||
uniform. However, both dashes ('-') and blanks (' ') will be read in
|
||||
as gaps in the alignment. Each sequence MUST begin with at least one
|
||||
comment line. When a comment line is encountered, that signals the
|
||||
beginning of a new sequence. The first line after the comment is read
|
||||
as the name, and the sequence begins on the next line after that.
|
||||
|
||||
SEE ALSO ralign, mase
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,84 @@
|
|||
ribosome update 3 Feb 94
|
||||
|
||||
NAME
|
||||
ribosome - translates nucleic acid into protein
|
||||
|
||||
SYNOPSIS
|
||||
ribosome [-g gcfile] < input > output
|
||||
|
||||
DESCRIPTION
|
||||
ribosome reads a file of one or more nucleic acid sequences
|
||||
and writes the corresponding amino acid sequence, in the standard
|
||||
one letter code, to output. Ribosome begins translating at the
|
||||
first nucleotide in each input sequence and continues to the end.
|
||||
If the length of the translated sequence is not divisible by 3,
|
||||
ribosome pads the final codon with N's and attempts to use ambi-
|
||||
guity rules to translate the final codon. Based on the genetic
|
||||
code used, ribosome derives a set of rules to resolve all ambi-
|
||||
guities that can possibly be resolved.
|
||||
|
||||
-g read in an alternative genetic code from gcfile. If this
|
||||
option is not specified, ribosome uses the universal
|
||||
genetic code.
|
||||
|
||||
gcfile - This file specifies an alternative genetic code. An
|
||||
example is shown below. ribosome reads the first 64 legal
|
||||
capital letters as amino acids. Consequently, lowercase letters
|
||||
can be used for annotation purposes, as shown in the example.
|
||||
All non-amino acid characters are ignored.
|
||||
|
||||
sgc2 - yeast mitochondrial genetic code
|
||||
|
||||
second position
|
||||
first position ------------------------------- third position
|
||||
(5' end) u c a g (3' end)
|
||||
-----------------------------------------------------------------
|
||||
u F S Y C u
|
||||
F S Y C c
|
||||
L S * W a
|
||||
L S * W g
|
||||
-----------------------------------------------------------------
|
||||
c T P H R u
|
||||
T P H R c
|
||||
T P Q R a
|
||||
T P Q R g
|
||||
-----------------------------------------------------------------
|
||||
a I T N S u
|
||||
I T N S c
|
||||
M T K R a
|
||||
M T K R g
|
||||
-----------------------------------------------------------------
|
||||
g V A D G u
|
||||
V A D G c
|
||||
V A E G a
|
||||
V A E G g
|
||||
|
||||
|
||||
input - If the first line of the file begins with '>' or ';',
|
||||
input will be read as the standard .wrp (Pearson) format,
|
||||
such as that produced by getob:
|
||||
|
||||
>name
|
||||
; one or more comment lines (optional)
|
||||
sequence lines
|
||||
|
||||
|
||||
Otherwise, it will be assumed that the file ONLY contains
|
||||
sequence, and all legal IUPAC/IUB DNA characters will be
|
||||
read as sequence.
|
||||
|
||||
SEE ALSO
|
||||
getob
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,66 @@
|
|||
shuffle.doc update 3 Feb 94
|
||||
|
||||
SYNOPSIS
|
||||
shuffle -sn [-wn -on]
|
||||
|
||||
DESCRIPTION
|
||||
Shuffles sequences locally. See Lipman DJ, Wilbur WJ, Smith TF
|
||||
and Waterman MS (1984) On the statistical significance of nucleic
|
||||
acid similarities. Nucl. Acids Res. 12:215-226.
|
||||
-sn n is a random integer between 0 and 32767. This number
|
||||
must be provided for each run.
|
||||
|
||||
-wn n is an integer, indicating the width of the window for
|
||||
random localization. If w exceeds the length of a sequence,
|
||||
or is negative, the entire sequence is scrambled as a single
|
||||
window. This is also the case if w is not specified.
|
||||
|
||||
-on n is an integer, indicating the number of nucleotides
|
||||
overlap between adjacent windows. It should never exceed
|
||||
the window size. o defaults to 0 if not specified.
|
||||
|
||||
If w and o are specified, overlapping windows of w nucleotides
|
||||
are shuffled, thus preserving the local characteristic base
|
||||
composition. Windows overlap by o nucleotides.
|
||||
If w and o are not specified, each sequence is shuffled globally,
|
||||
thus preserving the overall base composition, but not the local
|
||||
variations in comp.
|
||||
|
||||
Any number of sequences may be processed from a single input
|
||||
file. In Pearson-format files, each new sequence begins with a
|
||||
'>' comment line, indicating the name and a short description of
|
||||
the sequence.
|
||||
|
||||
No distinction is made between protein or nucleic acid sequences.
|
||||
That is, shuffle will read any of the following characters as
|
||||
sequence:
|
||||
|
||||
T,U,C,A,G,N,R,Y,M,W,S,K,D,H,V,B,L,Z,F,P,E,I,Q,X,*,-
|
||||
|
||||
where '*' is the result of translating a stop codon, and '-'
|
||||
is a gap generated during sequence alignment. Lowercase is
|
||||
also accepted.
|
||||
|
||||
EXAMPLE
|
||||
A sample output file is shown below. Note that the first two
|
||||
lines of output are comment lines, listing the version of the
|
||||
program and the parameters used in the run.
|
||||
|
||||
>SHUFFLE VERSION 11/ 8/93
|
||||
>RANDOM SEED: 9873 WINDOW: 12 OVERLAP: 3
|
||||
>BAZFAZ - Borborigmus azerbi F-actin-zeta gene
|
||||
ctgagtagctagtcctaaatagttagtccatagtactagtacgggtcgtt
|
||||
cacccttgggcagtg.....(etc.)
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,141 @@
|
|||
|
||||
SPLITDB update 28 Mar 98
|
||||
|
||||
|
||||
NAME
|
||||
splitdb - split GenBank files into annotation, sequence, and index
|
||||
|
||||
SYNOPSIS
|
||||
splitdb [-gepvlct] dbfile anofile seqfile indfile
|
||||
|
||||
DESCRIPTION
|
||||
Splitdb splits a database (dbfile) among three files: anofile, seqfile
|
||||
and indfile. Splitdb ignores any header information that might be in the
|
||||
file and begins processing at the first entry.
|
||||
|
||||
anofile contains the annotation portion of each entry. Entries are
|
||||
terminated with '//' or '///' (PIR only). Trailing blanks present in
|
||||
dbfile are omitted in anofile.
|
||||
|
||||
seqfile contains the sequence data for each entry. Each sequence
|
||||
entry begins with a header line, followed by sequence data on
|
||||
succeeding lines of 75 characters per line. The header line
|
||||
includes the header flag character '>' in column 1, followed by the
|
||||
name, followed by the first 50 characters of the 1st
|
||||
DEFINITION line. An example is shown below:
|
||||
|
||||
>UNHOR1 - Unicorn horn protein 1, complete cDNA sequence
|
||||
attcctctatagtctattctagctagccaaataggttagatggctgtcttactacttacgc
|
||||
...
|
||||
|
||||
Removal of blanks and numbers from sequence lines makes makes split
|
||||
datasets about 8-9% smaller than the original GenBank files.
|
||||
|
||||
indfile is an index which tells the line numbers for each entry in
|
||||
anofile and seqfile. It is assumed to be in alphabetical order by
|
||||
name. Each line contains a name and accession number, followed by the
|
||||
line numbers on which the annotation and sequence data begin in anofile
|
||||
and seqfile, respectively. Thus the file plants.ind might contain:
|
||||
|
||||
|
||||
A15660 TA156608 1 1
|
||||
A15671 A15671 33 11
|
||||
A15673 A15673 65 25
|
||||
A15675 AK156751 97 36
|
||||
A15677 BA156770 128 46
|
||||
A16780 BA167807 160 57
|
||||
A16782 A16782 192 70
|
||||
ATHRPRP1C GM905105 225 83
|
||||
etc...
|
||||
|
||||
Note that indfile is a perfectly legitimate .nam file, for use with
|
||||
programs such as getloc, getob, or comm.
|
||||
|
||||
|
||||
The following options identify the type of database being read:
|
||||
|
||||
-g GenBank (default)
|
||||
-e EMBL
|
||||
-p PIR (NBRF)
|
||||
-v Vecbase
|
||||
-l LiMB
|
||||
|
||||
Other options:
|
||||
-c Compress 3 or more leading blanks in annotation lines
|
||||
to take the form <CRUNCHFLAG><CRUNCHCHAR>, where CRUNCHFLAG
|
||||
is the ASCII character specified by the Pascal const
|
||||
CRUNCHOFFSET, which is set to 33 ("!") in the current
|
||||
implementation. For each annotation line read, if the
|
||||
number of leading blanks is >=3, splitdb sets CRUNCHCHAR
|
||||
to CRUNCHOFFSET+the number of blanks. Thus, for lines
|
||||
with 3, 4, or 5 leading blanks, CRUNCHCHAR would be
|
||||
'$', '%' and '&', respectively. GETLOC and GETOB
|
||||
automatically expand crunched blanks when CRUNCHFLAG
|
||||
is encountered on an input line. Empiracle observations
|
||||
indicate that the -c option decreases the size of
|
||||
GenBank files by about 10%.
|
||||
|
||||
This compression method may fail when the number of
|
||||
leading blanks exceeds 127-CRUNCHOFFSET. However,
|
||||
none of the above mentioned databases currently
|
||||
supports any datafield with anywhere near that number
|
||||
of leading blanks.
|
||||
|
||||
-t (GenBank only) Append all information in the first
|
||||
ORGANISM to the end of each line in indfile. For example,
|
||||
the entry which begins:
|
||||
|
||||
LOCUS GORMTDLOOZ 282 bp DNA UNA 11-MAR-1996
|
||||
DEFINITION GGGOMT493; Gorilla gorilla gorilla (BomBom, ISIS 438, Audubon
|
||||
Zoological Gardens) mitochondrial D-loop DNA.
|
||||
ACCESSION L76759
|
||||
NID g1222584
|
||||
KEYWORDS D-loop.
|
||||
SOURCE Mitochondrion Gorilla gorilla gorilla (individual_isolate BomBom,
|
||||
ISIS 438, Audubon Zoological Gardens, sub_species gorilla) male
|
||||
DNA.
|
||||
ORGANISM Mitochondrion Gorilla gorilla gorilla
|
||||
Eukaryotae; mitochondrial eukaryotes; Metazoa; Chordata;
|
||||
Vertebrata; Eutheria; Primates; Catarrhini; Hominidae; Gorilla.
|
||||
|
||||
might be indexed as
|
||||
|
||||
GORMTDLOOZ L76759 1 1 Mitochondrion Gorilla gorilla gorilla
|
||||
|
||||
This is useful for taxonomic studies, or as a way of making
|
||||
it easy to create subsets from a single index. Thus,
|
||||
'grep gorilla primates.ind' would print all lines in the
|
||||
file that contained the word gorilla. The output from
|
||||
this command could be used as a .nam file for extracting
|
||||
just gorilla sequences from a larger dataset using
|
||||
fetch.
|
||||
|
||||
|
||||
NOTES
|
||||
1. Header lines that aren't part of entries are automatically
|
||||
stripped out during processing. For example, in a file containing
|
||||
GenBank entries, all lines up to the first occurrence of 'LOCUS'
|
||||
starting in column 1, are ignored. Similarly for PIR, processing
|
||||
begins on the first line containing 'ENTRY' beginning in column 1.
|
||||
2. GenBank/EMBL/DDBJ entries created on or after Feb. 1, 1996,
|
||||
have accession numbers of 8 characters, rather than 6. Previously
|
||||
assigned accession numbers will remain at 6 characters. Splitdb has
|
||||
been updated to write all accession numbers to the .ind file, left
|
||||
justified in a field of 8 characters, in columns 14-21 of the .ind
|
||||
file.
|
||||
|
||||
SEE ALSO
|
||||
getloc, getob, comm(1) (Unix command).
|
||||
|
||||
AUTHOR
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB Canada R3T 2N2
|
||||
Phone: 204-474-6085
|
||||
FAX: 204-261-5732
|
||||
frist@cc.umanitoba.ca
|
||||
|
||||
REFERENCE
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
|
@ -0,0 +1,125 @@
|
|||
|
||||
|
||||
XYLEM.DOC update 10 Aug 1994
|
||||
|
||||
XYLEM: TOOLS FOR MANIPULATION OF GENETIC DATABASES
|
||||
Brian Fristensky, University of Manitoba
|
||||
|
||||
Fristensky, B. (1993) Feature expressions: creating and manipulating
|
||||
sequence datasets. Nucleic Acids Research 21:5997-6003.
|
||||
|
||||
SPLITDB - Splits files containing one or more GenBank entries into
|
||||
annotation, sequence, and index files. Indexfiles can also serve as
|
||||
namefiles for GETLOC. Sequence files are in the format required for
|
||||
use with the Pearson programs (FASTA,LFASTA etc.).
|
||||
|
||||
GETLOC - Reads a file containing LOCUS names (namefile) and
|
||||
retrieves either annotation, sequence, or both from a split
|
||||
database or database subset created by SPLITDB.
|
||||
|
||||
FETCH - A c-shell script that provides a convenient menu-driven
|
||||
front end for retrieval of database entries using GETLOC.
|
||||
|
||||
FINDKEY - A c-shell script that provides a convenient menu-driven
|
||||
front end for keyword searches of database annotation files,
|
||||
using IDENTIFY.
|
||||
|
||||
IDENTIFY- Given line-numbered output from grep, IDENTIFY uses the
|
||||
index file to determine which entries contained the keywords
|
||||
searched for by grep. It then produces a namefile for use by
|
||||
GETLOC. Namefiles can serve as logical databases, and utilities
|
||||
such as the Unix comm command can perform logical operations on
|
||||
these namefiles to produce database subsets.
|
||||
|
||||
FEATURES/GETOB - Given a namefile, pulls objects (mRNA, tRNA, CDS
|
||||
etc.) from each of the named entries, using the new
|
||||
DDBJ/EMBL/GenBank International Features Table Format. A future
|
||||
version will also allow the annotation of sites within objects that
|
||||
are extracted.
|
||||
|
||||
DBSTAT - Calculates amino acid frequencies in a protein database.
|
||||
|
||||
RIBOSOME - Given a file of one or more nucleic acids (eg. output
|
||||
from GETOB) , RIBOSOME translates them into protein, using either
|
||||
the universal genetic code or an alternative genetic code supplied
|
||||
by the user. All ambiguities that can be resolved are translated.
|
||||
|
||||
PROT2NUC - reverse translates a sequence from protein to nucleic
|
||||
acid, using IUPAC-IUB ambiguity codes.
|
||||
|
||||
SHUFFLE - Given a random seed, shuffles each sequence in a Pearson-
|
||||
format (.wrp) file. Shuffling is done locally in overlapping windows
|
||||
across the length of a given sequence. The window size and overlap
|
||||
length can be specified by the user.
|
||||
|
||||
REFORM - Reformats multiply aligned nucleic acid or protein
|
||||
sequences for publication. Output for M. Waterman's RALIGN
|
||||
program, or the MBCRR MASE editor, can be directly used as input.
|
||||
A variety of options are available for representing gaps, consensus
|
||||
sequences and other features.
|
||||
|
||||
Fristensky (Cornell) Sequence Analysis Package - General purpose
|
||||
sequence analysis package written in Standard Pascal. Features
|
||||
include: sequence numbering, formatting, & translation, restriction
|
||||
site searches & mapping, matrix similarity searches, TESTCODE
|
||||
analysis, base composition analysis. All programs are interactive
|
||||
and read free-format, BIONET, and GenBank files.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
XYLEM DATABASE TOOLS
|
||||
|
||||
|
||||
|
||||
----------
|
||||
| .gen | getloc
|
||||
|----------|<--------------------------
|
||||
| GenBank | |
|
||||
---------- |
|
||||
| |
|
||||
| splitgb |
|
||||
/|\ |
|
||||
/ | \ |
|
||||
/ | \ |
|
||||
/ | \ |
|
||||
/ | \ |
|
||||
/ | \ |
|
||||
v v v |
|
||||
---------- ---------- ---------- |
|
||||
| .ano | | .wrp | | .ind | |
|
||||
|----------| |----------| |----------| |
|
||||
|annotation| | sequence | | index | |
|
||||
---------- ---------- ---------- |
|
||||
| \ | / |
|
||||
| \ | / |
|
||||
| \ | / |
|
||||
| \ | / |
|
||||
grep -n | \ | / |
|
||||
| \ | / |
|
||||
| | |
|
||||
| | -------------------------------+
|
||||
| ^ |
|
||||
v | getob |
|
||||
---------- ---------- v
|
||||
| .grep | identify | .nam | ----------
|
||||
|----------| --------->|----------| | .wrp |
|
||||
| numbered | | LOCUS | ----------
|
||||
|file lines| ---------- | eg. mRNA |
|
||||
---------- | ^ | tRNA |
|
||||
| | | rRNA |
|
||||
| | | CDS |
|
||||
--comm-- ----------
|
||||
(logical operations on
|
||||
sets of names)
|
||||
|
||||
Dr. Brian Fristensky
|
||||
Dept. of Plant Science
|
||||
University of Manitoba
|
||||
Winnipeg, MB R3T 2N2 CANADA
|
||||
204-474-6085
|
||||
frist@cc.umanitoba.ca
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,331 @@
|
|||
#include <stdio.h>
|
||||
#include "global_defs.h"
|
||||
#include <malloc.h>
|
||||
|
||||
/*
|
||||
* Alloc.c
|
||||
* Memory functions for Harvard Genome Laboratory.
|
||||
* Last revised 6/3/91
|
||||
*
|
||||
* Print error message, and die
|
||||
*/
|
||||
void ErrorOut(code,string)
|
||||
int code;
|
||||
char *string;
|
||||
{
|
||||
if (code == 0)
|
||||
{
|
||||
fprintf(stderr,"Error:%s\n",string);
|
||||
exit(1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Calloc count*size bytes with memory aligned to size.
|
||||
* Return pointer to new block.
|
||||
*/
|
||||
char *Calloc(count,size)
|
||||
int count,size;
|
||||
/*unsigned count,size;*/
|
||||
{
|
||||
char *temp;
|
||||
temp = calloc(count,(unsigned)size);
|
||||
|
||||
if(count*size == 0)
|
||||
fprintf(stderr,"Allocate ZERO blocks?\n");
|
||||
ErrorOut(temp,"Cannot allocate memory");
|
||||
return(temp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Reallocate memory at block, expand to size.
|
||||
* Return pointer to (possibly) new block.
|
||||
*/
|
||||
char *Realloc(block,size)
|
||||
char *block;
|
||||
unsigned size;
|
||||
{
|
||||
char *temp;
|
||||
temp=realloc(block,size);
|
||||
ErrorOut(temp,"Cannot change memory size");
|
||||
return(temp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free block Allocated by Calloc.
|
||||
* Return error code from free().
|
||||
*/
|
||||
|
||||
void Cfree(block)
|
||||
char* block;
|
||||
{
|
||||
extern void Warning();
|
||||
if(block != NULL)
|
||||
{
|
||||
#ifdef SUN4
|
||||
if(free(block) == 0)
|
||||
Warning("Error in Cfree...");
|
||||
#endif
|
||||
}
|
||||
/* else
|
||||
Warning("Error in Cfree, NULL block");
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Print Warning message to stderr.
|
||||
*/
|
||||
void Warning(s)
|
||||
char *s;
|
||||
{
|
||||
fprintf(stderr,"Warning:%s\n",s);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get array element from a sequence structure. The index
|
||||
* is relative to the alignment.
|
||||
*/
|
||||
char GetElem(seq,indx)
|
||||
Sequence *seq; /*Sequence to search*/
|
||||
int indx; /*Index relative to the global offset*/
|
||||
{
|
||||
if((indx<seq->offset) || (indx >= seq->offset + seq->seqlen))
|
||||
return('-');
|
||||
else
|
||||
return((char)(seq->c_elem[indx-seq->offset]));
|
||||
}
|
||||
|
||||
/*
|
||||
* Replace the array element at seq[indx] with elem. The index
|
||||
* is relative to the alignment.
|
||||
*/
|
||||
|
||||
void ReplaceElem(seq,indx,elem)
|
||||
Sequence *seq; /*Sequence */
|
||||
int indx; /*Position to overwrite (replace) */
|
||||
unsigned char elem; /*Character to replace with */
|
||||
{
|
||||
int j;
|
||||
extern char *Calloc();
|
||||
int width;
|
||||
|
||||
/*
|
||||
* If no c_elem has been allocated yet...
|
||||
*/
|
||||
/* if(index("abcdefghijklmnopqrstuvwxyz-0123456789",elem)==0)
|
||||
fprintf(stderr,"Warning (ReplaceElem) elem = %c\n",elem);
|
||||
*/
|
||||
width = seq->offset-indx;
|
||||
if(seq->seqlen == 0 && elem != '-')
|
||||
{
|
||||
if(seq->seqmaxlen == 0 || seq->c_elem == NULL)
|
||||
{
|
||||
seq->c_elem = Calloc(4,sizeof(char));
|
||||
seq->offset = indx;
|
||||
seq->seqmaxlen = 4;
|
||||
}
|
||||
seq->seqlen = 1;
|
||||
seq->c_elem[0] = elem;
|
||||
seq->offset = indx;
|
||||
}
|
||||
/*
|
||||
* If inserting before the c_elem (< offset)
|
||||
*/
|
||||
else if((indx<seq->offset) && (elem!='-'))
|
||||
{
|
||||
seq->seqmaxlen += width;
|
||||
seq->c_elem = Realloc(seq->c_elem,seq->seqmaxlen*sizeof(char));
|
||||
for(j=seq->seqmaxlen-1;j>=width;j--)
|
||||
seq->c_elem[j] = seq->c_elem[j-width];
|
||||
for(j=0;j<width;j++)
|
||||
seq->c_elem[j] = '-';
|
||||
seq->c_elem[0] = elem;
|
||||
seq->seqlen += width;
|
||||
seq->offset = indx;
|
||||
}
|
||||
/*
|
||||
* if inserting after c_elem (indx > offset + seqlen)
|
||||
*/
|
||||
else if((indx>=seq->offset+seq->seqlen) && (elem!='-'))
|
||||
{
|
||||
if(indx-seq->offset >= seq->seqmaxlen)
|
||||
{
|
||||
seq->seqmaxlen = indx-seq->offset+256;
|
||||
seq->c_elem = Realloc(seq->c_elem,seq->seqmaxlen*
|
||||
sizeof(char));
|
||||
}
|
||||
for(j=seq->seqlen;j<seq->seqmaxlen;j++)
|
||||
seq->c_elem[j] = '-';
|
||||
seq->c_elem[indx-seq->offset] = elem;
|
||||
seq->seqlen = indx-seq->offset+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(indx-(seq->offset)>=0 && indx-(seq->offset)<seq->seqlen)
|
||||
seq->c_elem[indx-(seq->offset)] = elem;
|
||||
else if(elem!='-')
|
||||
fprintf(stderr,"%c better be a -\n",elem);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* InsertElem is a modification of InsertElems, and should be
|
||||
* optimized. s.s.5/6/91
|
||||
*/
|
||||
int InsertElem(a,b,ch)
|
||||
Sequence *a; /* Sequence */
|
||||
int b; /*Position to insert BEFORE*/
|
||||
char ch; /*element to insert */
|
||||
{
|
||||
char c[2];
|
||||
c[0]=ch;
|
||||
c[1] = '\0';
|
||||
|
||||
return (InsertElems(a,b,c));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Make a copy of Sequence one, place in Sequence two
|
||||
*/
|
||||
void SeqCopy(one,two)
|
||||
Sequence *one,*two;
|
||||
{
|
||||
int j;
|
||||
*two = *one;
|
||||
if(two->seqmaxlen)
|
||||
two->c_elem = Calloc(one->seqmaxlen,sizeof(char));
|
||||
if(two->commentsmaxlen)
|
||||
two->comments = Calloc(one->commentsmaxlen,sizeof(char));
|
||||
for(j=0;j<one->seqlen;j++)
|
||||
two->c_elem[j] = one->c_elem[j];
|
||||
for(j=0;j<one->commentslen;j++)
|
||||
two->comments[j] = one->comments[j];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Normalize seq (remove leading indels in the c_elem;
|
||||
*/
|
||||
void SeqNormal(seq)
|
||||
Sequence *seq;
|
||||
{
|
||||
int len,j,shift_width,trailer;
|
||||
char *c_elem;
|
||||
len = seq->seqlen;
|
||||
|
||||
c_elem = seq->c_elem;
|
||||
|
||||
if(len == 0) return;
|
||||
|
||||
for(shift_width=0; (shift_width<len) && (c_elem[shift_width] == '-');
|
||||
shift_width++);
|
||||
|
||||
for(j=0;j<len-shift_width;j++)
|
||||
c_elem[j] = c_elem[j+shift_width];
|
||||
|
||||
seq->seqlen -= shift_width;
|
||||
seq->offset += shift_width;
|
||||
for(trailer=seq->seqlen-1;(c_elem[trailer] =='-' ||
|
||||
c_elem[trailer] == '\0') && trailer>=0;
|
||||
trailer--)
|
||||
c_elem[trailer] = '\0';
|
||||
seq->seqlen = trailer+1;
|
||||
return;
|
||||
}
|
||||
|
||||
void SeqRev(seq,min,max)
|
||||
Sequence *seq;
|
||||
int min,max;
|
||||
/*
|
||||
SeqRev will reverse a given sequence within a window from
|
||||
min to max (inclusive). The idea is to allow several sequences
|
||||
to be reversed in such a manner as to allow them to remain aligned.
|
||||
|
||||
BEFORE AFTER
|
||||
min | | max min | |max
|
||||
aaaacccgggttt tttgggcccaaaa
|
||||
aaa-cccg-g ---g-gccc-aaa
|
||||
----cccgggt --tgggccc
|
||||
*/
|
||||
{
|
||||
int j;
|
||||
char temp1,temp2;
|
||||
extern char GetElem();
|
||||
extern void ReplaceElem();
|
||||
|
||||
for(j=0;j<= (max-min)/2;j++)
|
||||
{
|
||||
temp1 = GetElem(seq,min+j);
|
||||
temp2 = GetElem(seq,max-j);
|
||||
ReplaceElem(seq,min+j,(unsigned char)temp2);
|
||||
ReplaceElem(seq,max-j,(unsigned char)temp1);
|
||||
}
|
||||
|
||||
seq->direction *= -1;
|
||||
|
||||
SeqNormal(seq);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* sequence complementing. */
|
||||
void SeqComp(seq)
|
||||
Sequence *seq;
|
||||
{
|
||||
int j;
|
||||
unsigned char in,out,case_bit;
|
||||
char *c;
|
||||
static int tmatr[16] = {'-','a','c','m','g','r','s','v',
|
||||
't','w','y','h','k','d','b','n'};
|
||||
|
||||
static int matr[128] = {
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0x01,0x0e,0x02,0x0d,0,0,0x04,0x0b,0,0,0x0c,0,0x03,0x0f,0,0x05,0,0x05,0x06,
|
||||
0x08,0x08,0x07,0x09,0x00,0x0a,0,0,0,0,0,0,0,0x01,0x0e,0x02,0x0d,0,0,0x04,
|
||||
0x0b,0,0,0x0c,0,0x03,0x0f,0,0x05,0,0x05,0x06,0x08,0x08,0x07,0x09,0x00,0x0a,
|
||||
0,0,0,0,0x00,0
|
||||
};
|
||||
|
||||
c = seq->c_elem;
|
||||
for(j=0;j<seq->seqlen;j++)
|
||||
{
|
||||
/*
|
||||
* Save Case bit...
|
||||
*/
|
||||
case_bit = c[j] & 32;
|
||||
out = 0;
|
||||
in = matr[c[j]];
|
||||
if(in&1)
|
||||
out|=8;
|
||||
if(in&2)
|
||||
out|=4;
|
||||
if(in&4)
|
||||
out|=2;
|
||||
if(in&8)
|
||||
out|=1;
|
||||
|
||||
if(case_bit == 0)
|
||||
c[j] = toupper(tmatr[out]);
|
||||
else
|
||||
c[j] = tmatr[out];
|
||||
}
|
||||
|
||||
seq->direction *= -1;
|
||||
seq->strandedness = ( seq->strandedness == 2)?1:
|
||||
( seq->strandedness == 1)?2:
|
||||
0;
|
||||
return;
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,27 @@
|
|||
#ifndef _GLOBAL_DEFS_H
|
||||
#define _GLOBAL_DEFS_H
|
||||
#include "global_defs.h"
|
||||
#endif
|
||||
|
||||
main()
|
||||
{
|
||||
Sequence tSeq;
|
||||
int ii, jj, rr;
|
||||
char acgt[128];
|
||||
|
||||
for(ii = 0; ii < 128; ii++)
|
||||
acgt[ii] = '0';
|
||||
|
||||
acgt[0x41] = acgt[0x43] = acgt[0x47] = acgt[0x54] = acgt[0x55] = '1';
|
||||
acgt[0x61] = acgt[0x63] = acgt[0x67] = acgt[0x74] = acgt[0x75] = '1';
|
||||
|
||||
while((rr = ReadRecord(stdin, &tSeq)) != -1)
|
||||
{
|
||||
strcpy(tSeq.type, "MASK");
|
||||
for(ii = 0; ii < tSeq.seqlen; ii++)
|
||||
{
|
||||
tSeq.c_elem[ii] = acgt[tSeq.c_elem[ii]];
|
||||
}
|
||||
WriteRecord(stdout, tSeq, NULL, 0);
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,703 @@
|
|||
/*
|
||||
Copyright (c) 1989-1990, University of Illinois board of trustees. All
|
||||
rights reserved. Written by Michael Maciukenas at the Center for Prokaryote
|
||||
Genome Analysis. Design and implementation guidance by Steven Smith, Carl
|
||||
Woese.
|
||||
*/
|
||||
/* File picker by Mike Maciukenas
|
||||
** Allows the user to search up and down the directory tree, and choose a
|
||||
** file.
|
||||
** "Open" descends down into a directory, or chooses a file (depending ** on what is selected). The user may also press return after choosing
|
||||
** a file or directory, to do the same thing.
|
||||
** "Up Dir" ascends to the parent directory.
|
||||
** "Cancel" cancels the operation.
|
||||
** The user may also type a directory into the "Directory:" field. When the
|
||||
** user presses return (or tab, or newline), the contents of the new directory
|
||||
** will be shown.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <xview/textsw.h>
|
||||
#include <xview/xview.h>
|
||||
#include <xview/panel.h>
|
||||
#include <xview/canvas.h>
|
||||
#include <xview/scrollbar.h>
|
||||
#include <xview/rectlist.h>
|
||||
#include <xview/notice.h>
|
||||
#include <xview/font.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
#define GBUFSIZ 256 /* buffer size, remove when adding to Steve's code */
|
||||
|
||||
#define FL_VIEW_H 15 /* # of files to show in one page, originally */
|
||||
|
||||
|
||||
/* structure for a linked list that allows sorting of filenames */
|
||||
typedef struct namedata {char *FileN; /* file name */
|
||||
int type; /* flag: 1 if directory '/'
|
||||
** 2 if executable '*'
|
||||
** 3 if symbolic link '@'
|
||||
** 4 if socket '='
|
||||
** 0 if normal */
|
||||
struct namedata *Next; /* next in list */
|
||||
} NameData;
|
||||
|
||||
Frame fl_getframe = XV_NULL; /* frame, is set to XV_NULL by free_mem(),
|
||||
** load_file() checks this to see if it should
|
||||
** destroy an existing frame */
|
||||
Scrollbar fl_scroll; /* the scrollbar for the file list canvas */
|
||||
Canvas fl_FileList; /* the file list canvas */
|
||||
Panel_item fl_DirText; /* the text item that displays the directory */
|
||||
Panel fl_Getpanel; /* the panel, contains buttons, and DirText */
|
||||
GC fl_gc; /* gc to use for drawing file names, just the default GC with
|
||||
** the frame's font copied in. */
|
||||
int fl_current_picked, fl_current_len; /* the current item picked in the file
|
||||
** list, and the current number of items
|
||||
** in the file list */
|
||||
int fl_cell_h, fl_width, fl_ascent; /* the height of the font, the width of the
|
||||
** canvas, and the default ascent of the
|
||||
** font, all used for drawing into the file
|
||||
** list canvas */
|
||||
Xv_opaque data;
|
||||
|
||||
extern int set_offset, *matrix;
|
||||
/* extern BuildMatrix(); */
|
||||
|
||||
NameData *fl_start; /* the root node for the linked list of filenames */
|
||||
|
||||
Frame load_file(Parentframe, x, y, passdata)
|
||||
/* pick a file for loading. */
|
||||
Frame Parentframe;
|
||||
int x, y;
|
||||
Xv_opaque passdata;
|
||||
{
|
||||
|
||||
/* callback procedures */
|
||||
int fl_open_btn_lf(), fl_up_dir_btn(), lf_cancel_btn();
|
||||
void fl_show_list_lf();
|
||||
void fl_list_select_lf();
|
||||
Panel_setting fl_dir_typed();
|
||||
/* interposed destroy function */
|
||||
Notify_value fl_free_mem();
|
||||
|
||||
char dirname[GBUFSIZ];
|
||||
Display *display;
|
||||
Xv_screen screen;
|
||||
int screen_no;
|
||||
Xv_Font font;
|
||||
XFontStruct *font_data;
|
||||
|
||||
data=passdata;
|
||||
|
||||
/* create the frame */
|
||||
fl_getframe = xv_create(Parentframe, FRAME,
|
||||
FRAME_LABEL, "Choose File",
|
||||
FRAME_SHOW_RESIZE_CORNER, FALSE,
|
||||
XV_X, x,
|
||||
XV_Y, y,
|
||||
NULL);
|
||||
notify_interpose_destroy_func(fl_getframe, fl_free_mem);
|
||||
|
||||
/* get font characteristics */
|
||||
font = xv_get(fl_getframe, XV_FONT);
|
||||
fl_cell_h = xv_get(font, FONT_DEFAULT_CHAR_HEIGHT);
|
||||
fl_width = 50*xv_get(font, FONT_DEFAULT_CHAR_WIDTH);
|
||||
font_data = (XFontStruct *)xv_get(font, FONT_INFO);
|
||||
fl_ascent = font_data->ascent;
|
||||
|
||||
/* create the panel and panel buttons */
|
||||
fl_Getpanel = xv_create(fl_getframe, PANEL,
|
||||
NULL);
|
||||
(void) xv_create(fl_Getpanel, PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING, "Open",
|
||||
PANEL_NOTIFY_PROC, fl_open_btn_lf,
|
||||
NULL);
|
||||
(void) xv_create(fl_Getpanel, PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING, "Up Dir",
|
||||
PANEL_NOTIFY_PROC, fl_up_dir_btn,
|
||||
NULL);
|
||||
(void) xv_create(fl_Getpanel, PANEL_BUTTON,
|
||||
PANEL_LABEL_STRING, "Cancel",
|
||||
PANEL_NOTIFY_PROC, lf_cancel_btn,
|
||||
NULL);
|
||||
/* create the "Directory:" field, initialized to the current working dir */
|
||||
getcwd(dirname, GBUFSIZ);
|
||||
fl_DirText = xv_create(fl_Getpanel, PANEL_TEXT,
|
||||
PANEL_LABEL_STRING,"Directory:",
|
||||
XV_X, xv_col(fl_Getpanel, 0),
|
||||
XV_Y, xv_row(fl_Getpanel, 1),
|
||||
PANEL_VALUE_STORED_LENGTH, GBUFSIZ,
|
||||
PANEL_VALUE_DISPLAY_LENGTH, 30,
|
||||
PANEL_VALUE, dirname,
|
||||
PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
|
||||
PANEL_NOTIFY_STRING, "\n\r\t",
|
||||
PANEL_NOTIFY_PROC, fl_dir_typed,
|
||||
NULL);
|
||||
|
||||
window_fit(fl_Getpanel);
|
||||
|
||||
/* create the file list canvas, below the above panel */
|
||||
fl_FileList = xv_create(fl_getframe, CANVAS,
|
||||
XV_X, 0,
|
||||
WIN_BELOW, fl_Getpanel,
|
||||
XV_WIDTH, fl_width,
|
||||
XV_HEIGHT, FL_VIEW_H*fl_cell_h+7,
|
||||
CANVAS_REPAINT_PROC, fl_show_list_lf,
|
||||
CANVAS_AUTO_EXPAND, FALSE,
|
||||
CANVAS_AUTO_SHRINK, FALSE,
|
||||
CANVAS_WIDTH, fl_width,
|
||||
CANVAS_HEIGHT, fl_cell_h,
|
||||
CANVAS_RETAINED, FALSE,
|
||||
OPENWIN_AUTO_CLEAR, FALSE,
|
||||
NULL);
|
||||
fl_scroll = xv_create(fl_FileList, SCROLLBAR,
|
||||
SCROLLBAR_DIRECTION, SCROLLBAR_VERTICAL,
|
||||
SCROLLBAR_PIXELS_PER_UNIT, fl_cell_h,
|
||||
SCROLLBAR_VIEW_LENGTH, fl_view_h(),
|
||||
SCROLLBAR_PAGE_LENGTH, fl_view_h(),
|
||||
NULL);
|
||||
xv_set(canvas_paint_window(fl_FileList),
|
||||
WIN_EVENT_PROC, fl_list_select_lf,
|
||||
WIN_CONSUME_EVENTS, WIN_MOUSE_BUTTONS, LOC_DRAG, WIN_ASCII_EVENTS, NULL,
|
||||
NULL);
|
||||
xv_set(fl_Getpanel, XV_WIDTH, xv_get(fl_FileList, XV_WIDTH), NULL);
|
||||
|
||||
/* set up the gc for drawing into the file list */
|
||||
display = (Display *)xv_get(fl_getframe, XV_DISPLAY);
|
||||
screen = (Xv_screen)xv_get(fl_getframe, XV_SCREEN);
|
||||
screen_no = (int)xv_get(screen, SCREEN_NUMBER);
|
||||
fl_gc = XCreateGC(display, RootWindow(display, screen_no),
|
||||
0, NULL);
|
||||
XCopyGC(display, DefaultGC(display, DefaultScreen(display)),
|
||||
0xFFFFFFFF, fl_gc);
|
||||
XSetFont(display, fl_gc, xv_get(font, XV_XID));
|
||||
/*
|
||||
* Added S.Smith 2/5/91
|
||||
*/
|
||||
XSetForeground(display,fl_gc,BlackPixel(display,DefaultScreen(display)));
|
||||
XSetBackground(display,fl_gc,WhitePixel(display,DefaultScreen(display)));
|
||||
|
||||
|
||||
/* set up the extra trailing node for the linked list, makes insertion
|
||||
** into the list easier */
|
||||
fl_start = (NameData *)calloc(1, sizeof(NameData));
|
||||
fl_start->FileN = (char *)NULL;
|
||||
fl_start->Next = NULL;
|
||||
|
||||
/* make the list, showing files in the application`s current directory
|
||||
*/
|
||||
(void) fl_make_list();
|
||||
|
||||
window_fit(fl_getframe);
|
||||
xv_set(fl_getframe, XV_SHOW, TRUE, NULL);
|
||||
return(fl_getframe);
|
||||
}
|
||||
|
||||
|
||||
int fl_open_btn_lf(item, event)
|
||||
/* callback procedure for the open button. If it's a directory, switch to
|
||||
** the new directory, otherwise return the filename
|
||||
*/
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
int i, end, r;
|
||||
char namebuf[GBUFSIZ], thestr[GBUFSIZ];
|
||||
NameData *current;
|
||||
Frame top_frame;
|
||||
|
||||
if(fl_current_picked != -1) /* then an item is selected. Work with it */
|
||||
{
|
||||
/* find item in list */
|
||||
current = fl_start;
|
||||
for(i=0; i<fl_current_picked; i++)
|
||||
current = current->Next;
|
||||
strcpy(namebuf, current->FileN);
|
||||
if(current->type == 1) /* then it's a directory, so switch to it */
|
||||
{
|
||||
if(fl_checkdir(namebuf))
|
||||
{
|
||||
chdir(namebuf);
|
||||
(void) fl_make_list();
|
||||
fl_set_dirtext(fl_DirText);
|
||||
return XV_OK;
|
||||
}
|
||||
}
|
||||
else /* it's a file name, so return it */
|
||||
{
|
||||
if(fl_checkdir(xv_get(fl_DirText, PANEL_VALUE))) /* then valid dir */
|
||||
{
|
||||
if(current->type != 0) /* then it's not a regular file, so strip off
|
||||
** the extra type character: *, =, /, or @ */
|
||||
namebuf[strlen(namebuf)-1]='\0';
|
||||
/* create the file string (with full directory path) */
|
||||
getcwd(thestr, GBUFSIZ);
|
||||
if(thestr[strlen(thestr)-1] != '/')
|
||||
strcat(thestr, "/");
|
||||
strcat(thestr, namebuf);
|
||||
|
||||
/* call load data procedure. */
|
||||
|
||||
top_frame = (Frame) xv_get(
|
||||
(Frame) xv_get(
|
||||
(Panel) xv_get(item,XV_OWNER),
|
||||
XV_OWNER),
|
||||
XV_OWNER);
|
||||
|
||||
xv_set(top_frame, FRAME_LABEL, thestr, NULL);
|
||||
|
||||
/********
|
||||
if(strcmp(thestr+(strlen(thestr)-3), "GDE") == 0)
|
||||
{
|
||||
LoadGDEData(thestr);
|
||||
set_offset = 0;
|
||||
}
|
||||
else if(strcmp(thestr+(strlen(thestr)-3), "HGL") == 0)
|
||||
{
|
||||
*********/
|
||||
if((r = LoadHGLData(thestr)) == -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
set_offset = r;
|
||||
/********
|
||||
}
|
||||
else
|
||||
printf("File format unknown. Should be .HGL or .GDE \n");
|
||||
********/
|
||||
|
||||
/*
|
||||
rect = (Rect *)xv_get(canvas,CANVAS_VIEWABLE_RECT,view_win);
|
||||
XClearArea(display,xwin,
|
||||
rect->r_left, rect->r_top,
|
||||
rect->r_width, rect->r_height,
|
||||
0);
|
||||
(void)xv_set(view_win,
|
||||
CANVAS_HEIGHT, max_lines*max_pbl+margin,
|
||||
CANVAS_WIDTH, max_dots/min_scale+margin,
|
||||
NULL);
|
||||
*/
|
||||
xv_destroy_safe(fl_getframe);
|
||||
return XV_OK;
|
||||
}
|
||||
else
|
||||
{ /* invalid directory, so show notice*/
|
||||
int result;
|
||||
Panel panel = (Panel)xv_get(fl_FileList, PANEL_PARENT_PANEL);
|
||||
|
||||
result = notice_prompt(panel, NULL,
|
||||
NOTICE_MESSAGE_STRINGS, "Invalid Directory specified.", NULL,
|
||||
NOTICE_FOCUS_XY, event_x(event), event_y(event),
|
||||
NOTICE_BUTTON_YES, "Change Directory",
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int fl_up_dir_btn(item, event)
|
||||
/* go up one directory */
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
char dirname[GBUFSIZ];
|
||||
|
||||
/* pretty simple, just go up, show it, and change the "Directory:" field */
|
||||
(void) chdir("..");
|
||||
(void) fl_make_list();
|
||||
fl_set_dirtext(fl_DirText);
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
Panel_setting fl_dir_typed(item, event)
|
||||
/* handle when user types return, newline, or tab in the "Directory:" field.
|
||||
** if it's a valid directory, it moves to it, otherwise, display a notice
|
||||
*/
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
int error;
|
||||
char dirname[GBUFSIZ];
|
||||
|
||||
switch (event_action(event))
|
||||
{
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '\t':
|
||||
{
|
||||
if(fl_checkdir(xv_get(fl_DirText, PANEL_VALUE)))
|
||||
{ /* valid directory, chdir to it and show it */
|
||||
chdir(xv_get(fl_DirText, PANEL_VALUE));
|
||||
fl_make_list();
|
||||
fl_set_dirtext(fl_DirText);
|
||||
}
|
||||
else
|
||||
{ /* invalid directory, so show notice */
|
||||
int result;
|
||||
Panel panel = (Panel)xv_get(fl_FileList, PANEL_PARENT_PANEL);
|
||||
|
||||
result = notice_prompt(panel, NULL,
|
||||
NOTICE_MESSAGE_STRINGS, "Invalid Directory specified.", NULL,
|
||||
NOTICE_FOCUS_XY, event_x(event), event_y(event),
|
||||
NOTICE_BUTTON_YES, "Change Directory",
|
||||
NULL);
|
||||
}
|
||||
return PANEL_NONE;
|
||||
};
|
||||
/* if it wasn't \n, \t, or \r, pass event on to standard
|
||||
** panel_text handler
|
||||
*/
|
||||
default:
|
||||
return(panel_text_notify(item, event));
|
||||
}
|
||||
}
|
||||
|
||||
int lf_cancel_btn(item, event)
|
||||
/* handle the cancel button. Just destroys the frame and returns
|
||||
*/
|
||||
Panel_item item;
|
||||
Event *event;
|
||||
{
|
||||
|
||||
LoadHGLData("");
|
||||
xv_destroy_safe(fl_getframe);
|
||||
return XV_OK;
|
||||
}
|
||||
|
||||
fl_readln(file, buf)
|
||||
FILE *file;
|
||||
char *buf;
|
||||
{
|
||||
int i;
|
||||
int ch;
|
||||
|
||||
ch = getc(file);
|
||||
if(ch==EOF)
|
||||
{
|
||||
buf[0]='\0';
|
||||
return;
|
||||
}
|
||||
i=0;
|
||||
do
|
||||
{
|
||||
buf[i++]=ch;
|
||||
ch = getc(file);
|
||||
} while(ch!='\n');
|
||||
buf[i]='\0';
|
||||
}
|
||||
|
||||
int fl_make_list()
|
||||
/* Creates a list of files, out of the current working directory. It then
|
||||
** tells the file list canvas to refresh itself. The list sits attached to
|
||||
** fl_start, for reading by the show_list() routine.
|
||||
*/
|
||||
{
|
||||
FILE *dirp; /* for directory data */
|
||||
int i, list_len, cur_pos;
|
||||
char dirname[GBUFSIZ], tempbuf[GBUFSIZ];
|
||||
NameData *current, *temp; /* structures for reading
|
||||
** and sorting file names */
|
||||
int notdone;
|
||||
struct stat statbuf; /* for checking if a file
|
||||
** name is a directory */
|
||||
int pid = getpid(); /* for creation of temp
|
||||
** file for directory list */
|
||||
char tmpcmd[GBUFSIZ]; /* for holding ls command */
|
||||
char tmpname[GBUFSIZ]; /* for holding file names */
|
||||
|
||||
|
||||
getcwd(dirname, GBUFSIZ);
|
||||
sprintf(tmpcmd, "cd %s;ls -aF > /usr/tmp/.svlffil%d", dirname, pid);
|
||||
sprintf(tmpname, "/usr/tmp/.svlffil%d", pid);
|
||||
system(tmpcmd);
|
||||
dirp = fopen(tmpname, "r");
|
||||
if (dirp == NULL) /* just a check to make sure */
|
||||
{
|
||||
fprintf(stderr, "fl_make_list was passed bad directory name\n");
|
||||
return(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* free up the old list, to build a new one */
|
||||
for(current = fl_start; current->FileN != (char *)NULL; i++)
|
||||
{
|
||||
temp = current;
|
||||
current = current->Next;
|
||||
free(temp->FileN);
|
||||
free(temp);
|
||||
};
|
||||
/* set up the linked list for sorting */
|
||||
fl_start = (NameData *)calloc(1, sizeof(NameData));
|
||||
fl_start->FileN = (char *)NULL;
|
||||
fl_start->Next = NULL;
|
||||
/* read through the directory entries */
|
||||
list_len = 0;
|
||||
for(fl_readln(dirp, tempbuf); tempbuf[0] != '\0'; fl_readln(dirp, tempbuf))
|
||||
{
|
||||
/* don't include "." and ".." in the list */
|
||||
if((strcmp(tempbuf,"./")!=0)&&
|
||||
(strcmp(tempbuf,"../")!=0))
|
||||
{
|
||||
/* find the right spot in the list to insert the new name */
|
||||
current = fl_start;
|
||||
notdone = 1;
|
||||
while(notdone)
|
||||
if(current->FileN == NULL)
|
||||
notdone = 0;
|
||||
else if(strcmp(tempbuf, current->FileN)>0)
|
||||
current = current->Next;
|
||||
else
|
||||
notdone = 0;
|
||||
/* insert the new name */
|
||||
temp = (NameData *)calloc(1, sizeof(NameData));
|
||||
temp->FileN = current->FileN;
|
||||
temp->type = current->type;
|
||||
temp->Next = current->Next;
|
||||
++list_len;
|
||||
current->Next = temp;
|
||||
/* set flag for file type */
|
||||
switch(tempbuf[strlen(tempbuf)-1])
|
||||
{
|
||||
case '/': /* directory */
|
||||
{
|
||||
current->type = 1;
|
||||
break;
|
||||
}
|
||||
case '@': /* symbolic link */
|
||||
{
|
||||
current->type = 3;
|
||||
break;
|
||||
}
|
||||
case '=': /* socket */
|
||||
{
|
||||
current->type = 4;
|
||||
break;
|
||||
}
|
||||
case '*': /* executable */
|
||||
{
|
||||
current->type = 2;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
current->type = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
current->FileN = (char *)calloc(1, strlen(tempbuf)+1);
|
||||
strcpy(current->FileN,tempbuf);
|
||||
};
|
||||
}
|
||||
fclose(dirp);
|
||||
sprintf(tmpcmd, "rm %s", tmpname);
|
||||
system(tmpcmd);
|
||||
|
||||
/* adjust the Canvas size, and refresh it */
|
||||
fl_current_len = list_len;
|
||||
cur_pos = xv_get(fl_scroll, SCROLLBAR_VIEW_START);
|
||||
xv_set(fl_FileList, CANVAS_HEIGHT,
|
||||
(list_len+fl_view_h()+1)*fl_cell_h,
|
||||
NULL);
|
||||
/* scrollbars bomb with zero-length objects */
|
||||
if(list_len == 0) ++list_len;
|
||||
/* reset scrollbar */
|
||||
xv_set(fl_scroll, SCROLLBAR_VIEW_START, 0,
|
||||
SCROLLBAR_OBJECT_LENGTH, list_len,
|
||||
NULL);
|
||||
/* refresh canvas */
|
||||
wmgr_refreshwindow(canvas_paint_window(fl_FileList));
|
||||
fl_current_picked = -1;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
fl_set_dirtext(fl_DirText)
|
||||
/* sets the "Directory:" field according to the current directory
|
||||
** fl_DirText is the Xview pointer to the fl_DirText Panel Item
|
||||
*/
|
||||
Panel_item fl_DirText;
|
||||
{
|
||||
char dirbuf[GBUFSIZ];
|
||||
|
||||
getcwd(dirbuf, GBUFSIZ);
|
||||
xv_set(fl_DirText, PANEL_VALUE, dirbuf, NULL);
|
||||
|
||||
}
|
||||
|
||||
int fl_checkdir(dirname)
|
||||
/* check if a directory can be opened. directory can be specified by
|
||||
** full root name or by current name. returns true if it can be opened.
|
||||
*/
|
||||
char *dirname;
|
||||
{
|
||||
DIR *dirp;
|
||||
|
||||
dirp = opendir(dirname);
|
||||
if(dirp == NULL) /* not available, user cannot enter */
|
||||
return(0);
|
||||
else
|
||||
{
|
||||
closedir(dirp); /* must close it */
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
void fl_show_list_lf(canvas, paint_window, repaint_area)
|
||||
/* repaint procedure for the file list canvas. Repaints all file names in
|
||||
** the damaged area */
|
||||
Canvas canvas;
|
||||
Xv_Window paint_window;
|
||||
Rectlist *repaint_area;
|
||||
{
|
||||
NameData *current;
|
||||
int i;
|
||||
int start_draw, end_draw;
|
||||
Display *dpy;
|
||||
Window xwin;
|
||||
|
||||
|
||||
/* make sure AUTO_CLEAR is off, this routine will do it itself */
|
||||
while(xv_get(fl_FileList, OPENWIN_AUTO_CLEAR)!=FALSE)
|
||||
{
|
||||
fprintf(stderr, "lf:found bug--OPENWIN_AUTO_CLEAR still TRUE");
|
||||
xv_set(fl_FileList, OPENWIN_AUTO_CLEAR, FALSE, NULL);
|
||||
}
|
||||
/* make sure RETAINED is off, this routine will repaint itself */
|
||||
while(xv_get(fl_FileList, CANVAS_RETAINED)!=FALSE)
|
||||
{
|
||||
fprintf(stderr, "lf:found bug--CANVAS_RETAINED still TRUE");
|
||||
xv_set(fl_FileList, CANVAS_RETAINED, FALSE, NULL);
|
||||
}
|
||||
/* get display and window */
|
||||
dpy = (Display *)xv_get(paint_window, XV_DISPLAY);
|
||||
xwin = (Window)xv_get(paint_window, XV_XID);
|
||||
|
||||
/* clear the area given us by Xview, for simplicity, we clear the
|
||||
** smallest rectangle that encloses all of the destroyed areas, the
|
||||
** rl_bound rectangle */
|
||||
XClearArea(dpy, xwin,
|
||||
repaint_area->rl_bound.r_left,
|
||||
repaint_area->rl_bound.r_top,
|
||||
repaint_area->rl_bound.r_width,
|
||||
repaint_area->rl_bound.r_height,
|
||||
0);
|
||||
/* the next 3 lines calculate which file names must be drawn, by where the
|
||||
** top and bottom of the rl_bound rectangle lie */
|
||||
start_draw = repaint_area->rl_bound.r_top;
|
||||
end_draw = (repaint_area->rl_bound.r_height + start_draw - 1) / fl_cell_h;
|
||||
start_draw = (start_draw - 1) / fl_cell_h;
|
||||
|
||||
/* find the first element to draw in the list */
|
||||
current = fl_start;
|
||||
for(i = 0; (i<start_draw) && (current->Next != NULL); i++)
|
||||
current = current->Next;
|
||||
/* now start drawing them */
|
||||
for(; (i<=end_draw) && (current->Next != NULL); i++)
|
||||
{
|
||||
XDrawString(dpy, xwin, fl_gc, 5, i*fl_cell_h+fl_ascent, current->FileN,
|
||||
strlen(current->FileN));
|
||||
/* add a box if we are drawing the currently picked one */
|
||||
if(i==fl_current_picked)
|
||||
{
|
||||
XDrawRectangle(dpy, xwin, fl_gc,
|
||||
2, i*fl_cell_h,
|
||||
xv_get(canvas, XV_WIDTH)-11-xv_get(fl_scroll, XV_WIDTH),
|
||||
fl_cell_h);
|
||||
}
|
||||
current = current->Next;
|
||||
}
|
||||
}
|
||||
|
||||
void fl_list_select_lf(paint_window, event)
|
||||
/* callback procedure for events that happen in the file list canvas. Checks
|
||||
** mouse button press or drag, and for when the user types return */
|
||||
Xv_window paint_window;
|
||||
Event *event;
|
||||
{
|
||||
int picked, cur_pos;
|
||||
Window xwin = (Window)xv_get(paint_window, XV_XID);
|
||||
Display *dpy;
|
||||
|
||||
dpy = (Display *)xv_get(paint_window, XV_DISPLAY);
|
||||
/* get the current position of the scrollbar for future reference */
|
||||
cur_pos = xv_get(fl_scroll, SCROLLBAR_VIEW_START);
|
||||
|
||||
/* first, check for user picking a file name */
|
||||
if((event_action(event) == ACTION_SELECT)||
|
||||
(event_action(event) == LOC_DRAG))
|
||||
{
|
||||
picked = (event_y(event) - 1) / fl_cell_h;
|
||||
/* make sure the file picked is on screen. if it is not,
|
||||
** we just ignore it. this avoids wierd stuff, like being
|
||||
** able to pick files that aren't shown on screen */
|
||||
if((picked >= cur_pos)&&
|
||||
(picked < cur_pos+fl_view_h())&&
|
||||
(picked < fl_current_len))
|
||||
{
|
||||
/* efficiency: ignore if it is already picked */
|
||||
if(picked != fl_current_picked)
|
||||
{
|
||||
XSetFunction(dpy, fl_gc, GXclear);
|
||||
XDrawRectangle(dpy, xwin, fl_gc,
|
||||
2, fl_current_picked*fl_cell_h,
|
||||
xv_get(fl_FileList, XV_WIDTH)-11-
|
||||
xv_get(fl_scroll, XV_WIDTH),
|
||||
fl_cell_h);
|
||||
XSetFunction(dpy, fl_gc, GXcopy);
|
||||
XDrawRectangle(dpy, xwin, fl_gc,
|
||||
2, picked*fl_cell_h,
|
||||
xv_get(fl_FileList, XV_WIDTH)-11-
|
||||
xv_get(fl_scroll, XV_WIDTH),
|
||||
fl_cell_h);
|
||||
fl_current_picked = picked;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* user may have pressed return, then just call the open button
|
||||
** callback procedure. PANEL_FIRST_ITEM gets the pointer to the
|
||||
** open button itself, since it happens to be the first item on
|
||||
** the panel. fl_open_btn doesn't really use this parameter, but
|
||||
** just in case it ever does, we include it. */
|
||||
else if((event_is_ascii(event))&&(event_action(event) == '\r'))
|
||||
fl_open_btn_lf(xv_get(fl_Getpanel, PANEL_FIRST_ITEM), event);
|
||||
else
|
||||
return;
|
||||
}
|
||||
int fl_view_h()
|
||||
/* returns the current height (in # of file names displayed) of the file list */
|
||||
{
|
||||
return (((int)xv_get(fl_FileList, XV_HEIGHT))/fl_cell_h);
|
||||
}
|
||||
|
||||
Notify_value
|
||||
fl_free_mem(client, status)
|
||||
/* clean up when the frame is destroyed. Frees up the memory used in the
|
||||
** linked list of file names, and sets the Frame variable (getframe) to null */
|
||||
Notify_client client;
|
||||
Destroy_status status;
|
||||
{
|
||||
NameData *current, *temp;
|
||||
int i;
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case DESTROY_CHECKING:
|
||||
return NOTIFY_DONE;
|
||||
case DESTROY_CLEANUP:
|
||||
{
|
||||
for(current = fl_start; current->FileN != (char *)NULL; i++)
|
||||
{
|
||||
temp = current;
|
||||
current = current->Next;
|
||||
free(temp->FileN);
|
||||
free(temp);
|
||||
};
|
||||
fl_getframe = XV_NULL;
|
||||
return notify_next_destroy_func(client, status);
|
||||
}
|
||||
default:
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,178 @@
|
|||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include "global_defs.h"
|
||||
|
||||
main(ac,av)
|
||||
int ac;
|
||||
char *av[];
|
||||
{
|
||||
Sequence cons; /* master alignment */
|
||||
Sequence *master; /* Current Walking sets to add */
|
||||
int cursize, maxsize = 10, ii;
|
||||
char str[2], cons_type;
|
||||
FILE *file, *consout_fp, *maskout_fp;
|
||||
int conserved_color, variable_color, partial_color, major_perc;
|
||||
|
||||
if(ac == 1)
|
||||
{
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
"%s %s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
|
||||
av[0],
|
||||
"sequence-file",
|
||||
"[-iupac] IUPAC consensus. Default",
|
||||
"[-majority percent] Majority consensus (default percent: 75)",
|
||||
"[-maskv colorv] Variable position color",
|
||||
"[-maskc colorc] Conserved position color",
|
||||
"[-maskp colorp] Partially conserved color",
|
||||
"[-consout output-consensus] Default: stdout",
|
||||
"[-maskout output-mask]");
|
||||
exit (0);
|
||||
}
|
||||
|
||||
InitRecord(&cons);
|
||||
|
||||
if((file = fopen(av[1],"r")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "Can't open sequence-file %s.\n", av[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
master = (Sequence*)Calloc(maxsize,sizeof(Sequence));
|
||||
|
||||
cursize = 0;
|
||||
while(ReadRecord(file,&(master[cursize])) != -1)
|
||||
{
|
||||
SeqNormal(&master[cursize]);
|
||||
if(++cursize == maxsize)
|
||||
{
|
||||
maxsize *= 2;
|
||||
master = (Sequence*)
|
||||
Realloc(master, maxsize*sizeof(Sequence));
|
||||
}
|
||||
|
||||
master[cursize].group_number = 99999;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
|
||||
cons_type = ' '; /* 'i':IUPAC, 'm':majority, 'k':mask */
|
||||
consout_fp = stdout;
|
||||
maskout_fp = NULL;
|
||||
conserved_color = 8; /* black */
|
||||
variable_color = 3; /* red */
|
||||
|
||||
ii = 2;
|
||||
while(ii < ac)
|
||||
{
|
||||
if(strcmp(av[ii], "-iupac") == 0)
|
||||
{
|
||||
cons_type = 'i';
|
||||
}
|
||||
else if(strcmp(av[ii], "-majority") == 0)
|
||||
{
|
||||
cons_type = 'm';
|
||||
ii++;
|
||||
major_perc = atoi(av[ii]);
|
||||
}
|
||||
else if(strcmp(av[ii], "-maskv") == 0)
|
||||
{
|
||||
variable_color = atoi(av[++ii]);
|
||||
if(cons_type == ' ')
|
||||
cons_type = 'k';
|
||||
}
|
||||
else if(strcmp(av[ii], "-maskc") == 0)
|
||||
{
|
||||
conserved_color = atoi(av[++ii]);
|
||||
if(cons_type == ' ')
|
||||
cons_type = 'k';
|
||||
}
|
||||
else if(strcmp(av[ii], "-maskp") == 0)
|
||||
{
|
||||
partial_color = atoi(av[++ii]);
|
||||
if(cons_type == ' ')
|
||||
cons_type = 'k';
|
||||
}
|
||||
else if(strcmp(av[ii], "-consout") == 0)
|
||||
{
|
||||
if((consout_fp = fopen(av[++ii], "w")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "Can't open output file %s.\n",av[ii]);
|
||||
consout_fp = stdout;
|
||||
}
|
||||
}
|
||||
else if(strcmp(av[ii], "-maskout") == 0)
|
||||
{
|
||||
if((maskout_fp = fopen(av[++ii], "w")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "Can't open output file %s.\n",av[ii]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Invalid flag %s\n", av[ii]);
|
||||
}
|
||||
ii++;
|
||||
}
|
||||
|
||||
if(cons_type == ' ')
|
||||
cons_type = 'i';
|
||||
|
||||
if(cons_type != 'k')
|
||||
{
|
||||
if(maskout_fp != NULL)
|
||||
{
|
||||
/* Useful only when output to GDE. */
|
||||
fprintf(maskout_fp, "length:%d\n", cons.seqlen);
|
||||
fprintf(maskout_fp, "start:\n");
|
||||
}
|
||||
|
||||
if((cons_type == 'i' &&
|
||||
MakeConsensus(master,cursize,&cons,0,cons_type)==FALSE) ||
|
||||
(cons_type == 'm' &&
|
||||
MajorityCons(master,cursize,&cons,0, major_perc) == FALSE))
|
||||
{
|
||||
fprintf(stderr, "Failed to make consensus.\n");
|
||||
exit(1);
|
||||
}
|
||||
WriteRecord(consout_fp, &cons, NULL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(MakeScore(master,cursize,&cons,0) == FALSE)
|
||||
{
|
||||
fprintf(stderr, "Failed to make consensus.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*WriteRecord(stdout, &cons, NULL, 0);
|
||||
printf("\n\n");*/
|
||||
|
||||
if(maskout_fp == NULL)
|
||||
{
|
||||
maskout_fp = stdout;
|
||||
}
|
||||
|
||||
fprintf(maskout_fp, "length:%d\n", cons.seqlen);
|
||||
fprintf(maskout_fp, "start:\n");
|
||||
|
||||
for(ii = 0; ii < cons.seqlen; ii++)
|
||||
{
|
||||
switch(cons.c_elem[ii])
|
||||
{
|
||||
case 'F':
|
||||
fprintf(maskout_fp, "%d\n", partial_color);
|
||||
break;
|
||||
case 'E':
|
||||
fprintf(maskout_fp, "%d\n", conserved_color);
|
||||
break;
|
||||
default:
|
||||
fprintf(maskout_fp, "%d\n", variable_color);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(consout_fp);
|
||||
fclose(maskout_fp);
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
CC = cc
|
||||
#FLAGS = -g
|
||||
OPENWINHOME = /usr/openwin
|
||||
MFILE =
|
||||
INCDIR = -I$(OPENWINHOME)/include
|
||||
LIBDIR = -L$(OPENWINHOME)/lib
|
||||
LIBS = -lxview -lolgx -lX11
|
||||
|
||||
libs.o = Alloc.o HGLfuncs.o
|
||||
|
||||
all: mapview MakeCons Consto01mask PrintStrat Translate heapsortHGL DotPlotTool
|
||||
|
||||
Alloc.o: Alloc.c
|
||||
$(CC) $(FLAGS) -c Alloc.c
|
||||
|
||||
HGLfuncs.o: HGLfuncs.c
|
||||
$(CC) $(FLAGS) -c HGLfuncs.c
|
||||
|
||||
MAP_ChooseFile.o: MAP_ChooseFile.c
|
||||
$(CC) $(FLAGS) -c MAP_ChooseFile.c $(INCDIR)
|
||||
|
||||
mapview: mapview.c MAP_ChooseFile.o $(libs.o)
|
||||
$(CC) $(FLAGS) -o $@ $@.c MAP_ChooseFile.o $(libs.o) $(INCDIR) $(LIBDIR) $(LIBS)
|
||||
|
||||
DotPlotTool: DotPlotTool.c MAP_ChooseFile.o $(libs.o)
|
||||
$(CC) $(FLAGS) -o $@ $@.c MAP_ChooseFile.o $(libs.o) \
|
||||
$(INCDIR) $(LIBDIR) $(LIBS)
|
||||
|
||||
MakeCons: MakeCons.c $(libs.o) $(MKFILE)
|
||||
$(CC) $(FLAGS) -o $@ $@.c $(libs.o)
|
||||
|
||||
Translate: Translate.c $(libs.o) $(MKFILE)
|
||||
$(CC) $(FLAGS) -o $@ $@.c $(libs.o)
|
||||
|
||||
heapsortHGL: heapsortHGL.c $(libs.o) $(MKFILE)
|
||||
$(CC) $(FLAGS) -o $@ $@.c $(libs.o)
|
||||
|
||||
PrintStrat: PrintStrat.c $(libs.o) $(MKFILE)
|
||||
$(CC) $(FLAGS) -o $@ $@.c $(libs.o)
|
||||
|
||||
Consto01mask: Consto01mask.c $(libs.o) $(MKFILE)
|
||||
$(CC) $(FLAGS) -o $@ $@.c $(libs.o)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue