From: Jim Procter Date: Mon, 14 Dec 2020 19:58:34 +0000 (+0000) Subject: Merge branch 'Jalview-JS/develop' into merge_js_develop X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=586ade46bdcd05ff028a1cff82c3c527326d28ec;hp=54f6fe32b978af0932428981a56c9960b0df44a7 Merge branch 'Jalview-JS/develop' into merge_js_develop also patched new code from JAL-3690 refactorings --- diff --git a/doc/addingWebClient.md b/doc/addingWebClient.md new file mode 100644 index 0000000..0d0ee1d --- /dev/null +++ b/doc/addingWebClient.md @@ -0,0 +1,68 @@ +# How to add a web service backend to Jalview's web services UI + +### Document Status: *Work in progress !* + +There are two phases to services. + + *Discovery* threads are started by jalview.gui.Desktop (or other UI components or the CLI if they are headless services accessible via commandline). Your service discovery thread registers discovered instances so they can be accessed by the user. + + *Access* most services are accessed by selecting a menu item, option, or specifying a nickname for the service instance as a Jalview command line parameter. Different access patterns are used for the various services: seqeunce data source, sequence feature annotation source, multiple sequence alignment, multiple alignment annotation source, etc. There should be no need for your code to create UI components (if there is then Jalview's UI needs to be refactored to avoid this). + +## Discovery + +*jalview.gui.Desktop* +- start a discovery thread to discover services provided by your framework. The discoverer should generate a list of objects that either implement WsMenuEntryProviderI or provide another mechanism to add themselves to Jalview's menus (via jalview.gui.AlignFrame.BuildWebServiceMenu() below) + +*jalview.gui.AlignFrame* +- BuildWebServiceMenu() + This method creates a runnable that's called when the available set of web services changes (e.g. when a discovery thread completes). Add code to the Runnable's run method to create Menu Items in the web services menu via jalview.ws.WSMenuEntryProviderI instances generated by your discoverer. + + +## Types of service + +### Services that create new alignments or windows, optionally with a progress log + +The pattern for these services requires a Client that initates a thread which creates, and montors one or more jobs based on input data. + +jalview.ws.MsaWSClient -- currently does double duty with Jaba services for alignment analysis and instantiation of alignment services. + +jalview.ws.gui.MSAThread -- UI model and controller for a running MSA service. Instantiated with an instance of jalview.ws.MultipleSequenceAlignmentI provided by the service endpoint factory. + + +## Other classes of interest + +### jalview.ws.api + +Interfaces and base classes to be implemented and used by a service endpoint. + + jalview.ws.api.CancellableI.java - implement if the service is cancellable + jalview.ws.api.JalviewWebServiceI.java - base service interface + jalview.ws.api.JobId.java - a timestamped job id that can be saved in a Jalview project + +#### submission interfaces +jalview.ws.api.MsaI.java +jalview.ws.api.MsaWithGuideTreeI.java + + +#### result interfaces +jalview.ws.api.MsaResultI.java +jalview.ws.api.TreeResultI.java +jalview.ws.api.DistanceMatrixResultI.java + + +#### minimal composed interfaces for a complete functional analysis + +jalview.ws.api.MultipleSequenceAlignmentI.java + + +#### base class for a service endpoint instance - to be materialised by service discoverers + +jalview.ws.api.UIinfo.java - basic information +jalview.ws.api.ServiceWithParameters.java + +jalview.ws.api.JalviewServiceEndpointProviderI - implemented by service endpoint factories (typically extended from UIinfo or ServiceWithParameters). + + +## Analysis services + +These have not yet been refactored. Feel free to look at how jalview.ws.jws2.AACons and Disorder clients operate and adapt the pattern for your own services. The Groovy example in the help [[help/html/groovy/featuresCounter.html]] for creating custom annotation tracks uses the same basic 'alignment analysis worker' mechanism to provide dynamically executed alignment analysis calculations that result in annotation tracks displayed below the alginment. diff --git a/examples/groovy/hmmertestimport.groovy b/examples/groovy/hmmertestimport.groovy new file mode 100644 index 0000000..88bd0e1 --- /dev/null +++ b/examples/groovy/hmmertestimport.groovy @@ -0,0 +1,6 @@ +// def alv = new jalview.io.FileLoader().LoadFileWaitTillLoaded("examples/testdata/hmmer3/alignment_res.fa.gz","File").getViewport(); +def alv = jalview.bin.Jalview.getCurrentAlignFrame().getViewport(); +def al = alv.getAlignment(); +def jproc = new jalview.ws.ebi.HmmerJSONProcessor(al) +jproc.parseFrom(new jalview.io.FileParse("/Users/jprocter/git/jalview/examples/testdata/hmmer3/hmmeresult.json.gz",jalview.io.DataSourceType.FILE)) +jproc.updateView(alv) \ No newline at end of file diff --git a/examples/testdata/hmmer3/alignment_frag.fa.gz b/examples/testdata/hmmer3/alignment_frag.fa.gz new file mode 100644 index 0000000..a4e79b2 Binary files /dev/null and b/examples/testdata/hmmer3/alignment_frag.fa.gz differ diff --git a/examples/testdata/hmmer3/alignment_res.fa.gz b/examples/testdata/hmmer3/alignment_res.fa.gz new file mode 100644 index 0000000..03206f4 Binary files /dev/null and b/examples/testdata/hmmer3/alignment_res.fa.gz differ diff --git a/examples/testdata/hmmer3/hit_fragment.json.gz b/examples/testdata/hmmer3/hit_fragment.json.gz new file mode 100644 index 0000000..bbc8405 Binary files /dev/null and b/examples/testdata/hmmer3/hit_fragment.json.gz differ diff --git a/examples/testdata/hmmer3/hmmeresult.json.gz b/examples/testdata/hmmer3/hmmeresult.json.gz new file mode 100644 index 0000000..c3fa9a2 Binary files /dev/null and b/examples/testdata/hmmer3/hmmeresult.json.gz differ diff --git a/examples/uniref50.hmm b/examples/uniref50.hmm new file mode 100644 index 0000000..b07ec14 --- /dev/null +++ b/examples/uniref50.hmm @@ -0,0 +1,466 @@ +HMMER3/f [3.1b2 | February 2015] +NAME uniref50 +LENG 148 +ALPH amino + RF no +MM no +CONS yes +CS no +MAP yes +DATE Mon Jun 12 14:32:05 2017 +NSEQ 15 +EFFN 0.648193 +CKSUM 2563184735 +STATS LOCAL MSV -10.0682 0.70956 +STATS LOCAL VITERBI -10.7870 0.70956 +STATS LOCAL FORWARD -4.6837 0.70956 +HMM A C D E F G H I K L M N P Q R S T V W Y + m->m m->i m->d i->m i->i d->m d->d + COMPO 2.40816 3.71583 2.80837 2.63551 3.47092 2.77036 3.85028 2.88279 2.80267 2.53589 3.68425 3.22102 3.34428 3.14560 3.11474 2.53177 2.75990 2.58070 5.00144 3.51101 + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.10433 3.97705 2.52157 0.61958 0.77255 0.00000 * + 1 2.99317 4.53706 4.08224 3.67789 3.22093 3.85692 4.40592 2.39958 3.44433 1.81088 1.32037 3.95163 4.31759 3.82413 3.64608 3.34553 3.29902 2.40928 5.06591 3.83044 1 m - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 2 0.97044 4.20710 3.49350 3.28598 4.08269 3.03087 4.30444 3.21278 3.30302 3.09300 4.12129 3.42792 3.77296 3.64134 3.55157 2.55705 2.83652 2.86187 5.50678 4.31039 2 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.11955 3.90315 2.38048 0.61958 0.77255 0.55549 0.85282 + 3 1.74035 4.09199 3.34495 3.00819 4.05288 2.91638 4.05509 3.33461 3.01251 3.11462 3.97728 3.20348 3.62940 3.32849 3.32799 1.99191 1.99086 2.89563 5.42641 4.20726 3 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03323 3.81683 4.53917 0.61958 0.77255 0.62561 0.76558 + 4 2.37663 4.18625 3.55838 3.17855 3.75132 3.18264 4.13666 2.64341 3.07328 2.62344 3.69712 3.39774 3.83139 3.44405 3.35689 2.61052 1.64486 2.15973 5.30034 4.05468 4 t - - - + 2.68617 4.42230 2.77525 2.73129 3.46359 2.40511 3.72500 3.29359 2.67746 2.69350 4.24695 2.90352 2.73719 3.18152 2.89806 2.37885 2.77501 2.98524 4.58482 3.61508 + 0.33937 1.47682 2.82312 0.71438 0.67236 0.50642 0.92294 + 5 1.78828 4.31568 3.18846 2.75366 3.97645 3.11838 3.84000 3.34055 2.67250 3.02453 3.87541 3.10729 3.71676 3.06391 2.67828 2.15246 2.50645 2.96422 5.30410 4.05011 9 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03188 3.85742 4.57976 0.61958 0.77255 0.59400 0.80322 + 6 2.60146 4.34120 4.20318 3.64233 3.23200 4.03946 4.38229 1.91078 3.53317 1.46276 2.80385 3.95250 4.35454 3.78680 3.77614 3.34686 3.12310 1.90138 5.05979 3.90282 10 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03188 3.85742 4.57976 0.61958 0.77255 0.59400 0.80322 + 7 2.51618 4.38929 3.20785 2.68482 3.53842 3.39630 3.71025 2.97988 2.63127 2.66315 3.23915 3.11866 3.35060 2.98059 3.01133 2.11689 2.77574 2.72369 4.95633 3.10650 11 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03188 3.85742 4.57976 0.61958 0.77255 0.59400 0.80322 + 8 1.83112 4.12334 3.20156 2.95461 4.23963 1.79514 4.09699 3.64646 3.07597 3.33878 4.16582 3.16397 3.61350 3.35846 3.40724 1.96001 2.64648 3.10558 5.57497 4.34818 12 g - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.07518 3.85742 2.97012 0.61958 0.77255 0.59400 0.80322 + 9 2.02467 4.19921 3.47207 3.00878 3.03795 3.27081 3.95597 2.70270 2.96218 2.55248 3.54468 3.31239 3.83177 3.27950 3.28895 2.63385 2.09090 2.46488 5.06606 3.80489 13 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03327 3.81551 4.53786 0.61958 0.77255 0.56041 0.84624 + 10 2.25155 4.19461 3.85704 3.29295 2.92371 3.72128 4.04839 2.07964 3.20853 2.08962 2.71310 3.60847 4.09120 3.47607 3.47945 3.00735 2.74040 2.14097 4.86082 3.65928 14 i - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03170 3.86316 4.58551 0.61958 0.77255 0.53107 0.88667 + 11 2.97746 4.34766 4.53309 3.96552 2.78843 4.21079 4.53997 1.80103 3.85948 1.59494 2.57669 4.20401 4.48099 4.02954 4.02513 3.53069 3.20806 1.63119 5.03312 3.89134 15 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 12 2.01604 4.15364 3.23013 2.99255 4.26101 2.66741 4.12859 3.66796 3.09383 3.37186 4.20680 3.19709 3.64453 3.39377 3.41395 1.27425 2.68165 3.13093 5.59931 4.36607 16 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 13 2.41396 4.26265 3.40226 2.93569 3.72492 3.24366 3.92462 2.93397 2.83929 2.73560 3.16052 3.25846 3.81309 3.20648 3.16819 2.37913 1.73294 2.65776 5.16309 3.91530 17 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 14 2.06589 4.14828 3.30608 3.02868 4.20053 2.92394 4.12227 3.52677 3.06750 3.27902 4.13704 3.22373 3.65849 3.38850 3.37961 1.31011 2.40891 3.04032 5.55736 4.32788 18 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 15 2.74009 4.29274 3.92243 3.42912 1.74599 3.72053 3.90473 2.32427 3.32349 2.18956 3.31553 3.65797 4.14118 3.57919 3.55745 2.71376 3.01017 2.38146 4.46330 2.97696 19 f - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 16 2.76094 4.39380 4.31945 3.75589 3.18422 4.12530 4.45889 2.01307 3.63847 1.30728 2.59228 4.05575 4.41925 3.86957 3.85970 3.43754 3.19324 1.94550 5.06650 3.93230 20 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 17 2.70295 4.73637 3.16526 2.68917 4.18427 3.37581 3.71759 3.61851 2.27125 3.18722 4.06871 3.11427 2.39752 2.89725 1.66361 2.77186 2.98335 3.28411 5.34221 4.10051 21 r - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.07762 3.90315 2.90945 0.61958 0.77255 0.55549 0.85282 + 18 2.49055 4.81399 3.14505 2.59164 4.19520 3.44406 3.60132 3.55142 1.92611 3.12799 3.98038 3.04037 3.86298 2.75679 1.83484 2.76119 2.76042 3.23493 5.31169 4.06564 22 r - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.06501 3.85742 3.17445 0.61958 0.77255 0.59400 0.80322 + 19 2.43450 4.81939 2.81703 2.39298 4.15804 3.33308 3.59871 3.56807 2.06609 3.14527 3.97247 2.89702 3.36070 2.29211 2.66793 2.54254 2.87166 3.22778 5.35034 4.03520 23 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03294 3.82535 4.54770 0.61958 0.77255 0.61916 0.77305 + 20 2.61608 4.67386 2.79167 2.51004 4.07010 3.23635 3.73836 3.55025 2.48903 3.13320 4.04098 2.97430 2.02723 2.34075 2.83811 2.68076 2.93097 3.21608 5.34739 4.03735 24 p - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03294 3.82535 4.54770 0.61958 0.77255 0.51069 0.91649 + 21 1.83080 4.22890 3.60014 3.08598 3.61014 3.38577 4.01761 2.55536 3.00939 2.52819 3.20189 3.39791 3.91288 3.33215 3.33591 2.72706 2.41446 2.12040 5.12303 3.89826 25 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 22 2.43845 4.29437 3.39983 3.04145 3.80350 3.19872 4.06195 2.96220 2.98493 2.76612 3.80233 3.32666 1.71751 3.35496 3.29387 2.63325 2.83846 2.21304 5.28839 4.02321 26 p - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 23 2.55648 4.28453 3.47615 2.92649 3.45346 3.51308 3.86072 2.37030 2.85167 2.40896 2.93550 3.31525 2.97437 3.17776 3.19434 2.79032 2.33896 2.42929 4.94762 3.71651 27 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 24 2.23005 4.31546 3.25841 2.77512 3.78441 3.22479 3.82985 3.12652 2.73582 2.83244 3.03171 3.14960 3.26067 3.07830 3.10838 1.85715 2.73859 2.81468 5.16957 3.91289 28 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 25 2.72216 3.51794 4.14734 3.58168 3.26953 3.85722 4.23682 2.10046 3.47012 1.71220 2.91412 3.83361 4.22096 3.71804 3.68973 3.16541 2.79579 1.71693 4.93656 3.75086 29 l - - - + 2.68606 4.42227 2.77522 2.73126 3.46337 2.40515 3.72497 3.29356 2.67743 2.69357 4.24692 2.90349 2.73742 3.18149 2.89784 2.37889 2.77522 2.98521 4.58479 3.61506 + 0.31572 1.55442 2.82310 0.27619 1.42159 0.55549 0.85282 + 26 2.06718 4.47388 3.00085 2.59301 4.03403 3.18938 3.75234 3.40130 2.21691 3.06406 3.90876 3.01767 3.74194 2.94856 2.91976 2.09488 2.60568 3.04014 5.32541 4.04568 31 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03205 3.85226 4.57460 0.61958 0.77255 0.52495 0.89548 + 27 2.09937 4.25808 3.35967 2.86682 3.65405 3.28224 3.85971 2.93650 2.81278 2.15397 3.59474 3.22143 3.43624 3.14697 3.16235 2.43009 2.43628 2.66078 5.07593 3.83686 32 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 28 2.56380 4.32380 3.45039 2.92280 3.52453 3.48960 3.88793 2.33272 2.83649 2.29194 3.45598 3.31192 2.56007 3.18425 3.18050 2.78603 2.52825 2.43071 5.02605 3.78340 33 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 29 2.52137 4.41862 3.18708 2.64701 3.24265 3.41116 3.70401 2.99879 2.50849 2.54033 3.56040 3.09794 3.19241 2.94883 3.00442 2.32271 2.53579 2.73855 5.01724 3.74765 34 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 30 2.00013 4.58033 2.94855 2.53646 4.07584 3.24271 3.72285 3.46598 2.50253 3.10366 3.94143 2.28591 3.76727 2.90505 2.65085 2.58556 2.61842 3.10852 5.34830 4.05040 35 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 31 2.38233 4.27978 3.41241 2.86526 3.23400 3.48475 3.81694 2.67786 2.81404 2.37039 3.42629 2.84230 3.90072 3.13098 3.17039 2.75440 2.50322 2.16090 4.92926 3.68461 36 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 32 2.57741 4.71210 2.95136 2.48036 4.10354 2.51445 3.64563 3.50876 2.11219 3.10615 3.93363 2.96219 3.79067 2.80786 2.54902 2.50592 2.51289 3.16566 5.32824 4.02677 37 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 33 2.48649 4.79372 2.91636 2.20828 4.05411 3.38774 3.59403 3.46081 2.32653 3.05709 3.87988 2.78811 3.79502 2.48988 2.50461 2.63652 2.83744 2.71303 5.28703 3.96685 38 e - - - + 2.68619 4.42226 2.77520 2.73124 3.46338 2.40514 3.72495 3.29355 2.67742 2.69356 4.24691 2.90348 2.73732 3.18147 2.89802 2.37888 2.77520 2.98519 4.58478 3.61504 + 0.07101 2.83445 4.62550 0.63888 0.75053 0.55549 0.85282 + 34 1.61247 4.12982 3.30077 3.01153 4.23531 2.30721 4.11812 3.64225 3.09602 3.33089 4.15414 3.20546 3.63382 3.37908 3.42786 1.71494 2.65404 3.10635 5.57312 4.35188 41 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 35 2.72153 4.23229 3.98871 3.42694 2.97156 3.37228 4.12428 2.11066 3.32720 1.56866 3.14804 3.72158 4.17041 3.58506 3.57523 3.10753 2.96236 2.01957 4.85619 3.63474 42 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 36 2.59948 4.33296 4.13320 3.58598 1.90470 3.92561 4.14661 2.31847 3.46961 1.74381 2.73954 3.84829 4.26638 3.69996 3.68809 3.23462 3.08833 2.27549 4.71854 3.39100 43 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 37 2.58931 4.58161 2.85848 2.66250 4.27569 1.35942 3.92193 3.72667 2.37699 3.36968 4.25453 3.08080 3.80217 3.15095 3.05968 2.68693 2.97358 3.32002 5.50315 4.25822 44 g - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 38 2.65443 4.41996 3.43781 2.92526 3.49579 3.52457 3.83449 2.83057 2.64507 1.65492 3.47551 3.30970 3.36731 3.12885 2.65176 2.85231 2.91346 2.65496 4.98654 3.73087 45 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 39 2.72350 4.79628 3.09209 2.60253 4.10688 3.43694 3.64699 3.48037 1.53491 2.80300 3.97997 3.05455 3.87955 2.81812 2.48623 2.53142 2.96661 3.17965 5.30004 4.01932 46 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 40 1.82674 4.13179 3.37396 3.04098 4.15468 2.93287 4.10316 3.48191 3.05943 3.22685 4.07364 3.23234 3.65478 3.36800 3.38156 1.54612 2.23418 3.00585 5.51189 4.29184 47 s - - - + 2.68618 4.42225 2.77520 2.73124 3.46354 2.40513 3.72495 3.29354 2.67741 2.69355 4.24690 2.90347 2.73740 3.18147 2.89801 2.37887 2.77520 2.98508 4.58477 3.61503 + 0.07101 2.83445 4.62550 0.49418 0.94179 0.55549 0.85282 + 41 1.87334 4.14690 3.25058 2.97809 4.26468 2.12605 4.11046 3.68104 3.08263 3.36184 4.18261 3.18779 3.63442 3.36584 3.42015 1.58161 2.66271 3.13490 5.59481 4.36766 49 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.11955 3.90315 2.38048 0.61958 0.77255 0.55549 0.85282 + 42 2.21070 4.25592 3.22113 2.77420 3.85340 3.11965 3.84389 3.18555 2.74438 2.69874 3.77079 3.12117 3.16635 3.08826 3.10948 2.13243 2.17697 2.83916 5.22265 3.97074 50 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03323 3.81683 4.53917 0.61958 0.77255 0.62561 0.76558 + 43 2.34367 4.62113 3.10732 2.54725 3.88271 3.41056 3.61301 3.25335 2.12788 2.89080 3.32993 3.01581 3.81452 2.79680 2.35592 2.55841 2.82420 2.96607 5.15612 3.88260 51 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.07842 3.81683 2.92953 0.61958 0.77255 0.50642 0.92294 + 44 2.82371 4.84862 3.20218 2.72371 4.21308 3.44211 3.65714 3.71157 2.07944 3.25434 4.14899 2.84303 3.91564 2.83614 1.36807 2.87376 3.07618 3.38687 5.31229 4.06004 52 r - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.12129 3.86316 2.37274 0.61958 0.77255 0.58934 0.80899 + 45 2.50307 4.57358 2.77436 2.48515 4.13002 2.10145 3.72113 3.58708 2.48196 3.19739 4.04544 2.56817 3.72971 2.91621 2.54565 2.57756 2.84032 3.19983 5.38083 4.07634 53 g - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03462 3.77648 4.49883 0.61958 0.77255 0.55399 0.85485 + 46 2.68547 4.96255 2.09111 2.21584 4.36925 1.97687 3.70446 3.84410 2.62382 3.41713 4.25934 2.75900 3.76266 2.58919 3.12019 2.66938 2.98839 3.45462 5.60805 4.21173 54 g - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03205 3.85226 4.57460 0.61958 0.77255 0.52495 0.89548 + 47 2.70472 4.70735 3.22145 2.64799 3.96742 3.15410 3.63371 3.33902 2.12091 2.43520 3.82970 3.09240 3.88741 2.81708 1.91192 2.78290 2.92703 3.06076 5.19463 3.94224 55 r - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 48 2.39251 4.23853 3.75245 3.18839 3.35715 3.69117 4.01036 2.17738 3.07061 2.00722 3.28706 3.53429 4.07078 3.39072 3.07752 2.97399 2.89120 1.85844 4.92824 3.71532 56 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 49 2.56050 4.39105 3.34411 2.78319 3.60155 3.46480 3.77128 2.83822 2.62742 2.58594 3.21262 3.20237 3.88486 3.03059 2.56448 2.73642 2.19035 2.37832 5.02624 3.77891 57 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 50 1.37812 2.80072 3.83498 3.42070 3.87397 2.99921 4.24161 2.96530 3.32256 2.89459 3.81917 3.44880 3.71764 3.60422 3.56604 2.43360 2.40411 2.61888 5.33835 4.15246 58 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.55549 0.85282 + 51 2.74532 4.50724 3.42983 2.95244 3.42568 3.60626 3.88910 2.77026 2.70375 2.22807 1.95486 3.35569 4.02547 2.58121 2.99178 2.94186 2.99694 2.66631 5.01046 3.74777 59 m - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.03044 3.90315 4.62550 0.61958 0.77255 0.44450 1.02483 + 52 0.87297 4.24657 3.57075 3.36786 4.15839 3.06811 4.37727 3.29971 3.38685 3.17640 4.19749 3.49040 3.81731 3.71861 3.62959 2.59634 2.88098 2.93600 5.57511 4.38724 60 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 53 1.96298 4.17134 3.43460 3.07855 4.14627 2.98936 4.12481 3.46945 3.08161 3.21642 4.06614 3.27556 3.70074 3.39215 3.40515 1.84467 1.63498 3.01250 5.50977 4.28998 61 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 54 3.40066 4.84720 3.99369 3.74344 2.30278 3.95279 3.67128 3.39553 3.59798 2.82228 4.05988 3.85394 4.42456 3.87882 3.75994 3.52665 3.68805 3.27113 3.95029 0.80817 62 y - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 55 2.86663 5.06853 2.87640 2.51952 4.45748 3.43879 3.66568 3.89866 1.33937 3.41664 4.27179 2.44223 3.91577 2.81805 2.46217 2.85914 3.10555 3.54515 5.50478 4.21799 63 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 56 2.89101 4.40561 4.26922 3.93641 3.62800 3.83108 4.72052 2.04974 3.80577 2.29743 3.57810 4.10920 4.38636 4.15841 4.00806 3.34183 3.25039 0.90272 5.42983 4.16757 64 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 57 2.78989 4.87427 3.10728 2.66228 4.33471 3.44160 3.70636 3.64306 1.30828 3.25641 4.14609 3.10047 3.92071 2.86764 2.46119 2.83588 2.59339 3.32217 5.44317 4.19498 65 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 58 3.28295 4.64373 4.65267 4.15432 2.12281 4.39226 4.40565 2.30868 4.01063 0.99404 2.96208 4.34589 4.63887 4.13687 4.14117 3.75853 3.51440 2.42033 4.68321 3.26182 66 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 59 3.08248 4.42168 4.72065 4.23378 3.50231 4.37831 4.95293 1.13074 4.10572 1.99571 3.31982 4.46032 4.70821 4.37869 4.30619 3.77127 3.35421 1.44848 5.47660 4.27063 67 i - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 60 2.47137 4.31634 3.52340 3.28135 4.06362 3.15188 4.29038 3.20358 3.22639 3.06334 4.10788 3.47324 3.86421 3.61618 3.47946 2.67390 1.00625 2.88730 5.49222 4.28053 68 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 61 2.89484 4.63395 3.51346 3.36817 4.35306 3.31558 4.43642 3.92611 3.43456 3.54133 4.59617 3.66397 0.65427 3.82016 3.66760 3.06578 3.34480 3.55944 5.51022 4.47541 69 P - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 62 2.83547 5.32344 1.90710 1.42799 4.63051 3.24198 3.71244 4.09996 2.65068 3.63347 4.46321 2.71732 3.81726 2.86723 3.20067 2.75440 2.81778 3.69487 5.81218 4.35094 70 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 63 2.79923 4.56350 3.49435 3.40744 4.54632 0.58454 4.52062 4.17205 3.60289 3.81287 4.79002 3.65874 3.95796 3.91884 3.82676 2.97427 3.28861 3.68020 5.61312 4.65200 71 G - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 64 2.69344 5.03834 2.59685 1.78499 4.35492 3.31996 3.63904 3.79867 2.33359 3.34661 4.15382 2.64678 2.71516 2.78054 2.89199 2.67010 2.77928 3.42501 5.53498 4.15652 72 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 65 2.70271 4.40317 3.56325 3.00957 3.45446 3.68235 3.94694 2.18180 2.88182 2.21283 3.37093 3.41883 4.05792 2.33611 3.21378 2.95204 2.94041 2.01647 5.02429 3.78732 73 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 66 3.04481 5.17464 2.53544 0.88540 4.53437 3.34332 3.94029 4.00914 2.83416 3.60986 4.58016 2.99593 3.95313 3.15433 3.25317 3.01711 3.35013 3.68253 5.68627 4.40959 74 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 67 3.05681 4.44153 4.54138 3.99838 1.97987 4.22221 4.40129 2.17878 3.87522 1.45215 3.02589 4.20160 4.50632 4.03401 4.02978 3.55251 3.29207 1.80812 4.80289 3.46847 75 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 68 2.82984 5.35567 1.99168 1.57663 4.64578 3.25717 3.68509 4.14274 2.58330 3.63869 4.45307 2.71724 3.81329 2.22362 3.11653 2.74299 3.09347 3.72626 5.79564 4.33600 76 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 69 2.50977 1.62448 4.23724 3.80750 3.60189 3.40590 4.45756 2.35254 3.63764 2.45765 3.57920 3.82230 4.04603 3.92585 3.81907 2.84633 2.91668 1.82275 5.24689 4.01880 77 c - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 70 2.77571 5.11398 2.10801 2.05696 4.45701 3.25620 3.72899 3.91339 2.64389 3.48166 4.32027 2.78446 1.86353 2.89484 3.15510 2.73789 3.05806 3.53410 5.67671 4.27030 78 p - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 71 2.91274 5.42662 1.24765 1.93231 4.73792 3.20738 3.76458 4.24169 2.78531 3.76893 4.62568 2.68636 3.83308 2.93581 3.37349 2.60161 3.20907 3.82383 5.94007 4.44265 79 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 72 2.93000 5.34144 1.08347 2.15883 4.66482 3.19912 3.82811 4.25255 2.88821 3.80850 4.69751 2.51974 3.85217 3.02158 3.46889 2.84580 3.25390 3.83179 5.90365 4.41772 80 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 73 2.89101 4.40561 4.26922 3.93641 3.62800 3.83108 4.72052 2.04974 3.80577 2.29743 3.57810 4.10920 4.38636 4.15841 4.00806 3.34183 3.25039 0.90272 5.42983 4.16757 81 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 74 3.40066 4.84720 3.99369 3.74344 2.30278 3.95279 3.67128 3.39553 3.59798 2.82228 4.05988 3.85394 4.42456 3.87882 3.75994 3.52665 3.68805 3.27113 3.95029 0.80817 82 y - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 75 3.08173 4.41570 4.73343 4.24332 3.51344 4.38931 4.96241 1.16063 4.11994 2.00857 3.32756 4.46929 4.71466 4.39012 4.32070 3.78014 3.35186 1.39369 5.48545 4.28088 83 i - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 76 3.27378 4.70553 4.35708 3.99825 3.17780 4.11433 4.62122 2.38848 3.76496 0.75643 3.16963 4.26355 4.53226 4.10824 3.92358 3.69863 3.56359 2.45281 5.09417 3.84135 84 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 77 3.10426 5.24570 0.77891 2.40498 4.63731 3.29196 4.02650 4.24977 3.13093 3.83985 4.82107 2.96628 3.95224 3.26642 3.66070 3.05541 3.44536 3.87811 5.78539 4.49402 85 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 78 2.10165 4.63153 3.04360 2.53313 3.37849 3.42468 3.14974 3.24484 2.48640 2.87927 3.73924 3.02051 3.83549 2.34761 2.89722 2.67591 2.83487 2.96227 5.11406 3.77860 86 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 79 0.87297 4.24657 3.57075 3.36786 4.15839 3.06811 4.37727 3.29971 3.38685 3.17640 4.19749 3.49040 3.81731 3.71861 3.62959 2.59634 2.88098 2.93600 5.57511 4.38724 87 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 80 3.04481 5.17464 2.53544 0.88540 4.53437 3.34332 3.94029 4.00914 2.83416 3.60986 4.58016 2.99593 3.95313 3.15433 3.25317 3.01711 3.35013 3.68253 5.68627 4.40959 88 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 81 3.04481 5.17464 2.53544 0.88540 4.53437 3.34332 3.94029 4.00914 2.83416 3.60986 4.58016 2.99593 3.95313 3.15433 3.25317 3.01711 3.35013 3.68253 5.68627 4.40959 89 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 82 2.02804 4.79412 2.56696 2.04470 4.09359 3.33689 3.67081 3.44631 2.51465 3.10781 3.94410 2.90500 3.80252 2.83547 2.98166 2.64658 2.87169 2.76307 5.37415 4.03168 90 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 83 2.79923 4.56350 3.49435 3.40744 4.54632 0.58454 4.52062 4.17205 3.60289 3.81287 4.79002 3.65874 3.95796 3.91884 3.82676 2.97427 3.28861 3.68020 5.61312 4.65200 91 G - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 84 2.73428 4.33692 3.73213 3.19478 3.16177 3.72868 2.92126 1.73180 3.00305 2.10225 3.32627 3.53324 4.10443 3.37488 3.27326 3.02489 2.97120 2.37844 4.75364 3.40581 92 i - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 85 2.98626 5.46880 1.08491 1.97249 4.77077 3.21550 3.81546 4.28421 2.87189 3.82944 4.72170 2.71026 3.86087 3.00007 3.46540 2.87647 3.29141 3.87860 5.96770 4.48798 93 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 86 3.27378 4.70553 4.35708 3.99825 3.17780 4.11433 4.62122 2.38848 3.76496 0.75643 3.16963 4.26355 4.53226 4.10824 3.92358 3.69863 3.56359 2.45281 5.09417 3.84135 94 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 87 2.89484 4.63395 3.51346 3.36817 4.35306 3.31558 4.43642 3.92611 3.43456 3.54133 4.59617 3.66397 0.65427 3.82016 3.66760 3.06578 3.34480 3.55944 5.51022 4.47541 95 P - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 88 3.48726 4.82741 4.35628 4.01269 1.82549 4.23514 3.48811 3.25093 3.87322 2.62544 3.87831 3.93991 4.57991 3.96204 3.99151 3.61127 3.72377 3.16284 3.67256 0.95290 96 y - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 89 2.36871 4.29005 3.29968 3.12112 4.18153 3.01810 4.22768 3.71868 3.20194 3.43114 4.34903 3.32859 3.76571 3.54324 3.48419 0.94365 2.85682 3.23083 5.54583 4.26583 97 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 90 2.70964 0.75093 4.25205 4.01610 3.98428 3.30982 4.64026 3.14621 3.84384 3.05665 4.18165 3.97525 4.02496 4.18572 3.94943 2.98138 3.18527 2.88356 5.37752 4.27103 98 c - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 91 3.12574 4.95602 3.62729 3.11760 4.33719 3.59265 3.90370 3.88680 2.28467 3.38377 4.38192 3.46899 4.09078 3.11945 0.82993 3.20529 3.38498 3.60641 5.37824 4.24257 99 r - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 92 0.87297 4.24657 3.57075 3.36786 4.15839 3.06811 4.37727 3.29971 3.38685 3.17640 4.19749 3.49040 3.81731 3.71861 3.62959 2.59634 2.88098 2.93600 5.57511 4.38724 100 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 93 2.79923 4.56350 3.49435 3.40744 4.54632 0.58454 4.52062 4.17205 3.60289 3.81287 4.79002 3.65874 3.95796 3.91884 3.82676 2.97427 3.28861 3.68020 5.61312 4.65200 101 G - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 94 2.36871 4.29005 3.29968 3.12112 4.18153 3.01810 4.22768 3.71868 3.20194 3.43114 4.34903 3.32859 3.76571 3.54324 3.48419 0.94365 2.85682 3.23083 5.54583 4.26583 102 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 95 2.70964 0.75093 4.25205 4.01610 3.98428 3.30982 4.64026 3.14621 3.84384 3.05665 4.18165 3.97525 4.02496 4.18572 3.94943 2.98138 3.18527 2.88356 5.37752 4.27103 103 c - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 96 2.36871 4.29005 3.29968 3.12112 4.18153 3.01810 4.22768 3.71868 3.20194 3.43114 4.34903 3.32859 3.76571 3.54324 3.48419 0.94365 2.85682 3.23083 5.54583 4.26583 104 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 97 2.36871 4.29005 3.29968 3.12112 4.18153 3.01810 4.22768 3.71868 3.20194 3.43114 4.34903 3.32859 3.76571 3.54324 3.48419 0.94365 2.85682 3.23083 5.54583 4.26583 105 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 98 2.70964 0.75093 4.25205 4.01610 3.98428 3.30982 4.64026 3.14621 3.84384 3.05665 4.18165 3.97525 4.02496 4.18572 3.94943 2.98138 3.18527 2.88356 5.37752 4.27103 106 c - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 99 0.87297 4.24657 3.57075 3.36786 4.15839 3.06811 4.37727 3.29971 3.38685 3.17640 4.19749 3.49040 3.81731 3.71861 3.62959 2.59634 2.88098 2.93600 5.57511 4.38724 107 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 100 2.79923 4.56350 3.49435 3.40744 4.54632 0.58454 4.52062 4.17205 3.60289 3.81287 4.79002 3.65874 3.95796 3.91884 3.82676 2.97427 3.28861 3.68020 5.61312 4.65200 108 G - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 101 3.06946 5.03551 3.25229 2.85531 4.44585 3.54670 3.82012 3.88188 0.90373 3.42461 4.38128 3.27486 4.04036 3.00629 2.45564 3.10509 3.31538 3.58407 5.45821 4.28639 109 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 102 3.06247 4.41039 4.65086 4.13598 3.48324 4.35915 4.85935 1.65561 4.00771 1.89605 3.31161 4.38665 4.67296 4.28428 4.22305 3.72759 3.32396 1.08186 5.42132 4.21018 110 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 103 2.33323 4.28075 3.53672 3.04537 3.62455 3.45748 3.98551 2.58410 2.72399 2.59228 3.55231 3.38781 3.95328 3.30102 3.25844 2.79290 2.46624 1.66085 5.10597 3.87716 111 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 104 2.09904 4.31904 3.13967 2.79512 4.23584 2.43802 3.97520 3.66080 2.88605 3.30435 4.12032 2.79615 3.70254 3.18983 3.27753 1.61859 2.49732 3.17574 5.54095 4.27688 112 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 105 2.79923 4.56350 3.49435 3.40744 4.54632 0.58454 4.52062 4.17205 3.60289 3.81287 4.79002 3.65874 3.95796 3.91884 3.82676 2.97427 3.28861 3.68020 5.61312 4.65200 113 G - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 106 2.34210 4.57052 2.98887 2.43186 3.63497 3.31233 3.71920 3.32573 2.57569 2.97882 3.82112 2.81207 3.79423 2.91349 3.00476 1.86229 2.69145 3.00524 5.25570 3.95436 114 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 107 3.05964 4.41092 4.64145 4.12759 3.48238 4.35054 4.85240 1.66963 3.99735 1.89738 3.31309 4.37857 4.66775 4.27653 4.21363 3.71953 3.32208 1.07763 5.41853 4.20516 115 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 108 2.91005 5.38045 1.25818 2.12941 4.69830 3.20228 3.78776 4.26304 2.81947 3.79137 4.65619 2.14323 3.83796 2.96707 3.40279 2.81725 3.21882 3.83565 5.91563 4.42054 116 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 109 2.96665 4.95377 2.97494 2.73211 4.13599 3.43683 3.89106 3.78353 2.54586 3.27542 4.30113 3.19246 3.99230 1.05904 2.82765 3.01035 3.26391 3.50694 5.38986 4.09082 117 q - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 110 2.64618 4.90499 2.31134 2.18942 4.30332 3.26131 3.70172 3.73572 2.57300 3.32434 4.14511 2.84177 3.78986 2.86174 3.06104 1.76618 2.63178 3.35922 5.54260 4.16860 118 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 111 3.10426 5.24570 0.77891 2.40498 4.63731 3.29196 4.02650 4.24977 3.13093 3.83985 4.82107 2.96628 3.95224 3.26642 3.66070 3.05541 3.44536 3.87811 5.78539 4.49402 119 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 112 2.73269 4.96873 2.61141 2.26957 4.35491 2.17303 3.70728 3.80016 2.46897 3.36392 4.20366 2.88233 3.83451 1.94009 2.87446 2.73151 3.00866 3.43365 5.54626 4.19876 120 q - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 113 2.56630 4.67539 2.76483 2.50324 4.25470 3.20379 3.80042 3.71196 2.47872 3.32135 4.15966 2.47516 3.79205 2.98884 3.00841 1.53662 2.90903 3.30833 5.51362 4.18451 121 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 114 3.45422 4.77029 4.46140 4.11213 1.01250 4.26302 3.55945 3.07075 3.96969 2.40922 3.69615 4.01237 4.59409 4.02617 4.05737 3.63979 3.68916 3.02613 3.73517 1.83750 122 f - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 115 3.27378 4.70553 4.35708 3.99825 3.17780 4.11433 4.62122 2.38848 3.76496 0.75643 3.16963 4.26355 4.53226 4.10824 3.92358 3.69863 3.56359 2.45281 5.09417 3.84135 123 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 116 2.92493 5.35887 1.12201 2.14550 4.68054 3.19834 3.81470 4.26138 2.86788 3.80711 4.68829 2.43062 3.84716 3.00361 3.45124 2.83676 3.24430 3.83759 5.91360 4.42201 124 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02824 3.97705 4.69940 0.61958 0.77255 0.48576 0.95510 + 117 2.99103 5.43832 1.04731 2.03422 4.75036 3.21916 3.83186 4.26509 2.89245 3.82288 4.72422 2.72815 3.86743 3.02108 3.48036 2.88767 3.30065 3.86474 5.95049 4.48470 125 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.05161 3.97705 3.45590 0.61958 0.77255 0.48576 0.95510 + 118 2.86997 5.43069 1.57180 1.74614 4.72729 2.80306 3.71453 4.23943 2.69618 3.73332 4.56237 2.43722 3.80910 2.87126 3.27991 2.76596 3.14983 3.81040 5.89719 4.40314 126 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 119 2.94701 4.93449 2.95833 2.71460 4.11381 3.42085 3.87354 3.75736 2.52981 3.25157 4.27740 3.17495 3.97565 1.09531 2.81227 2.99143 3.24405 3.48203 5.37148 4.07074 127 q - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 120 2.77849 4.28259 3.99549 3.02221 3.34513 3.89873 4.21017 1.60238 3.32583 1.96055 3.04166 3.76188 4.24121 3.61775 3.59603 3.18793 3.01465 1.89778 5.01613 3.81900 128 i - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 121 2.05663 4.99383 2.42035 1.95337 4.30142 3.11016 3.64379 3.74448 2.38547 3.30891 4.11909 2.80952 3.78509 2.79112 2.97996 2.54099 2.92358 3.37653 5.51637 4.13250 129 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 122 2.37074 5.20065 2.03752 1.62561 4.52764 2.94012 3.68254 3.99698 2.59389 3.53203 4.34713 2.73405 3.79399 2.83254 3.13133 2.70217 3.03318 3.59496 5.71621 4.27884 130 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 123 2.76891 4.53595 3.45942 3.36936 4.50963 0.61326 4.48439 4.12940 3.56175 3.77320 4.74981 3.62373 3.92970 3.87945 3.78857 2.94321 3.25651 3.64192 5.58291 4.61439 131 G - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 124 3.45280 4.72560 4.55948 4.18538 1.45983 4.27876 3.45556 3.19175 4.01502 2.56322 3.77632 3.99268 4.58568 4.02082 4.06587 3.62371 3.67122 3.09770 1.76510 1.80304 132 f - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 125 2.87283 4.39315 4.23821 3.90420 3.61058 3.80809 4.69198 2.04849 3.77322 2.28363 3.56364 4.08078 4.36427 4.12727 3.97777 3.31702 3.23254 0.92773 5.40873 4.14528 133 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 126 3.24760 4.68579 4.32075 3.96132 3.16793 4.08580 4.59138 2.37683 3.72825 0.78064 3.16594 4.22883 4.50730 4.07699 3.89079 3.66669 3.53825 2.43535 5.07658 3.81868 134 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 127 2.45786 4.30296 3.50186 3.25812 4.04222 3.13941 4.26905 3.17937 3.20271 3.03994 4.08552 3.45408 3.84975 3.59352 3.45722 2.66008 1.04037 2.86556 5.47283 4.25897 135 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 128 2.68154 0.78852 4.21932 3.97783 3.95068 3.28696 4.60693 3.10838 3.80528 3.02007 4.14415 3.94300 4.00035 4.14805 3.91507 2.95331 3.15521 2.84739 5.34926 4.23772 136 c - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 129 2.02617 4.29048 3.42265 2.94627 3.54036 3.40652 3.31257 2.77872 2.86355 2.59741 3.53948 3.30371 3.90044 3.21666 3.18816 2.73904 2.82169 1.86270 5.00831 3.74432 137 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 130 0.90195 4.23400 3.54659 3.34205 4.13472 3.05626 4.35430 3.27256 3.36043 3.15035 4.17350 3.47069 3.80326 3.69417 3.60509 2.58374 2.86679 2.91280 5.55371 4.36315 138 a - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 131 3.44381 4.80306 4.30117 3.95207 1.85364 4.19548 3.48537 3.22033 3.81418 2.60484 3.85318 3.90681 4.54641 3.92239 3.94488 3.57229 3.68268 3.12961 3.68006 0.97942 139 y - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 132 2.86235 4.60578 3.47842 3.32948 4.31715 3.28867 4.39999 3.88386 3.39382 3.50174 4.55528 3.62780 0.68858 3.78012 3.62986 3.03247 3.31042 3.51987 5.48103 4.43903 140 P - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 133 2.60256 4.60991 3.08123 2.59418 3.90705 3.39886 3.69738 3.25085 2.27951 2.91739 3.78849 3.05676 3.84470 2.63540 2.79735 2.69573 1.94572 2.76699 5.21418 3.93668 141 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 134 2.16968 3.47307 3.59233 3.22260 4.15866 2.47411 4.19438 3.56363 3.18625 3.27458 4.10858 3.32406 3.66022 3.48496 3.48055 1.23700 2.65371 3.05043 5.52336 4.31592 142 s - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 135 3.07859 5.21813 0.80740 2.38838 4.60638 3.27362 4.00471 4.21341 3.10456 3.80732 4.78755 2.94873 3.93224 3.24424 3.63163 3.03196 3.41903 3.84400 5.75900 4.46621 143 d - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 136 2.87283 4.39315 4.23821 3.90420 3.61058 3.80809 4.69198 2.04849 3.77322 2.28363 3.56364 4.08078 4.36427 4.12727 3.97777 3.31702 3.23254 0.92773 5.40873 4.14528 144 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 137 2.50102 4.23694 3.76525 3.33965 3.72246 3.37067 4.24809 2.46042 3.23911 2.55924 3.64161 3.56053 3.97799 3.58142 3.52035 2.77764 1.69802 1.75863 5.30971 4.08018 145 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 138 3.09498 4.49149 4.45102 4.07022 3.43002 4.15408 4.78347 0.98199 3.89992 1.99977 3.35310 4.30411 4.57779 4.24002 4.08717 3.65761 3.39284 1.85079 5.33749 4.08258 146 i - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 139 3.02382 5.15051 2.52384 0.91441 4.50717 3.32764 3.92196 3.97736 2.81286 3.58149 4.55225 2.98104 3.93620 3.13613 3.22992 2.99812 3.32879 3.65289 5.66334 4.38601 147 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 140 2.45786 4.30296 3.50186 3.25812 4.04222 3.13941 4.26905 3.17937 3.20271 3.03994 4.08552 3.45408 3.84975 3.59352 3.45722 2.66008 1.04037 2.86556 5.47283 4.25897 148 t - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 141 3.08695 4.88934 3.20791 2.97643 3.34377 3.51816 0.98092 3.80251 2.81733 3.28606 4.33566 3.38232 4.07539 3.34383 3.07797 3.15699 3.39324 3.53609 4.80769 3.29239 149 h - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 142 2.99214 5.06805 3.26268 2.74531 4.47846 3.57206 3.65342 3.86981 1.12103 3.36156 4.25702 3.16311 3.99796 2.80635 2.11223 3.00404 3.19554 3.55761 5.42835 4.23089 150 k - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 143 3.02382 5.15051 2.52384 0.91441 4.50717 3.32764 3.92196 3.97736 2.81286 3.58149 4.55225 2.98104 3.93620 3.13613 3.22992 2.99812 3.32879 3.65289 5.66334 4.38601 151 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 144 2.49167 5.21869 2.13891 1.38935 4.54510 3.23855 3.71342 3.98470 2.64038 3.55288 4.39217 2.73628 3.81159 2.87379 3.17028 2.74234 3.08340 3.59770 5.74876 4.31122 152 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 145 2.67924 5.36825 1.81597 1.42545 4.67130 3.22067 3.71949 4.14895 2.68617 3.67868 4.51726 2.69278 3.81366 2.87890 3.25116 2.76699 3.13943 3.73938 5.85528 4.37934 153 e - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 146 3.24708 4.60677 4.69416 4.13988 3.08947 4.47063 4.76500 1.92492 3.96672 0.95356 2.71915 4.43331 4.67883 4.15873 4.13317 3.81764 3.47493 2.15974 5.15578 4.04247 154 l - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.02889 3.95434 4.67668 0.61958 0.77255 0.50828 0.92013 + 147 2.69781 4.29649 3.84369 3.29786 3.44437 3.73086 4.15124 2.24231 3.19336 2.10104 3.11890 3.63278 4.14347 3.51043 3.49251 3.03876 2.03846 1.78833 5.07714 3.86271 155 v - - - + 2.68618 4.42225 2.77519 2.73123 3.46354 2.40513 3.72494 3.29354 2.67741 2.69355 4.24690 2.90347 2.73739 3.18146 2.89801 2.37887 2.77519 2.98518 4.58477 3.61503 + 0.18495 3.95434 1.89921 0.61958 0.77255 0.50828 0.92013 + 148 1.44115 4.10304 3.22225 2.99375 4.15355 2.08176 4.10711 3.47540 3.09081 3.24183 4.11431 3.18864 3.61518 3.39097 3.39593 2.35434 2.65737 2.99565 5.50492 4.29375 156 a - - - + 2.68608 4.42226 2.77520 2.73124 3.46354 2.40513 3.72495 3.29355 2.67741 2.69355 4.24690 2.90347 2.73740 3.18147 2.89801 2.37887 2.77520 2.98519 4.58477 3.61504 + 0.08120 2.55114 * 0.46726 0.98542 0.00000 * +// diff --git a/help/help/help.jhm b/help/help/help.jhm index 99d010d..3b6652f 100755 --- a/help/help/help.jhm +++ b/help/help/help.jhm @@ -128,6 +128,7 @@ + diff --git a/help/help/helpTOC.xml b/help/help/helpTOC.xml index a0c7fe6..4c372e0 100755 --- a/help/help/helpTOC.xml +++ b/help/help/helpTOC.xml @@ -151,6 +151,7 @@ + diff --git a/help/help/html/features/preferences.html b/help/help/html/features/preferences.html index 5fda2df..41dae1d 100755 --- a/help/help/html/features/preferences.html +++ b/help/help/html/features/preferences.html @@ -64,6 +64,9 @@
  • The "Editing" Preferences tab contains settings affecting behaviour when editing alignments.
  • +
  • The "HMMER" + Preferences tab allows you to configure locally installed HMMER tools. +
  • The "Web Service" Preferences tab allows you to configure the JABAWS @@ -398,6 +401,14 @@ Sort with New Tree - When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.

    +

    + "HMMER" Preferences tab +

    +

    If you have installed HMMER tools (available from hmmer.org), + then you should specify on this screen the location of the installation (the path to the folder + containing binary executable programs). Double-click in the input field to open a file browser.

    +

    When this path is configured, the HMMER menu will be + enabled in the Alignment window.

     

    Web Services Preferences - documentation for this tab is given in the diff --git a/help/help/html/menus/alwhmmer.html b/help/help/html/menus/alwhmmer.html new file mode 100644 index 0000000..ce23c4b --- /dev/null +++ b/help/help/html/menus/alwhmmer.html @@ -0,0 +1,87 @@ + + + + + +

    + HMMER Menu +

    +

    This menu is available if hmmbuild tools have been installed and configured in the +HMMER Preferences panel. +

    + + hmmbuild +

    Run hmmbuild to create a Hidden Markov Model profile of your sequence alignment or sub-groups. +

    The consensus sequence for the computed profile is inserted as the first sequence of + the alignment (or group) for which hmmbuild is run. +
    Jalview also computes and displays an annotation below the alignment, showing + the information content of each column. +
    This is calculated as the sum over residue symbols of +

    +    match emission probability * log(match emission probability / background frequency) / log(2)
    +  
    + where the background frequencies are taken from (tbc: where? not https://www.ebi.ac.uk/uniprot/TrEMBLstats) +
      +
    • Edit settings and run... +

      Choose whether to run hmmbuild for the whole alignment, or all or selected groups, or both + (default is the alignment). +
      Optionally enter a name to give the HMM profile consensus sequence + (default is "Alignment" or group name, with "_HMM" appended). +
      Use Reference Annotation: select this option if your alignment has an RF reference annotation, + and you wish to constrain the HMM profile to it (hmmbuild option '--hand'). +

    • +
    • hmmbuild with default settings +

      Runs hmmbuild for the whole alignment.
    • +
    + + hmmalign and hmmsearch require an HMM consensus sequence to be selected first. +
    To do this, right-click on the name of an HMM sequence added by hmmbuild, and 'Select HMM'. + The alignment will be with respect to the HMM profile for the consensus sequence. +

    + hmmalign +

    Run hmmalign to align selected sequences (or the whole alignment) to a selected HMM profile. +
      +
    • Edit settings and run... +

      Choose whether to 'trim non-matching termini' - hmmalign option '--trim'. +

    • +
    • hmmalign with default settings
    • +
    + hmmsearch +

    Run hmmsearch to use an HMM profile as input to search a sequence database. +
      +
    • Edit settings and run... +
        +
      • tbc: choose database
      • +
      • tbc: automatically align
      • +
      • tbc: return accessions
      • +
      • tbc: number of results
      • +
      • tbc: sequence eValue cutoff
      • +
      • tbc: domains eValue cutoff
      • +
      +
    • +
    • hmmsearch with default settings
    • +
    • Add database +
      Browse to select a local sequence data file to be searched
    • +
    +
    + + diff --git a/j11lib/apache-mime4j-0.6.jar b/j11lib/apache-mime4j-0.6.jar deleted file mode 100644 index 1d2282c..0000000 Binary files a/j11lib/apache-mime4j-0.6.jar and /dev/null differ diff --git a/j11lib/apache-mime4j-core-0.8.3.jar b/j11lib/apache-mime4j-core-0.8.3.jar new file mode 100644 index 0000000..448cf92 Binary files /dev/null and b/j11lib/apache-mime4j-core-0.8.3.jar differ diff --git a/j11lib/apache-mime4j-dom-0.8.3.jar b/j11lib/apache-mime4j-dom-0.8.3.jar new file mode 100644 index 0000000..938c215 Binary files /dev/null and b/j11lib/apache-mime4j-dom-0.8.3.jar differ diff --git a/j11lib/httpclient-4.0.3.jar b/j11lib/httpclient-4.0.3.jar deleted file mode 100644 index fd0d377..0000000 Binary files a/j11lib/httpclient-4.0.3.jar and /dev/null differ diff --git a/j11lib/httpclient-4.5.6.jar b/j11lib/httpclient-4.5.6.jar new file mode 100644 index 0000000..56231de Binary files /dev/null and b/j11lib/httpclient-4.5.6.jar differ diff --git a/j11lib/httpcore-4.0.1.jar b/j11lib/httpcore-4.0.1.jar deleted file mode 100644 index 4aef35e..0000000 Binary files a/j11lib/httpcore-4.0.1.jar and /dev/null differ diff --git a/j11lib/httpcore-4.4.10.jar b/j11lib/httpcore-4.4.10.jar new file mode 100644 index 0000000..dc510f8 Binary files /dev/null and b/j11lib/httpcore-4.4.10.jar differ diff --git a/j11lib/httpmime-4.0.3.jar b/j11lib/httpmime-4.0.3.jar deleted file mode 100644 index 0dfd331..0000000 Binary files a/j11lib/httpmime-4.0.3.jar and /dev/null differ diff --git a/j11lib/httpmime-4.5.6.jar b/j11lib/httpmime-4.5.6.jar new file mode 100644 index 0000000..df5a7d1 Binary files /dev/null and b/j11lib/httpmime-4.5.6.jar differ diff --git a/j11lib/java-json.jar b/j11lib/java-json.jar deleted file mode 100755 index 2f211e3..0000000 Binary files a/j11lib/java-json.jar and /dev/null differ diff --git a/j11lib/json-20180130.jar b/j11lib/json-20180130.jar new file mode 100644 index 0000000..bc2cd41 Binary files /dev/null and b/j11lib/json-20180130.jar differ diff --git a/j11lib/slivka-client.jar b/j11lib/slivka-client.jar new file mode 100644 index 0000000..34d2de9 Binary files /dev/null and b/j11lib/slivka-client.jar differ diff --git a/j8lib/apache-mime4j-core-0.8.3.jar b/j8lib/apache-mime4j-core-0.8.3.jar new file mode 100644 index 0000000..448cf92 Binary files /dev/null and b/j8lib/apache-mime4j-core-0.8.3.jar differ diff --git a/j8lib/apache-mime4j-dom-0.8.3.jar b/j8lib/apache-mime4j-dom-0.8.3.jar new file mode 100644 index 0000000..938c215 Binary files /dev/null and b/j8lib/apache-mime4j-dom-0.8.3.jar differ diff --git a/resources/ProbabilityOfMatch b/resources/ProbabilityOfMatch new file mode 100644 index 0000000..9e3869f --- /dev/null +++ b/resources/ProbabilityOfMatch @@ -0,0 +1,261 @@ +0.2 +A +200, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2 +, 0.20369859505605942, 0.4222571919176904, 0.02232980369562049, 0.026676627662949624, 0.03525533903309387, 0.04787669271298644, 0.05605478196465866, 0.0641749787418314, 0.10286871806399077, 0.12105923035393054, 0.12422338883170829, 0.10304081214854802, 0.10333588151825282, 0.10114320874739426, 0.11812749552768892, 0.15006056120099137, 0.2237625777282616, 0.30253227447901293, 0.388557592836257, 0.43721427997253054, 0.47970928320880174, 0.5289808943443863, 0.5486523348637581, 0.5583247254358412, 0.5484761487937164, 0.5995060657240099, 0.6195991719342547, 0.6227297938639322, 0.6284738072714547, 0.5548992929945823, 0.5416658828311707, 0.5848669247143425, 0.5528051163252368, 0.6785332996776757, 0.5806004778403442, 0.18593167643573633, 0.38318927736500424 +400, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.00538163724710359, 0.050246851326647975, 0.00325623383324987, 0.016089404836314707, 0.004768961434464644, 0.012975554662909325, 0.014612779422905292, 0.036453046922170884, 0.03669851726847946, 0.06053063401623625, 0.07734802668205788, 0.14448615467437756, 0.24953322777140308, 0.34806276783515594, 0.4229567261622065, 0.4873077681738967, 0.5401722415436365, 0.5521510226102508, 0.6000517399892216, 0.6107765515229574, 0.5870927019689605, 0.6298630970573851, 0.6879023365675971, 0.6221611553796009, 0.632263810408655, 0.689461445849211, 0.6390236708841557, 0.7242036199282817, 0.6557168681820945, 0.21069080034931634 +600, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.009258546378795182, 0.022829316518316413, 0.022698074547786367, 0.012736836086937675, 0.016469563173777596, 0.01913720324613999, 0.03173961484046805, 0.04293589176349238, 0.08585848446208531, 0.16926121837954017, 0.293436232527367, 0.3543603601267507, 0.48651755499862337, 0.5103148855367983, 0.5876985421521675, 0.5784255879120095, 0.5938007169568057, 0.5598080715719793, 0.691548146841681, 0.6943388099375437, 0.6996541955589088, 0.7434201980299975, 0.8365119642131629, 0.9095567810750043, 0.5207569176305396, 0.7405911308670332 +800, -2.4, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4 +, 0.008917934185414377, 0.01017895688795886, 0.037528784049424314, 0.02798827469166613, 0.03137703539242772, 0.11784556048768703, 0.11121306048524869, 0.20430912771074103, 0.2598593792958281, 0.4306348256035734, 0.46316119541365697, 0.5405314728294079, 0.539282096838667, 0.42055185929928385, 0.5448818087581953, 0.5997338164946914, 0.62308312092143, 0.7089840268242462, 0.6436353618329662, 0.826552573493094, 0.7908826508888537, 0.6905508284818629, 0.3823632872193804 +1000, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2 +, 0.006152180116633862, 0.015427371964555698, 0.02331992788794896, 0.10944473717642993, 0.19333261931256743, 0.2004513811627833, 0.2384363292885486, 0.5272892625055869, 0.5168199037063749, 0.5652991338441917, 0.4397653398451027, 0.46013409044401904, 0.5175981692561336, 0.6704643484850927, 0.7969708452261104, 0.4745152293484279, 0.9101407067992686, 0.9288992619408138, 0.8325611428419273 +10000000, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 2.0 +, 0.0013574547186773595, 0.07926513808931503, 0.07102964878743583, 0.0726328476783432, 0.188665578230727, 0.4670863411106134, 0.6080090637275772, 0.44379833749922704, 0.5310140600224029, 0.5931610388683948, 0.4655146952326047, 0.7948299079449878, 0.45438605875039634, 0.7676093316330358, 0.5325662206236474, 0.5570031538223215 +Q +200, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.8 +, 0.030660402054098843, 0.029515962408728325, 0.01386298123421587, 0.03323790765774019, 0.050077081129415675, 0.029026658778299946, 0.04803400920855964, 0.046080800910896676, 0.05350762941049219, 0.07623076885791424, 0.07766677224262616, 0.12818678386245805, 0.13808429251771162, 0.15976782729500769, 0.18553311032498795, 0.21473885233239454, 0.26862488576858196, 0.3335898147114968, 0.3933292215057105, 0.4471255648270871, 0.5140106474150711, 0.5606446177282451, 0.56645579177951, 0.6187003826533546, 0.6264565231734968, 0.6902587142708823, 0.7310434998635741, 0.7404822151595194, 0.7455970773478046, 0.8194310136729327, 0.754028761152219, 0.6904665436774613, 0.7865490878301985, 0.8251017523682402, 0.25767625767590513, 0.09683794373033726 +400, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.015174619218570292, 0.037092256738479906, 0.02807957626685945, 0.020952215954002592, 0.012490724790011861, 0.015060526993713729, 0.02337051753316606, 0.03585907871833321, 0.04997995343607782, 0.05116995577905059, 0.08421567659761686, 0.11469062311930732, 0.1729106310315939, 0.19279889620933457, 0.2305248874399254, 0.26979519803194807, 0.35005713230775476, 0.442197230272885, 0.5123688583661171, 0.5530137422740864, 0.5569824269831563, 0.5644003448573167, 0.5847125012080069, 0.6854939519416933, 0.7023668672066997, 0.7154562402783202, 0.7676568753108612, 0.8390636087066714, 0.8073438244745248, 0.7137044911123218, 0.7005129526561815, 0.660501122004602, 0.977346670748799 +600, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2 +, 0.06409443044310832, 0.17043537478138396, 0.06708416589502411, 0.04885363429869391, 0.03348033250104629, 0.05051027800044158, 0.027081552065751212, 0.05641650262162609, 0.08745592321636787, 0.13269225526345627, 0.17856051100094275, 0.2604735522213605, 0.2257012643447686, 0.33727227847072533, 0.43694229465002715, 0.47575874028429543, 0.5515806648065332, 0.5766003713260374, 0.5333600150424079, 0.6251127815619932, 0.6323814616237637, 0.7636923593854934, 0.8150120235799707, 0.8554510812808985, 0.8528317416457601, 0.8932737202285638, 0.8996973853124699, 0.7504095750846632, 0.0782035688876777 +800, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.6, 2.8, 3.0, 3.2 +, 0.008569761190854706, 0.01818566336086026, 0.0035886737075778684, 0.019557202027668318, 0.04730700327264522, 0.11713253719294132, 0.11747711101000212, 0.13566131005576462, 0.22173593877845912, 0.23226589196469324, 0.3285201642634684, 0.40175918428239643, 0.514273714962315, 0.6426839325030723, 0.5592607511903168, 0.4484374500207914, 0.4271084024627013, 0.5761775665904221, 0.7207597567939774, 0.8261386365447307, 0.9533012758522402, 0.9546438827372017, 0.9144745505555422, 0.5300797598551829, 0.3222227681422887 +1000, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 3.0 +, 0.03406830709780076, 0.059250254494420895, 0.06295161152712787, 0.14778317919449488, 0.2052302207229962, 0.18103793431053206, 0.27419636115330304, 0.43791113182322405, 0.5014274959179482, 0.6332032204767004, 0.4625651540928214, 0.5822609669670592, 0.46439614255985395, 0.5769223811890896, 0.7117235531057876, 0.7830268783073607, 0.7662000487154872, 0.9574188255261584, 0.9791270764706063, 0.3459984609465178 +10000000, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.4 +, 0.011375782562223234, 0.015110412493978646, 0.025236652426745946, 0.08429389717841733, 0.14087146909054712, 0.11134410528964563, 0.7012573537893643, 0.6706932505976297, 0.36458107960413166, 0.4313977123835829, 0.5936455596283988, 0.6425632118499391, 0.5015729047474079, 0.692265646351462, 0.8633350923482849, 0.4146853327478658, 0.4854770135494893 +L +200, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2 +, 0.022694200314865198, 0.04438120468049618, 0.2034621056438575, 0.09596674258314453, 0.0936871324670998, 0.14776469827002428, 0.13802184826675024, 0.13439766666587188, 0.04220458436568829, 0.16944536376489286, 0.11668704319818315, 0.10097026506035328, 0.13321742110406912, 0.1826244747204611, 0.24029848496689793, 0.27293725510554856, 0.3702265782860514, 0.39675970663839577, 0.3865827048643012, 0.4121574468469467, 0.42297029574231776, 0.42374694961798354, 0.45387310170747625, 0.4990958786276845, 0.5249310443913181, 0.5568838889388209, 0.5814034735034034, 0.5874918865708025, 0.544773016253518, 0.5740018578298114, 0.5921713379469711, 0.631807381420908, 0.7064114207808031, 0.7452793584039196, 0.5607075738856433, 0.6177654347620544, 0.2210712700377047, 0.0341445893559449 +400, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.022810154959402515, 0.022810154959402515, 0.007720793314408286, 0.020949129787512125, 0.008085477457937203, 0.025751402801163902, 0.010533333633145176, 0.019532582257393728, 0.02675455267790389, 0.04368701982880921, 0.0642728570843146, 0.09326829811586024, 0.1600825548451298, 0.2628755953431343, 0.33349628915200696, 0.3715599414484014, 0.39048003188172026, 0.3639567373219425, 0.3686159885628984, 0.3815167578493698, 0.4323222079737531, 0.47570929722908906, 0.5414607289365889, 0.5729269739868003, 0.6300711763621937, 0.6385473260853091, 0.6476475561759117, 0.6476414812252087, 0.6798341599008929, 0.7011957467766897, 0.6072402235385015, 0.6366008002469443, 0.28404340538354134 +600, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.004522531317523935, 0.005379331911902031, 0.041373584208902116, 0.06341550713400419, 0.00541136917154892, 0.024970967450366772, 0.01737419159452633, 0.02698710179147721, 0.10931342415377847, 0.16986739364325762, 0.3018235387326877, 0.3955846475210277, 0.36463488371059793, 0.35591519236678093, 0.33945447736638934, 0.3474316317416148, 0.40674510340538544, 0.45543036568909234, 0.5303127712434488, 0.5480395796161592, 0.6182397608837148, 0.6337199392749969, 0.6954318960326403, 0.7741570775389336, 0.7714912509580867, 0.8938303831713577, 0.8447712444019307, 0.6180977910562903, 0.09687554836070501 +800, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0 +, 0.00376740149279639, 0.008994324259810987, 0.011217681458643158, 0.01782829505291646, 0.06663319133607505, 0.10356871471685111, 0.22278722861655195, 0.42553503993613984, 0.36496033595587996, 0.3610925735058211, 0.3820858282736695, 0.4198207783566425, 0.4120354668294257, 0.41931435853443944, 0.3957678881854993, 0.530671191878201, 0.5316696899190078, 0.5311791062303839, 0.5776547205659004, 0.6069486624133318, 0.6843818658889624, 0.6689819508356897, 0.851214696227136 +1000, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8 +, 0.032368973346990515, 0.13969512844032048, 0.2276500581125476, 0.4431061395070267, 0.44559967376517107, 0.4080484956725524, 0.345312870981004, 0.5593329427588312, 0.3453546578106801, 0.39706278392354083, 0.4575762231727116, 0.5177464816296974, 0.47914956650885854, 0.5118580467178341, 0.6401841274969214, 0.6712200329105288, 0.6463117979877456, 0.42810448131912826 +10000000, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6 +, 0.01782272397306565, 0.09395030002738014, 0.28736733981389734, 0.4610503140581492, 0.4504825574929253, 0.5433177175779089, 0.39843618244538137, 0.35264792682742047, 0.2477238149909607, 0.36972491007649827, 0.4492191259986524, 0.4335075346288497, 0.5333388835840573, 0.5258079002931256, 0.4621631821269529, 0.6088093248295579, 0.7590881193363881, 0.7903597389905895 +S +200, -4.2, -4.0, -3.8, -3.6, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.12438418712700766, 0.017446874253851875, 0.18519360573679758, 0.22124855285421674, 0.059752889119277716, 0.042504821227910966, 0.0663164525876336, 0.029121816870577095, 0.05492112929293922, 0.06720779941392006, 0.08127909407093194, 0.0560348871102672, 0.09659058156200162, 0.10353812840581252, 0.1210800822205396, 0.1562651703452635, 0.20319933061104634, 0.26245317523800094, 0.3369190441521257, 0.4095080052105503, 0.48191521218608413, 0.5284157963491289, 0.5606549634969592, 0.5950347464160363, 0.6187357500970652, 0.6470608094279561, 0.6356898770675693, 0.6714774329043008, 0.6121942241790169, 0.6095743971384333, 0.6564633462830982, 0.8280795031669954, 0.726251886423071, 0.7056292388804567, 0.6339622337745136 +400, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.03629666034518226, 0.010251346587675996, 0.00588376225845094, 0.017103038428544992, 0.014167000294475663, 0.027002831996804307, 0.022073022212184695, 0.03815019381933721, 0.056348100149132954, 0.08949481882232799, 0.11963538365342391, 0.17229156999292647, 0.23102140894642761, 0.30799404180594553, 0.39670138039825537, 0.4994930747566133, 0.5572615383451857, 0.5696161186424068, 0.6158152862031046, 0.6439833627431268, 0.6519249573567936, 0.6333835930691046, 0.6961475696922559, 0.6193005635430306, 0.6552521049455082, 0.7202828580642087, 0.7532262221700042, 0.8334731780932044, 0.2368772002791371 +600, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.013059399423161333, 0.24102871126123523, 0.01585339152122089, 0.028060159218492607, 0.026905462227703764, 0.04927252800462799, 0.03723841497717851, 0.02803294010626132, 0.03829902396434643, 0.06344601230608479, 0.057968769867864034, 0.10541929960012424, 0.19562626406778896, 0.27703475443325176, 0.41179023162123574, 0.5335069983729668, 0.5546150860338063, 0.5747348009876617, 0.5514881911764865, 0.6364965911968703, 0.6801059018570212, 0.6534703205286367, 0.5564196913416785, 0.7302176125008304, 0.8131069350450936, 0.8027519219958231, 0.6085485091562549, 0.8202839094617357, 0.405278218549064 +800, -2.4, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.04216693629487124, 0.0043830307084839195, 0.014462196442335668, 0.01919041673092326, 0.01977825622316669, 0.023712744831969675, 0.055443290493752295, 0.08851448392127609, 0.11455256546377275, 0.2328694553482898, 0.3367326328850246, 0.459317221407433, 0.5879316224828962, 0.6470056873737324, 0.570650862440862, 0.7095801714949331, 0.706462120036267, 0.7170494260774206, 0.6295006361454005, 0.7778910581389612, 0.7148705132619393, 0.7592112207571959, 0.7482104188792188, 0.9522502952396771 +1000, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0 +, 0.026214357205221576, 0.04427631406271417, 0.1264935961447764, 0.14077609356326534, 0.2960780435431137, 0.38160536439121107, 0.474947107253397, 0.5727918213213382, 0.6855543310528419, 0.6138913582635468, 0.5778692630210621, 0.6580943515434279, 0.6050444129262045, 0.6168509337333394, 0.8288146290440119, 0.6657847422198185 +10000000, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.2 +, 0.027142096860031932, 0.013757755597518209, 0.0227211975407645, 0.05284974093264248, 0.048659901118917506, 0.16142942336804442, 0.12657774238502886, 0.26692784650029305, 0.3779063407756724, 0.643762567432302, 0.49130042503233945, 0.7242627649143978, 0.6783062480117502, 0.6304716291654356, 0.7038812933324693, 0.9237125448626993, 0.620579612380977, 0.6038819322983577, 0.4726479391294941 +R +200, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.03207726503553209, 0.005274482832016623, 0.02353481066931443, 0.01858536618468486, 0.029482970704681824, 0.029822145312603715, 0.03156800848371642, 0.030513654789762576, 0.04606365662704011, 0.04081943283545797, 0.05812095484759577, 0.07558217960358522, 0.08275712090661415, 0.09765221787115734, 0.13423340776679776, 0.1489303205649009, 0.2101302968591223, 0.241768086761866, 0.28003078459011693, 0.3620682642630574, 0.41228413694312804, 0.4842228134280171, 0.5208837054055414, 0.5601867659345883, 0.5971129002888642, 0.5931505256179169, 0.6398668937991495, 0.6522501064755667, 0.6681713881294856, 0.6631087700660413, 0.6581604871860909, 0.6224264678321053, 0.6767846770830652, 0.6536296591076727, 0.47393142233152774, 0.6996554390188527, 0.5687643264275022, 0.6981446635867379, 0.4736078327732734 +400, -3.4, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.06120237498398166, 0.041651302875030785, 0.005403336877600516, 0.005329713060580334, 0.014009522483041804, 0.030143197221196488, 0.030445491091082598, 0.029049177244755166, 0.04466300930040355, 0.02959186639672202, 0.07858217329768569, 0.10613250573098461, 0.13756433589801076, 0.1753766185741036, 0.24220992595864874, 0.3379268214752498, 0.43933847181192914, 0.4687608305155847, 0.5219843880663324, 0.5378031723967835, 0.5885073150547451, 0.5790215715229141, 0.6033105062790582, 0.6369385345570912, 0.6367438494487759, 0.6442980558476543, 0.7448119005362304, 0.6787320027676245, 0.7192587968629324, 0.6923730973665412, 0.5134331453351957, 0.5810559726136121, 0.5684926350975337, 0.6125402492396689, 0.9289869625201223 +600, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.1378365503565375, 0.050594717687005665, 0.12781834109421955, 0.08752773884720516, 0.049670070100221224, 0.07664827304436632, 0.046105225891738925, 0.02153118141988729, 0.03233228014945535, 0.0604699995627281, 0.053891025109674896, 0.06548772677419284, 0.15524097503420448, 0.20322318539844983, 0.2685506473941544, 0.3672922083066144, 0.4728367869025848, 0.5215150279053673, 0.5827726312548501, 0.5019429810469788, 0.6236707269413359, 0.6381821952554616, 0.5617610775185542, 0.6050454853873801, 0.6781155911224431, 0.6977041177757346, 0.7921057139590649, 0.6326622936336238, 0.8560845234345356, 0.8638521228076326, 0.9234678570523027, 0.5228541729414256, 0.7057173072099404 +800, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.012317541353916594, 0.006880746923185741, 0.0018860052516560708, 0.09200540112678679, 0.03267249789183022, 0.07654308724863221, 0.13111551917418324, 0.11110315232892057, 0.2858352233385768, 0.3183838804941956, 0.3214764152349552, 0.5381027132381613, 0.5154858992781721, 0.5938759396466544, 0.5317669156056538, 0.474571014220306, 0.6656176259936978, 0.4470667687414132, 0.5694015228099887, 0.5721682279897327, 0.8456605579912806, 0.6845196622874592, 0.701356537506164, 0.9379461680382511, 0.47849324750243555 +1000, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.03673099779274436, 0.05975508700856275, 0.11729622266401589, 0.07431155893971492, 0.20129024254078534, 0.4122602456482906, 0.6700041328568925, 0.4307533654784136, 0.43106406500951033, 0.4362086337224014, 0.4358870724581107, 0.5947155769405055, 0.5170772477786677, 0.6550101981782633, 0.42172408225949354, 0.6801152737752161, 0.5717836886325366, 0.8028045185803616, 0.5636513233075834, 0.32157261133978665, 0.7451205510907003, 0.25624149496885484, 0.030797703222132593 +10000000, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.8 +, 0.0062919463087248335, 0.024701523260601082, 0.2840737382895135, 0.0578473552912253, 0.07021063189568708, 0.436086646036658, 0.5269060018126795, 0.3787509834038887, 0.4402173913043479, 0.578105949559571, 0.6284310137501962, 0.7335907335907337, 0.45416143979928836, 0.7206038447930181, 0.9030250931270212, 0.6380443086325439, 0.7962851491959756, 0.7771192021827078, 0.4714806276492899, 0.3111369584181448, 0.5469497035762096 +E +200, -4.4, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.8 +, 0.009621440371994583, 0.004146270499067931, 0.027007253515549435, 0.03136727179124811, 0.038744876752604566, 0.016229285222223038, 0.03822370326896233, 0.03570001601652651, 0.04401784840638429, 0.05086975856820555, 0.07644960546391222, 0.06614806173185703, 0.061318793235008814, 0.10185835962162645, 0.1450144368887007, 0.1425492047876539, 0.20799587783194384, 0.19641586610839798, 0.2043744860695266, 0.2275087023393559, 0.2756277828898441, 0.3308814934337169, 0.4129586159308165, 0.48035942769144885, 0.5342480296805483, 0.5657700139485319, 0.6110696594264812, 0.6158626562381674, 0.6120291915122046, 0.6455192674095419, 0.6780413894925083, 0.6495724311929135, 0.6361403433588055, 0.7950927440077705, 0.5949832111286862, 0.37058920504165416, 0.3524209038075929, 0.5271389454687425, 0.7803589040683762, 0.47464831353328946 +400, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.017589676152591112, 0.06683204264988173, 0.01657213629129284, 0.00332003136981703, 0.00930518388267171, 0.005974036257469811, 0.017903762602890994, 0.03761496143931975, 0.03408447798140072, 0.07714241431466798, 0.10029575266470864, 0.09561574949799023, 0.14597655312457017, 0.15454703000082912, 0.17666151890870305, 0.18425024121949826, 0.20492924164637813, 0.27328431284733345, 0.35372364617784047, 0.45535119003288305, 0.5450906270210514, 0.5819563761275088, 0.6164230496799653, 0.6272027332867812, 0.6065517245120872, 0.5779706100641258, 0.6540444997527108, 0.5860082895169939, 0.6757729762046188, 0.5782390265906364, 0.6483029111399775, 0.7238765375054353, 0.8145822355514108, 0.38720430152211993, 0.29944373638984595, 0.26181929584821206 +600, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.053283575664541366, 0.03616471216877128, 0.06326608218206026, 0.011131203387245636, 0.028527095216323052, 0.014063364780183754, 0.045519433969399455, 0.10546598100346138, 0.14949350502179756, 0.15101877591261562, 0.09738810031195794, 0.13481415571820254, 0.14257886566448752, 0.2860309312905558, 0.3680760044864281, 0.4681448135606153, 0.5807334464914079, 0.5840788193716014, 0.5684825986445871, 0.5423637974395175, 0.6322784178809525, 0.5910884453929658, 0.4403967228080618, 0.7715571363898848, 0.6055828711644718, 0.7943209953485183, 0.44098092121701576, 0.8394721618942949, 0.771295161426513, 0.28710576355040146, 0.07682020988610647, 0.011131203387245636 +800, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.03430651347512906, 0.01170316774637141, 0.02172101047389925, 0.006417685703626693, 0.008803131942231902, 0.02558597050998453, 0.07306274568825875, 0.11280115830989065, 0.09350632912488134, 0.19757784784170848, 0.13668996284243146, 0.10109885106932971, 0.21372922331058639, 0.33935195047966055, 0.4835653244772779, 0.5933154629689057, 0.5389606803781795, 0.5486205951197954, 0.6256878350116513, 0.4954150416424488, 0.6982028550061831, 0.7725732080733803, 0.7556245509596634, 0.820419992617725, 0.3871956296488177, 0.21161330536631878 +1000, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4 +, 0.007075408536552707, 0.052106342694856415, 0.054267687080583535, 0.11138738604476046, 0.18238487903712933, 0.13756590467213264, 0.20171268632711103, 0.3204675946135979, 0.4939881373188593, 0.48725191860865325, 0.4577231292051552, 0.5029274757637503, 0.5911749097279292, 0.617890908127232, 0.6754028092464903, 0.7538926271666511, 0.7790160448683208, 0.9317881518423954, 0.2815681472036956 +10000000, -1.2, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.05348182058279778, 0.033963789927669706, 0.16707500121047786, 0.16511036477645546, 0.17236127301119492, 0.10153344754105208, 0.5210622228521675, 0.5405779170203302, 0.6467331482363765, 0.5613844499745355, 0.4960746174216681, 0.6196549070937729, 0.5823067577399326, 0.6626260661097897, 0.3857996700919029, 0.2655828409440213, 0.7804169453620828, 0.6799529670918482, 0.14494194369333543 +K +200, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.8, 4.0 +, 0.006233425622353032, 0.030408921119546396, 0.02093592220185473, 0.03558424628095059, 0.010346048488097845, 0.005378266919520889, 0.03131994736626652, 0.028487448042530204, 0.03379094987238925, 0.024700449398553797, 0.03347424071928632, 0.07302434835089781, 0.073512659195887, 0.09610703764665972, 0.10795809398583348, 0.12494848067773846, 0.15366097022715058, 0.19623704670279507, 0.20948968747096094, 0.24338255490000843, 0.2906241049173688, 0.33876574586758207, 0.4184822248111851, 0.47928225866895335, 0.5290089476862202, 0.5603050017954271, 0.5786006171900762, 0.5901574708056799, 0.6223281637221282, 0.628128623412185, 0.5921857112354082, 0.6140101201683108, 0.5920359569841578, 0.5965921083365542, 0.6087237791828294, 0.4924534069623098, 0.38684136208760095, 0.8267798205668004, 0.052443291913803605, 0.13555614153669435, 0.4949704158969042 +400, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.6 +, 0.020798610371752655, 0.005632200186423676, 0.020798610371752648, 0.017012541269074165, 0.006032073496491691, 0.01364226026152598, 0.021143675648025915, 0.01868251927506294, 0.025685901851698386, 0.05158053569829252, 0.06125362327569112, 0.10431760125648461, 0.11657963235000496, 0.16124223048718866, 0.16595610614723216, 0.20943134871276328, 0.2710357434275307, 0.3346119224884066, 0.4332968718252851, 0.5110259226245114, 0.5749134438517876, 0.6081320558919092, 0.5874087675618509, 0.6035394962722405, 0.6231341763893807, 0.5835358073444723, 0.5961581174202724, 0.5709563638636703, 0.5779902811937659, 0.6074718329071743, 0.659698021432162, 0.5065478271339936, 0.8797381245584289, 0.7417154908480318, 0.44066114867280576, 0.3040791284756775, 0.15208479719465084, 0.0783083282618651 +600, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.08005202718154787, 0.04962009188671522, 0.039406216500345155, 0.002740406190104946, 0.011403405751254717, 0.0028098082516713977, 0.0071633756207432455, 0.03306075603501498, 0.0646831514898025, 0.11569513004064116, 0.13990454263335425, 0.17679877588621143, 0.16262258352799974, 0.1706813596201359, 0.2931339965678484, 0.43799455936872084, 0.5507332991803784, 0.6083433873274956, 0.6506958124282605, 0.5950317952941324, 0.5577837159753122, 0.6396812143891745, 0.6025343792533054, 0.41729136641693454, 0.5159270205746278, 0.550689666206242, 0.6076331037708719, 0.5624524359539496, 0.6696235241307377, 0.8959934752809087, 0.07262822815281679, 0.13051495642939867 +800, -2.2, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.018911760605919804, 0.004795965261657025, 0.045975193728396195, 0.008989657476380065, 0.017318826511208574, 0.025057718947206414, 0.12261710593295176, 0.11213161725895983, 0.19187686131466689, 0.14188715644056538, 0.14546530966094284, 0.31206534648850154, 0.47086768089542014, 0.545789218740381, 0.5885204739595565, 0.5773710383535828, 0.46045973024930353, 0.5908802815580871, 0.626959762836653, 0.6316980119840698, 0.664414162678641, 0.79310547563987, 0.33278822567457084, 0.7061514195583597, 0.15356389927792902, 0.054667562122229715 +1000, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.02052890441228883, 0.04023189215617797, 0.07663031858028652, 0.20025096556556882, 0.18400997644450603, 0.18611930275336508, 0.21527083749750153, 0.3970930399563381, 0.4481132941803083, 0.5686396636354857, 0.5301579703207275, 0.621978803891937, 0.7140332311751852, 0.6286470990555741, 0.6377560435504707, 0.7720935141696131, 0.8320930630399452, 0.3946962688868332 +10000000, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.6 +, 0.01260629568849769, 0.01879100107483044, 0.09267256151895265, 0.04568967070994719, 0.09962589275592335, 0.11544315827770806, 0.28789943693289816, 0.2591618348295238, 0.3929734264526971, 0.39127635602768385, 0.5935754756602113, 0.6145883983450332, 0.3876823250131941, 0.6618930447590909, 0.6606724003127443, 0.5138853185066581, 0.5624084011945034 +T +200, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.008187665742003893, 0.028861201409083426, 0.00980913610487576, 0.1083985994398448, 0.0598706444724795, 0.05947128234147885, 0.16040484993339152, 0.09915598512252316, 0.10446723349172699, 0.1200298989675841, 0.15094705758522858, 0.1328601676913035, 0.07572629791473424, 0.12872358724292082, 0.14537735848143038, 0.18757394078969675, 0.20983017792030184, 0.2754583875906324, 0.3381900390309666, 0.40271265447333354, 0.4729359584475696, 0.5373178412824395, 0.5595641713342255, 0.6104980864110142, 0.6378975434547939, 0.6441654366086963, 0.6732334439933628, 0.666053356346672, 0.6774517895349775, 0.6637156928572294, 0.606772055426944, 0.6491227745638032, 0.6968486954506264, 0.6098259501108972, 0.6265547114255277 +400, -3.0, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.0027025687608381557, 0.004064194112156794, 0.0016032875228119338, 0.009757997483425634, 0.007868980509490626, 0.007607238389344213, 0.02595046601655586, 0.01905911002852271, 0.031882814581105576, 0.04062653475175, 0.08168889317790175, 0.1302149726190696, 0.17840065319707346, 0.2606656745972047, 0.39450792466149653, 0.4911094546024143, 0.5585520055189517, 0.5923224948870527, 0.6302384579809271, 0.6457682162071837, 0.6946071862394861, 0.7185853742529493, 0.7454414752360349, 0.618499419222971, 0.7074628958097988, 0.7352779958711105, 0.6955516339755666, 0.726348989935302, 0.31671773573998374, 0.40958798265579704 +600, -2.8, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.052328852070039164, 0.026867396031232334, 0.16837658222176605, 0.024245798575350842, 0.0262292817988048, 0.12130083036303745, 0.0613620195234056, 0.060587459883910885, 0.05055444507030803, 0.07451277195194778, 0.07160801588372659, 0.09814403889181059, 0.23180293729028179, 0.37716308908081375, 0.5000132531217487, 0.5844300853732715, 0.588706451584414, 0.6364889102697228, 0.6447154143653666, 0.6571490187910064, 0.7745048328842353, 0.6898685260527815, 0.5933031009014547, 0.8136253894039864, 0.737081747390056, 0.612229773163282, 0.8993016606028706, 0.17838061372014036 +800, -2.6, -2.2, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.8 +, 0.021818989702759535, 0.021818989702759535, 0.026069027674035287, 0.01465256116221214, 0.029619466548546323, 0.011029824666793777, 0.019680030570921273, 0.03947987072242306, 0.0986257950403479, 0.18456806333044862, 0.3139427691570446, 0.4815565268749844, 0.6261430195281782, 0.5140415380874448, 0.5665602405952214, 0.5992870215665328, 0.6250365102046636, 0.8048492147720124, 0.6377275954637704, 0.5701006015265965, 0.8557024286413152, 0.9530038501783763, 0.8085467849780019, 0.27882798691668526 +1000, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.4 +, 0.009332428725528, 0.04925965308388099, 0.07181890841950693, 0.1406860776336484, 0.259162393696497, 0.601915813203475, 0.5614990245451659, 0.5400938444987884, 0.6009355243934302, 0.5240251717766059, 0.5904347159672351, 0.7086467981563515, 0.6532544497183701, 0.7830103565979136, 0.8442480557193919, 0.6152519207547671 +10000000, -1.4, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.2 +, 0.017400075652502834, 0.013968671710909226, 0.016258931051023752, 0.02276972220938904, 0.07144236497729933, 0.25014108242074024, 0.6377278912714578, 0.6213497886400078, 0.8644058949419727, 0.43810672452330535, 0.5254430132270977, 0.8481163148765324, 0.3798431831480397, 0.7667171569008974, 0.8092008618156888, 0.5447444189442937 +N +200, -4.2, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.0712065157005121, 0.13294638271304174, 0.024918407202641813, 0.3991956150411048, 0.0953625460996715, 0.022620790870142397, 0.07653812401707984, 0.04013908322757407, 0.06637157555040195, 0.08790716077730971, 0.06987895197872204, 0.11594595731928202, 0.09469654486442684, 0.1055032820197743, 0.11677327019941976, 0.1383930868361456, 0.17556655708200233, 0.21274981636519386, 0.24681031402251496, 0.275707492383167, 0.343676483955714, 0.41361073312621865, 0.49954020026571794, 0.5289597425675846, 0.5644353295028, 0.594018016380281, 0.6394736076806113, 0.664612890069819, 0.6676529289997108, 0.6609569315008057, 0.7241923463576184, 0.6799056719677031, 0.6618977735500067, 0.7626413640672547, 0.5363488878232969, 0.7741958263705373, 0.6860956762633909, 0.7969009695833165, 0.7827637598777691 +400, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.001128461356220943, 0.007744997057307509, 0.007104165781121, 0.012715233504607883, 0.01992997097665505, 0.010023506476345678, 0.008734440583315614, 0.012766891527232208, 0.037250387032780934, 0.03554618185109885, 0.0641277000435746, 0.10383126855713888, 0.15817420705543073, 0.1590150077356472, 0.19733501123405667, 0.2655449837641665, 0.33774475148059496, 0.42156779664100374, 0.49403682221432815, 0.5567834425997928, 0.5869474638861647, 0.598529564395528, 0.6427745755499635, 0.6511468650484329, 0.656275764390928, 0.7339886223828026, 0.7133697636691161, 0.7833908369222597, 0.7814001135653762, 0.6921926967996985, 0.6930677127575958, 0.8719006330411663, 0.6993407299981116, 0.7520194008570942 +600, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.012861627109688046, 0.05731785655357574, 0.07991944732610307, 0.08479562252863253, 0.08630884538516512, 0.06730490514845179, 0.008611336673529002, 0.024364202282699095, 0.04027411837341045, 0.05638279176751919, 0.07866817897417579, 0.07014008024714515, 0.1488228079108204, 0.21117858715982965, 0.22492604700759586, 0.3527511628371557, 0.4612776292791651, 0.508376750438461, 0.5978425447842742, 0.6169494954975383, 0.5870009692193582, 0.6834443025176401, 0.7503292713151367, 0.6041252831156599, 0.7114403688322494, 0.7942233006410815, 0.8025344848026892, 0.480061963819044, 0.8510863288832535, 0.4311453569540338, 0.4549099721194074, 0.8294748061125389, 0.3232898151906798 +800, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2 +, 0.019989818428644154, 0.023892261719647902, 0.0029054710661450957, 0.004062937593554483, 0.008984136668700427, 0.010308406280718847, 0.08691527710437, 0.10361026893347543, 0.04789619477114294, 0.16745026833775423, 0.21747643195160038, 0.20845806212626344, 0.32694891534008996, 0.47723349576907653, 0.5295067551508112, 0.5770392423901299, 0.5730686049665393, 0.5894890079270304, 0.6047381214895978, 0.6682541217110526, 0.7311441820863821, 0.652518439576027, 0.8361938939030221, 0.4820988922476904, 0.7577299982101305, 0.5925855581398125, 0.12158342006740268, 0.9351822615425827, 0.12598320331575102 +1000, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.08803701255783213, 0.09574103749053965, 0.08474819481634101, 0.17517515123980776, 0.26799302520655116, 0.28439407716762816, 0.41648646362717917, 0.5455595697137675, 0.5615697118402637, 0.6793471491223992, 0.6046007911293165, 0.5491817816902066, 0.49692743170413184, 0.7221889848936341, 0.5269348636773619, 0.7588655952688864, 0.47213759827611784, 0.4709761521355724, 0.643696648197198, 0.20472622478386168 +10000000, -1.4, -1.2, -1.0, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 2.0, 2.2, 2.4 +, 0.011076077289999191, 0.021909483447944987, 0.019761832256823684, 0.1397123465907093, 0.42129914368169563, 0.0812885393899792, 0.40490640849438697, 0.445164695597671, 0.5457577680850202, 0.6138506965124918, 0.499762804469091, 0.6076612903225806, 0.6718496818294005, 0.36172655263459996, 0.30939476061427285, 0.7177078765779696, 0.6569729941950139, 0.7172609072522392 +G +200, -4.4, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0 +, 0.04980271364834668, 0.08033718293586467, 0.02137202174972912, 0.23924182209704178, 0.04290368826652217, 0.10995998186386532, 0.09077215489621959, 0.020063069662946225, 0.05199866894271401, 0.09869248618709753, 0.05755910536963877, 0.07335095177942563, 0.07836111992160895, 0.10947432785061317, 0.1829574600664543, 0.19644932151930236, 0.2475476355976773, 0.28047029664287276, 0.3663585502825831, 0.41381370184743865, 0.45028476809894513, 0.49271429268477074, 0.5257516371642744, 0.5380569146271968, 0.5816939874640986, 0.569518767778985, 0.5743891432518737, 0.5686338321658405, 0.6140459068175762, 0.5643093026733956, 0.6011486020284298, 0.573474665378709, 0.5168116740045788, 0.5321248352677072, 0.5278162040229152, 0.4301895642957476, 0.4371969736562028, 0.28501611757799006, 0.6434525427174271, 0.28996678413494487, 0.08989837533651014, 0.2567539583435563, 0.04184963224881832 +400, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.013901301934598695, 0.004289024917785121, 0.013437974346902313, 0.007368860439472664, 0.01073447463708951, 0.02777219816300249, 0.017735008916501906, 0.03167632189935238, 0.065395714271814, 0.08023970903915105, 0.11154164414214832, 0.2022512296813042, 0.25545491618906413, 0.3536476783862624, 0.42363655299206915, 0.4684936278546968, 0.4921050743779281, 0.5494874471369424, 0.558926685575915, 0.5687086639940497, 0.6215795839689724, 0.6083484928768131, 0.6314576358198148, 0.6230514702472063, 0.5920065807809958, 0.626983997044515, 0.6050340178513397, 0.5291775304616348, 0.49878218646796507, 0.47333053527490554, 0.5819171331727555, 0.5436606285875814, 0.7368953451348795, 0.21159919104802896, 0.2423277350632243 +600, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.004262592522543604, 0.009609989324161305, 0.040722908138649094, 0.017614076524928034, 0.0093627162404978, 0.015355034655796965, 0.024755600324803256, 0.020194055025720813, 0.026706288439159422, 0.08077741729614026, 0.12928457280333558, 0.2529615159130915, 0.34196845700567596, 0.45149860216958276, 0.40996695404314654, 0.42578108033137246, 0.4803786191950474, 0.5843776520341477, 0.5586147764363851, 0.617306728496986, 0.6227856958198603, 0.6671398928615958, 0.6500952347555135, 0.6889882325738811, 0.6256734694615649, 0.5995168124878059, 0.7490707491628702, 0.5011582262180214, 0.5080490865168124, 0.28843898542192936, 0.6652919608969325, 0.7408142102868135 +800, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.0020230132774187795, 0.023747698329704935, 0.028075380703131567, 0.015626043218693486, 0.04235468455893636, 0.09197490603136489, 0.18883534980280212, 0.27670832943186874, 0.4442895339785569, 0.36389293680452, 0.5494049531835955, 0.4340033509928248, 0.6029975424434239, 0.5363372195839183, 0.574020584323784, 0.5723823552003017, 0.668482030254807, 0.4580004693100662, 0.7116840257389728, 0.5822536180791649, 0.4377759423870536, 0.6468675879501711, 0.7183741297796663, 0.6254979951414307, 0.5158137378302833, 0.7279496888294327, 0.2627362326894526 +1000, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.006489542114188809, 0.006949859307726209, 0.022534370804249342, 0.04516393000377678, 0.1136821257633273, 0.5110285116517171, 0.46770290612880394, 0.3659219700856653, 0.4583001142462624, 0.41336563823768924, 0.397921392614628, 0.39534194552429375, 0.4342297564398891, 0.5579332833345442, 0.6046583720178514, 0.41123271903157327, 0.6403926457323382, 0.6698778696734571, 0.5480418899094861, 0.7586576713030415, 0.7548134802193488, 0.6548685078706759, 0.9440873569829723, 0.7717038041572167, 0.23724929693196156 +10000000, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2 +, 0.021380286118534823, 0.027108017567662453, 0.1482481505468543, 0.600664441493963, 0.6398889295975626, 0.37057797159012834, 0.7850458683916712, 0.614502459890595, 0.3122958193267364, 0.8122341869514071, 0.5943585978600379, 0.7604878736966307, 0.5587283184181798, 0.6866167554855552, 0.4973986404656242, 0.780872442534018, 0.7371014288730907, 0.30209092437916923 +M +200, -3.4, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.02845963128097755, 0.006327814220719094, 0.03532321766363078, 0.02785817915545463, 0.06305230492182508, 0.06525558678224297, 0.06920333364821739, 0.09663310690550701, 0.09168272875852655, 0.10444060917510496, 0.14161496195972897, 0.18760094354688894, 0.27340880409079077, 0.3140034341765975, 0.3341867951289014, 0.3632541277201427, 0.39668565401586187, 0.43522081815108804, 0.47207835629148115, 0.5026342064038121, 0.5554008469913351, 0.5833574566458571, 0.6008099311783961, 0.6450861919646963, 0.6497380418171971, 0.7249028494100742, 0.7645552091301733, 0.7775959306800271, 0.7826666371582449, 0.7687189766034876, 0.7377750773840379, 0.8546113117648433, 0.7309510025155838, 0.5922461289520015 +400, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.038170835425479464, 0.01826291926366975, 0.008627909268057714, 0.005990921954905756, 0.007691489978484118, 0.020392739300842774, 0.04472291093102174, 0.060316255940233786, 0.06302004459220394, 0.1541038418593209, 0.22685507146016778, 0.2784664330885808, 0.29825937959171117, 0.3196733796620143, 0.3640325566040108, 0.40625749304857856, 0.4479345337346429, 0.5468608319197934, 0.5597030539512597, 0.6165686331561653, 0.6632688548164488, 0.6959674881486, 0.7903394987481768, 0.7268668913376479, 0.8235451001308638, 0.8275484601484625, 0.8098358326580584, 0.8637631783068633, 0.7737756627826707, 0.8647890997855323, 0.6977375511994904, 0.5247504661744165 +600, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2 +, 0.005736237861731748, 0.009523975244624639, 0.023891194668858876, 0.025234750802993748, 0.02552717930757656, 0.056254640669280716, 0.20941928914694077, 0.19788347655830058, 0.29589811372140384, 0.29852413139321216, 0.2897028729418557, 0.39073179258287705, 0.4552629356841357, 0.5593966833420538, 0.5750394291646366, 0.585085568055378, 0.7318672657089549, 0.6941092464581831, 0.8819680496498116, 0.8406532752846406, 0.8451650670206011, 0.9416795740780045, 0.893085997768151, 0.9110602722058794, 0.7163256112121613, 0.7174375236482226 +800, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.4, 3.8 +, 0.004674108580720676, 0.0035096825949236417, 0.02573551674322442, 0.08020943690055882, 0.2141222710358276, 0.3552257946322249, 0.323221883037281, 0.334294250957123, 0.2829357833432641, 0.43434992803525485, 0.5808355469054186, 0.6241893673747914, 0.6931880921298325, 0.5795185281057724, 0.5509178962895578, 0.8197337451110486, 0.736948316454277, 0.7846023423062995, 0.6580624097643196, 0.9191076830846109, 0.9023948888700153, 0.9474981632934666, 0.016170424235835836, 0.21365134335027647 +1000, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 3.4, 3.8 +, 0.0395955810122565, 0.20251297074083224, 0.2515696605044113, 0.23118137403932495, 0.31920693493675995, 0.32386507072905335, 0.5120874998766078, 0.5880070517335512, 0.7408938081106, 0.6469459262991496, 0.40303988237456356, 0.8411104193700822, 0.9040742300533903, 0.7482458141989218, 0.7670674781862866, 0.9574210199417486, 0.23437245866088377, 0.1630415456646714 +10000000, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.2 +, 0.005278592375366569, 0.02483900643974241, 0.21079571893904142, 0.25278114329772, 0.24822695035460993, 0.39404962972586727, 0.8361985706007341, 0.5839568257083283, 0.5340659340659342, 0.7478816708785491, 0.435701214440193, 0.7346019028542814, 0.5848733325174398, 0.5098265895953757 +W +200, -4.0, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0 +, 0.010053137251715156, 0.03614107661201093, 0.07513752318069507, 0.06232763609362001, 0.04090719053394041, 0.03012721074281631, 0.01999689051399049, 0.020024382749013706, 0.035560145033910834, 0.041624797523196214, 0.06142487113870969, 0.07038694508427773, 0.0874141479196364, 0.14373224227628087, 0.1930317693688374, 0.17608850960040795, 0.2837591992712456, 0.31751427975693, 0.37402457119572285, 0.3767044103235768, 0.3875467674943792, 0.5162805569385304, 0.5513809807468663, 0.43645713565312544, 0.5295897770124752, 0.5509452638284295, 0.6355399448481385, 0.6292792289200955, 0.6154280980913217, 0.5862191648292456, 0.692729444731882, 0.6933688155617883, 0.6525897180760073, 0.6862900638687898, 0.6206267900753528, 0.7227963137333674, 0.6563610741001843, 0.6541491631508591, 0.6862278523667734, 0.5173986502301023, 0.6254962352564359, 0.2376686434766528, 0.2850520026378816, 0.32445331851643955, 0.1545443294828597 +400, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.2 +, 0.003936305168090178, 0.002892443565021887, 0.008130955780809584, 0.012686225767031701, 0.025774402091606103, 0.04458131185056105, 0.05957848834895015, 0.09030918669627554, 0.1253577531298458, 0.1762117242340049, 0.18978784602769633, 0.2613781994982344, 0.3479702350864556, 0.38339977058667163, 0.38746151324205624, 0.4143832977912655, 0.4326335523770048, 0.48109640926677794, 0.5253077885613805, 0.5436337693892012, 0.5957468274559441, 0.6066920552022064, 0.5856318907005583, 0.7405960813443107, 0.6556337756952331, 0.7700481180232187, 0.6123487455485063, 0.716084361648064, 0.5946136429487322, 0.7631646331908402, 0.7287205565301803, 0.7089736280501816, 0.7458023147425407, 0.800312812064102, 0.7905807458117725, 0.7524453487016617, 0.6904598548976143, 0.09244951222078437, 0.8853441973001723, 0.22803862653375243 +600, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8 +, 0.015941116115818707, 0.016594307129943656, 0.010924353018042558, 0.014218984649465553, 0.02534885725861216, 0.06771148595573359, 0.06116471271630187, 0.058466868227181355, 0.11369094282044122, 0.10028915633745711, 0.09713241672842075, 0.23121690042026713, 0.21175385468088415, 0.28462241635242436, 0.31685345966888984, 0.34243553290584766, 0.3967943463270171, 0.5322292663560987, 0.46053074781033976, 0.46756551159626847, 0.5093913642584738, 0.46665721497662693, 0.5872387559719567, 0.5295263318218335, 0.6679207002526416, 0.633194898204035, 0.8205977787023934, 0.6778801000144382, 0.6386241437433336, 0.7474959665347901, 0.7280984639756457, 0.792440375474518, 0.8269539563283489, 0.914446352387371, 0.6292990018576369, 0.9002209011938572, 0.8814371535125446, 0.9569213613893796, 0.5613551803722755, 0.15303410010373106 +800, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0 +, 0.0224761653850587, 0.06897795528325656, 0.043964184488533876, 0.05426990516042012, 0.10593446276907946, 0.11088933395600369, 0.11131403251399657, 0.41212081201518397, 0.252185523895901, 0.5131779640168599, 0.4970442274474704, 0.3753445990025042, 0.4454367118169079, 0.43641127627008697, 0.5375555342059549, 0.582743847296434, 0.700875716747453, 0.3693056263810981, 0.5166424534068959, 0.5938453539126746, 0.5650094444620126, 0.7110946731164166, 0.6077794715264038, 0.797757938175236, 0.5455658878175588, 0.673111514092521, 0.7037020400243812, 0.6435682203777798, 0.604048928630185, 0.8674003285619997, 0.2236593996887986, 0.928303029180713 +1000, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.6 +, 0.05041657765434737, 0.02326957207651351, 0.03004073319755601, 0.19675712971481144, 0.3266965127238455, 0.22095951443145867, 0.36550759392486015, 0.7630891680139287, 0.6041852181656279, 0.8423339540657977, 0.6174986823281381, 0.39799453053783046, 0.7304563141139018, 0.6849573328041277, 0.3470302731161567, 0.3593023674822529, 0.4835460460460461, 0.7854439789160697, 0.6272501956691886, 0.6353194544149319, 0.8131345333267939, 0.6726479627242986, 0.9429828499595941, 0.7991883202445581, 0.6992572398895678, 0.5080599505378266, 0.8768982229402262, 0.4046968016124748, 0.8114981199287552, 0.3381969775924961 +10000000, -1.0, -0.8, -0.6, -0.4, -0.2, 0.4, 0.6, 0.8, 1.0, 3.0, 4.0, 4.2 +, 0.0021122338299937207, 0.1448140900195695, 0.07805907172995782, 0.28139773895169584, 0.22224694104560624, 0.16373639516804211, 0.3721264367816092, 0.3226118969192017, 0.33218720152817577, 0.0726298477372805, 0.4892249251223611, 0.8037608756665732 +D +200, -4.6, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8 +, 0.018626895228895723, 0.11728080320078006, 0.5937426667262748, 0.03927533862645874, 0.05974671976524982, 0.0917149470704997, 0.06046434414289128, 0.04459964351175079, 0.03891584428680007, 0.05454776436988832, 0.05760795314793352, 0.06520214434682021, 0.08441878992655659, 0.10554307834242026, 0.13156414894978147, 0.14638211055267963, 0.17598859363160593, 0.17217531685054885, 0.18463737353117532, 0.20794269423656211, 0.27808363911099476, 0.3642544766197776, 0.42615125908706963, 0.5026779437159384, 0.5381913735877556, 0.5448344936741886, 0.5736658815321012, 0.5728175734848698, 0.5772159313301718, 0.5935206601384001, 0.5785927893804083, 0.5803030006598179, 0.634696992284186, 0.6632184597205736, 0.5725772600179964, 0.5806805560809384, 0.6456153291100302, 0.4008137326056845, 0.5142766154383125, 0.594144624446019, 0.9480860255395239, 0.7891323212963747 +400, -3.8, -3.6, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8 +, 0.017526022053705452, 0.010090662246000215, 0.005911072408159453, 0.0094242912522625, 0.00483203212764107, 0.014840210378253412, 0.035251055138788005, 0.03010333597027076, 0.05707110978001972, 0.06806654215390828, 0.10122954326734433, 0.13770152403508962, 0.1251534611085536, 0.15864699520014003, 0.12863271934388903, 0.17303911256916327, 0.23872337803608437, 0.3438374233682127, 0.4471077553553215, 0.5299235923012301, 0.5563624942893748, 0.5662502058564726, 0.5721638839165779, 0.6129871191897227, 0.5660340347563402, 0.6308606276684164, 0.632643587440431, 0.5798265428394158, 0.5711256183324998, 0.6104867833858457, 0.5477759251339209, 0.5034780015525244, 0.28633253697579686, 0.6019606099741027, 0.41753839461241327, 0.34898716933495605, 0.1753443010109411, 0.4937170887940028 +600, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.07572055697912322, 0.04685137919874146, 0.013470059859080275, 0.016120642626666723, 0.025934741332931405, 0.013470059859080279, 0.01047103161086878, 0.043184882720677706, 0.07524094553614041, 0.057131662342132405, 0.07555065450499734, 0.09094351900345422, 0.07943708440995989, 0.14120981974737906, 0.15889063869132145, 0.18288901171356836, 0.2994462254923587, 0.455922970640683, 0.470865053294829, 0.555923147176361, 0.5744394407250271, 0.5983652427055746, 0.6451298402584105, 0.6144094316369362, 0.5638708071261487, 0.5817023571301216, 0.7382954315694873, 0.6415137553013202, 0.6027798778331301, 0.5498240561188864, 0.3129098587277003, 0.5853527174502478, 0.6417674076529638, 0.34646976044148603, 0.8892401221593547, 0.06589683307979534 +800, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 3.0, 3.2 +, 0.008510660029390252, 0.053999319540527856, 0.029166739590808066, 0.11008787306416677, 0.06867749030405805, 0.10487922755985372, 0.08441754322657907, 0.13927445001053515, 0.1262502840915484, 0.1581350088904876, 0.37032405294594306, 0.47112296199708115, 0.5059968009083806, 0.5667473589508149, 0.5662007078489808, 0.5036665508717231, 0.5685524410133438, 0.5021030771387083, 0.46777863494735494, 0.6249417586714079, 0.6570922695616377, 0.7799387736421073, 0.7624247583463559, 0.364603814519136, 0.8518129178326466, 0.33007532508626103, 0.2808647177027291 +1000, -2.0, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.03099074564389641, 0.03526188187699943, 0.0601183779288754, 0.10708870906841245, 0.14124632869365342, 0.07858307490648676, 0.16099733636085756, 0.11251951702527954, 0.31888428435752014, 0.3845687605484582, 0.47978895233223035, 0.5356864443869647, 0.5760458574570188, 0.5243609252477301, 0.44676271680565494, 0.5517489421762919, 0.40731563845050217, 0.5530463031664227, 0.7056189995435903, 0.6602700897805741, 0.7555583244746631, 0.43490969602040125, 0.9630958463140022 +10000000, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.4, 2.6 +, 0.0014151021012620737, 0.01120977596741344, 0.04853957951178213, 0.06924634213674427, 0.2242589254898953, 0.3488169966199903, 0.4214279585474444, 0.5540891613841836, 0.6191275770879868, 0.5765505268784041, 0.7524044757887831, 0.70228140959197, 0.36758525047113005, 0.6752083232984923, 0.8562413388764525, 0.4384222653499529, 0.2229776446185757, 0.7973201791445547, 0.13059610618454792, 0.0663917127836773 +H +200, -4.0, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0 +, 0.03366143791073794, 0.12229579473890749, 0.0023965874294210304, 0.11142894439620184, 0.0598821754984208, 0.035073646976856346, 0.030033608637588124, 0.042770531837719, 0.07436799354604083, 0.06192889876940986, 0.07501889297412434, 0.07651922461089912, 0.10236657357048272, 0.13008490869476172, 0.17570521982550932, 0.19562570288549183, 0.2402717212537774, 0.34894741760751985, 0.3926314534309388, 0.463459973122341, 0.4872892573845177, 0.5656076053978417, 0.5702410891638474, 0.5842610000246314, 0.6401215021032886, 0.6635057656919326, 0.6858272882551264, 0.7036437455064729, 0.6900683507603625, 0.7912016521539376, 0.6256905279756557, 0.6551663451279496, 0.6442387019495477, 0.5154430296772594, 0.610714922104654, 0.47655815437182536, 0.5038680884987706, 0.331638615368125, 0.16532032785248002 +400, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0 +, 0.024983509456821706, 0.0023065782730348084, 0.02498350945682171, 0.03938325596225074, 0.01924885711675501, 0.017001918349411307, 0.004532697766235948, 0.01672786076537002, 0.030488464144219574, 0.04246194666294303, 0.05482530743289866, 0.09453774664211397, 0.15068238595070957, 0.22043514025408253, 0.30862698998080434, 0.40606922105192056, 0.4635111004362203, 0.5490011391057846, 0.5896936531471226, 0.6012522032441759, 0.6334213044527051, 0.6530489917577715, 0.6816836432220428, 0.7235863198736988, 0.6104989855312881, 0.744281538492875, 0.6437700766365099, 0.6596101401847652, 0.6237587050584414, 0.4909123749450153, 0.4754536332396059, 0.5319185585373064, 0.5738471453688846, 0.5770204247077545, 0.3974957524720365, 0.12628946646351794 +600, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8 +, 0.003375360767234541, 0.02315851530668037, 0.007713013203962888, 0.020489809218885796, 0.02789797627428184, 0.05670945810086781, 0.08172911385087334, 0.10354699727263074, 0.20946023963686963, 0.3485166802620737, 0.4135052949447255, 0.5048283954868971, 0.5810659272872755, 0.6252028870513755, 0.49276922092287434, 0.6972373542165986, 0.598283244541968, 0.7060471943352125, 0.6335714820846869, 0.8409656287721421, 0.8713022883991768, 0.7548429339870076, 0.7731077709300429, 0.6286562667563377, 0.7416134578437232, 0.7973583875768113, 0.6246797630480752, 0.44839283867200974, 0.618207741949151 +800, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.004332254797836343, 0.008517472428799602, 0.02801288412634691, 0.04042976376212141, 0.05638253860440923, 0.1485878639312434, 0.45494966839303996, 0.5364218471499814, 0.6019752585827106, 0.6468967344018158, 0.7291083814949837, 0.5541234821386483, 0.44092351636485544, 0.5412120458980819, 0.5492062498043022, 0.6146558441172213, 0.46263676380203994, 0.8097888157180061, 0.8253314552869299, 0.9025689021252576, 0.3065145430410163, 0.887952826612005, 0.7349291853455371, 0.6930569512214189, 0.7189787433389939 +1000, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 3.0, 3.2, 3.4 +, 0.016726572227312234, 0.044336969269249515, 0.06230922176482117, 0.2733652504290111, 0.3606353085893688, 0.4154854412512842, 0.4931667421477475, 0.5421469025922283, 0.5483236455497511, 0.569378907839295, 0.43122599932991407, 0.506119714597294, 0.4286583086215133, 0.6048992306603105, 0.45424657023908194, 0.6333345687706163, 0.5822196798974196, 0.8918964292632531, 0.9422988109598484, 0.8579332348997845 +10000000, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 2.0, 2.4, 3.0, 3.4 +, 0.026043125175021, 0.28627129078596353, 0.2006741486957521, 0.3602109329490757, 0.5126121076233183, 0.7521644636049453, 0.7345747319418476, 0.4402735868034601, 0.7231112172597723, 0.4617557163307154, 0.4887361728712654, 0.6417756720568545, 0.36683051156016755, 0.3773720014321518, 0.6682563906905762 +F +200, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.8 +, 0.0118796572796037, 0.0014672582394740575, 0.03743998420606895, 0.027945978849726678, 0.042221213889387516, 0.010801552826949386, 0.04139522496607944, 0.03999191502135917, 0.05211549995458061, 0.060297109638310954, 0.10129384648254204, 0.15616351789120644, 0.21318276089539578, 0.25042509461225854, 0.29299384438800996, 0.30431199722184266, 0.31474465593677153, 0.3215608071222106, 0.34933410952686794, 0.4013372334166951, 0.4132461627252968, 0.4735993600214136, 0.5137798275706204, 0.5240892505076316, 0.5732127691892553, 0.5728471386016757, 0.587424087598907, 0.6378341853871199, 0.6652131586082336, 0.6434091755890186, 0.6811145001725185, 0.6778946461924046, 0.6531231489646425, 0.622114029030299, 0.7027944481835392, 0.6544984744633467, 0.6768972298187619, 0.7649999212127353, 0.17747727606580532, 0.03200371938741867 +400, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.004521502078034196, 0.011294546197758165, 0.01902181455153136, 0.028453600912992427, 0.045494587204780265, 0.075636622645322, 0.1346817828927533, 0.1858370410511906, 0.21145461364683354, 0.22993300300255923, 0.24758097664369763, 0.2503946720700768, 0.2893435384653396, 0.33294847977837494, 0.3801325469321394, 0.4218741104610451, 0.4797481604447298, 0.511808478587414, 0.5974117622187544, 0.5834704269428962, 0.6578279478883984, 0.6933440994726486, 0.7200687227206225, 0.6742670559283108, 0.7199198750632219, 0.7264408323450363, 0.7378516949019436, 0.8038271425512616, 0.8296853580700081, 0.8243729580366167, 0.779678703055898, 0.7171620329790568 +600, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.04225844325367724, 0.02996073852825442, 0.0033279267524589365, 0.010538147174194904, 0.0055842967220071866, 0.023707193295361365, 0.03287914981492101, 0.055581517092584964, 0.12205147623150721, 0.18674255469804368, 0.21228362626337297, 0.19176664697425205, 0.192771021747899, 0.2738504396168108, 0.2706484536269102, 0.3113119235107976, 0.3768631860175106, 0.4286865380951811, 0.4674373782473765, 0.4470173830795746, 0.5654578562715549, 0.6089083108990303, 0.6950018580809499, 0.754745539388691, 0.6729932052759504, 0.6466101067600745, 0.7630081242628347, 0.7653017355343918, 0.7660715915354379, 0.9006582480689912, 0.8613792472553212, 0.9183691145965688 +800, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.0025284892240452768, 0.0013041538615920674, 0.02322344999575436, 0.06274762646486995, 0.14440845571763275, 0.3574106974338475, 0.26027269066425, 0.2629704658055164, 0.24533138237707777, 0.26347140721903634, 0.3022788001575987, 0.29989143373704513, 0.4442104934598845, 0.5365972904585126, 0.4221062978051718, 0.5554972868238451, 0.5400155429805876, 0.6527242876757253, 0.47262603008218756, 0.6000342893579687, 0.8297108914342853, 0.5432571765506535, 0.6164512733317686, 0.659729845987438, 0.878226507885687, 0.8293156239699597, 0.39935167691260115 +1000, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.06957581181214641, 0.11727576980179334, 0.19879724787180408, 0.15514564994465022, 0.15335563242078185, 0.2029411563067941, 0.33025361900905537, 0.4179908587644115, 0.4428200805838054, 0.5634100755177667, 0.5680939840623824, 0.41520905829955296, 0.5753449870929177, 0.48414588902396805, 0.5913147768147112, 0.4648190251829891, 0.6358734895010334, 0.8449506822406887, 0.5716931289884855, 0.6013880377634973, 0.7021165582108326, 0.7605031088714594, 0.8316368363163683 +10000000, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.08665812891997504, 0.1893325561060915, 0.392884167636787, 0.7103372143883693, 0.1713556511117511, 0.12470072279692956, 0.2383403904279098, 0.4472355817003856, 0.3084458638141755, 0.3922429804435704, 0.5098120423323317, 0.4048967889635629, 0.4046453884579675, 0.45231916560612523, 0.578670933838637, 0.527791925571288, 0.9204796267282687, 0.9253331472075768, 0.8919738382028523, 0.8766760073779796, 0.8865785578260142 +Y +200, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0 +, 0.009286499266584609, 0.04190994220311158, 0.005673267516690456, 0.011282526243736116, 0.041909942203111575, 0.05957785566189, 0.04749864096985896, 0.05803797548561103, 0.07284698771143527, 0.04867312515561958, 0.0837839451245465, 0.08136844795311347, 0.1196284938247924, 0.13488330074785607, 0.1859103414172193, 0.22494333273362108, 0.2845607850383266, 0.34148624354154694, 0.3537330507841197, 0.4303267700378927, 0.4596981968135125, 0.5043265158898462, 0.5722032966248287, 0.591132260747033, 0.5615672359144327, 0.6433527557582447, 0.6200821169061512, 0.6866199534656023, 0.6409420681507526, 0.6377669951160809, 0.6475917264147603, 0.5867402271820585, 0.6081464300418282, 0.5855598936277712, 0.703751153709795, 0.5335558858652032, 0.5718292411383575, 0.7868125143340565, 0.5943859446876695, 0.2531795538962151 +400, -3.0, -2.8, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8 +, 0.0024631904120060435, 0.014599337728464305, 0.0019080473895611095, 0.0034467235991527422, 0.007898872470056247, 0.02454940809416175, 0.02767901585092433, 0.060144475081240587, 0.10182673535143302, 0.1402223895256354, 0.2159272947456956, 0.2474628127234784, 0.30672796698809546, 0.3701837946270894, 0.4281630341544478, 0.4900105528169095, 0.49672558077846896, 0.5458230184672949, 0.5822237283945346, 0.6232035400297948, 0.6309651873689367, 0.6650089068472502, 0.6906883232556257, 0.719070120561808, 0.5861318306017409, 0.6939528630753063, 0.644733589945717, 0.7557826365261244, 0.7868872016335692, 0.8077101821427416, 0.785137848061695, 0.7007336361374807, 0.7907789335787568, 0.9314640234622172 +600, -3.2, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8 +, 0.0678339420637355, 0.03132907113746549, 0.19521471211245917, 0.0790468441438464, 0.04504147115901855, 0.03621970390869113, 0.03736078959794541, 0.0702121913978338, 0.07678045932576472, 0.10633802477667664, 0.11960413292539095, 0.19900688668929817, 0.19847870369671886, 0.35052340230366474, 0.4182620478260756, 0.49334638007139636, 0.4139336918612302, 0.4758803364739189, 0.48058197497143446, 0.5325837123233392, 0.6764738640938338, 0.5824113213410999, 0.6854925565305252, 0.716699831685794, 0.6913247110998257, 0.7364537742437196, 0.6973151529206393, 0.6640017089879244, 0.7535147537884177, 0.8736524217431264, 0.8883154079240142, 0.9086524895242979, 0.3364614429341759, 0.8892455486542443, 0.516276512630574 +800, -2.4, -2.2, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.12499249996999987, 0.017542677750980205, 0.004183814710350362, 0.04049577780196881, 0.01945394480279348, 0.05981555656515628, 0.1662287133765109, 0.2470726136520115, 0.2279836885745909, 0.3405906596146762, 0.39304167365159454, 0.5479494843905584, 0.5776797970134353, 0.4969350548999451, 0.554976031602476, 0.6111452872519451, 0.5933613225870421, 0.6503765957046587, 0.6459187382843162, 0.47697114639093807, 0.4439174984783494, 0.5898786001485177, 0.6521583574634947, 0.699411044781371, 0.8755290078823845, 0.6892194962693724, 0.5956513541689771, 0.4191972780617089, 0.6859665367471306 +1000, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.01513420581891473, 0.04710716529773664, 0.08675346730823665, 0.2536586494224809, 0.34051794477036007, 0.4949352227554531, 0.3744979625153848, 0.3885763166955366, 0.47500620176957165, 0.6732234245582497, 0.5916145874535242, 0.6141509220860845, 0.7235237614799357, 0.8444622025111802, 0.5840380724187212, 0.37117416203862574, 0.6845523703789804, 0.7343493349470799, 0.6147306746541727, 0.836192015818726, 0.6897855770617488, 0.7497181598163127, 0.3071472030349666, 0.1919103374866947 +10000000, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 2.0, 2.2, 2.6, 2.8, 3.0, 3.2 +, 0.0708645474792468, 0.17151110308719983, 0.2570225856067352, 0.11678972600342932, 0.14007308160779536, 0.5103673933918981, 0.7576957600718095, 0.7229533929002657, 0.7098140887820918, 0.6723469072042269, 0.6112883643448062, 0.6166996129966311, 0.893002867868218, 0.8895255061508461, 0.8001654763978401, 0.30475369142377656, 0.6623003900213408, 0.7044407947702315, 0.6821802063854838 +C +200, -4.4, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8 +, 0.00552600427650797, 0.03485954094930549, 0.03838810402982251, 0.025715627803848534, 0.025488221431905482, 0.04343408489770449, 0.07142970187382498, 0.061574074307699386, 0.07314774143241341, 0.0645623004653657, 0.08295448119612607, 0.11583376897861364, 0.10923780472615427, 0.15872284777216678, 0.18960300191746962, 0.21632285501348175, 0.2689843145563964, 0.317374224275957, 0.3630447998094276, 0.47533324924738357, 0.47607691305922323, 0.5079450745840531, 0.5277576798975776, 0.5628057172760719, 0.575051710042101, 0.5593880195311266, 0.6755090738783593, 0.5934386213582137, 0.6382467809460037, 0.46977743056505733, 0.49332782901573397, 0.433919671579876, 0.4787946054736947, 0.5285187386448856, 0.5192055844835611, 0.5418864058012781, 0.4974690811553878, 0.6669903566100355, 0.5635741644172909, 0.5631278587090643, 0.4509635087812499, 0.41102196954637915, 0.5675101424562242, 0.3858209367335479, 0.7158058178212813, 0.8441831930348846, 0.917028268187617 +400, -2.8, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0, 5.2 +, 0.010395396838634843, 0.021361460299502484, 0.02165535066430582, 0.015159525108778021, 0.05264200337595036, 0.09707983819746174, 0.09731511297628698, 0.14129374581890802, 0.20022262624150677, 0.1899999623811763, 0.24177069784075372, 0.2794320762962471, 0.3349563341527679, 0.39941588667848116, 0.37542427668497114, 0.4413948575311084, 0.4994511731980783, 0.5229578236619977, 0.517824249985961, 0.5986188278934524, 0.55649711734287, 0.6546467413270598, 0.7295136272915, 0.6635498671850562, 0.6708303778437357, 0.6854662728780426, 0.7366769816589981, 0.6804239212899574, 0.8020315025334613, 0.648248800129263, 0.4883801068027809, 0.5457865193156772, 0.7435757599432814, 0.3888378116158756, 0.8142396988934587, 0.35653604110313064, 0.9515094757412567, 0.8683671258886828, 0.43063122020040623, 0.20134832264371375 +600, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4 +, 0.014640944089221617, 0.047190998499466535, 0.016131092675076904, 0.05393342938205346, 0.03794117361550069, 0.14801529752994014, 0.12649865136882416, 0.12425487801283724, 0.18258838145967776, 0.17401252442552514, 0.24820371537628083, 0.2723009495881132, 0.31076828090971514, 0.4228592493350921, 0.4833419854280797, 0.48225822549606906, 0.6096979060194508, 0.6813975348841623, 0.6390568469900091, 0.6423882998985359, 0.6933120557029364, 0.7437104177397691, 0.7344965946599342, 0.5339314985180899, 0.76693091389901, 0.7860009499083788, 0.9485711375084455, 0.7614620936289629, 0.7922335003939941, 0.8140234673530409, 0.9905994173641781, 0.7496322833936753, 0.5402660706005019, 0.18423883691036483 +800, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 4.0, 4.2, 4.4 +, 0.1676606183648437, 0.1676606183648437, 0.07743155394424302, 0.07659036520366225, 0.040008410782623315, 0.06504823840581023, 0.1572369829786188, 0.20637862095592702, 0.26511828078110244, 0.26880018429549696, 0.7715955945577099, 0.5608321221346089, 0.5723698356275932, 0.5774648391346796, 0.5310722977083755, 0.5139787601877006, 0.6388370807266754, 0.5159175246850328, 0.4037730013428791, 0.6462677917648109, 0.6914477449297176, 0.7064353719025876, 0.6496598105159759, 0.8061020949745134, 0.9114250135029706, 0.805807135371541, 0.7069698372603644, 0.5579972241756949, 0.9707483336999887, 0.2521582668435688, 0.6737025368927209 +1000, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.6 +, 0.020481263776634836, 0.03747584236618773, 0.07963219211712719, 0.42117945879058266, 0.40087635526094045, 0.4186096119797778, 0.7519767441860465, 0.6969740019889189, 0.6769121710047986, 0.5095117468832265, 0.49996377012356535, 0.42357137893493324, 0.3704784074335224, 0.5022112276689343, 0.5377495655874323, 0.9377135348226019, 0.518641826827345, 0.6148997981190606, 0.925832429274806, 0.9306706710610997, 0.5275370793684547 +10000000, -0.6, 0.2, 0.6, 1.0, 1.2, 1.4, 2.2, 2.6, 2.8, 3.6 +, 0.2450956648098813, 0.34003811136989204, 0.5689392891716222, 0.5240494732020156, 0.4197691734921817, 0.6071833648393195, 0.47977746870653687, 0.1474288840262582, 0.2158490566037736, 0.059728506787330306 +I +200, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6 +, 0.010246568324761396, 0.023586419611002423, 0.07326453667116309, 0.02266434565723754, 0.19125014334998405, 0.049215674536650926, 0.08042765604892763, 0.11504040934022898, 0.09190473758714221, 0.07884776581058621, 0.13204286686172295, 0.17339014874279796, 0.14738531701866997, 0.1925666588813994, 0.2798288367649437, 0.30356530000018567, 0.37802490411090917, 0.3891635072532392, 0.4188735667360788, 0.4130451708923584, 0.4090566074203953, 0.4005398324769401, 0.43727658014390886, 0.4525658021391098, 0.49469453336259855, 0.5364548074114078, 0.5487359041804901, 0.5589759259605349, 0.5600275134828192, 0.5857561779201617, 0.5950991838931297, 0.6171171951409766, 0.6208158282379346, 0.5341821673007862, 0.5911918922048982, 0.47767207984960436, 0.6016175443003301, 0.453017422332317, 0.009829615646825916, 0.011933949374280328 +400, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8 +, 0.009424041651289006, 0.005248090853102813, 0.020104435812286, 0.008380660947748239, 0.011633543757944554, 0.031233862457621414, 0.03796795304800285, 0.05304879411403409, 0.09428391079887828, 0.1957080355293911, 0.26417738982917194, 0.33722314135736386, 0.3835329367560942, 0.38791379723365044, 0.3469048845284936, 0.33981871326454166, 0.3718334747259479, 0.3744119941355528, 0.4371801106903041, 0.4742278199477808, 0.5467307808120919, 0.5889710925569661, 0.6003132839102469, 0.6282891377294968, 0.6667994100593078, 0.7149791981213757, 0.7165443100481403, 0.7648169965214152, 0.7931588888124155, 0.849697960723633, 0.5985009755051228 +600, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6 +, 0.01177149197646163, 0.019466387676539337, 0.009179617714196748, 0.021002809412977955, 0.012304705104874294, 0.01742489800381316, 0.09673996824968178, 0.20818513532059035, 0.24902690941466604, 0.3201033911616928, 0.3968527717263692, 0.32677150095038016, 0.2956502311222198, 0.3521918640702484, 0.34323878987875367, 0.41238085067793995, 0.4528202043089073, 0.4946606714015018, 0.60916176112803, 0.586244459052103, 0.731691655254136, 0.7615547888406847, 0.7532320282223522, 0.8256747853564931, 0.8227885041950739, 0.9414977098583945, 0.8707420724568614 +800, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4 +, 0.004884508436313263, 0.008895670331354973, 0.04738253012569462, 0.15700893886749803, 0.2720568723512916, 0.29754465051552165, 0.3529009205231974, 0.33901402505796213, 0.33151291774566327, 0.3171419785124146, 0.39610993206239475, 0.42435592249318754, 0.4284240846602554, 0.48610410052424313, 0.5011209748404598, 0.5923040805122267, 0.6801122435468188, 0.6003811302269592, 0.6886824799977288, 0.6536244005652843, 0.7340922067541863, 0.9749464234875972 +1000, -2.0, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2 +, 0.04006366374589266, 0.016420176967562962, 0.10541928765426886, 0.1842196914154018, 0.33370157870353867, 0.4140144214086954, 0.37627524716443256, 0.376828275689411, 0.350294020866546, 0.29056694294813423, 0.428977185963412, 0.4437891708347922, 0.4040640317539013, 0.5436759732095426, 0.6396942795183248, 0.699574241911313, 0.6264500766775059, 0.6958787809288652, 0.6647049856983595, 0.9007007532728866 +10000000, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0 +, 0.05928374933750602, 0.2840734480639214, 0.355188042763727, 0.4981825035676783, 0.522066931657905, 0.687219937903835, 0.4285758086769892, 0.26404535582320265, 0.4070341937448583, 0.31549829407614327, 0.3522842812258061, 0.41463591162408975, 0.44042322850815757, 0.8108811576260953, 0.6660499661785326, 0.6714949448238751, 0.6945054584794939, 0.9471616054797473 +P +200, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2 +, 0.09462093250004656, 0.06513499980673217, 0.25836149525869284, 0.003590843571806108, 0.08011419031573228, 0.03750805525576047, 0.0574609648224664, 0.021046661598639223, 0.03965651331683649, 0.03233547498093971, 0.05244949461037999, 0.059239211279768764, 0.08658427873468452, 0.11641077018764909, 0.17102302987730567, 0.21557776345358962, 0.3488992728757439, 0.38412126513874806, 0.4717518589355339, 0.48086303211958253, 0.5349972443434652, 0.5523284345890979, 0.5139727330404497, 0.5737275580736053, 0.646507295963126, 0.6177418767988746, 0.5913879649161384, 0.6113435859450091, 0.6248086488637173, 0.6177495838258914, 0.5915088103951179, 0.5390155146848349, 0.5544234138321293, 0.4961989976316854, 0.5910782276103086, 0.575955804525867, 0.8040228012576552, 0.2552364547730815, 0.1539699424587969, 0.6105382318958665, 0.6920195597291678 +400, -3.2, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 4.0, 4.2 +, 0.027678544003005952, 0.0017759936101448578, 0.01563976484987035, 0.02662887534696838, 0.010267917113890223, 0.014499665143659572, 0.027299347695871414, 0.045885094521211214, 0.04395609633506502, 0.07075355873801675, 0.11122160543559785, 0.19482765066850968, 0.3102447121351171, 0.4323382675846813, 0.5049196275808877, 0.5340408301827624, 0.5699327744168944, 0.5646308086676382, 0.5898440411347238, 0.5960532705788892, 0.6456568185067169, 0.6761301863788893, 0.6705221804706994, 0.6794427710153623, 0.6560926262495437, 0.6670270517403344, 0.6415870485838746, 0.4940385904199614, 0.5459239564924565, 0.47599332002445893, 0.409220079384302, 0.42847584927258375, 0.827666355527503, 0.6427397436884055, 0.3387975859228055, 0.6658481930242676 +600, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 +, 0.054115861337130235, 0.046296087292164195, 0.056336173545012996, 0.005138426504631574, 0.03016715284976033, 0.02195661225379361, 0.035469037639700524, 0.043213639799410224, 0.07923069137404684, 0.1892981614814477, 0.24008662810215636, 0.4542352013348483, 0.5155927001365727, 0.6227024593529396, 0.6069408758206023, 0.5689367573494439, 0.6173067228915726, 0.6507688014522729, 0.5604747283213789, 0.7005841663886421, 0.6021972001890809, 0.7322327525953377, 0.6256764860648757, 0.6644107146326537, 0.6404289926815111, 0.5798792570169877, 0.48913332794575626, 0.4739894981973522, 0.6169184160982089, 0.6311019946564094, 0.9162938262863316 +800, -2.4, -2.2, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2 +, 0.00625109691006886, 0.0036866050811829405, 0.010821473610371099, 0.034581709047270474, 0.052505947010089406, 0.04046046640914797, 0.0715445762534076, 0.19387348265185214, 0.3024834157149413, 0.4407693068754491, 0.5501948550333603, 0.4344640358714685, 0.4429962655179792, 0.4559017802592965, 0.4550889515888062, 0.562065860749629, 0.5872819382503642, 0.5031074411074145, 0.549570630011202, 0.7331689607663807, 0.637804892388616, 0.7508243979930967, 0.6847389871555631, 0.6837776185382219, 0.7089342805159007, 0.7548686754100637, 0.6858453269953747, 0.737874223470343 +1000, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.09319850573232, 0.10979172199248835, 0.06948530038214824, 0.07586792624252905, 0.1989606990626378, 0.3974041167469781, 0.4836987107065937, 0.43529270200348963, 0.5872083609038189, 0.4748060743676909, 0.4782649923500425, 0.47660581529267176, 0.40493349371783804, 0.4729478286637323, 0.5031491548381056, 0.4918696117603916, 0.474799166651737, 0.7606885434541573, 0.6515931714096899, 0.8523660209056383, 0.6549542201339508, 0.49738075923608915, 0.37358200278550074, 0.9102043744992286, 0.30461699146099175 +10000000, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.2, 0.4, 0.6, 0.8, 1.0, 1.4, 1.6, 1.8, 2.0, 2.4, 2.8, 3.0 +, 0.002034225211333397, 0.03213966868366234, 0.1254929577464789, 0.22886329058900245, 0.5338868536424239, 0.30411880078453357, 0.7558683600047184, 0.8943652386947497, 0.5068308181096108, 0.8747794169548951, 0.808677163898561, 0.6541717723070068, 0.520123659549802, 0.8308427892277724, 0.75944364805703, 0.46422176679969807, 0.11903193440828615, 0.9246754822273444 +V +200, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0 +, 0.3013177924972648, 0.0670576962538446, 0.027947536968587417, 0.025471567022443797, 0.17738326284128084, 0.10698026054520915, 0.027192326456929903, 0.04736489830728461, 0.15565145058718088, 0.08889759595104872, 0.0901815261535527, 0.12890229680120277, 0.17640442149470179, 0.20057478536198106, 0.25497736014857153, 0.2845496101729879, 0.3387008081814645, 0.36859541367677057, 0.408859593377653, 0.42852982770728926, 0.43491545736005727, 0.4437173153173867, 0.4307511980475097, 0.4688229717283917, 0.5041690529385188, 0.5206150940885195, 0.5504178549950146, 0.604449454781223, 0.5852695922917379, 0.5892740759521515, 0.5821242214118382, 0.611738803380447, 0.5748701424067844, 0.5470664583475426, 0.4366875437443472, 0.2990467205099567, 0.17194313586429896 +400, -3.4, -3.2, -3.0, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 3.0 +, 0.007630710431630884, 0.05643138079149608, 0.0019464106682222882, 0.00495914554400256, 0.008471384625919275, 0.022434103491537804, 0.040253776825090605, 0.025356097618350212, 0.048630164072312, 0.06994433785325964, 0.10054807768512329, 0.17714681726250375, 0.262931751831555, 0.34550802640469575, 0.3781959689270546, 0.43546932456834325, 0.4111227842326892, 0.39342474726021504, 0.40754351242412284, 0.460087545031051, 0.4784670790288331, 0.5272787211953236, 0.5658096821582352, 0.6095502530391147, 0.6572364343932448, 0.6458428060835956, 0.699498928622632, 0.7675563268175648, 0.7165153170099512, 0.5393942384511748, 0.5587490608280018, 0.7684784086894817 +600, -2.8, -2.6, -2.4, -2.2, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4 +, 0.061032997065434115, 0.18533639985747144, 0.0145577041202563, 0.010942786101539745, 0.07387934237880509, 0.037536176376309634, 0.02763024311231824, 0.02265328277135838, 0.09520478453610436, 0.1595129075059143, 0.22597260291075094, 0.37063686634929416, 0.4028000965396746, 0.40189585160555535, 0.32174279329124866, 0.37195239626061044, 0.4539851836669101, 0.4666124404448917, 0.5233672984387059, 0.5443786020355682, 0.670588238862655, 0.6746727393780464, 0.774273657653073, 0.8059482440811514, 0.7534118409082837, 0.933769318652744, 0.9199396810574295 +800, -2.0, -1.8, -1.6, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4 +, 0.008536139445826405, 0.010647452272946844, 0.003065442904427912, 0.004083085051204419, 0.017935306813610788, 0.09716361787367706, 0.19725368574759128, 0.3505081624049802, 0.4204715759928817, 0.45469008403510625, 0.388999422485893, 0.32305500994632613, 0.39140601027418337, 0.48052658276599364, 0.421967881355336, 0.5799579944888391, 0.619119965966238, 0.619504925624972, 0.6769064254531707, 0.7778709874558832, 0.771651999854801, 0.7479361219585633, 0.5246872402663989 +1000, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2 +, 0.03892955516942246, 0.12043398243351962, 0.2645304545541721, 0.4365200127998329, 0.437088025611357, 0.35702064605615885, 0.4010590154472944, 0.36781079834103564, 0.4587836912312046, 0.39663279275577046, 0.6365005914806564, 0.5655098255829267, 0.593426197811947, 0.6692760067022221, 0.8622693278223753, 0.7184982472426565, 0.7060497525545142 +10000000, -1.4, -1.2, -1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 2.0 +, 0.017728944142882157, 0.007167824432547233, 0.08493880095308559, 0.2528489732042521, 0.4813898894916351, 0.36070591557949294, 0.39824076805492237, 0.3119042195275812, 0.32650985724376896, 0.49659876345439163, 0.5211131565504622, 0.4260184611915101, 0.5637321616051639, 0.5428210040346628, 0.7687209074612477, 0.7000895494459963, 0.8891690518938169 diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 1762a06..bf9cc18 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -11,6 +11,7 @@ action.paste = Paste action.show_html_source = Show HTML Source action.print = Print... action.web_service = Web Service +action.hmmer = HMMER action.cancel_job = Cancel Job action.start_job = Start Job action.revert = Revert @@ -59,6 +60,8 @@ action.boxes = Boxes action.text = Text action.by_pairwise_id = By Pairwise Identity action.by_id = By Id +action.by_evalue = By E-Value +action.by_bit_score = By Bit Score action.by_length = By Length action.by_group = By Group action.unmark_as_reference = Unmark as Reference @@ -98,6 +101,7 @@ action.edit_group = Edit Group action.border_colour = Border colour action.edit_new_group = Edit New Group action.hide_sequences = Hide Sequences +action.add_background_frequencies = Add Background Frequencies action.sequences = Sequences action.ids = IDS action.ids_sequences = IDS and sequences @@ -131,6 +135,8 @@ action.select_highlighted_columns = Select Highlighted Columns tooltip.select_highlighted_columns = Press B to mark highlighted columns, Ctrl-(or Cmd)-B to toggle, and Alt-B to mark all but highlighted columns action.deselect_all = Deselect all action.invert_selection = Invert selection +action.filter_by_evalue = Filter by E-Value +action.filter_by_score = Filter by Score action.using_jmol = Using Jmol action.undo_changes_to_feature_settings = Undo all unapplied changes to feature settings action.undo_changes_to_feature_settings_and_close_the_dialog = Undo all pending changes and close the feature settings dialog @@ -200,6 +206,9 @@ label.colourScheme_turnpropensity = Turn Propensity label.colourScheme_buriedindex = Buried Index label.colourScheme_purine/pyrimidine = Purine/Pyrimidine label.colourScheme_nucleotide = Nucleotide +label.colourScheme_hmmer-uniprot = HMMER profile v global background +label.colourScheme_hmmer-alignment = HMMER profile v alignment background +label.colourScheme_hmm_match_score = HMM Match Score label.colourScheme_t-coffeescores = T-Coffee Scores label.colourScheme_rnahelices = By RNA Helices label.colourScheme_sequenceid = Sequence ID Colour @@ -810,8 +819,8 @@ label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}
    label.feature_settings_click_drag = Drag up or down to change render order.
    Double click to select columns containing feature. label.transparency_tip = Adjust transparency to 'see through' feature colours. label.opt_and_params_further_details = see further details by right-clicking -label.opt_and_params_show_brief_desc_image_link = Click to show brief description
    Right click for further information. -label.opt_and_params_show_brief_desc = Click to show brief description
    +label.opt_and_params_show_brief_desc_image_link = Click to show brief description
    Right click for further information. +label.opt_and_params_show_brief_desc = Click to show brief description
    label.adjusts_width_generated_eps_png = Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed label.manually_specify_width_left_column = Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set label.job_created_when_checked = When checked, a job is created for every sequence in the current selection. @@ -946,7 +955,6 @@ label.groovy_support_failed = Jalview Groovy Support Failed label.couldnt_create_groovy_shell = Couldn't create the groovy Shell. Check the error log for the details of what went wrong. error.unsupported_version_calcIdparam = Unsupported Version for calcIdparam {0} error.implementation_error_cant_reorder_tree = Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode. -error.invalid_value_for_option = Invalid value {0} for option {1} error.implementation_error_cannot_import_vamsas_doc = Implementation Error - cannot import existing vamsas document into an existing session, Yet! label.vamsas_doc_couldnt_be_opened_as_new_session = VAMSAS Document could not be opened as a new session - please choose another error.implementation_error_vamsas_operation_not_init = Impementation error! Vamsas Operations when client not initialised and connected @@ -1054,6 +1062,7 @@ exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0}) exception.ranml_invalid_file = Invalid RNAML file ({0}) exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0}) exception.pfam_no_sequences_found = No sequences found (PFAM input) +exception.hmmer_no_valid_sequences_found = No valid sequences found exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM' exception.couldnt_parse_sequence_line = Could not parse sequence line: {0} exception.unknown_annotation_detected = Unknown annotation detected: {0} {1} @@ -1125,6 +1134,9 @@ status.loading_cached_pdb_entries = Loading Cached PDB Entries status.searching_for_pdb_structures = Searching for PDB Structures status.opening_file_for = opening file for status.colouring_chimera = Colouring Chimera +status.running_hmmbuild = Building Hidden Markov Model +status.running_hmmalign = Creating alignment with Hidden Markov Model +status.running_search = Searching for matching sequences label.font_doesnt_have_letters_defined = Font doesn't have letters defined\nso cannot be used\nwith alignment data label.font_too_small = Font size is too small label.error_loading_file_params = Error loading file {0} @@ -1341,6 +1353,79 @@ label.alignment = alignment label.pca = PCA label.create_image_of = Create {0} image of {1} label.click_to_edit = Click to edit, right-click for menu +label.hmmalign = hmmalign +label.use_hmm = HMM profile to use +label.use_sequence = Sequence to use +label.hmmbuild = hmmbuild +label.hmmsearch = hmmsearch +label.jackhmmer = jackhmmer +label.installation = Installation +label.hmmer_location = HMMER Binaries Installation Location +label.cygwin_location = Cygwin Binaries Installation Location (Windows) +label.information_annotation = Information Annotation +label.ignore_below_background_frequency = Ignore Below Background Frequency +label.information_description = Information content, measured in bits +warn.no_hmm = No Hidden Markov model found.\nRun hmmbuild or load an HMM file first. +label.no_sequences_found = No matching sequences, or an error occurred. +label.hmmer = HMMER +label.trim_termini = Trim Non-Matching Termini +label.trim_termini_desc = If true, non-matching regions on either end of the resulting alignment are removed. +label.no_of_sequences = Number of sequences returned +label.reporting_cutoff = Reporting Cut-off +label.inclusion_threshold = Inlcusion Threshold +label.freq_alignment = Use alignment background frequencies +label.freq_uniprot = Use Uniprot background frequencies +label.hmmalign_options = hmmalign options +label.hmmsearch_options = hmmsearch options +label.jackhmmer_options = jackhmmer options +label.executable_not_found = The ''{0}'' executable file was not found +warn.command_failed = {0} failed +label.invalid_folder = Invalid Folder +label.number_of_results = Number of Results to Return +label.number_of_iterations = Number of jackhmmer Iterations +label.auto_align_seqs = Automatically Align Fetched Sequences +label.new_returned = new sequences returned +label.use_accessions = Return Accessions +label.check_for_new_sequences = Return Number of New Sequences +label.evalue = E-Value +label.reporting_seq_evalue = Reporting Sequence E-value Cut-off +label.reporting_seq_score = Reporting Sequence Score Threshold +label.reporting_dom_evalue = Reporting Domain E-value Cut-off +label.reporting_dom_score = Reporting Domain Score Threshold +label.inclusion_seq_evalue = Inclusion Sequence E-value Cut-off +label.inclusion_seq_score = Inclusion Sequence Score Threshold +label.inclusion_dom_evalue = Inclusion Domain E-value Cut-off +label.inclusion_dom_score = Inclusion Domain Score Threshold +label.number_of_results_desc = The maximum number of hmmsearch results to display +label.number_of_iterations_desc = The number of iterations jackhmmer will complete when searching for new sequences +label.auto_align_seqs_desc = If true, all fetched sequences will be aligned to the hidden Markov model with which the search was performed +label.check_for_new_sequences_desc = Display number of new sequences returned from hmmsearch compared to the previous alignment +label.use_accessions_desc = If true, the accession number of each sequence is returned, rather than that sequence's name +label.reporting_seq_e_value_desc = The E-value cutoff for returned sequences +label.reporting_seq_score_desc = The score threshold for returned sequences +label.reporting_dom_e_value_desc = The E-value cutoff for returned domains +label.reporting_dom_score_desc = The score threshold for returned domains +label.inclusion_seq_e_value_desc = Sequences with an E-value less than this cut-off are classed as significant +label.inclusion_seq_score_desc = Sequences with a bit score greater than this threshold are classed as significant +label.inclusion_dom_e_value_desc = Domains with an E-value less than this cut-off are classed as significant +label.inclusion_dom_score_desc = Domains with a bit score greater than this threshold are classed as significant +label.add_database = Add Database +label.this_alignment = This alignment +warn.invalid_format = This is not a valid database file format. The current supported formats are Fasta, Stockholm and Pfam. +label.database_for_hmmsearch = The database hmmsearch will search through +label.use_reference = Use Reference Annotation +label.use_reference_desc = If true, hmmbuild will keep all columns defined as a reference position by the reference annotation +label.hmm_name = Alignment HMM Name +label.hmm_name_desc = The name given to the HMM for the alignment +warn.no_reference_annotation = No reference annotation found +label.hmmbuild_for = Build HMM for +label.hmmbuild_for_desc = Build an HMM for the selected sets of sequences +label.alignment = Alignment +label.groups_and_alignment = All groups and alignment +label.groups = All groups +label.selected_group = Selected group +label.use_info_for_height = Use Information Content as Letter Height +action.search = Search label.backupfiles_confirm_delete = Confirm delete label.backupfiles_confirm_delete_old_files = Delete the following older backup files? (see the Backups tab in Preferences for more options) label.backupfiles_confirm_save_file = Confirm save file @@ -1413,3 +1498,4 @@ label.include_linked_features = Include {0} features label.include_linked_tooltip = Include visible {0} features
    converted to local sequence coordinates label.features_not_shown = {0} feature(s) not shown label.no_features_to_sort_by = No features to sort by + diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index d3c3355..0dee36d 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -865,7 +865,6 @@ label.groovy_support_failed = El soporte Groovy de Jalview ha fallado label.couldnt_create_groovy_shell = No es posible crear el shell de Groovy. Compruebe el fichero de log para conocer los detalles. error.unsupported_version_calcIdparam = Versión no soportada de {0} error.implementation_error_cant_reorder_tree = Error de implementación: no es posible reordenar este árbol. No DefaultMutableTreeNode. -error.invalid_value_for_option = Valor no válido de {0} para la opción {1} error.implementation_error_cannot_import_vamsas_doc = Error de implementación - todavía no es posible importar el documento VAMSAS existente en una sesión existente. label.vamsas_doc_couldnt_be_opened_as_new_session = El documento VAMSAS no ha podido abrirse como una nueva sesión. Por favor, escoja otra. error.implementation_error_vamsas_operation_not_init = ¡Error de implementación! Operaciones VAMSAS cuando el cliente no estaba inicializado ni conectado @@ -1337,6 +1336,7 @@ label.alignment = alineamiento label.pca = ACP label.create_image_of = Crear imagen {0} de {1} label.click_to_edit = Haga clic para editar, clic en el botón derecho para ver el menú +action.search = Buscar label.backupfiles_confirm_delete = Confirmar borrar label.backupfiles_confirm_delete_old_files = ¿Borrar los siguientes archivos? (ver la pestaña 'Copias' de la ventana de Preferencias para más opciones) label.backupfiles_confirm_save_file = Confirmar guardar archivo diff --git a/schemas/jalview.xsd b/schemas/jalview.xsd index 1d2235e..c21721b 100755 --- a/schemas/jalview.xsd +++ b/schemas/jalview.xsd @@ -293,6 +293,11 @@ + + + name of the project jar entry that holds the HMM file with the profile for the sequence + + diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java index 4378457..c1d04c4 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java @@ -34,6 +34,7 @@ package ext.edu.ucsf.rbvi.strucviz2; import jalview.bin.Cache; import jalview.gui.Preferences; +import jalview.util.FileUtils; import jalview.util.Platform; import java.io.File; @@ -936,18 +937,16 @@ public class StructureManager } else if (os.startsWith("Windows")) { - for (String root : new String[] { "\\Program Files", - "C:\\Program Files", "\\Program Files (x86)", - "C:\\Program Files (x86)" }) - { - for (String version : new String[] { "1.11", "1.11.1", "1.11.2", - "1.12", "1.12.1", "1.12.2", "1.13" }) - { - pathList.add(root + "\\Chimera " + version + "\\bin\\chimera"); - pathList.add( - root + "\\Chimera " + version + "\\bin\\chimera.exe"); - } - } + /* + * typical Windows installation path is + * C:\Program Files\Chimera 1.12\bin\chimera.exe + */ + // current drive: + pathList.addAll(FileUtils.findMatches("\\", + "Program Files*/Chimera*/bin/{chimera,chimera.exe}")); + // C: drive (note may add as duplicates) + pathList.addAll(FileUtils.findMatches("C:\\", + "Program Files*/Chimera*/bin/{chimera,chimera.exe}")); } else if (os.startsWith("Mac")) { diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 52dedcf..4e53484 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -24,6 +24,7 @@ import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; +import jalview.datamodel.HiddenMarkovModel; import jalview.datamodel.Profile; import jalview.datamodel.ProfileI; import jalview.datamodel.Profiles; @@ -32,6 +33,7 @@ import jalview.datamodel.ResidueCount; import jalview.datamodel.ResidueCount.SymbolCounts; import jalview.datamodel.SequenceI; import jalview.ext.android.SparseIntArray; +import jalview.schemes.ResidueProperties; import jalview.util.Comparison; import jalview.util.Format; import jalview.util.MappingUtils; @@ -48,25 +50,12 @@ import java.util.List; * This class is used extensively in calculating alignment colourschemes that * depend on the amount of conservation in each alignment column. * - * @author $author$ - * @version $Revision$ */ public class AAFrequency { - public static final String PROFILE = "P"; - - /* - * Quick look-up of String value of char 'A' to 'Z' - */ - private static final String[] CHARS = new String['Z' - 'A' + 1]; + private static final double LOG2 = Math.log(2); - static - { - for (char c = 'A'; c <= 'Z'; c++) - { - CHARS[c - 'A'] = String.valueOf(c); - } - } + public static final String PROFILE = "P"; public static final ProfilesI calculate(List list, int start, int end) @@ -192,6 +181,52 @@ public class AAFrequency } /** + * Returns the full set of profiles for a hidden Markov model. The underlying + * data is the raw probabilities of a residue being emitted at each node, + * however the profiles returned by this function contain the percentage + * chance of a residue emission. + * + * @param hmm + * @param width + * The width of the Profile array (Profiles) to be returned. + * @param start + * The alignment column on which the first profile is based. + * @param end + * The alignment column on which the last profile is based. + * @param removeBelowBackground + * if true, symbols with a match emission probability less than + * background frequency are ignored + * @return + */ + public static ProfilesI calculateHMMProfiles(final HiddenMarkovModel hmm, + int width, int start, int end, boolean removeBelowBackground, + boolean infoLetterHeight) + { + ProfileI[] result = new ProfileI[width]; + char[] symbols = hmm.getSymbols().toCharArray(); + int symbolCount = symbols.length; + for (int column = start; column < end; column++) + { + ResidueCount counts = new ResidueCount(); + for (char symbol : symbols) + { + int value = getAnalogueCount(hmm, column, symbol, + removeBelowBackground, infoLetterHeight); + counts.put(symbol, value); + } + int maxCount = counts.getModalCount(); + String maxResidue = counts.getResiduesForCount(maxCount); + int gapCount = counts.getGapCount(); + ProfileI profile = new Profile(symbolCount, gapCount, maxCount, + maxResidue); + profile.setCounts(counts); + + result[column] = profile; + } + return new Profiles(result); + } + + /** * Make an estimate of the profile size we are going to compute i.e. how many * different characters may be present in it. Overestimating has a cost of * using more memory than necessary. Underestimating has a cost of needing to @@ -289,9 +324,80 @@ public class AAFrequency } /** - * Derive the gap count annotation row. + * Derive the information annotations to be added to the alignment for + * display. This does not recompute the raw data, but may be called on a + * change in display options, such as 'ignore below background frequency', + * which may in turn result in a change in the derived values. + * + * @param information + * the annotation row to add annotations to + * @param profiles + * the source information data + * @param startCol + * start column (inclusive) + * @param endCol + * end column (exclusive) + * @param ignoreGaps + * if true, normalise residue percentages + * @param showSequenceLogo + * if true include all information symbols, else just show modal + * residue + */ + public static float completeInformation(AlignmentAnnotation information, + ProfilesI profiles, int startCol, int endCol) + { + // long now = System.currentTimeMillis(); + if (information == null || information.annotations == null) + { + /* + * called with a bad alignment annotation row + * wait for it to be initialised properly + */ + return 0; + } + + float max = 0f; + SequenceI hmmSeq = information.sequenceRef; + + int seqLength = hmmSeq.getLength(); + if (information.annotations.length < seqLength) + { + return 0; + } + + HiddenMarkovModel hmm = hmmSeq.getHMM(); + + for (int column = startCol; column < endCol; column++) + { + if (column >= seqLength) + { + // hmm consensus sequence is shorter than the alignment + break; + } + + float value = hmm.getInformationContent(column); + boolean isNaN = Float.isNaN(value); + if (!isNaN) + { + max = Math.max(max, value); + } + + String description = isNaN ? null + : String.format("%.4f bits", value); + information.annotations[column] = new Annotation( + Character.toString( + Character.toUpperCase(hmmSeq.getCharAt(column))), + description, ' ', value); + } + + information.graphMax = max; + return max; + } + + /** + * Derive the occupancy count annotation * - * @param gaprow + * @param occupancy * the annotation row to add annotations to * @param profiles * the source consensus data @@ -300,11 +406,11 @@ public class AAFrequency * @param endCol * end column (exclusive) */ - public static void completeGapAnnot(AlignmentAnnotation gaprow, + public static void completeGapAnnot(AlignmentAnnotation occupancy, ProfilesI profiles, int startCol, int endCol, long nseq) { - if (gaprow == null || gaprow.annotations == null - || gaprow.annotations.length < endCol) + if (occupancy == null || occupancy.annotations == null + || occupancy.annotations.length < endCol) { /* * called with a bad alignment annotation row @@ -313,8 +419,8 @@ public class AAFrequency return; } // always set ranges again - gaprow.graphMax = nseq; - gaprow.graphMin = 0; + occupancy.graphMax = nseq; + occupancy.graphMin = 0; double scale = 0.8 / nseq; for (int i = startCol; i < endCol; i++) { @@ -325,7 +431,7 @@ public class AAFrequency * happens if sequences calculated over were * shorter than alignment width */ - gaprow.annotations[i] = null; + occupancy.annotations[i] = null; return; } @@ -333,7 +439,8 @@ public class AAFrequency String description = "" + gapped; - gaprow.annotations[i] = new Annotation("", description, '\0', gapped, + occupancy.annotations[i] = new Annotation("", description, '\0', + gapped, jalview.util.ColorUtils.bleachColour(Color.DARK_GRAY, (float) scale * gapped)); } @@ -470,6 +577,7 @@ public class AAFrequency return result; } + /** * Extract a sorted extract of cDNA codon profile data. The returned array * contains @@ -749,4 +857,118 @@ public class AAFrequency } return scale; } + + /** + * Returns the sorted HMM profile for the given column of the alignment. The + * returned array contains + * + *
    +   *    [profileType=0, numberOfValues, 100, charValue1, percentage1, charValue2, percentage2, ...]
    +   * in descending order of percentage value
    +   * 
    + * + * @param hmm + * @param column + * @param removeBelowBackground + * if true, ignores residues with probability less than their + * background frequency + * @param infoHeight + * if true, uses the log ratio 'information' measure to scale the + * value + * @return + */ + public static int[] extractHMMProfile(HiddenMarkovModel hmm, int column, + boolean removeBelowBackground, boolean infoHeight) + { + if (hmm == null) + { + return null; + } + String alphabet = hmm.getSymbols(); + int size = alphabet.length(); + char symbols[] = new char[size]; + int values[] = new int[size]; + int totalCount = 0; + + for (int i = 0; i < size; i++) + { + char symbol = alphabet.charAt(i); + symbols[i] = symbol; + int value = getAnalogueCount(hmm, column, symbol, + removeBelowBackground, infoHeight); + values[i] = value; + totalCount += value; + } + + /* + * sort symbols by increasing emission probability + */ + QuickSort.sort(values, symbols); + + int[] profile = new int[3 + size * 2]; + + profile[0] = AlignmentAnnotation.SEQUENCE_PROFILE; + profile[1] = size; + profile[2] = 100; + + /* + * order symbol/count profile by decreasing emission probability + */ + if (totalCount != 0) + { + int arrayPos = 3; + for (int k = size - 1; k >= 0; k--) + { + Float percentage; + int value = values[k]; + if (removeBelowBackground) + { + percentage = ((float) value) / totalCount * 100f; + } + else + { + percentage = value / 100f; + } + int intPercent = Math.round(percentage); + profile[arrayPos] = symbols[k]; + profile[arrayPos + 1] = intPercent; + arrayPos += 2; + } + } + return profile; + } + + /** + * Converts the emission probability of a residue at a column in the alignment + * to a 'count', suitable for rendering as an annotation value + * + * @param hmm + * @param column + * @param symbol + * @param removeBelowBackground + * if true, returns 0 for any symbol with a match emission + * probability less than the background frequency + * @infoHeight if true, uses the log ratio 'information content' to scale the + * value + * @return + */ + static int getAnalogueCount(HiddenMarkovModel hmm, int column, + char symbol, boolean removeBelowBackground, boolean infoHeight) + { + double value = hmm.getMatchEmissionProbability(column, symbol); + double freq = ResidueProperties.backgroundFrequencies + .get(hmm.getAlphabetType()).get(symbol); + if (value < freq && removeBelowBackground) + { + return 0; + } + + if (infoHeight) + { + value = value * (Math.log(value / freq) / LOG2); + } + + value = value * 10000d; + return Math.round((float) value); + } } diff --git a/src/jalview/analysis/AlignmentAnnotationUtils.java b/src/jalview/analysis/AlignmentAnnotationUtils.java index f5626ce..5c2d936 100644 --- a/src/jalview/analysis/AlignmentAnnotationUtils.java +++ b/src/jalview/analysis/AlignmentAnnotationUtils.java @@ -75,11 +75,11 @@ public class AlignmentAnnotationUtils * Build a lookup, by calcId (annotation source), of all annotation types in * each graph group. */ - Map>> groupLabels = new HashMap>>(); + Map>> groupLabels = new HashMap<>(); // trackers for which calcId!label combinations we have dealt with - List addedToShown = new ArrayList(); - List addedToHidden = new ArrayList(); + List addedToShown = new ArrayList<>(); + List addedToHidden = new ArrayList<>(); for (AlignmentAnnotation aa : annotations) { @@ -99,7 +99,7 @@ public class AlignmentAnnotationUtils /* * Build a 'composite label' for types in line graph groups. */ - final List labelAsList = new ArrayList(); + final List labelAsList = new ArrayList<>(); final String displayLabel = aa.label; labelAsList.add(displayLabel); if (aa.graph == AlignmentAnnotation.LINE_GRAPH @@ -239,4 +239,42 @@ public class AlignmentAnnotationUtils return (anns == null ? Collections. emptyList() : Arrays.asList(anns)); } + + /** + * replace an existing sequence associated annotation with another, creating + * association as necessary. + * + * @param newAnnot + * - annotation row associated with a sequence to be propagated to + * its reference annotation + * @param typeName + * - label used to match existing row + * @param calcId + * - calcId for existing row + */ + public static void replaceAnnotationOnAlignmentWith( + AlignmentAnnotation newAnnot, String typeName, String calcId) + { + if (newAnnot.sequenceRef != null) + { + SequenceI dsseq = newAnnot.sequenceRef; + while (dsseq.getDatasetSequence() != null) + { + dsseq = dsseq.getDatasetSequence(); + } + // look for same annotation on dataset and lift this one over + List dsan = dsseq.getAlignmentAnnotations(calcId, + typeName); + if (dsan != null && dsan.size() > 0) + { + for (AlignmentAnnotation dssan : dsan) + { + dsseq.removeAlignmentAnnotation(dssan); + } + } + AlignmentAnnotation dssan = new AlignmentAnnotation(newAnnot); + dsseq.addAlignmentAnnotation(dssan); + dssan.adjustForAlignment(); + } + } } diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index af7db0a..f2b2222 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -113,6 +113,10 @@ public class AlignmentSorter implements ApplicationSingletonI private boolean sortLengthAscending; + private static boolean sortEValueAscending; + + private static boolean sortBitScoreAscending; + /** * Sorts sequences in the alignment by Percentage Identity with the given * reference sequence, sorting the highest identity to the top @@ -196,6 +200,90 @@ public class AlignmentSorter implements ApplicationSingletonI } /** + * Sorts by sequence evalue. Currently moves all sequences without an evalue to + * the top of the alignment. + * + * @param align + * The alignment object to sort + */ + public static void sortByEValue(AlignmentI align) + { + int nSeq = align.getHeight(); + + double[] evalue = new double[nSeq]; + SequenceI[] seqs = new SequenceI[nSeq]; + + for (int i = 0; i < nSeq; i++) + { + seqs[i] = align.getSequenceAt(i); + AlignmentAnnotation[] ann = seqs[i].getAnnotation("Search Scores"); + if (ann != null) + { + evalue[i] = ann[0].getEValue(); + } + else + { + evalue[i] = -1; + } + } + + QuickSort.sort(evalue, seqs); + + if (sortEValueAscending) + { + setReverseOrder(align, seqs); + } + else + { + setOrder(align, seqs); + } + + sortEValueAscending = !sortEValueAscending; + } + + /** + * Sorts by sequence bit score. Currently moves all sequences without a bit + * score to the top of the alignment + * + * @param align + * The alignment object to sort + */ + public static void sortByBitScore(AlignmentI align) + { + int nSeq = align.getHeight(); + + double[] score = new double[nSeq]; + SequenceI[] seqs = new SequenceI[nSeq]; + + for (int i = 0; i < nSeq; i++) + { + seqs[i] = align.getSequenceAt(i); + AlignmentAnnotation[] ann = seqs[i].getAnnotation("Search Scores"); + if (ann != null) + { + score[i] = ann[0].getEValue(); + } + else + { + score[i] = -1; + } + } + + QuickSort.sort(score, seqs); + + if (sortBitScoreAscending) + { + setReverseOrder(align, seqs); + } + else + { + setOrder(align, seqs); + } + + sortBitScoreAscending = !sortBitScoreAscending; + } + + /** * Sorts the alignment by size of group.
    * Maintains the order of sequences in each group by order in given alignment * object. diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 0c40873..be2739f 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -1459,28 +1459,31 @@ public class AlignmentUtils final List result = new ArrayList<>(); for (AlignmentAnnotation dsann : datasetAnnotations) { - /* - * Find matching annotations on the alignment. If none is found, then - * add this annotation to the list of 'addable' annotations for this - * sequence. - */ - final Iterable matchedAlignmentAnnotations = al - .findAnnotations(seq, dsann.getCalcId(), dsann.label); - if (!matchedAlignmentAnnotations.iterator().hasNext()) + if (dsann.annotations != null) // ignore non-positional annotation { - result.add(dsann); - if (labelForCalcId != null) + /* + * Find matching annotations on the alignment. If none is found, then + * add this annotation to the list of 'addable' annotations for this + * sequence. + */ + final Iterable matchedAlignmentAnnotations = al + .findAnnotations(seq, dsann.getCalcId(), dsann.label); + if (!matchedAlignmentAnnotations.iterator().hasNext()) { - labelForCalcId.put(dsann.getCalcId(), dsann.label); + result.add(dsann); + if (labelForCalcId != null) + { + labelForCalcId.put(dsann.getCalcId(), dsann.label); + } } } - } - /* - * Save any addable annotations for this sequence - */ - if (!result.isEmpty()) - { - candidates.put(seq, result); + /* + * Save any addable annotations for this sequence + */ + if (!result.isEmpty()) + { + candidates.put(seq, result); + } } } } diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index fdca89d..61fc747 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -20,6 +20,8 @@ */ package jalview.analysis; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.HiddenMarkovModel; import jalview.datamodel.PDBEntry; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; @@ -35,7 +37,7 @@ public class SeqsetUtils /** * Store essential properties of a sequence in a hashtable for later recovery - * Keys are Name, Start, End, SeqFeatures, PdbId + * Keys are Name, Start, End, SeqFeatures, PdbId, HMM * * @param seq * SequenceI @@ -52,7 +54,7 @@ public class SeqsetUtils sqinfo.put("Description", seq.getDescription()); } - Vector sfeat = new Vector(); + Vector sfeat = new Vector<>(); List sfs = seq.getFeatures().getAllFeatures(); sfeat.addAll(sfs); @@ -69,6 +71,16 @@ public class SeqsetUtils (seq.getDatasetSequence() != null) ? seq.getDatasetSequence() : new Sequence("THISISAPLACEHOLDER", "")); } + if (seq.hasHMMProfile()) + { + sqinfo.put("HMM", seq.getHMM()); + } + + if (seq.getAnnotation("Search Scores") != null) + { + sqinfo.put("Score", seq.getAnnotation("Search Scores")); + } + return sqinfo; } @@ -97,6 +109,10 @@ public class SeqsetUtils Vector pdbid = (Vector) sqinfo.get("PdbId"); String description = (String) sqinfo.get("Description"); Sequence seqds = (Sequence) sqinfo.get("datasetSequence"); + HiddenMarkovModel hmm = (HiddenMarkovModel) sqinfo.get("HMM"); + AlignmentAnnotation[] scores = (AlignmentAnnotation[]) sqinfo + .get("Score"); + if (oldname == null) { namePresent = false; @@ -135,6 +151,18 @@ public class SeqsetUtils sq.setDatasetSequence(seqds); } + if (hmm != null) + { + sq.setHMM(new HiddenMarkovModel(hmm, sq)); + } + + if (scores != null) + { + for (AlignmentAnnotation score : scores) + { + sq.addAlignmentAnnotation(score); + } + } return namePresent; } diff --git a/src/jalview/api/AlignCalcListener.java b/src/jalview/api/AlignCalcListener.java new file mode 100644 index 0000000..9ce385d --- /dev/null +++ b/src/jalview/api/AlignCalcListener.java @@ -0,0 +1,39 @@ +package jalview.api; + +import java.util.EventListener; + +/** + * A listener class which receives state updates of {@link AlignCalcWorkerI}. + * It can be registered with an {@link AlignCalcManagerI2}. + * + * @author mmwarowny + * + */ +public interface AlignCalcListener extends EventListener +{ + /** + * Called when the worker is scheduler for execution with + * {@link AlignCalcManagerI2#startWorker(AlignCalcWorkerI)}. + */ + default void workerQueued(AlignCalcWorkerI worker) {} + + /** + * Called when the worker starts calculations. + */ + default void workerStarted(AlignCalcWorkerI worker) {} + + /** + * Called when the worker finishes successfully. + */ + default void workerCompleted(AlignCalcWorkerI worker) {} + + /** + * Called when the worker is cancelled. + */ + default void workerCancelled(AlignCalcWorkerI worker) {} + + /** + * Called when the worker finishes with an exception. + */ + default void workerExceptional(AlignCalcWorkerI worker, Throwable throwable) {} +} diff --git a/src/jalview/api/AlignCalcManagerI.java b/src/jalview/api/AlignCalcManagerI.java index 18605b8..005ecd7 100644 --- a/src/jalview/api/AlignCalcManagerI.java +++ b/src/jalview/api/AlignCalcManagerI.java @@ -32,7 +32,7 @@ public interface AlignCalcManagerI * * @param worker */ - void notifyStart(AlignCalcWorkerI worker); + void notifyStarted(AlignCalcWorkerI worker); /** * tell manager that a thread running worker's run() loop is ready to start @@ -150,7 +150,7 @@ public interface AlignCalcManagerI * * @param typeToRemove */ - void removeRegisteredWorkersOfClass( + void removeWorkersOfClass( Class typeToRemove); /** diff --git a/src/jalview/api/AlignCalcManagerI2.java b/src/jalview/api/AlignCalcManagerI2.java new file mode 100644 index 0000000..22b4832 --- /dev/null +++ b/src/jalview/api/AlignCalcManagerI2.java @@ -0,0 +1,120 @@ +package jalview.api; + +import java.util.List; + +import jalview.datamodel.AlignmentAnnotation; + +/** + * An abstract manager which controls the execution of interactive jobs. + * There is always one instance of AlignCancManager per AlignmenViewport + * which runs the jobs, notifies observers and ensures no race conditions. + * + * @author mmwarowny + * + */ +public interface AlignCalcManagerI2 +{ + /** + * Registers the worker with the manager and immediately schedules it + * for execution. + */ + void registerWorker(AlignCalcWorkerI worker); + + /** + * Returns the list of all registered workers or an empty list if + * there are none + */ + List getWorkers(); + + /** + * Returns the list of all workers of a given class or an empty list + * if there are none. The classes are compared using + * {@ink Class#equals(Object)} rather than {@code instanceof}. + */ + List getWorkersOfClass(Class cls); + + /** + * Removes the worker from the scheduler. It does not cancel workers + * already scheduled for execution. + */ + void removeWorker(AlignCalcWorkerI worker); + + /** + * Removes all workers which are involved with the given annotation. + */ + void removeWorkerForAnnotation(AlignmentAnnotation annot); + + /** + * Removes all workers of a given class. The classes are compared using + * {@link Class#equals(Object)}. + */ + void removeWorkersOfClass(Class cls); + + /** + * Disables a worker so it won't be run during the following restarts. + */ + void disableWorker(AlignCalcWorkerI worker); + + /** + * Restores the previously disabled worker back to operation. + */ + void enableWorker(AlignCalcWorkerI worker); + + /** + * Checks whether the worker is disabled either due to failure or + * disabling it manually. + */ + boolean isDisabled(AlignCalcWorkerI worker); + + /** + * Checks whether the given worker is currently running. + */ + boolean isWorking(AlignCalcWorkerI worker); + + /** + * Checks whether the currently running worker (if any) is processing + * the given annotation. + */ + boolean isWorkingWithAnnotation(AlignmentAnnotation annot); + + /** + * Checks whether this manager is running a worker. + */ + boolean isWorking(); + + /** + * Scheduler the worker for one-time execution. The worker does not need + * to be registered with this manager and will be scheduler regardless + * of being disabled. If the worker has already been scheduled, the + * previous one will be cancelled. + */ + void startWorker(AlignCalcWorkerI worker); + + /** + * Schedules all registered and not-disabled workers for next execution. + */ + void restartWorkers(); + + /** + * Cancels the execution of the worker. Note, if the worker is already + * running, this method may, but doesn't have to, interrupt it in + * the middle of the work. + */ + void cancelWorker(AlignCalcWorkerI worker); + + /** + * Connect the listener of the worker state changes. + */ + void addAlignCalcListener(AlignCalcListener listener); + + /** + * Remove previously registered worker listener. + */ + void removeAlignCalcListener(AlignCalcListener listener); + + /** + * Stops the manager from running new jobs and cleans-up all + * resources such as threads and thread pools. + */ + void shutdown(); +} diff --git a/src/jalview/api/AlignCalcWorkerI.java b/src/jalview/api/AlignCalcWorkerI.java index 85157c4..b51b94e 100644 --- a/src/jalview/api/AlignCalcWorkerI.java +++ b/src/jalview/api/AlignCalcWorkerI.java @@ -20,13 +20,15 @@ */ package jalview.api; +import java.util.concurrent.Callable; + import jalview.datamodel.AlignmentAnnotation; /** * Interface describing a worker that calculates alignment annotation(s). The * main (re-)calculation should be performed by the inherited run() method. */ -public interface AlignCalcWorkerI extends Runnable +public interface AlignCalcWorkerI { /** * Answers true if this worker updates the given annotation (regardless of its @@ -39,8 +41,8 @@ public interface AlignCalcWorkerI extends Runnable /** * Updates the display of calculated annotation values (does not recalculate - * the values). This allows ßquick redraw of annotations when display settings - * are changed. + * the values). This allows a quick redraw of annotations when display + * settings are changed. */ void updateAnnotation(); @@ -48,7 +50,13 @@ public interface AlignCalcWorkerI extends Runnable * Removes any annotation(s) managed by this worker from the alignment */ void removeAnnotation(); - + + /** + * The main calculation happens here + * @throws Throwable + */ + public void run() throws Throwable; + /** * Answers true if the worker should be deleted entirely when its annotation * is deleted from the display, or false if it should continue to run. Some diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 065be75..2f992a6 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -55,7 +55,7 @@ public interface AlignViewportI extends ViewStyleI * * @return */ - public ViewportRanges getRanges(); + ViewportRanges getRanges(); /** * calculate the height for visible annotation, revalidating bounds where @@ -63,7 +63,7 @@ public interface AlignViewportI extends ViewStyleI * * @return total height of annotation */ - public int calcPanelHeight(); + int calcPanelHeight(); /** * Answers true if the viewport has at least one column selected @@ -87,6 +87,12 @@ public interface AlignViewportI extends ViewStyleI boolean isNormaliseSequenceLogo(); + boolean isShowInformationHistogram(); + + boolean isShowHMMSequenceLogo(); + + boolean isNormaliseHMMSequenceLogo(); + ColourSchemeI getGlobalColourScheme(); /** @@ -114,6 +120,8 @@ public interface AlignViewportI extends ViewStyleI boolean isIgnoreGapsConsensus(); + boolean isIgnoreBelowBackground(); + boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation); AlignmentAnnotation getAlignmentQualityAnnot(); @@ -158,7 +166,7 @@ public interface AlignViewportI extends ViewStyleI * * @return */ - AlignCalcManagerI getCalcManager(); + AlignCalcManagerI2 getCalcManager(); /** * get the percentage gaps allowed in a conservation calculation @@ -499,9 +507,21 @@ public interface AlignViewportI extends ViewStyleI @Override void setProteinFontAsCdna(boolean b); - TreeModel getCurrentTree(); + void setHmmProfiles(ProfilesI info); - void setCurrentTree(TreeModel tree); + ProfilesI getHmmProfiles(); + + /** + * Registers and starts a worker thread to calculate Information Content + * annotation, if it is not already registered + * + * @param ap + */ + void initInformationWorker(AlignmentViewPanel ap); + + boolean isInfoLetterHeight(); + + public abstract TreeModel getCurrentTree(); /** * Answers a data bean containing data for export as configured by the @@ -512,6 +532,8 @@ public interface AlignViewportI extends ViewStyleI */ AlignmentExportData getAlignExportData(AlignExportSettingsI options); + public abstract void setCurrentTree(TreeModel tree); + /** * @param update * - set the flag for updating structures on next repaint diff --git a/src/jalview/api/FeatureSettingsModelI.java b/src/jalview/api/FeatureSettingsModelI.java index c0fc523..5e910dc 100644 --- a/src/jalview/api/FeatureSettingsModelI.java +++ b/src/jalview/api/FeatureSettingsModelI.java @@ -20,6 +20,8 @@ */ package jalview.api; +import jalview.datamodel.features.FeatureMatcherSetI; + import java.util.Comparator; /** @@ -60,6 +62,15 @@ public interface FeatureSettingsModelI extends Comparator FeatureColourI getFeatureColour(String type); /** + * Returns any filters defined for the feature type, or null if not known + * + * @param type + * @return + */ + + FeatureMatcherSetI getFeatureFilters(String type); + + /** * Returns the transparency value, from 0 (fully transparent) to 1 (fully * opaque) * diff --git a/src/jalview/api/PollableAlignCalcWorkerI.java b/src/jalview/api/PollableAlignCalcWorkerI.java new file mode 100644 index 0000000..25074ec --- /dev/null +++ b/src/jalview/api/PollableAlignCalcWorkerI.java @@ -0,0 +1,18 @@ +package jalview.api; + +public interface PollableAlignCalcWorkerI extends AlignCalcWorkerI +{ + @Override + public default void run() throws Throwable + { + startUp(); + } + + public void startUp() throws Throwable; + + public boolean poll() throws Throwable; + + public void cancel(); + + public void done(); +} diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index fc1f26d..063e949 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -236,6 +236,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, alignPanel); viewport.updateConservation(alignPanel); viewport.updateConsensus(alignPanel); + viewport.initInformationWorker(alignPanel); displayNonconservedMenuItem.setState(viewport.getShowUnconserved()); followMouseOverFlag.setState(viewport.isFollowHighlight()); @@ -1324,6 +1325,14 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { sortGroupMenuItem_actionPerformed(); } + else if (source == sortEValueMenuItem) + { + sortEValueMenuItem_actionPerformed(); + } + else if (source == sortBitScoreMenuItem) + { + sortBitScoreMenuItem_actionPerformed(); + } else if (source == removeRedundancyMenuItem) { removeRedundancyMenuItem_actionPerformed(); @@ -2770,6 +2779,26 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } + public void sortEValueMenuItem_actionPerformed() + { + SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); + AlignmentSorter.sortByEValue(viewport.getAlignment()); + addHistoryItem(new OrderCommand("Group Sort", oldOrder, + viewport.getAlignment())); + alignPanel.paintAlignment(true, false); + + } + + public void sortBitScoreMenuItem_actionPerformed() + { + SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); + AlignmentSorter.sortByBitScore(viewport.getAlignment()); + addHistoryItem(new OrderCommand("Group Sort", oldOrder, + viewport.getAlignment())); + alignPanel.paintAlignment(true, false); + + } + public void removeRedundancyMenuItem_actionPerformed() { new RedundancyPanel(alignPanel); @@ -3120,6 +3149,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuItem sortGroupMenuItem = new MenuItem(); + MenuItem sortEValueMenuItem = new MenuItem(); + + MenuItem sortBitScoreMenuItem = new MenuItem(); + MenuItem removeRedundancyMenuItem = new MenuItem(); MenuItem pairwiseAlignmentMenuItem = new MenuItem(); diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index b379c2d..e2eebfc 100644 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) * * This file is part of Jalview. * @@ -54,10 +54,16 @@ public class AlignViewport extends AlignmentViewport private AnnotationColumnChooser annotationColumnSelectionState; + java.awt.Frame nullFrame; + + protected FeatureSettings featureSettings = null; + + private float heightScale = 1, widthScale = 1; + public AlignViewport(AlignmentI al, JalviewLite applet) { super(al); - calculator = new jalview.workers.AlignCalcManager(); + calculator = new jalview.workers.AlignCalcManager2(); this.applet = applet; // we always pad gaps @@ -197,7 +203,7 @@ public class AlignViewport extends AlignmentViewport colour)); if (residueShading != null) { - residueShading.setConsensus(hconsensus); + residueShading.setConsensus(consensusProfiles); } } @@ -208,15 +214,8 @@ public class AlignViewport extends AlignmentViewport } } initAutoAnnotation(); - } - java.awt.Frame nullFrame; - - protected FeatureSettings featureSettings = null; - - private float heightScale = 1, widthScale = 1; - /** * {@inheritDoc} */ @@ -296,17 +295,6 @@ public class AlignViewport extends AlignmentViewport .getStructureSelectionManager(applet); } - @Override - public boolean isNormaliseSequenceLogo() - { - return normaliseSequenceLogo; - } - - public void setNormaliseSequenceLogo(boolean state) - { - normaliseSequenceLogo = state; - } - /** * * @return true if alignment characters should be displayed diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 58569cd..3d74aa2 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -555,8 +555,8 @@ public class AlignmentPanel extends Panel // this is called after loading new annotation onto alignment if (alignFrame.getSize().height == 0) { - System.out.println( - "adjustAnnotationHeight frame size zero NEEDS FIXING"); + // panel not laid out yet? + return; } fontChanged(); validateAnnotationDimensions(true); diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index a0102b9..9cd2b51 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -534,7 +534,7 @@ public class AnnotationLabels extends Panel MessageManager.getString("label.ignore_gaps_consensus"), (aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef - .getIgnoreGapsConsensus() + .getIgnoreGapsConsensus() : ap.av.isIgnoreGapsConsensus()); final AlignmentAnnotation aaa = aa[selectedRow]; cbmi.addItemListener(new ItemListener() diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index f89b67c..aa08e79 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -20,6 +20,18 @@ */ package jalview.appletgui; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.Annotation; +import jalview.datamodel.SequenceI; +import jalview.renderer.AnnotationRenderer; +import jalview.renderer.AwtRenderPanelI; +import jalview.schemes.ResidueProperties; +import jalview.util.Comparison; +import jalview.util.MessageManager; +import jalview.util.Platform; +import jalview.viewmodel.ViewportListenerI; +import jalview.viewmodel.ViewportRanges; + import java.awt.Color; import java.awt.Dimension; import java.awt.Font; diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 9cbdd36..f4603b5 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -71,7 +71,7 @@ public class OverviewPanel extends Panel implements Runnable, od = new OverviewDimensionsShowHidden(av.getRanges(), (av.isShowAnnotation() - && av.getSequenceConsensusHash() != null)); + && av.getSequenceConsensusHash() != null)); oviewCanvas = new OverviewCanvas(od, av); setLayout(new BorderLayout()); diff --git a/src/jalview/appletgui/TitledPanel.java b/src/jalview/appletgui/TitledPanel.java index dec6573..8c72f64 100644 --- a/src/jalview/appletgui/TitledPanel.java +++ b/src/jalview/appletgui/TitledPanel.java @@ -23,6 +23,8 @@ package jalview.appletgui; import java.awt.Graphics; import java.awt.Insets; import java.awt.Panel; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; public class TitledPanel extends Panel { diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 70aaa42..75504be 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -186,8 +186,8 @@ public class Jalview implements ApplicationSingletonI class FeatureFetcher { /* - * TODO: generalise to track all jalview events to orchestrate batch processing - * events. + * TODO: generalise to track all jalview events to orchestrate batch + * processing events. */ private int queued = 0; @@ -461,7 +461,12 @@ public class Jalview implements ApplicationSingletonI System.out.println("Error setting Taskbar: " + t.getMessage()); } desktop.setVisible(true); - + if (Platform.isJS()) + Cache.setProperty("SHOW_JWS2_SERVICES", "false"); + if (allowServices) + { + desktop.startServiceDiscovery(); + } if (!isJS) /** * Java only @@ -469,8 +474,6 @@ public class Jalview implements ApplicationSingletonI * @j2sIgnore */ { - if (allowServices) - desktop.startServiceDiscovery(); if (!aparser.contains("nousagestats")) { startUsageStats(desktop); @@ -763,6 +766,10 @@ public class Jalview implements ApplicationSingletonI createOutputFiles(aparser, format); } } + if (headless) + { + af.getViewport().getCalcManager().shutdown(); + } } // extract groovy arguments before anything else. // Once all other stuff is done, execute any groovy scripts (in order) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 8d81a34..3a79ac6 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -292,6 +292,32 @@ public class Alignment implements AlignmentI, AutoCloseable } /** + * Inserts a sequence at a point in the alignment. + * + * @param i + * the index of the position the sequence is to be inserted in. + */ + @Override + public void insertSequenceAt(int i, SequenceI snew) + { + synchronized (sequences) + { + if (sequences.size() > i) + { + sequences.add(i, snew); + return; + + } + else + { + sequences.add(snew); + hiddenSequences.adjustHeightSequenceAdded(); + } + return; + } + } + + /** * DOCUMENT ME! * * @return DOCUMENT ME! @@ -1606,34 +1632,50 @@ public class Alignment implements AlignmentI, AutoCloseable String calcId, boolean autoCalc, SequenceI seqRef, SequenceGroup groupRef) { - if (annotations != null) + AlignmentAnnotation annot = annotations == null ? null + : AlignmentAnnotation.findFirstAnnotation( + Arrays.asList(getAlignmentAnnotation()), name, calcId, + autoCalc, seqRef, groupRef); + + if (annot == null) { - for (AlignmentAnnotation annot : getAlignmentAnnotation()) + + annot = new AlignmentAnnotation(name, name, new Annotation[1], 0f, 0f, + AlignmentAnnotation.BAR_GRAPH); + annot.hasText = false; + if (calcId != null) { - if (annot.autoCalculated == autoCalc && (name.equals(annot.label)) - && (calcId == null || annot.getCalcId().equals(calcId)) - && annot.sequenceRef == seqRef - && annot.groupRef == groupRef) - { - return annot; - } + annot.setCalcId(calcId); } + annot.autoCalculated = autoCalc; + if (seqRef != null) + { + annot.setSequenceRef(seqRef); + } + annot.groupRef = groupRef; + addAnnotation(annot); } - AlignmentAnnotation annot = new AlignmentAnnotation(name, name, - new Annotation[1], 0f, 0f, AlignmentAnnotation.BAR_GRAPH); - annot.hasText = false; - if (calcId != null) + return annot; + } + + + @Override + public AlignmentAnnotation updateFromOrCopyAnnotation( + AlignmentAnnotation ala) + { + AlignmentAnnotation annot = AlignmentAnnotation.findFirstAnnotation( + Arrays.asList(getAlignmentAnnotation()), ala.label, ala.calcId, + ala.autoCalculated, ala.sequenceRef, ala.groupRef); + if (annot == null) { - annot.setCalcId(new String(calcId)); + annot = new AlignmentAnnotation(ala); + addAnnotation(annot); } - annot.autoCalculated = autoCalc; - if (seqRef != null) + else { - annot.setSequenceRef(seqRef); + annot.updateAlignmentAnnotationFrom(ala); } - annot.groupRef = groupRef; - addAnnotation(annot); - + validateAnnotation(annot); return annot; } @@ -2033,4 +2075,18 @@ public class Alignment implements AlignmentI, AutoCloseable } } + @Override + public List getHmmSequences() + { + List result = new ArrayList<>(); + for (int i = 0; i < sequences.size(); i++) + { + SequenceI seq = sequences.get(i); + if (seq.hasHMMProfile()) + { + result.add(seq); + } + } + return result; + } } diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 2ee4503..4ba0ac4 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -94,6 +94,10 @@ public class AlignmentAnnotation */ private long invalidrnastruc = -2; + private double bitScore; + + private double eValue; + /** * Updates the _rnasecstr field Determines the positions that base pair and * the positions of helices based on secondary structure from a Stockholm file @@ -584,7 +588,7 @@ public class AlignmentAnnotation } return null; } - + /** * Creates a new AlignmentAnnotation object. * @@ -696,7 +700,7 @@ public class AlignmentAnnotation } } } - + /** * Copy constructor creates a new independent annotation row with the same * associated sequenceRef @@ -706,6 +710,17 @@ public class AlignmentAnnotation public AlignmentAnnotation(AlignmentAnnotation annotation) { setAnnotationId(); + updateAlignmentAnnotationFrom(annotation); + } + + /** + * copy attributes and annotation from an existing annotation (used by copy + * constructor). This method does not update the unique annotationId + * + * @param annotation + */ + public void updateAlignmentAnnotationFrom(AlignmentAnnotation annotation) + { this.label = new String(annotation.label); if (annotation.description != null) { @@ -729,6 +744,9 @@ public class AlignmentAnnotation this.scaleColLabel = annotation.scaleColLabel; this.showAllColLabels = annotation.showAllColLabels; this.calcId = annotation.calcId; + this.bitScore = annotation.bitScore; + this.eValue = annotation.eValue; + if (annotation.properties != null) { properties = new HashMap<>(); @@ -960,6 +978,7 @@ public class AlignmentAnnotation * @param seqRef * @param startRes * @param alreadyMapped + * - annotation are at aligned columns */ public void createSequenceMapping(SequenceI seqRef, int startRes, boolean alreadyMapped) @@ -1161,7 +1180,7 @@ public class AlignmentAnnotation { return hasScore || !Double.isNaN(score); } - + /** * Score only annotation * @@ -1192,6 +1211,7 @@ public class AlignmentAnnotation makeVisibleAnnotation(hidden); } + public void setPadGaps(boolean padgaps, char gapchar) { this.padGaps = padgaps; @@ -1651,7 +1671,6 @@ public class AlignmentAnnotation Iterable list, SequenceI seq, String calcId, String label) { - ArrayList aa = new ArrayList<>(); for (AlignmentAnnotation ann : list) { @@ -1696,7 +1715,6 @@ public class AlignmentAnnotation public static Iterable findAnnotation( List list, String calcId) { - List aa = new ArrayList<>(); if (calcId == null) { @@ -1714,4 +1732,42 @@ public class AlignmentAnnotation return aa; } + public double getBitScore() + { + return bitScore; + } + + public void setBitScore(double bitScore) + { + this.bitScore = bitScore; + } + + public double getEValue() + { + return eValue; + } + + public void setEValue(double eValue) + { + this.eValue = eValue; + } + + public static AlignmentAnnotation findFirstAnnotation( + Iterable alignmentAnnotation, String name, + String calcId, boolean autoCalc, SequenceI seqRef, + SequenceGroup groupRef) + { + + for (AlignmentAnnotation annot : alignmentAnnotation) + { + if (annot.autoCalculated == autoCalc && (name.equals(annot.label)) + && (calcId == null || annot.getCalcId().equals(calcId)) + && annot.sequenceRef == seqRef && annot.groupRef == groupRef) + { + return annot; + } + } + return null; + } + } diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index 93a2456..cea1c5b 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -518,8 +518,6 @@ public interface AlignmentI extends AnnotatedCollectionI * - null or specific sequence reference * @param groupRef * - null or specific group reference - * @param method - * - CalcId for the annotation (must match) * * @return existing annotation matching the given attributes */ @@ -527,6 +525,17 @@ public interface AlignmentI extends AnnotatedCollectionI boolean autoCalc, SequenceI seqRef, SequenceGroup groupRef); /** + * like findOrCreateAnnotation - looks for an existing alignment annotation + * row with matching name, calcId, sequenceRef, groupRef and autoCalculated + * flag and updates it from the annotation. If none is found the annotation is + * added directly. + * + * @param ala + * @return ala or the annotation row that was updated. + */ + AlignmentAnnotation updateFromOrCopyAnnotation(AlignmentAnnotation ala); + + /** * move the given group up or down in the alignment by the given number of * rows. Implementor assumes given group is already present on alignment - no * recalculations are triggered. @@ -604,6 +613,16 @@ public interface AlignmentI extends AnnotatedCollectionI public boolean setHiddenColumns(HiddenColumns cols); /** + * Insert a sequence at a position in an alignment + * + * @param i + * The index of the position. + * @param snew + * The new sequence. + */ + void insertSequenceAt(int i, SequenceI snew); + + /** * Set the first sequence as representative and hide its insertions. Typically * used when loading JPred files. */ @@ -623,5 +642,4 @@ public interface AlignmentI extends AnnotatedCollectionI */ public HiddenColumns propagateInsertions(SequenceI profileseq, AlignmentView input); - } diff --git a/src/jalview/datamodel/AlignmentOrder.java b/src/jalview/datamodel/AlignmentOrder.java index 6d09145..ef46d79 100755 --- a/src/jalview/datamodel/AlignmentOrder.java +++ b/src/jalview/datamodel/AlignmentOrder.java @@ -80,7 +80,7 @@ public class AlignmentOrder */ public AlignmentOrder(AlignmentI orderFrom) { - Order = new ArrayList(); + Order = new ArrayList<>(); for (SequenceI seq : orderFrom.getSequences()) { @@ -96,7 +96,7 @@ public class AlignmentOrder */ public AlignmentOrder(SequenceI[] orderFrom) { - Order = new ArrayList(Arrays.asList(orderFrom)); + Order = new ArrayList<>(Arrays.asList(orderFrom)); } /** diff --git a/src/jalview/datamodel/AlignmentView.java b/src/jalview/datamodel/AlignmentView.java index e6604d1..c00f0b1 100644 --- a/src/jalview/datamodel/AlignmentView.java +++ b/src/jalview/datamodel/AlignmentView.java @@ -25,6 +25,7 @@ import jalview.util.ShiftList; import java.io.PrintStream; import java.util.ArrayList; +import java.util.Collection; import java.util.List; /** @@ -114,6 +115,16 @@ public class AlignmentView { return seqs.size(); } + + public SequenceGroup getNewSequenceGroup(char c) + { + SequenceGroup newsg = new SequenceGroup(sg); + for (SeqCigar seq : seqs) + { + newsg.addSequence(seq.getSeq(c), false); + } + return newsg; + } } /** @@ -1237,4 +1248,21 @@ public class AlignmentView } } + + /** + * return pruned visible sequences in each group in alignment view + * + * @param c + * @return + */ + public Collection getVisibleGroups(char c) + { + ArrayList groups = new ArrayList<>(); + for (ScGroup sc : scGroups) + { + SequenceGroup sg = sc.getNewSequenceGroup(c); + groups.add(sg); + } + return groups; + } } diff --git a/src/jalview/datamodel/AnnotatedCollectionI.java b/src/jalview/datamodel/AnnotatedCollectionI.java index 2963fd5..878f22a 100644 --- a/src/jalview/datamodel/AnnotatedCollectionI.java +++ b/src/jalview/datamodel/AnnotatedCollectionI.java @@ -61,4 +61,6 @@ public interface AnnotatedCollectionI extends SequenceCollectionI * alignment, parent group). */ AnnotatedCollectionI getContext(); + + } diff --git a/src/jalview/datamodel/HMMNode.java b/src/jalview/datamodel/HMMNode.java new file mode 100644 index 0000000..b646eee --- /dev/null +++ b/src/jalview/datamodel/HMMNode.java @@ -0,0 +1,148 @@ +package jalview.datamodel; + +/** + * stores data for each node in the hmm model + * @author TZVanaalten + * + */ +public class HMMNode +{ + //contains the match emissions for each symbol + double[] matchEmissions; + + //contains the insert emissions for each symbol + double[] insertEmissions; + + // contains the state transitions for each possible transition. These are mm, + // mi, md, im, ii, dm and dd in order + double[] stateTransitions; + + //annotations + int residueNumber; + char consensusResidue; + char referenceAnnotation; + char maskValue; + char consensusStructure; + + /** + * Constructor + */ + public HMMNode() + { + } + + public double[] getMatchEmissions() + { + return matchEmissions; + } + + double getMatchEmission(int symbolIndex) + { + return matchEmissions[symbolIndex]; + } + + public void setMatchEmissions(double[] matches) + { + this.matchEmissions = matches; + } + + public double[] getInsertEmissions() + { + return insertEmissions; + } + + double getInsertEmission(int symbolIndex) + { + return insertEmissions[symbolIndex]; + } + + public void setInsertEmissions(double[] insertEmissionsL) + { + this.insertEmissions = insertEmissionsL; + } + + public double[] getStateTransitions() + { + return stateTransitions; + } + + double getStateTransition(int transition) + { + return stateTransitions[transition]; + } + + public void setStateTransitions(double[] stateTransitionsM) + { + this.stateTransitions = stateTransitionsM; + } + + int getResidueNumber() + { + return residueNumber; + } + public void setResidueNumber(int resNo) + { + this.residueNumber = resNo; + } + + char getConsensusResidue() + { + return consensusResidue; + } + public void setConsensusResidue(char consensusResidue) + { + this.consensusResidue = consensusResidue; + } + + char getReferenceAnnotation() + { + return referenceAnnotation; + } + public void setReferenceAnnotation(char referenceAnnotation) + { + this.referenceAnnotation = referenceAnnotation; + } + + char getMaskValue() + { + return maskValue; + } + public void setMaskValue(char maskValue) + { + this.maskValue = maskValue; + } + + char getConsensusStructure() + { + return consensusStructure; + } + public void setConsensusStructure(char consensusStructure) + { + this.consensusStructure = consensusStructure; + } + + /** + * Answers the symbol index of the symbol with the highest match emission + * probability (first symbol in case of a tie). Note this object stores + * probabilities, not the negative logarithms as in the HMM file. + * + * @return + */ + int getMaxMatchEmissionIndex() + { + int maxIndex = 0; + double max = 0D; + + for (int i = 0; i < matchEmissions.length; i++) + { + if (matchEmissions[i] > max) + { + max = matchEmissions[i]; + maxIndex = i; + } + } + return maxIndex; + } +} + + diff --git a/src/jalview/datamodel/HiddenMarkovModel.java b/src/jalview/datamodel/HiddenMarkovModel.java new file mode 100644 index 0000000..6b8b095 --- /dev/null +++ b/src/jalview/datamodel/HiddenMarkovModel.java @@ -0,0 +1,672 @@ +package jalview.datamodel; + +import jalview.io.HMMFile; +import jalview.schemes.ResidueProperties; +import jalview.util.Comparison; +import jalview.util.MapList; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Data structure which stores a hidden Markov model + * + * @author TZVanaalten + * + */ +public class HiddenMarkovModel +{ + private static final char GAP_DASH = '-'; + + public final static String YES = "yes"; + + public final static String NO = "no"; + + public static final int MATCHTOMATCH = 0; + + public static final int MATCHTOINSERT = 1; + + public static final int MATCHTODELETE = 2; + + public static final int INSERTTOMATCH = 3; + + public static final int INSERTTOINSERT = 4; + + public static final int DELETETOMATCH = 5; + + public static final int DELETETODELETE = 6; + + private static final double LOG2 = Math.log(2); + + /* + * properties read from HMM file header lines + */ + private Map fileProperties = new HashMap<>(); + + private String fileHeader; + + /* + * the symbols used in this model e.g. "ACGT" + */ + private String alphabet; + + /* + * symbol lookup index into the alphabet for 'A' to 'Z' + */ + private int[] symbolIndexLookup = new int['Z' - 'A' + 1]; + + /* + * Nodes in the model. The begin node is at index 0, and contains + * average emission probabilities for each symbol. + */ + private List nodes = new ArrayList<>(); + + /* + * the aligned HMM consensus sequence extracted from the HMM profile + */ + private SequenceI hmmSeq; + + /* + * mapping from HMM nodes to residues of the hmm consensus sequence + */ + private Mapping mapToHmmConsensus; + + // stores background frequencies of alignment from which this model came + private Map backgroundFrequencies; + + /** + * Constructor + */ + public HiddenMarkovModel() + { + } + + /** + * Copy constructor given a new aligned sequence with which to associate the + * HMM profile + * + * @param hmm + * @param sq + */ + public HiddenMarkovModel(HiddenMarkovModel hmm, SequenceI sq) + { + super(); + this.fileProperties = new HashMap<>(hmm.fileProperties); + this.alphabet = hmm.alphabet; + this.nodes = new ArrayList<>(hmm.nodes); + this.symbolIndexLookup = hmm.symbolIndexLookup; + this.fileHeader = new String(hmm.fileHeader); + this.hmmSeq = sq; + this.backgroundFrequencies = hmm.getBackgroundFrequencies(); + if (sq.getDatasetSequence() == hmm.mapToHmmConsensus.getTo()) + { + // same dataset sequence e.g. after realigning search results + this.mapToHmmConsensus = hmm.mapToHmmConsensus; + } + else + { + // different dataset sequence e.g. after loading HMM from project + this.mapToHmmConsensus = new Mapping(sq.getDatasetSequence(), + hmm.mapToHmmConsensus.getMap()); + } + } + + /** + * Returns the information content at a specified column, calculated as the + * sum (over possible symbols) of the log ratio + * + *
    +   *  log(emission probability / background probability) / log(2)
    +   * 
    + * + * @param column + * column position (base 0) + * @return + */ + public float getInformationContent(int column) + { + float informationContent = 0f; + + for (char symbol : getSymbols().toCharArray()) + { + float freq = ResidueProperties.backgroundFrequencies + .get(getAlphabetType()).get(symbol); + float prob = (float) getMatchEmissionProbability(column, symbol); + informationContent += prob * Math.log(prob / freq); + } + + informationContent = informationContent / (float) LOG2; + + return informationContent; + } + + /** + * Gets the file header of the .hmm file this model came from + * + * @return + */ + public String getFileHeader() + { + return fileHeader; + } + + /** + * Sets the file header of this model. + * + * @param header + */ + public void setFileHeader(String header) + { + fileHeader = header; + } + + /** + * Returns the symbols used in this hidden Markov model + * + * @return + */ + public String getSymbols() + { + return alphabet; + } + + /** + * Gets the node in the hidden Markov model at the specified position. + * + * @param nodeIndex + * The index of the node requested. Node 0 optionally contains the + * average match emission probabilities across the entire model, and + * always contains the insert emission probabilities and state + * transition probabilities for the begin node. Node 1 contains the + * first node in the HMM that can correspond to a column in the + * alignment. + * @return + */ + public HMMNode getNode(int nodeIndex) + { + return nodes.get(nodeIndex); + } + + /** + * Returns the name of the sequence alignment on which the HMM is based. + * + * @return + */ + public String getName() + { + return fileProperties.get(HMMFile.NAME); + } + + /** + * Answers the string value of the property (parsed from an HMM file) for the + * given key, or null if the property is not present + * + * @param key + * @return + */ + public String getProperty(String key) + { + return fileProperties.get(key); + } + + /** + * Answers true if the property with the given key is present with a value of + * "yes" (not case-sensitive), else false + * + * @param key + * @return + */ + public boolean getBooleanProperty(String key) + { + return YES.equalsIgnoreCase(fileProperties.get(key)); + } + + /** + * Returns the length of the hidden Markov model. The value returned is the + * LENG property if specified, else the number of nodes, excluding the begin + * node (which should be the same thing). + * + * @return + */ + public int getLength() + { + if (fileProperties.get(HMMFile.LENGTH) == null) + { + return nodes.size() - 1; // not counting BEGIN node + } + return Integer.parseInt(fileProperties.get(HMMFile.LENGTH)); + } + + /** + * Returns the value of mandatory property "ALPH" - "amino", "DNA", "RNA" are + * the options. Other alphabets may be added. + * + * @return + */ + public String getAlphabetType() + { + return fileProperties.get(HMMFile.ALPHABET); + } + + /** + * Sets the model alphabet to the symbols in the given string (ignoring any + * whitespace), and returns the number of symbols + * + * @param symbols + */ + public int setAlphabet(String symbols) + { + String trimmed = symbols.toUpperCase().replaceAll("\\s", ""); + int count = trimmed.length(); + alphabet = trimmed; + symbolIndexLookup = new int['Z' - 'A' + 1]; + Arrays.fill(symbolIndexLookup, -1); + int ignored = 0; + + /* + * save the symbols in order, and a quick lookup of symbol position + */ + for (short i = 0; i < count; i++) + { + char symbol = trimmed.charAt(i); + if (symbol >= 'A' && symbol <= 'Z' + && symbolIndexLookup[symbol - 'A'] == -1) + { + symbolIndexLookup[symbol - 'A'] = i; + } + else + { + System.err + .println( + "Unexpected or duplicated character in HMM ALPHabet: " + + symbol); + ignored++; + } + } + return count - ignored; + } + + /** + * Answers the node of the model corresponding to an aligned column position + * (0...), or null if there is no such node + * + * @param column + * @return + */ + HMMNode getNodeForColumn(int column) + { + /* + * if the hmm consensus is gapped at the column, + * there is no corresponding node + */ + if (Comparison.isGap(hmmSeq.getCharAt(column))) + { + return null; + } + + /* + * find the node (if any) that is mapped to the + * consensus sequence residue position at the column + */ + int seqPos = hmmSeq.findPosition(column); + int[] nodeNo = mapToHmmConsensus.getMap().locateInFrom(seqPos, seqPos); + if (nodeNo != null) + { + return getNode(nodeNo[0]); + } + return null; + } + + /** + * Gets the match emission probability for a given symbol at a column in the + * alignment. + * + * @param alignColumn + * The index of the alignment column, starting at index 0. Index 0 + * usually corresponds to index 1 in the HMM. + * @param symbol + * The symbol for which the desired probability is being requested. + * @return + * + */ + public double getMatchEmissionProbability(int alignColumn, char symbol) + { + HMMNode node = getNodeForColumn(alignColumn); + int symbolIndex = getSymbolIndex(symbol); + if (node != null && symbolIndex != -1) + { + return node.getMatchEmission(symbolIndex); + } + return 0D; + } + + /** + * Gets the insert emission probability for a given symbol at a column in the + * alignment. + * + * @param alignColumn + * The index of the alignment column, starting at index 0. Index 0 + * usually corresponds to index 1 in the HMM. + * @param symbol + * The symbol for which the desired probability is being requested. + * @return + * + */ + public double getInsertEmissionProbability(int alignColumn, char symbol) + { + HMMNode node = getNodeForColumn(alignColumn); + int symbolIndex = getSymbolIndex(symbol); + if (node != null && symbolIndex != -1) + { + return node.getInsertEmission(symbolIndex); + } + return 0D; + } + + /** + * Gets the state transition probability for a given symbol at a column in the + * alignment. + * + * @param alignColumn + * The index of the alignment column, starting at index 0. Index 0 + * usually corresponds to index 1 in the HMM. + * @param symbol + * The symbol for which the desired probability is being requested. + * @return + * + */ + public double getStateTransitionProbability(int alignColumn, + int transition) + { + HMMNode node = getNodeForColumn(alignColumn); + if (node != null) + { + return node.getStateTransition(transition); + } + return 0D; + } + + /** + * Returns the sequence position linked to the node at the given index. This + * corresponds to an aligned column position (counting from 1). + * + * @param nodeIndex + * The index of the node, starting from index 1. Index 0 is the begin + * node, which does not correspond to a column in the alignment. + * @return + */ + public int getNodeMapPosition(int nodeIndex) + { + return nodes.get(nodeIndex).getResidueNumber(); + } + + /** + * Returns the consensus residue at the specified node. + * + * @param nodeIndex + * The index of the specified node. + * @return + */ + public char getConsensusResidue(int nodeIndex) + { + char value = nodes.get(nodeIndex).getConsensusResidue(); + return value; + } + + /** + * Returns the reference annotation at the specified node. + * + * @param nodeIndex + * The index of the specified node. + * @return + */ + public char getReferenceAnnotation(int nodeIndex) + { + char value = nodes.get(nodeIndex).getReferenceAnnotation(); + return value; + } + + /** + * Returns the mask value at the specified node. + * + * @param nodeIndex + * The index of the specified node. + * @return + */ + public char getMaskedValue(int nodeIndex) + { + char value = nodes.get(nodeIndex).getMaskValue(); + return value; + } + + /** + * Returns the consensus structure at the specified node. + * + * @param nodeIndex + * The index of the specified node. + * @return + */ + public char getConsensusStructure(int nodeIndex) + { + char value = nodes.get(nodeIndex).getConsensusStructure(); + return value; + } + + /** + * Sets a property read from an HMM file + * + * @param key + * @param value + */ + public void setProperty(String key, String value) + { + fileProperties.put(key, value); + } + + /** + * Temporary implementation, should not be used. + * + * @return + */ + public String getViterbi() + { + String value; + value = fileProperties.get(HMMFile.VITERBI); + return value; + } + + /** + * Temporary implementation, should not be used. + * + * @return + */ + public String getMSV() + { + String value; + value = fileProperties.get(HMMFile.MSV); + return value; + } + + /** + * Temporary implementation, should not be used. + * + * @return + */ + public String getForward() + { + String value; + value = fileProperties.get(HMMFile.FORWARD); + return value; + } + + /** + * Constructs the consensus sequence based on the most probable symbol at each + * position. Gap characters are inserted for discontinuities in the node map + * numbering (if provided), else an ungapped sequence is generated. + *

    + * A mapping between the HMM nodes and residue positions of the sequence is + * also built and saved. + * + * @return + */ + void buildConsensusSequence() + { + List toResidues = new ArrayList<>(); + + /* + * if the HMM provided a map to sequence, use those start/end values, + * else just treat it as for a contiguous sequence numbered from 1 + */ + boolean hasMap = getBooleanProperty(HMMFile.MAP); + int start = hasMap ? getNode(1).getResidueNumber() : 1; + int endResNo = hasMap ? getNode(nodes.size() - 1).getResidueNumber() + : (start + getLength() - 1); + char[] sequence = new char[endResNo]; + + int lastResNo = start - 1; + int seqOffset = -1; + int gapCount = 0; + + + for (int seqN = 0; seqN < start; seqN++) + { + sequence[seqN] = GAP_DASH; + seqOffset++; + } + + for (int nodeNo = 1; nodeNo < nodes.size(); nodeNo++) + { + HMMNode node = nodes.get(nodeNo); + final int resNo = hasMap ? node.getResidueNumber() : lastResNo + 1; + + /* + * insert gaps if map numbering is not continuous + */ + while (resNo > lastResNo + 1) + { + sequence[seqOffset++] = GAP_DASH; + lastResNo++; + gapCount++; + } + char consensusResidue = node.getConsensusResidue(); + if (GAP_DASH == consensusResidue) + { + /* + * no residue annotation in HMM - scan for the symbol + * with the highest match emission probability + */ + int symbolIndex = node.getMaxMatchEmissionIndex(); + consensusResidue = alphabet.charAt(symbolIndex); + if (node.getMatchEmission(symbolIndex) < 0.5D) + { + // follow convention of lower case if match emission prob < 0.5 + consensusResidue = Character.toLowerCase(consensusResidue); + } + } + sequence[seqOffset++] = consensusResidue; + lastResNo = resNo; + } + + Sequence seq = new Sequence(getName(), sequence, start, + lastResNo - gapCount); + seq.createDatasetSequence(); + seq.setHMM(this); + this.hmmSeq = seq; + + /* + * construct and store Mapping of nodes to residues + * note as constructed this is just an identity mapping, + * but it allows for greater flexibility in future + */ + List fromNodes = new ArrayList<>(); + fromNodes.add(new int[] { 1, getLength() }); + toResidues.add(new int[] { seq.getStart(), seq.getEnd() }); + MapList mapList = new MapList(fromNodes, toResidues, 1, 1); + mapToHmmConsensus = new Mapping(seq.getDatasetSequence(), mapList); + } + + + /** + * Answers the aligned consensus sequence for the profile. Note this will + * return null if called before setNodes has been called. + * + * @return + */ + public SequenceI getConsensusSequence() + { + return hmmSeq; + } + + /** + * Answers the index position (0...) of the given symbol, or -1 if not a valid + * symbol for this HMM + * + * @param symbol + * @return + */ + private int getSymbolIndex(char symbol) + { + /* + * symbolIndexLookup holds the index for 'A' to 'Z' + */ + char c = Character.toUpperCase(symbol); + if ('A' <= c && c <= 'Z') + { + return symbolIndexLookup[c - 'A']; + } + return -1; + } + + /** + * Sets the nodes of this HMM, and also extracts the HMM consensus sequence + * and a mapping between node numbers and sequence positions + * + * @param nodeList + */ + public void setNodes(List nodeList) + { + nodes = nodeList; + if (nodes.size() > 1) + { + buildConsensusSequence(); + } + } + + /** + * Sets the aligned consensus sequence this HMM is the model for + * + * @param hmmSeq + */ + public void setHmmSeq(SequenceI hmmSeq) + { + this.hmmSeq = hmmSeq; + } + + public void setBackgroundFrequencies(Map bkgdFreqs) + { + backgroundFrequencies = bkgdFreqs; + } + + public void setBackgroundFrequencies(ResidueCount bkgdFreqs) + { + backgroundFrequencies = new HashMap<>(); + + int total = bkgdFreqs.getTotalResidueCount(); + + for (char c : bkgdFreqs.getSymbolCounts().symbols) + { + backgroundFrequencies.put(c, bkgdFreqs.getCount(c) * 1f / total); + } + + } + + public Map getBackgroundFrequencies() + { + return backgroundFrequencies; + } + +} + diff --git a/src/jalview/datamodel/ResidueCount.java b/src/jalview/datamodel/ResidueCount.java index 74eb887..047b7e7 100644 --- a/src/jalview/datamodel/ResidueCount.java +++ b/src/jalview/datamodel/ResidueCount.java @@ -25,6 +25,8 @@ import jalview.util.Format; import jalview.util.QuickSort; import jalview.util.SparseCount; +import java.util.List; + /** * A class to count occurrences of residues in a profile, optimised for speed * and memory footprint. @@ -148,6 +150,24 @@ public class ResidueCount } /** + * A constructor that counts frequency of all symbols (including gaps) in the + * sequences (not case-sensitive) + * + * @param sequences + */ + public ResidueCount(List sequences) + { + this(); + for (SequenceI seq : sequences) + { + for (int i = 0; i < seq.getLength(); i++) + { + add(seq.getCharAt(i)); + } + } + } + + /** * Increments the count for the given character. The supplied character may be * upper or lower case but counts are for the upper case only. Gap characters * (space, ., -) are all counted together. @@ -640,4 +660,19 @@ public class ResidueCount sb.append("]"); return sb.toString(); } + + /** + * Answers the total count for all symbols (excluding gaps) + * + * @return + */ + public int getTotalResidueCount() + { + int total = 0; + for (char symbol : this.getSymbolCounts().symbols) + { + total += getCount(symbol); + } + return total; + } } diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 552349f..009a290 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -27,6 +27,7 @@ import jalview.util.Comparison; import jalview.util.DBRefUtils; import jalview.util.MapList; import jalview.util.StringUtils; +import jalview.workers.InformationThread; import java.util.ArrayList; import java.util.Arrays; @@ -82,6 +83,10 @@ public class Sequence extends ASequence implements SequenceI private String vamsasId; + HiddenMarkovModel hmm; + + boolean isHMMConsensusSequence = false; + private DBModList dbrefs; // controlled access /** @@ -361,6 +366,11 @@ public class Sequence extends ASequence implements SequenceI this.addPDBId(new PDBEntry(pdb)); } } + if (seq.getHMM() != null) + { + this.hmm = new HiddenMarkovModel(seq.getHMM(), this); + } + } @Override @@ -1069,7 +1079,8 @@ public class Sequence extends ASequence implements SequenceI @Override public ContiguousI findPositions(int fromColumn, int toColumn) { - if (toColumn < fromColumn || fromColumn < 1) + fromColumn = Math.max(fromColumn, 1); + if (toColumn < fromColumn) { return null; } @@ -1804,7 +1815,8 @@ public class Sequence extends ASequence implements SequenceI { for (AlignmentAnnotation ann : annotation) { - if (ann.calcId != null && ann.calcId.equals(calcId) + String id = ann.getCalcId(); + if (id != null && id.equals(calcId) && ann.label != null && ann.label.equals(label)) { result.add(ann); @@ -1924,6 +1936,34 @@ public class Sequence extends ASequence implements SequenceI } } + @Override + public HiddenMarkovModel getHMM() + { + return hmm; + } + + @Override + public void setHMM(HiddenMarkovModel hmm) + { + this.hmm = hmm; + } + + @Override + public boolean hasHMMAnnotation() + { + if (this.annotation == null) { + return false; + } + for (AlignmentAnnotation ann : annotation) + { + if (InformationThread.HMM_CALC_ID.equals(ann.getCalcId())) + { + return true; + } + } + return false; + } + /** * {@inheritDoc} */ @@ -2088,4 +2128,10 @@ public class Sequence extends ASequence implements SequenceI // otherwise, sequence was completely hidden return 0; } + + @Override + public boolean hasHMMProfile() + { + return hmm != null; + } } diff --git a/src/jalview/datamodel/SequenceCollectionI.java b/src/jalview/datamodel/SequenceCollectionI.java index e2bb5a6..aa15d1f 100644 --- a/src/jalview/datamodel/SequenceCollectionI.java +++ b/src/jalview/datamodel/SequenceCollectionI.java @@ -83,4 +83,12 @@ public interface SequenceCollectionI * @return */ boolean isNucleotide(); + + /** + * Returns the (possibly empty) list of HMM consensus sequences in the + * collection + * + * @return + */ + List getHmmSequences(); } diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 861595c..0431708 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -25,6 +25,8 @@ import jalview.analysis.Conservation; import jalview.renderer.ResidueShader; import jalview.renderer.ResidueShaderI; import jalview.schemes.ColourSchemeI; +import jalview.util.MessageManager; +import jalview.workers.InformationThread; import java.awt.Color; import java.beans.PropertyChangeListener; @@ -43,11 +45,10 @@ import java.util.Map; public class SequenceGroup implements AnnotatedCollectionI { // TODO ideally this event notification functionality should be separated into - // a - // subclass of ViewportProperties similarly to ViewportRanges. Done here as - // quick fix for JAL-2665 + // a subclass of ViewportProperties similarly to ViewportRanges. + // Done here as a quick fix for JAL-2665 public static final String SEQ_GROUP_CHANGED = "Sequence group changed"; - + protected PropertyChangeSupport changeSupport = new PropertyChangeSupport( this); @@ -65,40 +66,46 @@ public class SequenceGroup implements AnnotatedCollectionI String groupName; String description; - + Conservation conserve; + Conservation conservationData; + + ProfilesI consensusProfiles; + + ProfilesI hmmProfiles; + boolean displayBoxes = true; boolean displayText = true; boolean colourText = false; - /** - * True if the group is defined as a group on the alignment, false if it is - * just a selection. + /* + * true if the group is defined as a group on the alignment, false if it is + * just a selection */ boolean isDefined = false; - /** + /* * after Olivier's non-conserved only character display */ boolean showNonconserved = false; - /** - * group members + /* + * sequences in the group */ private List sequences; - /** + /* * representative sequence for this group (if any) */ private SequenceI seqrep = null; int width = -1; - /** - * Colourscheme applied to group if any + /* + * colour scheme applied to group if any */ public ResidueShaderI cs; @@ -122,22 +129,29 @@ public class SequenceGroup implements AnnotatedCollectionI public Color textColour2 = Color.white; - /** - * consensus calculation property + /* + * properties for consensus annotation */ private boolean ignoreGapsInConsensus = true; - /** - * consensus calculation property - */ private boolean showSequenceLogo = false; - /** - * flag indicating if logo should be rendered normalised - */ private boolean normaliseSequenceLogo; /* + * properties for HMM information annotation + */ + private boolean hmmIgnoreBelowBackground = true; + + private boolean hmmUseInfoLetterHeight; + + private boolean hmmShowSequenceLogo; + + private boolean hmmNormaliseSequenceLogo; + + private boolean hmmShowHistogram; + + /* * visibility of rows or represented rows covered by group */ private boolean hidereps = false; @@ -145,18 +159,22 @@ public class SequenceGroup implements AnnotatedCollectionI /* * visibility of columns intersecting this group */ - private boolean hidecols = false; + private boolean hidecols; AlignmentAnnotation consensus = null; AlignmentAnnotation conservation = null; + private AlignmentAnnotation hmmInformation; + private boolean showConsensusHistogram; - + private AnnotatedCollectionI context; + /** - * Creates a new SequenceGroup object. + * Constructor, assigning a generated default name of "JGroup:" with object + * hashcode appended */ public SequenceGroup() { @@ -199,10 +217,13 @@ public class SequenceGroup implements AnnotatedCollectionI * copy constructor * * @param seqsel + * @param keepsequences + * if false do not add sequences from seqsel to new instance */ public SequenceGroup(SequenceGroup seqsel) { this(); + if (seqsel != null) { sequences = new ArrayList<>(); @@ -228,6 +249,9 @@ public class SequenceGroup implements AnnotatedCollectionI showSequenceLogo = seqsel.showSequenceLogo; normaliseSequenceLogo = seqsel.normaliseSequenceLogo; showConsensusHistogram = seqsel.showConsensusHistogram; + hmmShowSequenceLogo = seqsel.hmmShowSequenceLogo; + hmmNormaliseSequenceLogo = seqsel.hmmNormaliseSequenceLogo; + hmmShowHistogram = seqsel.hmmShowHistogram; idColour = seqsel.idColour; outlineColour = seqsel.outlineColour; seqrep = seqsel.seqrep; @@ -236,8 +260,12 @@ public class SequenceGroup implements AnnotatedCollectionI thresholdTextColour = seqsel.thresholdTextColour; width = seqsel.width; ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus; + hmmIgnoreBelowBackground = seqsel.hmmIgnoreBelowBackground; + hmmUseInfoLetterHeight = seqsel.hmmUseInfoLetterHeight; if (seqsel.conserve != null) { + // todo avoid doing this if we don't actually want derived calculations + // ! recalcConservation(); // safer than // aaFrequency = (Vector) seqsel.aaFrequency.clone(); // ?? } @@ -580,8 +608,9 @@ public class SequenceGroup implements AnnotatedCollectionI } /** - * calculate residue conservation for group - but only if necessary. returns - * true if the calculation resulted in a visible change to group + * Recalculates column consensus, conservation, and HMM annotation for the + * group (as applicable). Returns true if the calculation resulted in a + * visible change to group. * * @param defer * when set, colourschemes for this group are not refreshed after @@ -589,7 +618,8 @@ public class SequenceGroup implements AnnotatedCollectionI */ public boolean recalcConservation(boolean defer) { - if (cs == null && consensus == null && conservation == null) + if (cs == null && consensus == null && conservation == null + && hmmInformation == null) { return false; } @@ -600,6 +630,16 @@ public class SequenceGroup implements AnnotatedCollectionI { ProfilesI cnsns = AAFrequency.calculate(sequences, startRes, endRes + 1, showSequenceLogo); + if (hmmInformation != null) + { + HiddenMarkovModel hmm = hmmInformation.sequenceRef.getHMM(); + + ProfilesI info = AAFrequency.calculateHMMProfiles(hmm, + (endRes + 1) - startRes, startRes, endRes + 1, + hmmIgnoreBelowBackground, hmmUseInfoLetterHeight); + _updateInformationRow(info); + upd = true; + } if (consensus != null) { _updateConsensusRow(cnsns, sequences.size()); @@ -700,6 +740,33 @@ public class SequenceGroup implements AnnotatedCollectionI } /** + * Recalculates the information content on the HMM annotation + * + * @param cnsns + */ + private void _updateInformationRow(ProfilesI cnsns) + { + if (hmmInformation == null) + { + createInformationAnnotation(); + } + hmmInformation.description = MessageManager + .getString("label.information_description"); + setHmmProfiles(cnsns); + // preserve width if already set + int aWidth = (hmmInformation.annotations != null) + ? (endRes < hmmInformation.annotations.length + ? hmmInformation.annotations.length : endRes + 1) + : endRes + 1; + hmmInformation.annotations = null; + hmmInformation.annotations = new Annotation[aWidth]; // should be alignment + // width + hmmInformation.setCalcId(InformationThread.HMM_CALC_ID); + AAFrequency.completeInformation(hmmInformation, cnsns, startRes, + endRes + 1); + } + + /** * @param s * sequence to either add or remove from group * @param recalc @@ -1156,6 +1223,22 @@ public class SequenceGroup implements AnnotatedCollectionI } /** + * Creates the Hidden Markov Model annotation for this group + */ + void createInformationAnnotation() + { + hmmInformation = new AlignmentAnnotation("", "", new Annotation[1], 0f, + 6.25f, AlignmentAnnotation.BAR_GRAPH); + hmmInformation.hasText = true; + hmmInformation.autoCalculated = false; + hmmInformation.groupRef = this; + hmmInformation.label = getName(); + hmmInformation.description = MessageManager + .getString("label.information_description"); + hmmInformation.setCalcId(InformationThread.HMM_CALC_ID); + } + + /** * set this alignmentAnnotation object as the one used to render consensus * annotation * @@ -1242,6 +1325,26 @@ public class SequenceGroup implements AnnotatedCollectionI return ignoreGapsInConsensus; } + public void setIgnoreBelowBackground(boolean state) + { + hmmIgnoreBelowBackground = state; + } + + public boolean isIgnoreBelowBackground() + { + return hmmIgnoreBelowBackground; + } + + public void setInfoLetterHeight(boolean state) + { + hmmUseInfoLetterHeight = state; + } + + public boolean isUseInfoLetterHeight() + { + return hmmUseInfoLetterHeight; + } + /** * @param showSequenceLogo * indicates if a sequence logo is shown for consensus annotation @@ -1485,4 +1588,70 @@ public class SequenceGroup implements AnnotatedCollectionI { return (startRes <= apos && endRes >= apos) && sequences.contains(seq); } + + public boolean isShowInformationHistogram() + { + return hmmShowHistogram; + } + + public void setShowInformationHistogram(boolean state) + { + if (hmmShowHistogram != state && hmmInformation != null) + { + this.hmmShowHistogram = state; + // recalcConservation(); TODO don't know what to do here next + } + this.hmmShowHistogram = state; + } + + public boolean isShowHMMSequenceLogo() + { + return hmmShowSequenceLogo; + } + + public void setShowHMMSequenceLogo(boolean state) + { + hmmShowSequenceLogo = state; + } + + public boolean isNormaliseHMMSequenceLogo() + { + return hmmNormaliseSequenceLogo; + } + + public void setNormaliseHMMSequenceLogo(boolean state) + { + hmmNormaliseSequenceLogo = state; + } + + public ProfilesI getConsensusData() + { + return consensusProfiles; + } + + public ProfilesI getHmmProfiles() + { + return hmmProfiles; + } + + public void setHmmProfiles(ProfilesI hmmProfiles) + { + this.hmmProfiles = hmmProfiles; + } + + @Override + public List getHmmSequences() + { + List result = new ArrayList<>(); + for (int i = 0; i < sequences.size(); i++) + { + SequenceI seq = sequences.get(i); + if (seq.hasHMMProfile()) + { + result.add(seq); + } + } + return result; + } + } diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 933f332..72ce22c 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -48,6 +48,10 @@ public interface SequenceI extends ASequenceI */ public void setName(String name); + public HiddenMarkovModel getHMM(); + + public void setHMM(HiddenMarkovModel hmm); + /** * Get the display name */ @@ -215,10 +219,10 @@ public interface SequenceI extends ASequenceI * from 1), or null if no residues are included in the range * * @param fromColum - * - first column base 1 + * - first column base 1. (0 and negative positions are rounded up) * @param toColumn * - last column, base 1 - * @return + * @return null if fromColum>toColumn */ public ContiguousI findPositions(int fromColum, int toColumn); @@ -506,6 +510,12 @@ public interface SequenceI extends ASequenceI public List getPrimaryDBRefs(); /** + * Answers true if the sequence has annotation for Hidden Markov Model + * information content, else false + */ + boolean hasHMMAnnotation(); + + /** * Returns a (possibly empty) list of sequence features that overlap the given * alignment column range, optionally restricted to one or more specified * feature types. If the range is all gaps, then features which enclose it are @@ -542,7 +552,7 @@ public interface SequenceI extends ASequenceI * @param c1 * @param c2 */ - public int replace(char c1, char c2); + int replace(char c1, char c2); /** * Answers the GeneLociI, or null if not known @@ -572,7 +582,7 @@ public interface SequenceI extends ASequenceI * the iterator to use * @return a String corresponding to the sequence */ - public String getSequenceStringFromIterator(Iterator it); + String getSequenceStringFromIterator(Iterator it); /** * Locate the first position in this sequence which is not contained in an @@ -582,8 +592,15 @@ public interface SequenceI extends ASequenceI * iterator over regions * @return first residue not contained in regions */ + public int firstResidueOutsideIterator(Iterator it); + /** + * Answers true if this sequence has an associated Hidden Markov Model + * + * @return + */ + boolean hasHMMProfile(); } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 5f7d0d4..9d8407a 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -64,6 +64,13 @@ import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.gui.ColourMenuHelper.ColourChangeListener; import jalview.gui.ViewSelectionMenu.ViewSetProvider; +import jalview.hmmer.HMMAlign; +import jalview.hmmer.HMMBuild; +import jalview.hmmer.HMMERParamStore; +import jalview.hmmer.HMMERPreset; +import jalview.hmmer.HMMSearch; +import jalview.hmmer.HmmerCommand; +import jalview.hmmer.JackHMMER; import jalview.io.AlignmentProperties; import jalview.io.AnnotationFile; import jalview.io.BackupFiles; @@ -98,10 +105,23 @@ import jalview.viewmodel.AlignmentViewport; import jalview.viewmodel.ViewportRanges; import jalview.ws.DBRefFetcher; import jalview.ws.DBRefFetcher.FetchFinishedListenerI; +import jalview.ws.ServiceChangeListener; +import jalview.ws.WSDiscovererI; +import jalview.ws.api.ServiceWithParameters; import jalview.ws.jws1.Discoverer; import jalview.ws.jws2.Jws2Discoverer; -import jalview.ws.jws2.jabaws2.Jws2Instance; +import jalview.ws.jws2.PreferredServiceRegistry; +import jalview.ws.params.ArgumentI; +import jalview.ws.params.ParamDatastoreI; +import jalview.ws.params.WsParamSetI; import jalview.ws.seqfetcher.DbSourceProxy; +import jalview.ws.slivkaws.SlivkaWSDiscoverer; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; import java.awt.BorderLayout; import java.awt.Color; @@ -130,12 +150,14 @@ import java.awt.event.MouseEvent; import java.awt.print.PageFormat; import java.awt.print.PrinterJob; import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; import java.io.File; import java.io.FileWriter; import java.io.PrintWriter; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Deque; import java.util.Enumeration; import java.util.Hashtable; @@ -154,6 +176,8 @@ import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; +import javax.swing.event.InternalFrameAdapter; +import javax.swing.event.InternalFrameEvent; import ext.vamsas.ServiceHandle; @@ -164,8 +188,9 @@ import ext.vamsas.ServiceHandle; * @version $Revision$ */ @SuppressWarnings("serial") -public class AlignFrame extends GAlignFrame implements DropTargetListener, - IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener +public class AlignFrame extends GAlignFrame + implements DropTargetListener, IProgressIndicator, + AlignViewControllerGuiI, ColourChangeListener, ServiceChangeListener { public static int frameCount; @@ -195,6 +220,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ String fileName = null; + /** + * TODO: remove reference to 'FileObject' in AlignFrame - not correct mapping + */ File fileObject; private int id; @@ -357,7 +385,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, void init() { - boolean newPanel = (alignPanel == null); viewport.setShowAutocalculatedAbove(isShowAutoCalculatedAbove()); if (newPanel) @@ -434,9 +461,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (Desktop.getDesktopPane() != null) { this.setDropTarget(new java.awt.dnd.DropTarget(this, this)); + addServiceListeners(); if (!Platform.isJS()) { - addServiceListeners(); } setGUINucleotide(); } @@ -855,6 +882,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, ap.av.updateConservation(ap); ap.av.updateConsensus(ap); ap.av.updateStrucConsensus(ap); + ap.av.initInformationWorker(ap); } } } @@ -874,58 +902,43 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return viewport; } + @Override + public void servicesChanged(WSDiscovererI discoverer, + Collection services) + { + buildWebServicesMenu(); + } + /* Set up intrinsic listeners for dynamically generated GUI bits. */ private void addServiceListeners() { - final java.beans.PropertyChangeListener thisListener; - Desktop.getInstance().addJalviewPropertyChangeListener("services", - thisListener = new java.beans.PropertyChangeListener() - { - - @Override - public void propertyChange(PropertyChangeEvent evt) - { - // // System.out.println("Discoverer property change."); - // if (evt.getPropertyName().equals("services")) - { - SwingUtilities.invokeLater(new Runnable() - { - - @Override - public void run() - { - System.err.println( - "Rebuild WS Menu for service change"); - BuildWebServiceMenu(); - } - - }); - } - } - }); - addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() + if (Cache.getDefault("SHOW_SLIVKA_SERVICES", true)) { - + WSDiscovererI discoverer = SlivkaWSDiscoverer.getInstance(); + discoverer.addServiceChangeListener(this); + } + if (Cache.getDefault("SHOW_JWS2_SERVICES", true)) + { + WSDiscovererI discoverer = Jws2Discoverer.getInstance(); + discoverer.addServiceChangeListener(this); + } + // legacy event listener for compatibility with jws1 + PropertyChangeListener legacyListener = (changeEvent) -> { + buildWebServicesMenu(); + }; + Desktop.getInstance().addJalviewPropertyChangeListener("services",legacyListener); + + addInternalFrameListener(new InternalFrameAdapter() { @Override - public void internalFrameClosed( - javax.swing.event.InternalFrameEvent evt) - { - // System.out.println("deregistering discoverer listener"); - Desktop.getInstance().removeJalviewPropertyChangeListener( - "services", thisListener); + public void internalFrameClosed(InternalFrameEvent e) { + System.out.println("deregistering discoverer listener"); + SlivkaWSDiscoverer.getInstance().removeServiceChangeListener(AlignFrame.this); + Jws2Discoverer.getInstance().removeServiceChangeListener(AlignFrame.this); + Desktop.getInstance().removeJalviewPropertyChangeListener("services", legacyListener); closeMenuItem_actionPerformed(true); } }); - // Finally, build the menu once to get current service state - new Thread(new Runnable() - { - - @Override - public void run() - { - BuildWebServiceMenu(); - } - }).start(); + buildWebServicesMenu(); } /** @@ -999,6 +1012,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, showConsensusHistogram.setSelected(av.isShowConsensusHistogram()); showSequenceLogo.setSelected(av.isShowSequenceLogo()); normaliseSequenceLogo.setSelected(av.isNormaliseSequenceLogo()); + showInformationHistogram.setSelected(av.isShowInformationHistogram()); + showHMMSequenceLogo.setSelected(av.isShowHMMSequenceLogo()); + normaliseHMMSequenceLogo.setSelected(av.isNormaliseHMMSequenceLogo()); ColourMenuHelper.setColourSelected(colourMenu, av.getGlobalColourScheme()); @@ -1043,6 +1059,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { progressBar.setProgressBar(message, id); } + + @Override + public void removeProgressBar(long id) + { + progressBar.removeProgressBar(id); + } @Override public void registerHandler(final long id, @@ -1101,6 +1123,257 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } @Override + public void hmmBuild_actionPerformed(boolean withDefaults) + { + if (!alignmentIsSufficient(1)) + { + return; + } + + /* + * get default parameters, and optionally show a dialog + * to allow them to be modified + */ + ParamDatastoreI store = HMMERParamStore.forBuild(viewport); + List args = store.getServiceParameters(); + + if (!withDefaults) + { + WsParamSetI set = new HMMERPreset(); + WsJobParameters params = new WsJobParameters(store, set, args); + if (params.showRunDialog()) + { + args = params.getJobParams(); + } + else + { + return; // user cancelled + } + } + new Thread(new HMMBuild(this, args)).start(); + } + + @Override + public void hmmAlign_actionPerformed(boolean withDefaults) + { + if (!(checkForHMM() && alignmentIsSufficient(2))) + { + return; + } + + /* + * get default parameters, and optionally show a dialog + * to allow them to be modified + */ + ParamDatastoreI store = HMMERParamStore.forAlign(viewport); + List args = store.getServiceParameters(); + + if (!withDefaults) + { + WsParamSetI set = new HMMERPreset(); + WsJobParameters params = new WsJobParameters(store, set, args); + if (params.showRunDialog()) + { + args = params.getJobParams(); + } + else + { + return; // user cancelled + } + } + new Thread(new HMMAlign(this, args)).start(); + } + + @Override + public void hmmSearch_actionPerformed(boolean withDefaults) + { + if (!checkForHMM()) + { + return; + } + + /* + * get default parameters, and (if requested) show + * dialog to allow modification + */ + ParamDatastoreI store = HMMERParamStore.forSearch(viewport); + List args = store.getServiceParameters(); + + if (!withDefaults) + { + WsParamSetI set = new HMMERPreset(); + WsJobParameters params = new WsJobParameters(store, set, args); + if (params.showRunDialog()) + { + args = params.getJobParams(); + } + else + { + return; // user cancelled + } + } + new Thread(new HMMSearch(this, args)).start(); + alignPanel.repaint(); + } + + @Override + public void jackhmmer_actionPerformed(boolean withDefaults) + { + + /* + * get default parameters, and (if requested) show + * dialog to allow modification + */ + + ParamDatastoreI store = HMMERParamStore.forJackhmmer(viewport); + List args = store.getServiceParameters(); + + if (!withDefaults) + { + WsParamSetI set = new HMMERPreset(); + WsJobParameters params = new WsJobParameters(store, set, args); + if (params.showRunDialog()) + { + args = params.getJobParams(); + } + else + { + return; // user cancelled + } + } + new Thread(new JackHMMER(this, args)).start(); + alignPanel.repaint(); + + } + + /** + * Checks if the alignment has at least one hidden Markov model, if not shows + * a dialog advising to run hmmbuild or load an HMM profile + * + * @return + */ + private boolean checkForHMM() + { + if (viewport.getAlignment().getHmmSequences().isEmpty()) + { + JOptionPane.showMessageDialog(this, + MessageManager.getString("warn.no_hmm")); + return false; + } + return true; + } + + @Override + protected void filterByEValue_actionPerformed() + { + viewport.filterByEvalue(inputDouble("Enter E-Value Cutoff")); + } + + @Override + protected void filterByScore_actionPerformed() + { + viewport.filterByScore(inputDouble("Enter Bit Score Threshold")); + } + + private double inputDouble(String message) + { + String str = null; + Double d = null; + while (d == null || d <= 0) + { + str = JOptionPane.showInputDialog(this.alignPanel, message); + try + { + d = Double.valueOf(str); + } catch (NumberFormatException e) + { + } + } + return d; + } + + /** + * Checks if the alignment contains the required number of sequences. + * + * @param required + * @return + */ + public boolean alignmentIsSufficient(int required) + { + if (getViewport().getSequenceSelection().length < required) + { + JOptionPane.showMessageDialog(this, + MessageManager.getString("label.not_enough_sequences")); + return false; + } + return true; + } + + /** + * Opens a file browser and adds the selected file, if in Fasta, Stockholm or + * Pfam format, to the list held under preference key "HMMSEARCH_DBS" (as a + * comma-separated list) + */ + @Override + public void addDatabase_actionPerformed() throws IOException + { + if (Cache.getProperty(Preferences.HMMSEARCH_DBS) == null) + { + Cache.setProperty(Preferences.HMMSEARCH_DBS, ""); + } + + String path = openFileChooser(false); + if (path != null && new File(path).exists()) + { + IdentifyFile identifier = new IdentifyFile(); + FileFormatI format = identifier.identify(path, DataSourceType.FILE); + if (format == FileFormat.Fasta || format == FileFormat.Stockholm + || format == FileFormat.Pfam) + { + String currentDbPaths = Cache + .getProperty(Preferences.HMMSEARCH_DBS); + currentDbPaths += Preferences.COMMA + path; + Cache.setProperty(Preferences.HMMSEARCH_DBS, currentDbPaths); + } + else + { + JOptionPane.showMessageDialog(this, + MessageManager.getString("warn.invalid_format")); + } + } + } + + /** + * Opens a file chooser, optionally restricted to selecting folders + * (directories) only. Answers the path to the selected file or folder, or + * null if none is chosen. + * + * @param + * @return + */ + protected String openFileChooser(boolean forFolder) + { + // TODO duplicates GPreferences method - relocate to JalviewFileChooser? + String choice = null; + JFileChooser chooser = new JFileChooser(); + if (forFolder) + { + chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + } + chooser.setDialogTitle( + MessageManager.getString("label.open_local_file")); + chooser.setToolTipText(MessageManager.getString("action.open")); + + int value = chooser.showOpenDialog(this); + + if (value == JFileChooser.APPROVE_OPTION) + { + choice = chooser.getSelectedFile().getPath(); + } + return choice; + } + + @Override public void reload_actionPerformed(ActionEvent e) { if (fileName == null && fileObject == null) @@ -1570,6 +1843,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void associatedData_actionPerformed(ActionEvent e) + throws IOException, InterruptedException { final JalviewFileChooser chooser = new JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); @@ -2070,10 +2344,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param e * DOCUMENT ME! + * @throws InterruptedException + * @throws IOException */ @Override protected void pasteNew_actionPerformed(ActionEvent e) + throws IOException, InterruptedException { paste(true); } @@ -2083,10 +2360,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param e * DOCUMENT ME! + * @throws InterruptedException + * @throws IOException */ @Override protected void pasteThis_actionPerformed(ActionEvent e) + throws IOException, InterruptedException { paste(false); } @@ -2096,9 +2376,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param newAlignment * true to paste to a new alignment, otherwise add to this. + * @throws InterruptedException + * @throws IOException */ - - void paste(boolean newAlignment) + void paste(boolean newAlignment) throws IOException, InterruptedException { boolean externalPaste = true; try @@ -2427,7 +2708,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, System.out.println("Exception whilst pasting: " + ex); // could be anything being pasted in here } - } @Override @@ -3794,6 +4074,28 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, alignPanel.paintAlignment(true, false); } + @Override + public void sortEValueMenuItem_actionPerformed(ActionEvent e) + { + SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); + AlignmentSorter.sortByEValue(viewport.getAlignment()); + addHistoryItem(new OrderCommand("Group Sort", oldOrder, + viewport.getAlignment())); + alignPanel.paintAlignment(true, false); + + } + + @Override + public void sortBitScoreMenuItem_actionPerformed(ActionEvent e) + { + SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray(); + AlignmentSorter.sortByBitScore(viewport.getAlignment()); + addHistoryItem(new OrderCommand("Group Sort", oldOrder, + viewport.getAlignment())); + alignPanel.paintAlignment(true, false); + + } + /** * DOCUMENT ME! * @@ -4015,34 +4317,33 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } if (viewport.getAlignment().getAlignmentAnnotation() - .hashCode() != _annotationScoreVectorHash) + .hashCode() == _annotationScoreVectorHash) + { + return; + } + + sortByAnnotScore.removeAll(); + Set scoreSorts = new HashSet<>(); + for (SequenceI sqa : viewport.getAlignment().getSequences()) { - sortByAnnotScore.removeAll(); - // almost certainly a quicker way to do this - but we keep it simple - Hashtable scoreSorts = new Hashtable<>(); - AlignmentAnnotation aann[]; - for (SequenceI sqa : viewport.getAlignment().getSequences()) + AlignmentAnnotation[] anns = sqa.getAnnotation(); + for (int i = 0; anns != null && i < anns.length; i++) { - aann = sqa.getAnnotation(); - for (int i = 0; aann != null && i < aann.length; i++) + AlignmentAnnotation aa = anns[i]; + if (aa != null && aa.hasScore() && aa.sequenceRef != null) { - if (aann[i].hasScore() && aann[i].sequenceRef != null) - { - scoreSorts.put(aann[i].label, aann[i].label); - } + scoreSorts.add(aa.label); } } - Enumeration labels = scoreSorts.keys(); - while (labels.hasMoreElements()) - { - addSortByAnnotScoreMenuItem(sortByAnnotScore, labels.nextElement()); - } - sortByAnnotScore.setVisible(scoreSorts.size() > 0); - scoreSorts.clear(); - - _annotationScoreVectorHash = viewport.getAlignment() - .getAlignmentAnnotation().hashCode(); } + for (String label : scoreSorts) + { + addSortByAnnotScoreMenuItem(sortByAnnotScore, label); + } + sortByAnnotScore.setVisible(!scoreSorts.isEmpty()); + + _annotationScoreVectorHash = viewport.getAlignment() + .getAlignmentAnnotation().hashCode(); } /** @@ -4324,185 +4625,80 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return tp; } - private boolean buildingMenu = false; - /** - * Generates menu items and listener event actions for web service clients - * + * Schedule the web services menu rebuild to the event dispatch thread. */ - - public void BuildWebServiceMenu() + public void buildWebServicesMenu() { - while (buildingMenu) - { - try + SwingUtilities.invokeLater(() -> { + Cache.log.info("Rebuiling WS menu"); + webService.removeAll(); + if (Cache.getDefault("SHOW_SLIVKA_SERVICES", true)) { - System.err.println("Waiting for building menu to finish."); - Thread.sleep(10); - } catch (Exception e) + Cache.log.info("Building web service menu for slivka"); + SlivkaWSDiscoverer discoverer = SlivkaWSDiscoverer.getInstance(); + JMenu submenu = new JMenu("Slivka"); + buildWebServicesMenu(discoverer, submenu); + webService.add(submenu); + } + if (Cache.getDefault("SHOW_JWS2_SERVICES", true)) { + WSDiscovererI jws2servs = Jws2Discoverer.getInstance(); + JMenu submenu = new JMenu("JABAWS"); + buildLegacyWebServicesMenu(submenu); + buildWebServicesMenu(jws2servs, submenu); + webService.add(submenu); } - } - final AlignFrame me = this; - buildingMenu = true; - new Thread(new Runnable() - { + }); + } - @Override - public void run() + private void buildLegacyWebServicesMenu(JMenu menu) + { + JMenu secstrmenu = new JMenu("Secondary Structure Prediction"); + if (Discoverer.getServices() != null && Discoverer.getServices().size() > 0) + { + var secstrpred = Discoverer.getServices().get("SecStrPred"); + if (secstrpred != null) { - final List legacyItems = new ArrayList<>(); - try - { - // System.err.println("Building ws menu again " - // + Thread.currentThread()); - // TODO: add support for context dependent disabling of services based - // on - // alignment and current selection - // TODO: add additional serviceHandle parameter to specify abstract - // handler - // class independently of AbstractName - // TODO: add in rediscovery GUI function to restart discoverer - // TODO: group services by location as well as function and/or - // introduce - // object broker mechanism. - final Vector wsmenu = new Vector<>(); - final IProgressIndicator af = me; - - /* - * do not i18n these strings - they are hard-coded in class - * compbio.data.msa.Category, Jws2Discoverer.isRecalculable() and - * SequenceAnnotationWSClient.initSequenceAnnotationWSClient() - */ - final JMenu msawsmenu = new JMenu("Alignment"); - final JMenu secstrmenu = new JMenu( - "Secondary Structure Prediction"); - final JMenu seqsrchmenu = new JMenu("Sequence Database Search"); - final JMenu analymenu = new JMenu("Analysis"); - final JMenu dismenu = new JMenu("Protein Disorder"); - // JAL-940 - only show secondary structure prediction services from - // the legacy server - Hashtable> ds = Discoverer - .getInstance().getServices(); - if (// Cache.getDefault("SHOW_JWS1_SERVICES", true) - // && - ds != null && (ds.size() > 0)) - { - // TODO: refactor to allow list of AbstractName/Handler bindings to - // be - // stored or retrieved from elsewhere - // No MSAWS used any more: - // Vector msaws = null; // (Vector) - // Discoverer.services.get("MsaWS"); - Vector secstrpr = ds.get("SecStrPred"); - if (secstrpr != null) - { - // Add any secondary structure prediction services - for (int i = 0, j = secstrpr.size(); i < j; i++) - { - final ext.vamsas.ServiceHandle sh = secstrpr.get(i); - jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer - .getServiceClient(sh); - int p = secstrmenu.getItemCount(); - impl.attachWSMenuEntry(secstrmenu, me); - int q = secstrmenu.getItemCount(); - for (int litm = p; litm < q; litm++) - { - legacyItems.add(secstrmenu.getItem(litm)); - } - } - } - } - - // Add all submenus in the order they should appear on the web - // services menu - wsmenu.add(msawsmenu); - wsmenu.add(secstrmenu); - wsmenu.add(dismenu); - wsmenu.add(analymenu); - // No search services yet - // wsmenu.add(seqsrchmenu); - - javax.swing.SwingUtilities.invokeLater(new Runnable() - { - - @Override - public void run() - { - try - { - webService.removeAll(); - // first, add discovered services onto the webservices menu - if (wsmenu.size() > 0) - { - for (int i = 0, j = wsmenu.size(); i < j; i++) - { - webService.add(wsmenu.get(i)); - } - } - else - { - webService.add(me.webServiceNoServices); - } - // TODO: move into separate menu builder class. - // boolean new_sspred = false; - if (Cache.getDefault("SHOW_JWS2_SERVICES", true)) - { - Jws2Discoverer jws2servs = Jws2Discoverer.getInstance(); - if (jws2servs != null) - { - if (jws2servs.hasServices()) - { - jws2servs.attachWSMenuEntry(webService, me); - for (Jws2Instance sv : jws2servs.getServices()) - { - if (sv.description.toLowerCase().contains("jpred")) - { - for (JMenuItem jmi : legacyItems) - { - jmi.setVisible(false); - } - } - } - - } - if (jws2servs.isRunning()) - { - JMenuItem tm = new JMenuItem( - "Still discovering JABA Services"); - tm.setEnabled(false); - webService.add(tm); - } - } - } - build_urlServiceMenu(me.webService); - build_fetchdbmenu(webService); - for (JMenu item : wsmenu) - { - if (item.getItemCount() == 0) - { - item.setEnabled(false); - } - else - { - item.setEnabled(true); - } - } - } catch (Exception e) - { - Cache.log.debug( - "Exception during web service menu building process.", - e); - } - } - }); - } catch (Exception e) + for (ext.vamsas.ServiceHandle sh : secstrpred) { + var menuProvider = Discoverer.getServiceClient(sh); + menuProvider.attachWSMenuEntry(secstrmenu, this); } - buildingMenu = false; } - }).start(); + } + menu.add(secstrmenu); + } + /** + * Constructs the web services menu for the given discoverer under the + * specified menu. This method must be called on the EDT + * + * @param discoverer + * the discoverer used to build the menu + * @param menu + * parent component which the elements will be attached to + */ + private void buildWebServicesMenu(WSDiscovererI discoverer, JMenu menu) + { + if (discoverer.hasServices()) + { + PreferredServiceRegistry.getRegistry().populateWSMenuEntry( + discoverer.getServices(), sv -> buildWebServicesMenu(), menu, + this, null); + } + if (discoverer.isRunning()) + { + JMenuItem item = new JMenuItem("Service discovery in progress."); + item.setEnabled(false); + menu.add(item); + } + else if (!discoverer.hasServices()) + { + JMenuItem item = new JMenuItem("No services available."); + item.setEnabled(false); + menu.add(item); + } } /** @@ -4943,6 +5139,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param file * either a filename or a URL string. + * @throws InterruptedException + * @throws IOException */ public void loadJalviewDataFile(Object file, DataSourceType sourceType, @@ -6079,6 +6277,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } + /** + * Sets the status of the HMMER menu + */ + public void updateHMMERStatus() + { + hmmerMenu.setEnabled(HmmerCommand.isHmmerAvailable()); + } + @Override protected void loadVcf_actionPerformed() { diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 7ab84ad..dca9047 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -39,6 +39,7 @@ import jalview.datamodel.SearchResults; import jalview.datamodel.SearchResultsI; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; +import jalview.datamodel.features.FeatureMatcherSetI; import jalview.renderer.ResidueShader; import jalview.schemes.ColourSchemeI; import jalview.schemes.ColourSchemeProperty; @@ -264,14 +265,13 @@ f */ setFont(new Font(fontName, style, Integer.parseInt(fontSize)), true); - alignment - .setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0)); + alignment.setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0)); // We must set conservation and consensus before setting colour, // as Blosum and Clustal require this to be done - if (hconsensus == null && !isDataset) + if (hconsensus == null && !isDataset) { - if (!alignment.isNucleotide()) + if (!alignment.isNucleotide()) { showConservation = Cache.getDefault("SHOW_CONSERVATION", true); showQuality = Cache.getDefault("SHOW_QUALITY", true); @@ -283,13 +283,19 @@ f */ showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false); normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO", false); + // for now, use consensus options for Information till it gets its own + setShowHMMSequenceLogo(showSequenceLogo); + setNormaliseHMMSequenceLogo(normaliseSequenceLogo); + setShowInformationHistogram(showConsensusHistogram); showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false); showConsensus = Cache.getDefault("SHOW_IDENTITY", true); showOccupancy = Cache.getDefault(Preferences.SHOW_OCCUPANCY, true); } initAutoAnnotation(); - String colourProperty = alignment.isNucleotide() + // initInformation(); + + String colourProperty = alignment.isNucleotide() ? Preferences.DEFAULT_COLOUR_NUC : Preferences.DEFAULT_COLOUR_PROT; String schemeName = Cache.getProperty(colourProperty); @@ -312,11 +318,11 @@ f */ if (residueShading != null) { - residueShading.setConsensus(hconsensus); + residueShading.setConsensus(hconsensus); } setColourAppliesToAllGroups(true); } - + boolean validCharWidth; /** @@ -401,7 +407,7 @@ f */ /* * replace mappings on our alignment */ - if (alignment != null && align != null) + if (alignment != null && align != null) { alignment.setCodonFrames(align.getCodonFrames()); } @@ -454,7 +460,7 @@ f */ } /** - * returns the visible column regions of the alignment + * Returns an iterator over the visible column regions of the alignment * * @param selectedRegionOnly * true to just return the contigs intersecting with the selected @@ -474,8 +480,9 @@ f */ { end = alignment.getWidth(); } - return (alignment.getHiddenColumns().getVisContigsIterator(start, end, - false)); + + return (alignment.getHiddenColumns().getVisContigsIterator(start, + end, false)); } /** @@ -525,7 +532,7 @@ f */ } public boolean followSelection = true; - + /** * @return true if view selection should always follow the selections * broadcast by other selection sources @@ -590,18 +597,20 @@ f */ return StructureSelectionManager .getStructureSelectionManager(Desktop.getInstance()); } - + @Override public boolean isNormaliseSequenceLogo() { return normaliseSequenceLogo; } - public void setNormaliseSequenceLogo(boolean state) + @Override +public void setNormaliseSequenceLogo(boolean state) { normaliseSequenceLogo = state; } + /** * * @return true if alignment characters should be displayed @@ -611,7 +620,7 @@ f */ { return validCharWidth; } - + private Hashtable calcIdParams = new Hashtable<>(); public AutoCalcSetting getCalcIdSettingsFor(String calcId) @@ -1091,6 +1100,9 @@ f */ { FeatureColourI preferredColour = featureSettings .getFeatureColour(type); + FeatureMatcherSetI preferredFilters = featureSettings + .getFeatureFilters(type); + FeatureColourI origColour = fr.getFeatureStyle(type); if (!mergeOnly || (!origRenderOrder.contains(type) || origColour == null @@ -1105,6 +1117,11 @@ f */ { fr.setColour(type, preferredColour); } + if (preferredFilters != null + && (!mergeOnly || fr.getFeatureFilter(type) != null)) + { + fr.setFeatureFilter(type, preferredFilters); + } if (featureSettings.isFeatureDisplayed(type)) { displayed.setVisible(type); diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index c843f37..673f04d 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -61,6 +61,7 @@ import jalview.io.FormatAdapter; import jalview.util.Comparison; import jalview.util.MessageManager; import jalview.util.Platform; +import jalview.workers.InformationThread; /** * The panel that holds the labels for alignment annotations, providing @@ -352,6 +353,10 @@ public class AnnotationLabels extends JPanel pop.show(this, evt.getX(), evt.getY()); return; } + + final AlignmentAnnotation ann = aa[selectedRow]; + final boolean isSequenceAnnotation = ann.sequenceRef != null; + item = new JMenuItem(EDITNAME); item.addActionListener(this); pop.add(item); @@ -399,7 +404,8 @@ public class AnnotationLabels extends JPanel if (selectedRow < aa.length) { final String label = aa[selectedRow].label; - if (!aa[selectedRow].autoCalculated) + if (!(aa[selectedRow].autoCalculated) + && !(InformationThread.HMM_CALC_ID.equals(ann.getCalcId()))) { if (aa[selectedRow].graph == AlignmentAnnotation.NO_GRAPH) { @@ -407,7 +413,7 @@ public class AnnotationLabels extends JPanel pop.addSeparator(); // av and sequencegroup need to implement same interface for item = new JCheckBoxMenuItem(TOGGLE_LABELSCALE, - aa[selectedRow].scaleColLabel); + aa[selectedRow].scaleColLabel); item.addActionListener(this); pop.add(item); } @@ -420,11 +426,169 @@ public class AnnotationLabels extends JPanel consclipbrd.addActionListener(this); pop.add(consclipbrd); } + else if (InformationThread.HMM_CALC_ID.equals(ann.getCalcId())) + { + addHmmerMenu(pop, ann); + } } pop.show(this, evt.getX(), evt.getY()); } /** + * Adds context menu options for (alignment or group) Hmmer annotation + * + * @param pop + * @param ann + */ + protected void addHmmerMenu(JPopupMenu pop, final AlignmentAnnotation ann) + { + final boolean isGroupAnnotation = ann.groupRef != null; + pop.addSeparator(); + final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem( + MessageManager.getString( + "label.ignore_below_background_frequency"), + isGroupAnnotation + ? ann.groupRef + .isIgnoreBelowBackground() + : ap.av.isIgnoreBelowBackground()); + cbmi.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + if (isGroupAnnotation) + { + if (!ann.groupRef.isUseInfoLetterHeight()) + { + ann.groupRef.setIgnoreBelowBackground(cbmi.getState()); + // todo and recompute group annotation + } + } + else if (!ap.av.isInfoLetterHeight()) + { + ap.av.setIgnoreBelowBackground(cbmi.getState(), ap); + // todo and recompute annotation + } + ap.alignmentChanged(); // todo not like this + } + }); + pop.add(cbmi); + final JCheckBoxMenuItem letterHeight = new JCheckBoxMenuItem( + MessageManager.getString("label.use_info_for_height"), + isGroupAnnotation ? ann.groupRef.isUseInfoLetterHeight() + : ap.av.isInfoLetterHeight()); + letterHeight.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + if (isGroupAnnotation) + { + ann.groupRef.setInfoLetterHeight((letterHeight.getState())); + ann.groupRef.setIgnoreBelowBackground(true); + // todo and recompute group annotation + } + else + { + ap.av.setInfoLetterHeight(letterHeight.getState(), ap); + ap.av.setIgnoreBelowBackground(true, ap); + // todo and recompute annotation + } + ap.alignmentChanged(); + } + }); + pop.add(letterHeight); + if (isGroupAnnotation) + { + final JCheckBoxMenuItem chist = new JCheckBoxMenuItem( + MessageManager.getString("label.show_group_histogram"), + ann.groupRef.isShowInformationHistogram()); + chist.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ann.groupRef.setShowInformationHistogram(chist.getState()); + ap.repaint(); + } + }); + pop.add(chist); + final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem( + MessageManager.getString("label.show_group_logo"), + ann.groupRef.isShowHMMSequenceLogo()); + cprofl.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ann.groupRef.setShowHMMSequenceLogo(cprofl.getState()); + ap.repaint(); + } + }); + pop.add(cprofl); + final JCheckBoxMenuItem cproflnorm = new JCheckBoxMenuItem( + MessageManager.getString("label.normalise_group_logo"), + ann.groupRef.isNormaliseHMMSequenceLogo()); + cproflnorm.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ann.groupRef + .setNormaliseHMMSequenceLogo(cproflnorm.getState()); + // automatically enable logo display if we're clicked + ann.groupRef.setShowHMMSequenceLogo(true); + ap.repaint(); + } + }); + pop.add(cproflnorm); + } + else + { + final JCheckBoxMenuItem chist = new JCheckBoxMenuItem( + MessageManager.getString("label.show_histogram"), + av.isShowInformationHistogram()); + chist.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + av.setShowInformationHistogram(chist.getState()); + ap.repaint(); + } + }); + pop.add(chist); + final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem( + MessageManager.getString("label.show_logo"), + av.isShowHMMSequenceLogo()); + cprof.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + av.setShowHMMSequenceLogo(cprof.getState()); + ap.repaint(); + } + }); + pop.add(cprof); + final JCheckBoxMenuItem cprofnorm = new JCheckBoxMenuItem( + MessageManager.getString("label.normalise_logo"), + av.isNormaliseHMMSequenceLogo()); + cprofnorm.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + av.setShowHMMSequenceLogo(true); + av.setNormaliseHMMSequenceLogo(cprofnorm.getState()); + ap.repaint(); + } + }); + pop.add(cprofnorm); + } + } + + /** * A helper method that adds menu options for calculation and visualisation of * group and/or alignment consensus annotation to a popup menu. This is * designed to be reusable for either unwrapped mode (popup menu is shown on @@ -926,7 +1090,6 @@ public class AnnotationLabels extends JPanel PaintRefresher.Refresh(ap, ap.av.getSequenceSetId()); ap.av.sendSelection(); } - } } return; @@ -990,7 +1153,6 @@ public class AnnotationLabels extends JPanel @Override public void paintComponent(Graphics g) { - int width = getWidth(); if (width == 0) { @@ -1005,7 +1167,6 @@ public class AnnotationLabels extends JPanel } drawComponent(g2, true, width); - } /** diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index c69d0a8..46d02f7 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -23,12 +23,12 @@ package jalview.gui; import jalview.analysis.TreeBuilder; import jalview.analysis.scoremodels.ScoreModels; import jalview.analysis.scoremodels.SimilarityParams; +import jalview.api.AlignViewportI; import jalview.api.analysis.ScoreModelI; import jalview.api.analysis.SimilarityParamsI; import jalview.bin.Cache; import jalview.datamodel.SequenceGroup; import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -643,7 +643,7 @@ public class CalculationChooser extends JPanel * gui validation shouldn't allow insufficient sequences here, but leave * this check in in case this method gets exposed programmatically in future */ - AlignViewport viewport = af.getViewport(); + AlignViewportI viewport = af.getViewport(); SequenceGroup sg = viewport.getSelectionGroup(); if (sg != null && sg.getSize() < MIN_TREE_SELECTION) { @@ -671,8 +671,7 @@ public class CalculationChooser extends JPanel public static Object openPcaPanel(AlignFrame af, String modelName, SimilarityParamsI params) { - - AlignViewport viewport = af.getViewport(); + AlignViewportI viewport = af.getViewport(); /* * gui validation shouldn't allow insufficient sequences here, but leave diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index bbd38ec..88c94f6 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -59,8 +59,11 @@ import java.util.Hashtable; import java.util.List; import java.util.ListIterator; import java.util.Vector; +import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.FutureTask; import java.util.concurrent.Semaphore; import javax.swing.AbstractAction; @@ -123,6 +126,7 @@ import jalview.util.MessageManager; import jalview.util.Platform; import jalview.util.UrlConstants; import jalview.viewmodel.AlignmentViewport; +import jalview.ws.WSDiscovererI; import jalview.ws.params.ParamManager; import jalview.ws.utils.UrlDownloadClient; @@ -162,6 +166,7 @@ public class Desktop extends GDesktop public static HashMap savingFiles = new HashMap(); + @SuppressWarnings("deprecation") private JalviewChangeSupport changeSupport = new JalviewChangeSupport(); /** @@ -175,6 +180,7 @@ public class Desktop extends GDesktop * @param listener * @see jalview.gui.JalviewChangeSupport#addJalviewPropertyChangeListener(java.beans.PropertyChangeListener) */ + @Deprecated public void addJalviewPropertyChangeListener( PropertyChangeListener listener) { @@ -187,6 +193,7 @@ public class Desktop extends GDesktop * @see jalview.gui.JalviewChangeSupport#addJalviewPropertyChangeListener(java.lang.String, * java.beans.PropertyChangeListener) */ + @Deprecated public void addJalviewPropertyChangeListener(String propertyName, PropertyChangeListener listener) { @@ -199,6 +206,7 @@ public class Desktop extends GDesktop * @see jalview.gui.JalviewChangeSupport#removeJalviewPropertyChangeListener(java.lang.String, * java.beans.PropertyChangeListener) */ + @Deprecated public void removeJalviewPropertyChangeListener(String propertyName, PropertyChangeListener listener) { @@ -1607,7 +1615,8 @@ public class Desktop extends GDesktop return; } - AlignmentViewport source = null, target = null; + AlignViewportI source = null; + AlignViewportI target = null; if (frames[0] instanceof AlignFrame) { source = ((AlignFrame) frames[0]).getCurrentView(); @@ -2573,6 +2582,13 @@ public class Desktop extends GDesktop progressBars.put(Long.valueOf(id), addProgressPanel(message)); } } + + @Override + public void removeProgressBar(long id) + { + //TODO + throw new UnsupportedOperationException("not implemented"); + } /* * (non-Javadoc) @@ -2692,10 +2708,13 @@ public class Desktop extends GDesktop public void startServiceDiscovery(boolean blocking) { - boolean alive = true; - Thread t0 = null, t1 = null, t2 = null; + System.out.println("Starting service discovery"); + var tasks = new ArrayList>(); // JAL-940 - JALVIEW 1 services are now being EOLed as of JABA 2.1 release - if (true) + + System.out.println("loading services"); + + /** @j2sIgnore */ { // todo: changesupport handlers need to be transferred if (discoverer == null) @@ -2706,31 +2725,30 @@ public class Desktop extends GDesktop } // JAL-940 - disabled JWS1 service configuration - always start discoverer // until we phase out completely - (t0 = new Thread(discoverer)).start(); + var f = new FutureTask(discoverer, null); + new Thread(f).start(); + tasks.add(f); } if (Cache.getDefault("SHOW_JWS2_SERVICES", true)) { - t2 = jalview.ws.jws2.Jws2Discoverer.getInstance() - .startDiscoverer(changeSupport); + tasks.add(jalview.ws.jws2.Jws2Discoverer.getInstance().startDiscoverer()); } - Thread t3 = null; + if (Cache.getDefault("SHOW_SLIVKA_SERVICES", true)) { - // TODO: do rest service discovery + tasks.add(jalview.ws.slivkaws.SlivkaWSDiscoverer.getInstance().startDiscoverer()); } if (blocking) { - while (alive) - { + for (Future task : tasks) { try { - Thread.sleep(15); + // block until all discovery tasks are done + task.get(); } catch (Exception e) { + e.printStackTrace(); } - alive = (t1 != null && t1.isAlive()) || (t2 != null && t2.isAlive()) - || (t3 != null && t3.isAlive()) - || (t0 != null && t0.isAlive()); } } } @@ -2744,8 +2762,10 @@ public class Desktop extends GDesktop { if (evt.getNewValue() == null || evt.getNewValue() instanceof Vector) { - final String ermsg = jalview.ws.jws2.Jws2Discoverer.getInstance() - .getErrorMessages(); + final WSDiscovererI discoverer = jalview.ws.jws2.Jws2Discoverer + .getInstance(); + final String ermsg = discoverer.getErrorMessages(); + // CONFLICT:ALT:? final String ermsg = jalview.ws.jws2.Jws2Discoverer.getInstance() if (ermsg != null) { if (Cache.getDefault("SHOW_WSDISCOVERY_ERRORS", true)) diff --git a/src/jalview/gui/IProgressIndicator.java b/src/jalview/gui/IProgressIndicator.java index 35bd871..c250aca 100644 --- a/src/jalview/gui/IProgressIndicator.java +++ b/src/jalview/gui/IProgressIndicator.java @@ -56,4 +56,11 @@ public interface IProgressIndicator */ boolean operationInProgress(); + /** + * Remove progress bar with a given id from the panel. + * + * @param id + */ + void removeProgressBar(long id); + } diff --git a/src/jalview/gui/JalviewChangeSupport.java b/src/jalview/gui/JalviewChangeSupport.java index 784e6c1..21c1af0 100644 --- a/src/jalview/gui/JalviewChangeSupport.java +++ b/src/jalview/gui/JalviewChangeSupport.java @@ -23,6 +23,7 @@ package jalview.gui; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +@Deprecated public class JalviewChangeSupport implements PropertyChangeListener { public void propertyChange(PropertyChangeEvent evt) diff --git a/src/jalview/gui/JvSwingUtils.java b/src/jalview/gui/JvSwingUtils.java index f23dcf8..8a735ed 100644 --- a/src/jalview/gui/JvSwingUtils.java +++ b/src/jalview/gui/JvSwingUtils.java @@ -20,12 +20,10 @@ */ package jalview.gui; -import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +import java.awt.Container; import java.awt.Font; -import java.awt.GridLayout; -import java.awt.Rectangle; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -37,10 +35,8 @@ import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JComponent; -import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuItem; -import javax.swing.JPanel; import javax.swing.JScrollBar; import javax.swing.SwingConstants; import javax.swing.border.Border; @@ -156,54 +152,23 @@ public final class JvSwingUtils } /** + * A convenience method that that adds a component with label to a container, + * sets a tooltip on both component and label, and optionally specifies layout + * constraints for the added component (but not the label) * - * @param panel + * @param container * @param tooltip * @param label - * @param valBox - * @return the GUI element created that was added to the layout so it's - * attributes can be changed. + * @param comp + * @param constraints */ - public static JPanel addtoLayout(JPanel panel, String tooltip, - JComponent label, JComponent valBox) - { - JPanel laypanel = new JPanel(new GridLayout(1, 2)); - JPanel labPanel = new JPanel(new BorderLayout()); - JPanel valPanel = new JPanel(); - labPanel.setBounds(new Rectangle(7, 7, 158, 23)); - valPanel.setBounds(new Rectangle(172, 7, 270, 23)); - labPanel.add(label, BorderLayout.WEST); - valPanel.add(valBox); - laypanel.add(labPanel); - laypanel.add(valPanel); - valPanel.setToolTipText(tooltip); - labPanel.setToolTipText(tooltip); - valBox.setToolTipText(tooltip); - panel.add(laypanel); - panel.validate(); - return laypanel; - } - - public static void mgAddtoLayout(JPanel cpanel, String tooltip, - JLabel jLabel, JComponent name) + public static void addtoLayout(Container container, String tooltip, + JComponent label, JComponent comp, String constraints) { - mgAddtoLayout(cpanel, tooltip, jLabel, name, null); - } - - public static void mgAddtoLayout(JPanel cpanel, String tooltip, - JLabel jLabel, JComponent name, String params) - { - cpanel.add(jLabel); - if (params == null) - { - cpanel.add(name); - } - else - { - cpanel.add(name, params); - } - name.setToolTipText(tooltip); - jLabel.setToolTipText(tooltip); + container.add(label); + container.add(comp, constraints); + comp.setToolTipText(tooltip); // this doesn't seem to show? + label.setToolTipText(tooltip); } /** @@ -368,7 +333,7 @@ public final class JvSwingUtils /** * Adds a titled border to the component in the default font and position (top - * left), optionally witht italic text + * left), optionally with italic text * * @param comp * @param title diff --git a/src/jalview/gui/OptsAndParamsPage.java b/src/jalview/gui/OptsAndParamsPage.java index 5342c90..046eb81 100644 --- a/src/jalview/gui/OptsAndParamsPage.java +++ b/src/jalview/gui/OptsAndParamsPage.java @@ -20,30 +20,46 @@ */ package jalview.gui; +import jalview.bin.Cache; +import jalview.io.DataSourceType; +import jalview.io.FileLoader; +import jalview.io.JalviewFileChooser; +import jalview.io.JalviewFileView; import jalview.util.MessageManager; +import jalview.ws.jws2.dm.JabaOption; import jalview.ws.params.ArgumentI; import jalview.ws.params.OptionI; import jalview.ws.params.ParameterI; import jalview.ws.params.ValueConstrainI; import jalview.ws.params.ValueConstrainI.ValueType; +import jalview.ws.params.simple.FileParameter; +import jalview.ws.params.simple.LogarithmicParameter; +import jalview.ws.params.simple.RadioChoiceParameter; +import jalview.ws.params.simple.StringParameter; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Component; +import java.awt.Container; import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.Font; -import java.awt.GridLayout; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; +import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.io.File; import java.net.URL; import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; @@ -52,6 +68,7 @@ import javax.swing.JLabel; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; +import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JSlider; import javax.swing.JTextArea; @@ -71,15 +88,33 @@ import net.miginfocom.swing.MigLayout; */ public class OptsAndParamsPage { - /** + public static final int PARAM_WIDTH = 340; + + public static final int PARAM_HEIGHT = 150; + + public static final int PARAM_CLOSEDHEIGHT = 80; + + URL linkImageURL = getClass().getResource("/images/link.gif"); + + Map optSet = new LinkedHashMap<>(); + + Map paramSet = new LinkedHashMap<>(); + + /* * compact or verbose style parameters */ boolean compact = false; + OptsParametersContainerI poparent; + + /** + * A class that models a panel rendering a single option (checkbox or choice + * list) + */ public class OptionBox extends JPanel implements MouseListener, ActionListener { - JCheckBox enabled = new JCheckBox(); + JCheckBox enabled; final URL finfo; @@ -91,57 +126,89 @@ public class OptsAndParamsPage OptionI option; - JLabel optlabel = new JLabel(); - - JComboBox val = new JComboBox(); + JComboBox val; + /** + * Constructs and adds labels and controls to the panel for one Option + * + * @param opt + */ public OptionBox(OptionI opt) { option = opt; - setLayout(new BorderLayout()); - enabled.setSelected(opt.isRequired()); // TODO: lock required options + setLayout(new FlowLayout(FlowLayout.LEFT)); + enabled = new JCheckBox(opt.getLabel()); + enabled.setSelected(opt.isRequired()); + + /* + * If option is required, show a label, if optional a checkbox + * (but not for Jabaws pending JWS-126 resolution) + */ + if (opt.isRequired() && !(opt instanceof JabaOption)) + { + finfo = null; + add(new JLabel(opt.getLabel())); + } + else + { + finfo = option.getFurtherDetails(); + configureCheckbox(opt); + add(enabled); + } + + /* + * construct the choice box with possible values, + * or their display names if provided + */ + val = buildComboBox(opt); + val.setSelectedItem(opt.getValue()); + + /* + * only show the choicebox if there is more than one option, + * or the option is mandatory + */ + if (opt.getPossibleValues().size() > 1 || opt.isRequired()) + { + val.addActionListener(this); + add(val); + } + + setInitialValue(); + } + + /** + * Configures the checkbox that controls whether or not the option is + * selected + * + * @param opt + */ + protected void configureCheckbox(OptionI opt) + { enabled.setFont(new Font("Verdana", Font.PLAIN, 11)); - enabled.setText(""); - enabled.setText(opt.getName()); enabled.addActionListener(this); - finfo = option.getFurtherDetails(); - String desc = opt.getDescription(); + final String desc = opt.getDescription(); if (finfo != null) { hasLink = true; - - enabled.setToolTipText(JvSwingUtils.wrapTooltip(true, - ((desc == null || desc.trim().length() == 0) - ? MessageManager.getString( - "label.opt_and_params_further_details") - : desc) + "
    ")); - enabled.addMouseListener(this); + String description = desc; + if (desc == null || desc.trim().isEmpty()) + { + description = MessageManager + .getString("label.opt_and_params_further_details"); + } + description = description + "
    "; + String text = JvSwingUtils.wrapTooltip(true, description); + enabled.setToolTipText(text); + enabled.addMouseListener(this); // for popup menu to show link } else { if (desc != null && desc.trim().length() > 0) { - enabled.setToolTipText( - JvSwingUtils.wrapTooltip(true, opt.getDescription())); + enabled.setToolTipText(JvSwingUtils.wrapTooltip(true, desc)); } } - add(enabled, BorderLayout.NORTH); - for (Object str : opt.getPossibleValues()) - { - val.addItem(str); - } - val.setSelectedItem(opt.getValue()); - if (opt.getPossibleValues().size() > 1) - { - setLayout(new GridLayout(1, 2)); - val.addActionListener(this); - add(val, BorderLayout.SOUTH); - } - // TODO: add actionListeners for popup (to open further info), - // and to update list of parameters if an option is enabled - // that takes a value. JBPNote: is this TODO still valid ? - setInitialValue(); } @Override @@ -178,31 +245,21 @@ public class OptsAndParamsPage poparent.argSetModified(this, !notmod); } - public OptionI getOptionIfEnabled() + /** + * Answers null if the option is not selected, else a new Option holding the + * selected value + * + * @return + */ + public ArgumentI getSelectedOption() { if (!enabled.isSelected()) { return null; } + String value = getSelectedValue(option, val.getSelectedIndex()); OptionI opt = option.copy(); - if (opt.getPossibleValues() != null - && opt.getPossibleValues().size() == 1) - { - // Hack to make sure the default value for an enabled option with only - // one value is actually returned - opt.setValue(opt.getPossibleValues().get(0)); - } - if (val.getSelectedItem() != null) - { - opt.setValue((String) val.getSelectedItem()); - } - else - { - if (option.getValue() != null) - { - opt.setValue(option.getValue()); - } - } + opt.setValue(value); return opt; } @@ -218,15 +275,11 @@ public class OptsAndParamsPage @Override public void mouseEntered(MouseEvent e) { - // TODO Auto-generated method stub - } @Override public void mouseExited(MouseEvent e) { - // TODO Auto-generated method stub - } @Override @@ -268,27 +321,57 @@ public class OptsAndParamsPage } } + /** + * toString representation for identification in the debugger only + */ + @Override + public String toString() + { + return option == null ? super.toString() : option.toString(); + } + } + /** + * A class that models a panel rendering a single parameter + */ public class ParamBox extends JPanel implements ChangeListener, ActionListener, MouseListener { - boolean adjusting = false; + /* + * parameter values (or their logs) are multiplied by this + * scaling factor to ensure an integer range for the slider + */ + private int sliderScaleFactor = 1; + + boolean isLogarithmicParameter; + + boolean isChoiceParameter; + + boolean isIntegerParameter; - boolean choice = false; + boolean isStringParameter; - JComboBox choicebox; + boolean adjusting; - JPanel controlPanel = new JPanel(); + /* + * drop-down list of choice options (if applicable) + */ + JComboBox choicebox; - boolean descisvisible = false; + /* + * radio buttons as an alternative to combo box + */ + ButtonGroup buttonGroup; + + JPanel controlsPanel = new JPanel(); + + boolean descriptionIsVisible = false; JScrollPane descPanel = new JScrollPane(); final URL finfo; - boolean integ = false; - Object lastVal; ParameterI parameter; @@ -297,58 +380,82 @@ public class OptsAndParamsPage JPanel settingPanel = new JPanel(); - JButton showDesc = new JButton(); + JSlider slider; - JSlider slider = null; + JTextArea descriptionText = new JTextArea(); - JTextArea string = new JTextArea(); + ValueConstrainI validator; - ValueConstrainI validator = null; + JTextField valueField; - JTextField valueField = null; + private String descTooltip; - public ParamBox(final OptsParametersContainerI pmlayout, + public ParamBox(final OptsParametersContainerI paramContainer, ParameterI parm) { - pmdialogbox = pmlayout; + pmdialogbox = paramContainer; finfo = parm.getFurtherDetails(); validator = parm.getValidValue(); parameter = parm; + + isLogarithmicParameter = parm instanceof LogarithmicParameter; + if (validator != null) { - integ = validator.getType() == ValueType.Integer; - } - else - { - if (parameter.getPossibleValues() != null) + ValueType type = validator.getType(); + isIntegerParameter = type == ValueType.Integer; + isStringParameter = type == ValueType.String + || type == ValueType.File; + + /* + * ensure slider has an integer range corresponding to + * the min-max range of the parameter + */ + if (validator.getMin() != null && validator.getMax() != null + // && !isIntegerParameter + && !isStringParameter) { - choice = true; + double min = validator.getMin().doubleValue(); + double max = validator.getMax().doubleValue(); + if (isLogarithmicParameter) + { + min = Math.log(min); + max = Math.log(max); + } + sliderScaleFactor = (int) (1000000 / (max - min)); + // todo scaleMin, scaleMax could also be final fields } } - if (!compact) + List possibleValues = parameter.getPossibleValues(); + isChoiceParameter = possibleValues != null + && !possibleValues.isEmpty(); + + if (compact) { - makeExpanderParam(parm); + addCompactParameter(parm); } else { - makeCompactParam(parm); - + addExpandableParam(parm); } } - private void makeCompactParam(ParameterI parm) + /** + * Adds a 'compact' format parameter, with any help text shown as a tooltip + * + * @param parm + */ + private void addCompactParameter(ParameterI parm) { setLayout(new MigLayout("", "[][grow]")); - String ttipText = null; - controlPanel.setLayout(new BorderLayout()); + controlsPanel.setLayout(new BorderLayout()); if (parm.getDescription() != null && parm.getDescription().trim().length() > 0) { - // Only create description boxes if there actually is a description. ttipText = (JvSwingUtils.wrapTooltip(true, parm.getDescription() + (finfo != null ? "
    " @@ -357,91 +464,57 @@ public class OptsAndParamsPage : ""))); } - JvSwingUtils.mgAddtoLayout(this, ttipText, new JLabel(parm.getName()), - controlPanel, ""); + JvSwingUtils.addtoLayout(this, ttipText, new JLabel(parm.getName()), + controlsPanel, ""); updateControls(parm); validate(); } - private void makeExpanderParam(ParameterI parm) + /** + * Adds an 'expanded' format parameter, with any help shown in a panel that + * may be shown or hidden + * + * @param parm + */ + private void addExpandableParam(ParameterI parm) { setPreferredSize(new Dimension(PARAM_WIDTH, PARAM_CLOSEDHEIGHT)); setBorder(new TitledBorder(parm.getName())); setLayout(null); - showDesc.setFont(new Font("Verdana", Font.PLAIN, 6)); - showDesc.setText("+"); - string.setFont(new Font("Verdana", Font.PLAIN, 11)); - string.setBackground(getBackground()); + descriptionText.setFont(new Font("Verdana", Font.PLAIN, 11)); + descriptionText.setBackground(getBackground()); - string.setEditable(false); - descPanel.getViewport().setView(string); + descriptionText.setEditable(false); + descPanel.getViewport().setView(descriptionText); descPanel.setVisible(false); JPanel firstrow = new JPanel(); firstrow.setLayout(null); - controlPanel.setLayout(new BorderLayout()); - controlPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH - 70, + controlsPanel.setLayout(new BorderLayout()); + controlsPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH - 70, PARAM_CLOSEDHEIGHT - 50)); - firstrow.add(controlPanel); + firstrow.add(controlsPanel); firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30, PARAM_CLOSEDHEIGHT - 30)); - final ParamBox me = this; - if (parm.getDescription() != null && parm.getDescription().trim().length() > 0) { - // Only create description boxes if there actually is a description. - if (finfo != null) - { - showDesc.setToolTipText(JvSwingUtils.wrapTooltip(true, - MessageManager.formatMessage( - "label.opt_and_params_show_brief_desc_image_link", - new String[] - { linkImageURL.toExternalForm() }))); - showDesc.addMouseListener(this); - } - else - { - showDesc.setToolTipText( - JvSwingUtils.wrapTooltip(true, MessageManager.getString( - "label.opt_and_params_show_brief_desc"))); - } - showDesc.addActionListener(new ActionListener() - { - - @Override - public void actionPerformed(ActionEvent e) - { - descisvisible = !descisvisible; - descPanel.setVisible(descisvisible); - descPanel.getVerticalScrollBar().setValue(0); - me.setPreferredSize(new Dimension(PARAM_WIDTH, - (descisvisible) ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT)); - me.validate(); - pmdialogbox.refreshParamLayout(); - } - }); - string.setWrapStyleWord(true); - string.setLineWrap(true); - string.setColumns(32); - string.setText(parm.getDescription()); - showDesc.setBounds(new Rectangle(10, 10, 16, 16)); - firstrow.add(showDesc); + addExpandableHelp(firstrow, parm); } add(firstrow); validator = parm.getValidValue(); parameter = parm; if (validator != null) { - integ = validator.getType() == ValueType.Integer; + isIntegerParameter = validator.getType() == ValueType.Integer; } else { if (parameter.getPossibleValues() != null) { - choice = true; + isChoiceParameter = true; } } updateControls(parm); @@ -451,6 +524,57 @@ public class OptsAndParamsPage validate(); } + /** + * Adds a button which can be clicked to show or hide help text + * + * @param container + * @param param + */ + protected void addExpandableHelp(JPanel container, ParameterI param) + { + JButton showDescBtn = new JButton("+"); + showDescBtn.setFont(new Font("Verdana", Font.PLAIN, 8)); + if (finfo != null) + { + descTooltip = JvSwingUtils.wrapTooltip(true, + MessageManager.formatMessage( + "label.opt_and_params_show_brief_desc_image_link", + new String[] + { linkImageURL.toExternalForm() })); + showDescBtn.addMouseListener(this); + } + else + { + descTooltip = JvSwingUtils.wrapTooltip(true, MessageManager + .getString("label.opt_and_params_show_brief_desc")); + } + showDescBtn.setToolTipText(descTooltip); + showDescBtn.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + descriptionIsVisible = !descriptionIsVisible; + showDescBtn.setText(descriptionIsVisible ? "-" : "+"); + showDescBtn.setToolTipText( + descriptionIsVisible ? null : descTooltip); + descPanel.setVisible(descriptionIsVisible); + descPanel.getVerticalScrollBar().setValue(0); + ParamBox.this.setPreferredSize(new Dimension(PARAM_WIDTH, + (descriptionIsVisible) ? PARAM_HEIGHT + : PARAM_CLOSEDHEIGHT)); + ParamBox.this.validate(); + pmdialogbox.refreshParamLayout(); + } + }); + descriptionText.setWrapStyleWord(true); + descriptionText.setLineWrap(true); + descriptionText.setColumns(32); + descriptionText.setText(param.getDescription()); + showDescBtn.setBounds(new Rectangle(10, 10, 16, 16)); + container.add(showDescBtn); + } + @Override public void actionPerformed(ActionEvent e) { @@ -458,33 +582,22 @@ public class OptsAndParamsPage { return; } - if (!choice) - { - updateSliderFromValueField(); - } checkIfModified(); } + /** + * Checks whether the value of this parameter has been changed and notifies + * the parent page accordingly + */ private void checkIfModified() { - Object cstate = updateSliderFromValueField(); - boolean notmod = false; - if (cstate.getClass() == lastVal.getClass()) + Object newValue = updateSliderFromValueField(); + boolean modified = true; + if (newValue.getClass() == lastVal.getClass()) { - if (cstate instanceof int[]) - { - notmod = (((int[]) cstate)[0] == ((int[]) lastVal)[0]); - } - else if (cstate instanceof float[]) - { - notmod = (((float[]) cstate)[0] == ((float[]) lastVal)[0]); - } - else if (cstate instanceof String[]) - { - notmod = (((String[]) cstate)[0].equals(((String[]) lastVal)[0])); - } + modified = !newValue.equals(lastVal); } - pmdialogbox.argSetModified(this, !notmod); + pmdialogbox.argSetModified(this, modified); } @Override @@ -502,22 +615,30 @@ public class OptsAndParamsPage return Component.BaselineResizeBehavior.CONSTANT_ASCENT; } - public int getBoxHeight() - { - return (descisvisible ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT); - } - - public ParameterI getParameter() + /** + * Answers an argument holding the value entered or selected in the dialog + * + * @return + */ + public ArgumentI getParameter() { ParameterI prm = parameter.copy(); - if (choice) + String value = null; + if (parameter instanceof RadioChoiceParameter) + { + value = buttonGroup.getSelection().getActionCommand(); + } + else if (isChoiceParameter) { - prm.setValue((String) choicebox.getSelectedItem()); + value = getSelectedValue(this.parameter, + choicebox.getSelectedIndex()); } else { - prm.setValue(valueField.getText()); + value = valueField.getText(); } + prm.setValue(value); + return prm; } @@ -539,15 +660,11 @@ public class OptsAndParamsPage @Override public void mouseEntered(MouseEvent e) { - // TODO Auto-generated method stub - } @Override public void mouseExited(MouseEvent e) { - // TODO Auto-generated method stub - } @Override @@ -562,52 +679,98 @@ public class OptsAndParamsPage @Override public void mouseReleased(MouseEvent e) { - // TODO Auto-generated method stub - } @Override public void stateChanged(ChangeEvent e) { - if (!adjusting) + if (adjusting) { - valueField.setText("" + ((integ) ? ("" + slider.getValue()) - : ("" + slider.getValue() / 1000f))); + return; + } + try + { + adjusting = true; + if (!isLogarithmicParameter) + { + /* + * set (int or float formatted) text field value + */ + valueField.setText(isIntegerParameter + ? String.valueOf(slider.getValue()) + : formatDouble( + slider.getValue() / (float) sliderScaleFactor)); + } + else + { + double value = Math.pow(Math.E, + slider.getValue() / (double) sliderScaleFactor); + valueField.setText(formatDouble(value)); + } checkIfModified(); + } finally + { + adjusting = false; } + } + + /** + * Answers the value formatted as a string to 3 decimal places - in + * scientific notation if the value is less than 0.001 + * + * @param value + * @return + */ + String formatDouble(double value) + { + String format = value < 0.001 ? "%3.1E" : "%3.3f"; + return String.format(format, value); + } + /** + * Formats a number as integer or float (3dp) or scientific notation (1dp) + * + * @param n + * @return + */ + String formatNumber(Number n) + { + return n instanceof Integer ? String.valueOf(n.intValue()) + : formatDouble(n.doubleValue()); } - public void updateControls(ParameterI parm) + void updateControls(ParameterI parm) { adjusting = true; - boolean init = (choicebox == null && valueField == null); + boolean init = (choicebox == null && valueField == null + && buttonGroup == null); if (init) { - if (choice) + if (parm instanceof RadioChoiceParameter) + { + buttonGroup = addRadioButtons(parameter, controlsPanel); + } + else if (isChoiceParameter) { - choicebox = new JComboBox(); + choicebox = buildComboBox(parm); choicebox.addActionListener(this); - controlPanel.add(choicebox, BorderLayout.CENTER); + controlsPanel.add(choicebox, BorderLayout.CENTER); } else { slider = new JSlider(); slider.addChangeListener(this); - valueField = new JTextField(); + int cols = parm instanceof StringParameter ? 20 : 0; + valueField = new JTextField(cols); valueField.addActionListener(this); - valueField.addKeyListener(new KeyListener() + valueField.addKeyListener(new KeyAdapter() { - - @Override - public void keyTyped(KeyEvent e) - { - } - @Override public void keyReleased(KeyEvent e) { - if (e.isActionKey()) + int keyCode = e.getKeyCode(); + if (e.isActionKey() && keyCode != KeyEvent.VK_LEFT + && keyCode != KeyEvent.VK_RIGHT) { if (valueField.getText().trim().length() > 0) { @@ -615,161 +778,251 @@ public class OptsAndParamsPage } } } - - @Override - public void keyPressed(KeyEvent e) - { - } }); - valueField.setPreferredSize(new Dimension(60, 25)); - controlPanel.add(slider, BorderLayout.WEST); - controlPanel.add(valueField, BorderLayout.EAST); - + valueField.setPreferredSize(new Dimension(65, 25)); + if (parm instanceof FileParameter) + { + valueField.setToolTipText(MessageManager + .getString("label.double_click_to_browse")); + valueField.addMouseListener(new MouseAdapter() + { + @Override + public void mouseClicked(MouseEvent e) + { + if (e.getClickCount() == 2) + { + String dir = Cache.getProperty("LAST_DIRECTORY"); + JalviewFileChooser chooser = new JalviewFileChooser(dir); + chooser.setFileView(new JalviewFileView()); + chooser.setDialogTitle( + MessageManager.getString("action.select_ddbb")); + + int val = chooser.showOpenDialog(ParamBox.this); + if (val == JalviewFileChooser.APPROVE_OPTION) + { + File choice = chooser.getSelectedFile(); + String path = choice.getPath(); + valueField.setText(path); + Cache.setProperty("LAST_DIRECTORY", choice.getParent()); + FileLoader.updateRecentlyOpened(path, + DataSourceType.FILE); + } + } + } + }); + } + + controlsPanel.add(slider, BorderLayout.WEST); + controlsPanel.add(valueField, BorderLayout.EAST); } } - if (parm != null) + String value = parm.getValue(); + if (value != null) { - if (choice) + if (isChoiceParameter) { - if (init) - { - List vals = parm.getPossibleValues(); - for (Object val : vals) - { - choicebox.addItem(val); - } - } - - if (parm.getValue() != null) + if (!(parm instanceof RadioChoiceParameter)) { - choicebox.setSelectedItem(parm.getValue()); + choicebox.setSelectedItem(value); } } else { - valueField.setText(parm.getValue()); + valueField.setText(value); } } lastVal = updateSliderFromValueField(); adjusting = false; } - public Object updateSliderFromValueField() + /** + * Adds a panel to comp, containing a label and radio buttons for the choice + * of values of the given option. Returns a ButtonGroup whose members are + * the added radio buttons. + * + * @param option + * @param comp + * + * @return + */ + protected ButtonGroup addRadioButtons(OptionI option, Container comp) { - int iVal; - float fVal; - if (validator != null) + ButtonGroup bg = new ButtonGroup(); + JPanel radioPanel = new JPanel(); + radioPanel.add(new JLabel(option.getDescription())); + + String value = option.getValue(); + + for (String opt : option.getPossibleValues()) + { + JRadioButton btn = new JRadioButton(opt); + btn.setActionCommand(opt); + boolean selected = opt.equals(value); + btn.setSelected(selected); + btn.addActionListener(this); + bg.add(btn); + radioPanel.add(btn); + } + comp.add(radioPanel); + + return bg; + } + + /** + * Action depends on the type of the input parameter: + *
      + *
    • if a text input, returns the trimmed value
    • + *
    • if a choice list or radio button, returns the selected value
    • + *
    • if a value slider and input field, sets the value of the slider from + * the value in the text field, limiting it to any defined min-max + * range.
    • + *
    + * Answers the (possibly modified) input value, as a String, Integer, Float + * or Double. + * + * @return + */ + Object updateSliderFromValueField() + { + if (validator == null || isStringParameter) { - if (integ) + if (isChoiceParameter) { - iVal = 0; - try - { - valueField.setText(valueField.getText().trim()); - iVal = Integer.valueOf(valueField.getText()); - if (validator.getMin() != null - && validator.getMin().intValue() > iVal) - { - iVal = validator.getMin().intValue(); - // TODO: provide visual indication that hard limit was reached for - // this parameter - } - if (validator.getMax() != null - && validator.getMax().intValue() < iVal) - { - iVal = validator.getMax().intValue(); - // TODO: provide visual indication that hard limit was reached for - // this parameter - } - } catch (Exception e) + if (parameter instanceof RadioChoiceParameter) { - } - ; - // update value field to reflect any bound checking we performed. - valueField.setText("" + iVal); - if (validator.getMin() != null && validator.getMax() != null) - { - slider.getModel().setRangeProperties(iVal, 1, - validator.getMin().intValue(), - validator.getMax().intValue() + 1, true); + return buttonGroup.getSelection().getActionCommand(); } else { - slider.setVisible(false); + return getSelectedValue(this.parameter, + choicebox.getSelectedIndex()); } - return new int[] { iVal }; } - else + slider.setVisible(false); + return valueField.getText().trim(); + } + + if (validator.getMin() == null || validator.getMax() == null) + { + slider.setVisible(false); + } + + valueField.setText(valueField.getText().trim()); + + /* + * ensure not outside min-max range + * TODO: provide some visual indicator if limit reached + */ + try + { + valueField.setBackground(Color.WHITE); + double d = Double.parseDouble(valueField.getText()); + if (validator.getMin() != null + && validator.getMin().doubleValue() > d) { - fVal = 0f; - try - { - valueField.setText(valueField.getText().trim()); - fVal = Float.valueOf(valueField.getText()); - if (validator.getMin() != null - && validator.getMin().floatValue() > fVal) - { - fVal = validator.getMin().floatValue(); - // TODO: provide visual indication that hard limit was reached for - // this parameter - // update value field to reflect any bound checking we performed. - valueField.setText("" + fVal); - } - if (validator.getMax() != null - && validator.getMax().floatValue() < fVal) - { - fVal = validator.getMax().floatValue(); - // TODO: provide visual indication that hard limit was reached for - // this parameter - // update value field to reflect any bound checking we performed. - valueField.setText("" + fVal); - } - } catch (Exception e) - { - } - ; - if (validator.getMin() != null && validator.getMax() != null) - { - slider.getModel().setRangeProperties((int) (fVal * 1000f), 1, - (int) (validator.getMin().floatValue() * 1000f), - 1 + (int) (validator.getMax().floatValue() * 1000f), - true); - } - else - { - slider.setVisible(false); - } - return new float[] { fVal }; + valueField.setText(formatNumber(validator.getMin())); + } + if (validator.getMax() != null + && validator.getMax().doubleValue() < d) + { + valueField.setText(formatNumber(validator.getMax())); } + } catch (NumberFormatException e) + { + valueField.setBackground(Color.yellow); + return Float.NaN; } - else + + if (isIntegerParameter) { - if (!choice) + int iVal = 0; + try + { + iVal = Integer.valueOf(valueField.getText()); + } catch (Exception e) + { + valueField.setBackground(Color.yellow); + return Integer.valueOf(0); + } + + if (validator.getMin() != null && validator.getMax() != null) + { + slider.getModel().setRangeProperties(iVal, 1, + validator.getMin().intValue(), + validator.getMax().intValue() + 1, true); + } + else { slider.setVisible(false); - return new String[] { valueField.getText().trim() }; + } + return Integer.valueOf(iVal); + } + + if (isLogarithmicParameter) + { + double dVal = 0d; + try + { + double eValue = Double.valueOf(valueField.getText()); + dVal = Math.log(eValue); + } catch (Exception e) + { + // shouldn't be possible here + valueField.setBackground(Color.yellow); + return Double.NaN; + } + if (validator.getMin() != null && validator.getMax() != null) + { + double scaleMin = Math.log(validator.getMin().doubleValue()) + * sliderScaleFactor; + double scaleMax = Math.log(validator.getMax().doubleValue()) + * sliderScaleFactor; + slider.getModel().setRangeProperties( + (int) (sliderScaleFactor * dVal), 1, + (int) scaleMin, 1 + (int) scaleMax, true); } else { - return new String[] { (String) choicebox.getSelectedItem() }; + slider.setVisible(false); } + return Double.valueOf(dVal); } + float fVal = 0f; + try + { + fVal = Float.valueOf(valueField.getText()); + } catch (Exception e) + { + return Float.valueOf(0f); // shouldn't happen + } + if (validator.getMin() != null && validator.getMax() != null) + { + float scaleMin = validator.getMin().floatValue() + * sliderScaleFactor; + float scaleMax = validator.getMax().floatValue() + * sliderScaleFactor; + slider.getModel().setRangeProperties( + (int) (fVal * sliderScaleFactor), 1, (int) scaleMin, + 1 + (int) scaleMax, true); + } + else + { + slider.setVisible(false); + } + return Float.valueOf(fVal); } } - public static final int PARAM_WIDTH = 340; - - public static final int PARAM_HEIGHT = 150; - - public static final int PARAM_CLOSEDHEIGHT = 80; - - public OptsAndParamsPage(OptsParametersContainerI paramContainer) - { - this(paramContainer, false); - } - + /** + * Constructor with the option to show 'compact' format (parameter description + * as tooltip) or 'expanded' format (parameter description in a textbox which + * may be opened or closed). Use compact for simple description text, expanded + * for more wordy or formatted text. + * + * @param paramContainer + */ public OptsAndParamsPage(OptsParametersContainerI paramContainer, boolean compact) { @@ -799,12 +1052,6 @@ public class OptsAndParamsPage mnu.show(invoker, x, y); } - URL linkImageURL = getClass().getResource("/images/link.gif"); - - Map optSet = new java.util.LinkedHashMap(); - - Map paramSet = new java.util.LinkedHashMap(); - public Map getOptSet() { return optSet; @@ -825,8 +1072,6 @@ public class OptsAndParamsPage this.paramSet = paramSet; } - OptsParametersContainerI poparent; - OptionBox addOption(OptionI opt) { OptionBox cb = optSet.get(opt.getName()); @@ -870,11 +1115,9 @@ public class OptsAndParamsPage } else { - throw new Error(MessageManager.formatMessage( - "error.invalid_value_for_option", new String[] - { string, option.getName() })); + throw new Error(String.format("Invalid value '%s' for option '%s'", + string, option.getName())); } - } if (option.isRequired() && !cb.enabled.isSelected()) { @@ -898,16 +1141,18 @@ public class OptsAndParamsPage } /** - * recover options and parameters from GUI + * Answers a list of arguments representing all the options and arguments + * selected on the dialog, holding their chosen or input values. Optional + * parameters which were not selected are not included. * * @return */ public List getCurrentSettings() { - List argSet = new ArrayList(); + List argSet = new ArrayList<>(); for (OptionBox opts : getOptSet().values()) { - OptionI opt = opts.getOptionIfEnabled(); + ArgumentI opt = opts.getSelectedOption(); if (opt != null) { argSet.add(opt); @@ -915,7 +1160,7 @@ public class OptsAndParamsPage } for (ParamBox parambox : getParamSet().values()) { - ParameterI parm = parambox.getParameter(); + ArgumentI parm = parambox.getParameter(); if (parm != null) { argSet.add(parm); @@ -925,4 +1170,57 @@ public class OptsAndParamsPage return argSet; } + /** + * A helper method that constructs and returns a CombBox for choice of the + * possible option values. If display names are provided, then these are added + * as options, otherwise the actual values are added. + * + * @param opt + * @return + */ + protected static JComboBox buildComboBox(OptionI opt) + { + JComboBox cb = null; + List displayNames = opt.getDisplayNames(); + if (displayNames != null) + { + List displayNamesObjects = new ArrayList<>(); + displayNamesObjects.addAll(displayNames); + cb = JvSwingUtils.buildComboWithTooltips(displayNamesObjects, + opt.getPossibleValues()); + } + else + { + cb = new JComboBox<>(); + for (String v : opt.getPossibleValues()) + { + cb.addItem(v); + } + } + return cb; + } + + /** + * Answers the value corresponding to the selected item in the choice combo + * box. Note that this returns the underlying value even if a different + * display name is used in the combo box. + * + * @return + */ + protected static String getSelectedValue(OptionI opt, int sel) + { + List possibleValues = opt.getPossibleValues(); + String value = null; + if (possibleValues != null && possibleValues.size() == 1) + { + // Hack to make sure the default value for an enabled option with only + // one value is actually returned even if this.val is not displayed + value = possibleValues.get(0); + } + else if (sel >= 0 && sel < possibleValues.size()) + { + value = possibleValues.get(sel); + } + return value; + } } diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index cf15aa1..4b6d79b 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.AlignViewportI; import jalview.bin.Cache; import jalview.renderer.OverviewRenderer; import jalview.util.MessageManager; @@ -63,7 +64,7 @@ public class OverviewPanel extends JPanel private OverviewCanvas oviewCanvas; - protected AlignViewport av; + private AlignViewportI av; private AlignmentPanel ap; diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index 5eca00f..c0d57a6 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -607,6 +607,12 @@ public class PCAPanel extends GPCAPanel // // setMenusForViewport(); // validate(); } + + @Override + public void removeProgressBar(long id) + { + progressBar.removeProgressBar(id); + } @Override public void registerHandler(final long id, diff --git a/src/jalview/gui/PairwiseAlignPanel.java b/src/jalview/gui/PairwiseAlignPanel.java index d081794..e736a11 100755 --- a/src/jalview/gui/PairwiseAlignPanel.java +++ b/src/jalview/gui/PairwiseAlignPanel.java @@ -21,13 +21,13 @@ package jalview.gui; import jalview.analysis.AlignSeq; +import jalview.api.AlignViewportI; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentView; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.jbgui.GPairwiseAlignPanel; import jalview.util.MessageManager; -import jalview.viewmodel.AlignmentViewport; import java.awt.event.ActionEvent; import java.util.Vector; @@ -43,7 +43,7 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel private static final String DASHES = "---------------------\n"; - AlignmentViewport av; + AlignViewportI av; Vector sequences; @@ -51,14 +51,13 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel * Creates a new PairwiseAlignPanel object. * * @param viewport - * DOCUMENT ME! */ - public PairwiseAlignPanel(AlignmentViewport viewport) + public PairwiseAlignPanel(AlignViewportI viewport) { super(); this.av = viewport; - sequences = new Vector(); + sequences = new Vector<>(); SequenceGroup selectionGroup = viewport.getSelectionGroup(); boolean isSelection = selectionGroup != null diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 4469b43..f46bd4e 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -64,11 +64,13 @@ import jalview.datamodel.DBRefEntry; import jalview.datamodel.HiddenColumns; import jalview.datamodel.MappedFeatures; import jalview.datamodel.PDBEntry; +import jalview.datamodel.ResidueCount; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.gui.ColourMenuHelper.ColourChangeListener; import jalview.gui.JalviewColourChooser.ColourChooserListener; +import jalview.io.CountReader; import jalview.io.FileFormatI; import jalview.io.FileFormats; import jalview.io.FormatAdapter; @@ -87,6 +89,9 @@ import jalview.util.StringUtils; import jalview.util.UrlLink; import jalview.viewmodel.seqfeatures.FeatureRendererModel; +import java.io.IOException; +import java.net.MalformedURLException; + /** * The popup menu that is displayed on right-click on a sequence id, or in the * sequence alignment. @@ -545,6 +550,36 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener } } + if (seq.hasHMMProfile()) + { + menuItem = new JMenuItem(MessageManager + .getString("action.add_background_frequencies")); + menuItem.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + try + { + ResidueCount counts = CountReader.getBackgroundFrequencies(ap, + seq); + if (counts != null) + { + seq.getHMM().setBackgroundFrequencies(counts); + ap.alignFrame.buildColourMenu(); + } + } catch (MalformedURLException e1) + { + e1.printStackTrace(); + } catch (IOException e1) + { + e1.printStackTrace(); + } + } + }); + add(menuItem); + } + menuItem = new JMenuItem( MessageManager.getString("action.hide_sequences")); menuItem.addActionListener(new ActionListener() @@ -669,7 +704,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener buildGroupURLMenu(sg, groupLinks); } // Add a 'show all structures' for the current selection - Hashtable pdbe = new Hashtable<>(), reppdb = new Hashtable<>(); + Hashtable pdbe = new Hashtable<>(); + Hashtable reppdb = new Hashtable<>(); SequenceI sqass = null; for (SequenceI sq : alignPanel.av.getSequenceSelection()) diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 4030afa..04851e8 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -27,6 +27,8 @@ import java.awt.Dimension; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.MouseEvent; import java.io.File; import java.util.ArrayList; @@ -37,6 +39,7 @@ import javax.swing.JComboBox; import javax.swing.JFileChooser; import javax.swing.JInternalFrame; import javax.swing.JPanel; +import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.RowFilter; import javax.swing.RowSorter; @@ -50,6 +53,9 @@ import javax.swing.table.TableColumn; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; +import jalview.hmmer.HmmerCommand; +import jalview.util.FileUtils; + import ext.edu.ucsf.rbvi.strucviz2.StructureManager; import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; import jalview.bin.Cache; @@ -82,6 +88,14 @@ import jalview.ws.sifts.SiftsSettings; */ public class Preferences extends GPreferences { + // suggested list delimiter character + public static final String COMMA = ","; + + public static final String HMMSEARCH_SEQCOUNT = "HMMSEARCH_SEQCOUNT"; + + public static final String HMMINFO_GLOBAL_BACKGROUND = "HMMINFO_GLOBAL_BACKGROUND"; + + public static final String HMMALIGN_TRIM_TERMINI = "HMMALIGN_TRIM_TERMINI"; public static final String ADD_SS_ANN = "ADD_SS_ANN"; @@ -126,6 +140,12 @@ public class Preferences extends GPreferences public static final String FONT_SIZE = "FONT_SIZE"; public static final String FONT_STYLE = "FONT_STYLE"; + + public static final String HMMER_PATH = "HMMER_PATH"; + + public static final String CYGWIN_PATH = "CYGWIN_PATH"; + + public static final String HMMSEARCH_DBS = "HMMSEARCH_DBS"; public static final String GAP_COLOUR = "GAP_COLOUR"; @@ -269,6 +289,8 @@ public class Preferences extends GPreferences private WsPreferences wsPrefs; + private SlivkaPreferences slivkaPrefs; + private OptionsParam promptEachTimeOpt = new OptionsParam( MessageManager.getString("label.prompt_each_time"), "Prompt each time"); @@ -296,6 +318,8 @@ public class Preferences extends GPreferences { wsPrefs = new WsPreferences(); wsTab.add(wsPrefs, BorderLayout.CENTER); + slivkaPrefs = new SlivkaPreferences(); + slivkaTab.add(slivkaPrefs, BorderLayout.CENTER); } int width = 500, height = 450; if (Platform.isAMacAndNotJS()) @@ -309,6 +333,63 @@ public class Preferences extends GPreferences frame.setMinimumSize(new Dimension(width, height)); /* + * Set HMMER tab defaults + */ + hmmrTrimTermini.setSelected(Cache.getDefault(HMMALIGN_TRIM_TERMINI, false)); + if (Cache.getDefault(HMMINFO_GLOBAL_BACKGROUND, false)) + { + hmmerBackgroundUniprot.setSelected(true); + } + else + { + hmmerBackgroundAlignment.setSelected(true); + } + hmmerSequenceCount + .setText(Cache.getProperty(HMMSEARCH_SEQCOUNT)); + hmmerPath.setText(Cache.getProperty(HMMER_PATH)); + hmmerPath.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + validateHmmerPath(); + } + }); + hmmerPath.addFocusListener(new FocusAdapter() + { + @Override + public void focusLost(FocusEvent e) + { + validateHmmerPath(); + } + }); + if (cygwinPath != null) + { + String path = Cache.getProperty(CYGWIN_PATH); + if (path == null) + { + path = FileUtils.getPathTo("bash"); + } + cygwinPath.setText(path); + cygwinPath.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + validateCygwinPath(); + } + }); + cygwinPath.addFocusListener(new FocusAdapter() + { + @Override + public void focusLost(FocusEvent e) + { + validateCygwinPath(); + } + }); + } + + /* * Set Visual tab defaults */ seqLimit.setSelected(Cache.getDefault("SHOW_JVSUFFIX", true)); @@ -331,6 +412,9 @@ public class Preferences extends GPreferences Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM", true)); showConsensLogo .setSelected(Cache.getDefault("SHOW_CONSENSUS_LOGO", false)); + showInformationHistogram.setSelected( + Cache.getDefault("SHOW_INFORMATION_HISTOGRAM", true)); + showHMMLogo.setSelected(Cache.getDefault("SHOW_HMM_LOGO", false)); showNpTooltip .setSelected(Cache.getDefault("SHOW_NPFEATS_TOOLTIP", true)); showDbRefTooltip @@ -509,7 +593,7 @@ public class Preferences extends GPreferences doReset.addActionListener(onReset); // filter to display only custom urls - final RowFilter customUrlFilter = new RowFilter() + final RowFilter customUrlFilter = new RowFilter<>() { @Override public boolean include( @@ -741,6 +825,10 @@ public class Preferences extends GPreferences Boolean.toString(showConsensHistogram.isSelected())); Cache.setPropertyNoSave("SHOW_CONSENSUS_LOGO", Boolean.toString(showConsensLogo.isSelected())); + Cache.setPropertyNoSave("SHOW_INFORMATION_HISTOGRAM", + Boolean.toString(showConsensHistogram.isSelected())); + Cache.setPropertyNoSave("SHOW_HMM_LOGO", + Boolean.toString(showHMMLogo.isSelected())); Cache.setPropertyNoSave("ANTI_ALIAS", Boolean.toString(smoothFont.isSelected())); Cache.setPropertyNoSave(SCALE_PROTEIN_TO_CDNA, @@ -787,6 +875,42 @@ public class Preferences extends GPreferences maxColour.getBackground()); /* + * Save HMMER settings + */ + Cache.setPropertyNoSave(HMMALIGN_TRIM_TERMINI, + Boolean.toString(hmmrTrimTermini.isSelected())); + Cache.setPropertyNoSave(HMMINFO_GLOBAL_BACKGROUND, + Boolean.toString(hmmerBackgroundUniprot.isSelected())); + Cache.setPropertyNoSave(HMMSEARCH_SEQCOUNT, + hmmerSequenceCount.getText()); + Cache.setOrRemove(HMMER_PATH, hmmerPath.getText()); + if (cygwinPath != null) + { + Cache.setOrRemove(CYGWIN_PATH, cygwinPath.getText()); + } + AlignFrame[] frames = Desktop.getAlignFrames(); + if (frames != null && frames.length > 0) + { + for (AlignFrame f : frames) + { + f.updateHMMERStatus(); + } + } + + hmmrTrimTermini.setSelected(Cache.getDefault(HMMALIGN_TRIM_TERMINI, false)); + if (Cache.getDefault(HMMINFO_GLOBAL_BACKGROUND, false)) + { + hmmerBackgroundUniprot.setSelected(true); + } + else + { + hmmerBackgroundAlignment.setSelected(true); + } + hmmerSequenceCount + .setText(Cache.getProperty(HMMSEARCH_SEQCOUNT)); + hmmerPath.setText(Cache.getProperty(HMMER_PATH)); + + /* * Save Overview settings */ Cache.setColourPropertyNoSave(GAP_COLOUR, gapColour.getBackground()); @@ -1101,6 +1225,8 @@ public class Preferences extends GPreferences && (identity.isSelected() || showGroupConsensus.isSelected())); showConsensLogo.setEnabled(annotations.isSelected() && (identity.isSelected() || showGroupConsensus.isSelected())); + showInformationHistogram.setEnabled(annotations.isSelected()); + showHMMLogo.setEnabled(annotations.isSelected()); } @Override @@ -1370,6 +1496,57 @@ public class Preferences extends GPreferences } return true; } + + /** + * Returns true if the given text field contains a path to a folder that + * contains an executable with the given name, else false (after showing a + * warning dialog). The executable name will be tried with .exe appended if not + * found. + * + * @param textField + * @param executable + */ + protected boolean validateExecutablePath(JTextField textField, String executable) + { + String folder = textField.getText().trim(); + + if (FileUtils.getExecutable(executable, folder) != null) + { + return true; + } + if (folder.length() > 0) + { + JvOptionPane.showInternalMessageDialog(Desktop.getInstance(), + MessageManager.formatMessage("label.executable_not_found", + executable), + MessageManager.getString("label.invalid_folder"), + JvOptionPane.ERROR_MESSAGE); + } + return false; + } + + /** + * Checks if a file can be executed + * + * @param path + * the path to the file + * @return + */ + public boolean canExecute(String path) + { + File file = new File(path); + if (!file.canExecute()) + { + file = new File(path + ".exe"); + { + if (!file.canExecute()) + { + return false; + } + } + } + return true; + } /** * If Chimera is selected, check it can be found on default or user-specified @@ -1418,6 +1595,18 @@ public class Preferences extends GPreferences } } + @Override + protected void validateHmmerPath() + { + validateExecutablePath(hmmerPath, HmmerCommand.HMMBUILD); + } + + @Override + protected void validateCygwinPath() + { + validateExecutablePath(cygwinPath, "run"); + } + public class OptionsParam { private String name; diff --git a/src/jalview/gui/ProgressBar.java b/src/jalview/gui/ProgressBar.java index 011d810..abf096f 100644 --- a/src/jalview/gui/ProgressBar.java +++ b/src/jalview/gui/ProgressBar.java @@ -166,6 +166,23 @@ public class ProgressBar implements IProgressIndicator }); } + + @Override + public void removeProgressBar(final long id) + { + SwingUtilities.invokeLater(() -> { + JPanel progressPanel = progressBars.get(id); + if (progressPanel != null) + { + progressBars.remove(id); + if (progressBarHandlers.containsKey(id)) + { + progressBarHandlers.remove(id); + } + removeRow(progressPanel); + } + }); + } /** * Lays out progress bar container hierarchy diff --git a/src/jalview/gui/RestServiceEditorPane.java b/src/jalview/gui/RestServiceEditorPane.java index cda76d9..213a979 100644 --- a/src/jalview/gui/RestServiceEditorPane.java +++ b/src/jalview/gui/RestServiceEditorPane.java @@ -476,10 +476,13 @@ public class RestServiceEditorPane extends GRestServiceEditorPane final Thread runner = Thread.currentThread(); JFrame df = new JFrame(); df.getContentPane().setLayout(new BorderLayout()); - df.getContentPane().add((nulserv = !nulserv) - ? new RestServiceEditorPane(jalview.ws.rest.RestClient - .makeShmmrRestClient().getRestDescription()) - : new RestServiceEditorPane(), BorderLayout.CENTER); + df.getContentPane().add( + (nulserv = !nulserv) ? new RestServiceEditorPane( + jalview.ws.rest.clientdefs.ShmrRestClient + .makeShmmrRestClient() + .getRestDescription()) + : new RestServiceEditorPane(), + BorderLayout.CENTER); df.setBounds(100, 100, 600, 400); df.addComponentListener(new ComponentListener() { diff --git a/src/jalview/gui/SlivkaPreferences.java b/src/jalview/gui/SlivkaPreferences.java new file mode 100644 index 0000000..6c365b9 --- /dev/null +++ b/src/jalview/gui/SlivkaPreferences.java @@ -0,0 +1,368 @@ +package jalview.gui; + +import jalview.bin.Cache; +import jalview.util.MessageManager; +import jalview.ws.WSDiscovererI; +import jalview.ws.slivkaws.SlivkaWSDiscoverer; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.NoSuchElementException; + +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.DefaultTableCellRenderer; + +@SuppressWarnings("serial") +public class SlivkaPreferences extends JPanel +{ + { + setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); + setPreferredSize(new Dimension(500, 450)); + } + + WSDiscovererI discoverer; + + private final ArrayList urls = new ArrayList<>(); + + private final ArrayList statuses = new ArrayList<>(); + + private final AbstractTableModel urlTableModel = new AbstractTableModel() + { + final String[] columnNames = { "Service URL", "Status" }; + + @Override + public String getColumnName(int col) + { + return columnNames[col]; + } + + @Override + public Object getValueAt(int rowIndex, int columnIndex) + { + switch (columnIndex) + { + case 0: + return urls.get(rowIndex); + case 1: + return statuses.get(rowIndex); + default: + throw new NoSuchElementException(); + } + } + + @Override + public int getRowCount() + { + return urls.size(); + } + + @Override + public int getColumnCount() + { + return 2; + } + }; + + private class WSStatusCellRenderer extends DefaultTableCellRenderer + { + @Override + public Component getTableCellRendererComponent(JTable table, + Object value, boolean isSelected, boolean hasFocus, int row, + int column) + { + setHorizontalAlignment(CENTER); + super.getTableCellRendererComponent(table, "\u25CF", isSelected, + hasFocus, row, column); + switch ((Integer) value) + { + case WSDiscovererI.STATUS_NO_SERVICES: + setForeground(Color.ORANGE); + break; + case WSDiscovererI.STATUS_OK: + setForeground(Color.GREEN); + break; + case WSDiscovererI.STATUS_INVALID: + setForeground(Color.RED); + break; + case WSDiscovererI.STATUS_UNKNOWN: + default: + setForeground(Color.LIGHT_GRAY); + } + return this; + } + } + + private JTable urlListTable = new JTable(urlTableModel); + { + urlListTable.getColumnModel().getColumn(1).setMaxWidth(60); + urlListTable.getColumnModel().getColumn(1) + .setCellRenderer(new WSStatusCellRenderer()); + } + + // URL control panel buttons + JButton newWsUrl = new JButton( + MessageManager.getString("label.new_service_url")); + + JButton editWsUrl = new JButton( + MessageManager.getString("label.edit_service_url")); + + JButton deleteWsUrl = new JButton( + MessageManager.getString("label.delete_service_url")); + + JButton moveUrlUp = new JButton( + MessageManager.getString("action.move_up")); + + JButton moveUrlDown = new JButton( + MessageManager.getString("action.move_down")); + + private String showEditUrlDialog(String oldUrl) + { + String input = (String) JvOptionPane + .showInternalInputDialog( + this, + MessageManager.getString("label.url:"), + UIManager.getString("OptionPane.inputDialogTitle", MessageManager.getLocale()), + JOptionPane.QUESTION_MESSAGE, + null, + null, + oldUrl); + if (input == null) + { + return null; + } + try + { + new URL(input); + } catch (MalformedURLException ex) + { + JvOptionPane.showInternalMessageDialog(this, + MessageManager.getString("label.invalid_url"), + UIManager.getString("OptionPane.messageDialogTitle", + MessageManager.getLocale()), + JOptionPane.WARNING_MESSAGE); + return null; + } + return input; + } + + // Button Action Listeners + private ActionListener newUrlAction = (ActionEvent e) -> { + final String input = showEditUrlDialog(""); + if (input != null) + { + urls.add(input); + statuses.add(discoverer.getServerStatusFor(input)); + urlTableModel.fireTableRowsInserted(urls.size(), urls.size()); + discoverer.setServiceUrls(urls); + } + }; + + private ActionListener editUrlAction = (ActionEvent e) -> { + final int i = urlListTable.getSelectedRow(); + if (i >= 0) + { + final String input = showEditUrlDialog(urls.get(i)); + if (input != null) + { + urls.set(i, input); + statuses.set(i, discoverer.getServerStatusFor(input)); + urlTableModel.fireTableRowsUpdated(i, i); + discoverer.setServiceUrls(urls); + } + } + }; + + private ActionListener deleteUrlAction = (ActionEvent e) -> { + final int i = urlListTable.getSelectedRow(); + if (i >= 0) + { + urls.remove(i); + statuses.remove(i); + urlTableModel.fireTableRowsDeleted(i, i); + discoverer.setServiceUrls(urls); + } + }; + + private ActionListener moveUrlUpAction = (ActionEvent e) -> { + final int i = urlListTable.getSelectedRow(); + if (i > 0) + { + moveTableRow(i, i - 1); + discoverer.setServiceUrls(urls); + } + }; + + private ActionListener moveUrlDownAction = (ActionEvent e) -> { + final int i = urlListTable.getSelectedRow(); + if (i >= 0 && i < urls.size() - 1) + { + moveTableRow(i, i + 1); + discoverer.setServiceUrls(urls); + } + }; + + private MouseListener tableClickListener = new MouseAdapter() + { + final ActionEvent actionEvent = new ActionEvent(urlListTable, + ActionEvent.ACTION_PERFORMED, "edit"); + + @Override + public void mouseClicked(MouseEvent e) + { + if (e.getClickCount() > 1) + { + editUrlAction.actionPerformed(actionEvent); + } + } + }; + + // Setting up URL list Pane + { + Font font = new Font("Verdana", Font.PLAIN, 10); + JPanel urlPaneContainer = new JPanel(new BorderLayout(5, 5)); + urlPaneContainer.setBorder(BorderFactory.createCompoundBorder( + BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), + "Slivka Web Services"), + BorderFactory.createEmptyBorder(10, 5, 5, 5))); + + newWsUrl.setFont(font); + editWsUrl.setFont(font); + deleteWsUrl.setFont(font); + moveUrlUp.setFont(font); + moveUrlDown.setFont(font); + JPanel editContainer = new JPanel(); + editContainer.add(newWsUrl); + editContainer.add(editWsUrl); + editContainer.add(deleteWsUrl); + urlPaneContainer.add(editContainer, BorderLayout.PAGE_END); + + JPanel moveContainer = new JPanel(); + moveContainer + .setLayout(new BoxLayout(moveContainer, BoxLayout.PAGE_AXIS)); + moveContainer.add(moveUrlUp); + moveContainer.add(Box.createRigidArea(new Dimension(0, 5))); + moveContainer.add(moveUrlDown); + urlPaneContainer.add(moveContainer, BorderLayout.LINE_START); + + urlPaneContainer.add(new JScrollPane(urlListTable), + BorderLayout.CENTER); + this.add(urlPaneContainer); + + // Connecting action listeners + urlListTable.addMouseListener(tableClickListener); + newWsUrl.addActionListener(newUrlAction); + editWsUrl.addActionListener(editUrlAction); + deleteWsUrl.addActionListener(deleteUrlAction); + moveUrlUp.addActionListener(moveUrlUpAction); + moveUrlDown.addActionListener(moveUrlDownAction); + } + + private void moveTableRow(int fromIndex, int toIndex) + { + String url = urls.get(fromIndex); + int status = statuses.get(fromIndex); + urls.set(fromIndex, urls.get(toIndex)); + statuses.set(fromIndex, statuses.get(toIndex)); + urls.set(toIndex, url); + statuses.set(toIndex, status); + if (urlListTable.getSelectedRow() == fromIndex) + { + urlListTable.setRowSelectionInterval(toIndex, toIndex); + } + int firstRow = Math.min(toIndex, fromIndex); + int lastRow = Math.max(fromIndex, toIndex); + urlTableModel.fireTableRowsUpdated(firstRow, lastRow); + } + + // Discoverer reloading buttons + JButton refreshServices = new JButton( + MessageManager.getString("action.refresh_services")); + + JButton resetServices = new JButton( + MessageManager.getString("action.reset_services")); + + JProgressBar progressBar = new JProgressBar(); + + // Discoverer buttons action listeners + private ActionListener refreshServicesAction = (ActionEvent e) -> { + progressBar.setVisible(true); + Cache.log.info("Requesting service reload"); + discoverer.startDiscoverer().handle((_discoverer, exception) -> { + if (exception == null) + { + Cache.log.info("Reloading done"); + } + else + { + Cache.log.error("Reloading failed", exception); + } + SwingUtilities.invokeLater(() -> progressBar.setVisible(false)); + return null; + }); + }; + + private ActionListener resetServicesAction = (ActionEvent e) -> { + discoverer.setServiceUrls(null); + urls.clear(); + statuses.clear(); + urls.addAll(discoverer.getServiceUrls()); + for (String url : urls) + { + statuses.add(discoverer.getServerStatusFor(url)); + } + urlTableModel.fireTableDataChanged(); + }; + + { + Font font = new Font("Verdana", Font.PLAIN, 11); + refreshServices.setFont(font); + resetServices.setFont(font); + JPanel container = new JPanel(); + container.add(refreshServices); + container.add(resetServices); + this.add(container); + + // Connecting action listeners + refreshServices.addActionListener(refreshServicesAction); + resetServices.addActionListener(resetServicesAction); + } + + { + progressBar.setVisible(false); + progressBar.setIndeterminate(true); + add(progressBar); + } + + SlivkaPreferences() + { + // Initial URLs loading + discoverer = SlivkaWSDiscoverer.getInstance(); + urls.addAll(discoverer.getServiceUrls()); + for (String url : urls) + { + statuses.add(discoverer.getServerStatusFor(url)); + } + } +} diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 953755f..c4b47a0 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -20,6 +20,19 @@ */ package jalview.gui; +import jalview.api.AlignViewportI; +import jalview.api.AlignViewControllerGuiI; +import jalview.api.FeatureSettingsControllerI; +import jalview.api.SplitContainerI; +import jalview.controller.FeatureSettingsControllerGuiI; +import jalview.datamodel.AlignmentI; +import jalview.jbgui.GAlignFrame; +import jalview.jbgui.GSplitFrame; +import jalview.structure.StructureSelectionManager; +import jalview.util.MessageManager; +import jalview.util.Platform; +import jalview.viewmodel.AlignmentViewport; + import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -49,18 +62,6 @@ import javax.swing.event.ChangeListener; import javax.swing.event.InternalFrameAdapter; import javax.swing.event.InternalFrameEvent; -import jalview.api.AlignViewControllerGuiI; -import jalview.api.FeatureSettingsControllerI; -import jalview.api.SplitContainerI; -import jalview.controller.FeatureSettingsControllerGuiI; -import jalview.datamodel.AlignmentI; -import jalview.jbgui.GAlignFrame; -import jalview.jbgui.GSplitFrame; -import jalview.structure.StructureSelectionManager; -import jalview.util.MessageManager; -import jalview.util.Platform; -import jalview.viewmodel.AlignmentViewport; - /** * An internal frame on the desktop that hosts a horizontally split view of * linked DNA and Protein alignments. Additional views can be created in linked @@ -230,8 +231,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI topFrame.alignPanel.adjustAnnotationHeight(); bottomFrame.alignPanel.adjustAnnotationHeight(); - final AlignViewport topViewport = topFrame.viewport; - final AlignViewport bottomViewport = bottomFrame.viewport; + final AlignViewportI topViewport = topFrame.viewport; + final AlignViewportI bottomViewport = bottomFrame.viewport; final AlignmentI topAlignment = topViewport.getAlignment(); final AlignmentI bottomAlignment = bottomViewport.getAlignment(); boolean topAnnotations = topViewport.isShowAnnotation(); @@ -1100,4 +1101,4 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI { return featureSettingsUI != null && !featureSettingsUI.isClosed(); } -} \ No newline at end of file +} diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 47c9a00..97b0cfb 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -1283,6 +1283,12 @@ public class StructureChooser extends GStructureChooser { progressBar.setProgressBar(message, id); } + + @Override + public void removeProgressBar(long id) + { + progressBar.removeProgressBar(id); + } @Override public void registerHandler(long id, IProgressIndicatorHandler handler) diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java index ab9444e..b88102e 100644 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -929,6 +929,12 @@ public void hyperlinkUpdate(HyperlinkEvent e) { progressBar.setProgressBar(message, id); } + + @Override + public void removeProgressBar(long id) + { + progressBar.removeProgressBar(id); + } @Override public void registerHandler(final long id, diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index 45822a3..719b7d9 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -23,10 +23,7 @@ package jalview.gui; import jalview.gui.OptsAndParamsPage.OptionBox; import jalview.gui.OptsAndParamsPage.ParamBox; import jalview.util.MessageManager; -import jalview.ws.jws2.JabaParamStore; -import jalview.ws.jws2.JabaPreset; -import jalview.ws.jws2.Jws2Discoverer; -import jalview.ws.jws2.jabaws2.Jws2Instance; +import jalview.ws.api.UIinfo; import jalview.ws.params.ArgumentI; import jalview.ws.params.OptionI; import jalview.ws.params.ParamDatastoreI; @@ -48,33 +45,21 @@ import java.awt.event.HierarchyBoundsListener; import java.awt.event.HierarchyEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.awt.event.WindowEvent; -import java.awt.event.WindowListener; -import java.net.URL; import java.util.Hashtable; -import java.util.Iterator; import java.util.List; import java.util.Vector; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JDialog; -import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JSplitPane; import javax.swing.JTextArea; import javax.swing.border.TitledBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; -import compbio.metadata.Argument; -import compbio.metadata.Option; -import compbio.metadata.Parameter; -import compbio.metadata.Preset; -import compbio.metadata.PresetManager; -import compbio.metadata.RunnerConfig; import net.miginfocom.swing.MigLayout; /** @@ -95,36 +80,35 @@ import net.miginfocom.swing.MigLayout; public class WsJobParameters extends JPanel implements ItemListener, ActionListener, DocumentListener, OptsParametersContainerI { - URL linkImageURL = getClass().getResource("/images/link.gif"); + private static final int PREFERRED_WIDTH = 540; - private static final String SVC_DEF = "Defaults"; // this is the null - // parameter set as shown to - // user + private static final int DEFAULT_HEIGHT = 640; + + // the default parameter set shown to the user + private static final String SVC_DEF = "Defaults"; + + private int maxOptWidth = 200; + + // URL linkImageURL = getClass().getResource("/images/link.gif"); + + // TODO ABSRACT FROM JABAWS CLASSES /** * manager for options and parameters. */ - OptsAndParamsPage opanp = new OptsAndParamsPage(this); + OptsAndParamsPage opanp; - /** + /* * panel containing job options */ - JPanel jobOptions = new JPanel(); + JPanel optionsPanel = new JPanel(); - /** + /* * panel containing job parameters */ - JPanel paramList = new JPanel(); - - JPanel SetNamePanel = new JPanel(); - - JPanel setDetails = new JPanel(); - - JSplitPane settingsPanel = new JSplitPane(); - - JPanel jobPanel = new JPanel(); + JPanel paramsPanel = new JPanel(); - JScrollPane jobOptionsPane = new JScrollPane(); + JPanel setNamePanel = new JPanel(); JButton createpref = new JButton(); @@ -134,81 +118,80 @@ public class WsJobParameters extends JPanel implements ItemListener, JButton updatepref = new JButton(); - JButton startjob = new JButton(); - - JButton canceljob = new JButton(); - - JComboBox setName = new JComboBox(); + JComboBox setName = new JComboBox<>(); JTextArea setDescr = new JTextArea(); JScrollPane paramPane = new JScrollPane(); - // ScrollablePanel optsAndparams = new ScrollablePanel(); - JPanel optsAndparams = new JPanel(); - - RunnerConfig serviceOptions; - ParamDatastoreI paramStore; - private int MAX_OPTWIDTH = 200; + // set true when 'Start Job' is clicked + boolean startJob = false; - WsJobParameters(Jws2Instance service) - { - this(service, null); - } + JDialog frame = null; - public WsJobParameters(Jws2Instance service, WsParamSetI preset) - { - this(null, service, preset, null); - } + UIinfo service; - /** - * - * @param desktop - * - if null, create new JFrame outside of desktop - * @param service - * @param preset + /* + * list of service presets in the gui + */ + Hashtable servicePresets = null; + + /* + * set if dialog is being set - so handlers will avoid spurious events */ - public WsJobParameters(JFrame parent, Jws2Instance service, - WsParamSetI preset, List jobArgset) + boolean settingDialog = false; + + private Hashtable modifiedElements = new Hashtable<>(); + + String lastParmSet = null; + + public WsJobParameters(ParamDatastoreI store, WsParamSetI preset, + List args) { - this(parent, null, service, preset, jobArgset); + super(); + + // parameters dialog in 'compact' format (help as tooltips) + opanp = new OptsAndParamsPage(this, true); + jbInit(); + this.paramStore = store; + this.service = null; + init(preset, args); + validate(); } /** + * Constructor given a set of parameters and presets, a service to be invoked, + * and a list of (Jabaws client) arguments * - * @param parent * @param paramStorei * @param service * @param preset * @param jobArgset */ - public WsJobParameters(JFrame parent, ParamDatastoreI paramStorei, - Jws2Instance service, WsParamSetI preset, - List jobArgset) + public WsJobParameters(ParamDatastoreI paramStorei, UIinfo service, + WsParamSetI preset, List jobArgset) { super(); + + // parameters dialog in 'expanded' format (help text boxes) + opanp = new OptsAndParamsPage(this, false); + jbInit(); this.paramStore = paramStorei; - if (paramStore == null) + if (paramStore == null && service != null) { paramStore = service.getParamStore(); } this.service = service; - // argSetModified(false); - // populate parameter table - initForService(service, preset, jobArgset); - // display in new JFrame attached to parent. + initForService(preset, jobArgset); validate(); } - int response = -1; - - JDialog frame = null; - /** - * shows a modal dialog containing the parameters. + * Shows a modal dialog containing the parameters and Start or Cancel options. + * Answers true if the job is started, false if cancelled. * * @return */ @@ -216,7 +199,12 @@ public class WsJobParameters extends JPanel implements ItemListener, { frame = new JDialog(Desktop.getInstance(), true); - + if (service != null) + { + frame.setTitle(MessageManager.formatMessage("label.edit_params_for", + new String[] + { service.getActionText() })); + } frame.setTitle(MessageManager.formatMessage("label.edit_params_for", new String[] { service.getActionText() })); @@ -242,11 +230,7 @@ public class WsJobParameters extends JPanel implements ItemListener, }); frame.setVisible(true); - if (response > 0) - { - return true; - } - return false; + return startJob; } private void jbInit() @@ -276,7 +260,7 @@ public class WsJobParameters extends JPanel implements ItemListener, @Override public void actionPerformed(ActionEvent e) { - update_actionPerformed(e); + update_actionPerformed(); } }); deletepref = JvSwingUtils.makeButton( @@ -288,7 +272,7 @@ public class WsJobParameters extends JPanel implements ItemListener, @Override public void actionPerformed(ActionEvent e) { - delete_actionPerformed(e); + delete_actionPerformed(); } }); createpref = JvSwingUtils.makeButton( @@ -300,7 +284,7 @@ public class WsJobParameters extends JPanel implements ItemListener, @Override public void actionPerformed(ActionEvent e) { - create_actionPerformed(e); + create_actionPerformed(); } }); revertpref = JvSwingUtils.makeButton( @@ -313,10 +297,11 @@ public class WsJobParameters extends JPanel implements ItemListener, @Override public void actionPerformed(ActionEvent e) { - revert_actionPerformed(e); + revert_actionPerformed(); } }); - startjob = JvSwingUtils.makeButton( + + JButton startjob = JvSwingUtils.makeButton( MessageManager.getString("action.start_job"), MessageManager.getString("label.start_job_current_settings"), new ActionListener() @@ -324,10 +309,10 @@ public class WsJobParameters extends JPanel implements ItemListener, @Override public void actionPerformed(ActionEvent e) { - startjob_actionPerformed(e); + startjob_actionPerformed(); } }); - canceljob = JvSwingUtils.makeButton( + JButton canceljob = JvSwingUtils.makeButton( MessageManager.getString("action.cancel_job"), MessageManager.getString("label.cancel_job_close_dialog"), new ActionListener() @@ -335,10 +320,11 @@ public class WsJobParameters extends JPanel implements ItemListener, @Override public void actionPerformed(ActionEvent e) { - canceljob_actionPerformed(e); + canceljob_actionPerformed(); } }); + JPanel setDetails = new JPanel(); setDetails.setBorder( new TitledBorder(MessageManager.getString("label.details"))); setDetails.setLayout(new BorderLayout()); @@ -357,7 +343,7 @@ public class WsJobParameters extends JPanel implements ItemListener, setName.getEditor().addActionListener(this); JPanel setNameInfo = new JPanel(new FlowLayout(FlowLayout.LEFT)); GridBagLayout gbl = new GridBagLayout(); - SetNamePanel.setLayout(gbl); + setNamePanel.setLayout(gbl); JLabel setNameLabel = new JLabel( MessageManager.getString("label.current_parameter_set_name")); @@ -372,9 +358,7 @@ public class WsJobParameters extends JPanel implements ItemListener, revertpref.setVisible(false); createpref.setVisible(false); JPanel setsavebuts = new JPanel(); - setsavebuts.setLayout(new FlowLayout(FlowLayout.LEFT)); // GridLayout(1,2)); - ((FlowLayout) setsavebuts.getLayout()).setHgap(10); - ((FlowLayout) setsavebuts.getLayout()).setVgap(0); + setsavebuts.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0)); // GridLayout(1,2)); JPanel spacer = new JPanel(); spacer.setPreferredSize(new Dimension(2, 30)); setsavebuts.add(spacer); @@ -385,11 +369,11 @@ public class WsJobParameters extends JPanel implements ItemListener, // setsavebuts.setSize(new Dimension(150, 30)); JPanel buttonArea = new JPanel(new GridLayout(1, 1)); buttonArea.add(setsavebuts); - SetNamePanel.add(setNameInfo); + setNamePanel.add(setNameInfo); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridheight = 2; gbl.setConstraints(setNameInfo, gbc); - SetNamePanel.add(buttonArea); + setNamePanel.add(buttonArea); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; @@ -399,36 +383,33 @@ public class WsJobParameters extends JPanel implements ItemListener, // paramPane.setPreferredSize(new Dimension(360, 400)); // paramPane.setPreferredSize(null); - jobOptions.setBorder( + optionsPanel.setBorder( new TitledBorder(MessageManager.getString("label.options"))); - jobOptions.setOpaque(true); - paramList.setBorder( + optionsPanel.setOpaque(true); + paramsPanel.setBorder( new TitledBorder(MessageManager.getString("label.parameters"))); - paramList.setOpaque(true); - JPanel bjo = new JPanel(new BorderLayout()), - bjp = new JPanel(new BorderLayout()); - bjo.add(jobOptions, BorderLayout.CENTER); - bjp.add(paramList, BorderLayout.CENTER); - bjp.setOpaque(true); - bjo.setOpaque(true); + paramsPanel.setOpaque(true); // optsAndparams.setScrollableWidth(ScrollableSizeHint.FIT); // optsAndparams.setScrollableHeight(ScrollableSizeHint.NONE); // optsAndparams.setLayout(new BorderLayout()); + JPanel optsAndparams = new JPanel(); optsAndparams.setLayout(new BorderLayout()); - optsAndparams.add(jobOptions, BorderLayout.NORTH); - optsAndparams.add(paramList, BorderLayout.CENTER); + optsAndparams.add(optionsPanel, BorderLayout.NORTH); + optsAndparams.add(paramsPanel, BorderLayout.CENTER); JPanel jp = new JPanel(new BorderLayout()); jp.add(optsAndparams, BorderLayout.CENTER); paramPane.getViewport().setView(jp); paramPane.setBorder(null); setLayout(new BorderLayout()); + + JPanel jobPanel = new JPanel(); jobPanel.setPreferredSize(null); jobPanel.setLayout(new BorderLayout()); jobPanel.add(setDetails, BorderLayout.NORTH); jobPanel.add(paramPane, BorderLayout.CENTER); // jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT); - add(SetNamePanel, BorderLayout.NORTH); + add(setNamePanel, BorderLayout.NORTH); add(jobPanel, BorderLayout.CENTER); JPanel dialogpanel = new JPanel(); @@ -436,20 +417,20 @@ public class WsJobParameters extends JPanel implements ItemListener, dialogpanel.add(canceljob); // JAL-1580: setMaximumSize() doesn't work, so just size for the worst case: // check for null is for JUnit usage - final int windowHeight = Desktop.getInstance() == null ? 540 + final int windowHeight = Desktop.getInstance() == null ? DEFAULT_HEIGHT : Desktop.getInstance().getHeight(); setPreferredSize(new Dimension(540, windowHeight)); add(dialogpanel, BorderLayout.SOUTH); validate(); } - protected void revert_actionPerformed(ActionEvent e) + protected void revert_actionPerformed() { reInitDialog(lastParmSet); updateWebServiceMenus(); } - protected void update_actionPerformed(ActionEvent e) + protected void update_actionPerformed() { if (isUserPreset) { @@ -467,7 +448,7 @@ public class WsJobParameters extends JPanel implements ItemListener, paramStore.deletePreset(lastParmSet2); } - protected void delete_actionPerformed(ActionEvent e) + protected void delete_actionPerformed() { if (isUserPreset) { @@ -478,7 +459,7 @@ public class WsJobParameters extends JPanel implements ItemListener, updateWebServiceMenus(); } - protected void create_actionPerformed(ActionEvent e) + protected void create_actionPerformed() { String curname = ((String) setName.getSelectedItem()).trim(); if (curname.length() > 0) @@ -497,55 +478,40 @@ public class WsJobParameters extends JPanel implements ItemListener, } } - protected void canceljob_actionPerformed(ActionEvent e) + protected void canceljob_actionPerformed() { - response = 0; + startJob = false; if (frame != null) { frame.setVisible(false); } } - protected void startjob_actionPerformed(ActionEvent e) + protected void startjob_actionPerformed() { - response = 1; + startJob = true; if (frame != null) { frame.setVisible(false); } } - Jws2Instance service; + void initForService(WsParamSetI paramSet, List jobArgset) + { + settingDialog = true; - /** - * list of service presets in the gui - */ - Hashtable servicePresets = null; + init(paramSet, jobArgset); - /** - * set if dialog is being set - so handlers will avoid spurious events - */ - boolean settingDialog = false; + } - void initForService(Jws2Instance service, WsParamSetI jabap, - List jabajobArgset) + void init(WsParamSetI p, List jobArgset) { - WsParamSetI p = null; - List jobArgset = null; - settingDialog = true; - { // instantiate the abstract proxy for Jaba objects - jobArgset = jabajobArgset == null ? null - : JabaParamStore.getJwsArgsfromJaba(jabajobArgset); - p = jabap; // (jabap != null) ? paramStore.getPreset(jabap.getName()) : - // null; - } - - Hashtable exnames = new Hashtable(); + Hashtable exnames = new Hashtable<>(); for (int i = 0, iSize = setName.getItemCount(); i < iSize; i++) { exnames.put(setName.getItemAt(i), setName.getItemAt(i)); } - servicePresets = new Hashtable(); + servicePresets = new Hashtable<>(); // Add the default entry - if not present already. if (!exnames.contains(SVC_DEF)) { @@ -553,7 +519,8 @@ public class WsJobParameters extends JPanel implements ItemListener, exnames.put(SVC_DEF, SVC_DEF); servicePresets.put(SVC_DEF, SVC_DEF); } - String curname = (p == null ? "" : p.getName()); + + // String curname = (p == null ? "" : p.getName()); for (WsParamSetI pr : paramStore.getPresets()) { if (!pr.isModifiable()) @@ -593,10 +560,8 @@ public class WsJobParameters extends JPanel implements ItemListener, } } settingDialog = false; - } - @SuppressWarnings("unchecked") private void updateTable(WsParamSetI p, List jobArgset) { boolean setDefaultParams = false; @@ -633,9 +598,9 @@ public class WsJobParameters extends JPanel implements ItemListener, OptionI opt = (OptionI) myarg; OptionBox ob = opanp.addOption(opt); ob.resetToDefault(setDefaultParams); - if (MAX_OPTWIDTH < ob.getPreferredSize().width) + if (maxOptWidth < ob.getPreferredSize().width) { - MAX_OPTWIDTH = ob.getPreferredSize().width; + maxOptWidth = ob.getPreferredSize().width; } ob.validate(); cw += ob.getPreferredSize().width + 5; @@ -704,8 +669,6 @@ public class WsJobParameters extends JPanel implements ItemListener, return modifiedElements.size() > 0; } - private Hashtable modifiedElements = new Hashtable(); - /** * reset gui and modification state settings */ @@ -770,7 +733,7 @@ public class WsJobParameters extends JPanel implements ItemListener, if (b && modifiedElements.size() > 0) { makeSetNameValid(!isUserPreset); - SetNamePanel.revalidate(); + setNamePanel.revalidate(); } updateButtonDisplay(); } @@ -817,7 +780,7 @@ public class WsJobParameters extends JPanel implements ItemListener, // sync the gui with the preset database for (int i = 0, iS = setName.getItemCount(); i < iS; i++) { - String snm = (String) setName.getItemAt(i); + String snm = setName.getItemAt(i); if (snm.equals(nm)) { makeupdate = true; @@ -837,96 +800,88 @@ public class WsJobParameters extends JPanel implements ItemListener, settingDialog = stn; } + /** + * Rebuilds the Options and Parameters panels + */ @Override public void refreshParamLayout() { - // optsAndparams.setPreferredSize(null); - FlowLayout fl = new FlowLayout(FlowLayout.LEFT); - int sep = fl.getVgap(); - boolean fh = true; - int os = 0, - s = jobOptions.getBorder().getBorderInsets(jobOptions).bottom - + jobOptions.getBorder().getBorderInsets(jobOptions).top - + 2 * sep; - /** - * final height for viewport - */ - int finalh = s; - int panewidth = paramPane.getViewport().getSize().width - 120 - - jobOptions.getBorder().getBorderInsets(jobOptions).left - + jobOptions.getBorder().getBorderInsets(jobOptions).right; - - int w = 2 * fl.getHgap() - + (MAX_OPTWIDTH > OptsAndParamsPage.PARAM_WIDTH ? MAX_OPTWIDTH - : OptsAndParamsPage.PARAM_WIDTH); - int hgap = fl.getHgap(), cw = hgap; + final int rightMargin = 40; + final int availableWidth = paramPane.getViewport().getSize().width + - rightMargin + - optionsPanel.getBorder().getBorderInsets(optionsPanel).left + + optionsPanel.getBorder().getBorderInsets(optionsPanel).right; if (opanp.getOptSet().size() > 0) { + int hgap = 5; + int currentWidth = hgap; - jobOptions.setLayout(new MigLayout("", "", "")); - jobOptions.removeAll(); + /* + * layout constraint 'nogrid' prevents vertical column alignment, + * allowing controls to flow without extra space inserted to align + */ + optionsPanel.setLayout(new MigLayout("nogrid", "", "")); + optionsPanel.removeAll(); + JPanel lastAdded = null; + /* + * add each control in turn; if adding would overflow the right margin, + * remove and re-add the previous parameter with "wrap" (after) + * in order to start a new row + */ for (OptionBox pbox : opanp.getOptSet().values()) { pbox.validate(); - cw += pbox.getSize().width + hgap; - if (cw + 120 > panewidth) - { - jobOptions.add(pbox, "wrap"); - // System.out.println("Wrap on "+pbox.option.getName()); - cw = hgap + pbox.getSize().width; - fh = true; - } - else - { - jobOptions.add(pbox); - } - if (fh) + int boxWidth = pbox.getSize().width; + currentWidth += boxWidth + hgap; + boolean wrapAfterLast = currentWidth > availableWidth + && lastAdded != null; + // System.out.println(String.format( + // "%s width=%d, paneWidth=%d, currentWidth=%d, wrapAfterLast=%s", + // pbox.toString(), boxWidth, panewidth, currentWidth, + // wrapAfterLast)); + if (wrapAfterLast) { - finalh += pbox.getSize().height + fl.getVgap(); - fh = false; + optionsPanel.remove(lastAdded); + optionsPanel.add(lastAdded, "wrap"); + currentWidth = hgap + boxWidth; } + optionsPanel.add(pbox); + lastAdded = pbox; } - jobOptions.revalidate(); + optionsPanel.revalidate(); } else { - jobOptions.setVisible(false); + optionsPanel.setVisible(false); } - // Now layout the parameters assuming they occupy one column - to calculate - // total height of options+parameters - fl = new FlowLayout(FlowLayout.LEFT); - // helpful hint from - // http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout - fl.setAlignOnBaseline(true); if (opanp.getParamSet().size() > 0) { - paramList.removeAll(); - paramList.setLayout(new MigLayout("", "", "")); - fh = true; + paramsPanel.removeAll(); + paramsPanel.setLayout(new MigLayout("", "", "")); + int hgap = 5; + int currentWidth = hgap; + + JPanel lastAdded = null; for (ParamBox pbox : opanp.getParamSet().values()) { pbox.validate(); - cw += pbox.getSize().width + hgap; - if (cw + 160 > panewidth) + int boxWidth = pbox.getSize().width; + currentWidth += boxWidth + hgap; + boolean wrapAfterLast = currentWidth > availableWidth + && lastAdded != null; + if (wrapAfterLast) { - paramList.add(pbox, "wrap"); - cw = pbox.getSize().width + hgap; - fh = true; + paramsPanel.remove(lastAdded); + paramsPanel.add(lastAdded, "wrap"); + currentWidth = pbox.getSize().width + hgap; } - else - { - paramList.add(pbox); - } - if (fh) - { - finalh += pbox.getSize().height + fl.getVgap(); - fh = false; - } - + paramsPanel.add(pbox); + lastAdded = pbox; } + /* * s = 2 * sep; for (ParamBox pbox : opanp.getParamSet().values()) { * pbox.validate(); s += sep + @@ -938,11 +893,11 @@ public class WsJobParameters extends JPanel implements ItemListener, * .getBorder().getBorderInsets(paramList).bottom+paramList * .getBorder().getBorderInsets(paramList).top; */ - paramList.revalidate(); + paramsPanel.revalidate(); } else { - paramList.setVisible(false); + paramsPanel.setVisible(false); } // TODO: waste some time trying to eliminate any unnecessary .validate calls // here @@ -953,244 +908,6 @@ public class WsJobParameters extends JPanel implements ItemListener, paramPane.revalidate(); revalidate(); } - - /** - * testing method - grab a service and parameter set and show the window - * - * @param args - * @j2sIgnore - */ - public static void main(String[] args) - { - jalview.ws.jws2.Jws2Discoverer disc = jalview.ws.jws2.Jws2Discoverer - .getInstance(); - int p = 0; - if (args.length > 0) - { - Vector services = new Vector<>(); - services.addElement(args[p++]); - Jws2Discoverer.getInstance().setServiceUrls(services); - } - try - { - disc.run(); - } catch (Exception e) - { - System.err.println("Aborting. Problem discovering services."); - e.printStackTrace(); - return; - } - Jws2Instance lastserv = null; - for (Jws2Instance service : disc.getServices()) - { - lastserv = service; - if (p >= args.length || service.serviceType.equalsIgnoreCase(args[p])) - { - if (lastserv != null) - { - List prl = null; - Preset pr = null; - if (++p < args.length) - { - PresetManager prman = lastserv.getPresets(); - if (prman != null) - { - pr = prman.getPresetByName(args[p]); - if (pr == null) - { - // just grab the last preset. - prl = prman.getPresets(); - } - } - } - else - { - PresetManager prman = lastserv.getPresets(); - if (prman != null) - { - prl = prman.getPresets(); - } - } - Iterator en = (prl == null) ? null : prl.iterator(); - while (en != null && en.hasNext()) - { - if (en != null) - { - if (!en.hasNext()) - { - en = prl.iterator(); - } - pr = en.next(); - } - { - System.out.println("Testing opts dupes for " - + lastserv.getUri() + " : " + lastserv.getActionText() - + ":" + pr.getName()); - List