Merge branch 'bug/JAL-1819_isNaN' into develop
authorJim Procter <jprocter@issues.jalview.org>
Thu, 23 Jul 2015 10:30:56 +0000 (11:30 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 23 Jul 2015 10:30:56 +0000 (11:30 +0100)
24 files changed:
TESTNG [new file with mode: 0644]
examples/uniref50_test_annot [new file with mode: 0644]
examples/uniref50_test_features [new file with mode: 0644]
examples/uniref50_test_tree [new file with mode: 0644]
help/html/calculations/columnFilterByAnnotation.html
help/html/features/bioJsonFormat.html [new file with mode: 0644]
help/html/features/clarguments.html
help/html/features/pdbsequencefetcher.html
help/html/features/seqfetch.html
help/html/features/structurechooser.html
help/html/io/fileformats.html
help/html/menus/alignmentMenu.html
resources/lang/Messages.properties
src/jalview/bin/Jalview.java
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentI.java
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/PopupMenu.java
src/jalview/io/AppletFormatAdapter.java
src/jalview/io/FileLoader.java
src/jalview/io/IdentifyFile.java
src/jalview/renderer/AnnotationRenderer.java
test/jalview/bin/CommandLineOperations.java
test/jalview/commands/EditCommandTest.java

diff --git a/TESTNG b/TESTNG
new file mode 100644 (file)
index 0000000..f18885f
--- /dev/null
+++ b/TESTNG
@@ -0,0 +1,2 @@
+# Summary of TestNG for this branch
+"Functional" Tests: 242 ran, 121 failed.
diff --git a/examples/uniref50_test_annot b/examples/uniref50_test_annot
new file mode 100644 (file)
index 0000000..fd60c65
--- /dev/null
@@ -0,0 +1,11 @@
+JALVIEW_ANNOTATION
+# Created: Wed Jul 08 18:48:01 BST 2015
+
+NO_GRAPH       Test Annotation Test Annotation ||||H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|||||||||||E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|E,β|||||||||||||||||||||||||||||||||||||||||||||||||E,β|E,β|E,β|E,β|E,β|||||||||||||||H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|H,α|||||||||||||||||E,β|E,β||||
+BAR_GRAPH      Conservation    Conservation of total alignment less than 25% gaps      1.0,1,hydrophobic ,[5d1500]|3.0,3,small hydrophobic tiny ,[7d3f00]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|1.0,1,hydrophobic ,[5d1500]|2.0,2,small tiny ,[6d2a00]|0.0,0,[4d0000]|1.0,1,small ,[5d1500]|0.0,0,[4d0000]|1.0,1,hydrophobic ,[5d1500]|0.0,0,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,0,[4d0000]|1.0,1,small ,[5d1500]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|2.0,2,small tiny ,[6d2a00]|1.0,1,hydrophobic ,[5d1500]|1.0,1,hydrophobic ,[5d1500]|1.0,1,hydrophobic ,[5d1500]|0.0,0,[4d0000]|0.0,0,[4d0000]|1.0,1,small ,[5d1500]|0.0,-,[4d0000]|2.0,2,small tiny ,[6d2a00]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|1.0,1,small ,[5d1500]|0.0,0,[4d0000]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|7.0,7,small  !aromatic !negative !charged !positive !aliphatic !proline,[be9200]|11.0,*,hydrophobic aromatic polar  !tiny !negative !charged !small !positive !aliphatic !proline,[ffe600]|6.0,6,polar  !tiny !aromatic !negative !aliphatic !proline,[ae7d00]|11.0,*,aliphatic small hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[ffe600]|6.0,6,polar  !tiny !aromatic !negative !aliphatic !proline,[ae7d00]|8.0,8,hydrophobic  !tiny !polar !negative !charged !small !positive !proline,[cea700]|9.0,9,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[dfbc00]|11.0,*,small polar  !tiny !aromatic !hydrophobic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,proline small  !tiny !polar !aromatic !hydrophobic !negative !charged !positive !aliphatic,[ffe600]|7.0,7,polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[be9200]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|3.0,3, !tiny !aromatic !aliphatic,[7d3f00]|6.0,6, !tiny !aromatic !negative !charged !positive !proline,[ae7d00]|11.0,*,charged negative polar  !tiny !aromatic !hydrophobic !small !positive !aliphatic !proline,[ffe600]|7.0,7,hydrophobic  !tiny !polar !negative !charged !positive !proline,[be9200]|7.0,7,polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[be9200]|9.0,9,small hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[dfbc00]|5.0,5, !tiny !aromatic !hydrophobic !positive !aliphatic,[9e6800]|6.0,6,polar  !aromatic !hydrophobic !positive !aliphatic !proline,[ae7d00]|8.0,8,small polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[cea700]|11.0,*,aliphatic small hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[ffe600]|11.0,*,hydrophobic aromatic polar  !tiny !negative !charged !small !positive !aliphatic !proline,[ffe600]|9.0,9,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[dfbc00]|11.0,*,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !small !positive !proline,[ffe600]|11.0,*,small charged negative polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[ffe600]|3.0,3, !negative !aliphatic !proline,[7d3f00]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,charged negative polar  !tiny !aromatic !hydrophobic !small !positive !aliphatic !proline,[ffe600]|11.0,*,charged negative polar  !tiny !aromatic !hydrophobic !small !positive !aliphatic !proline,[ffe600]|3.0,3, !aromatic !positive !proline,[7d3f00]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|5.0,5,hydrophobic  !tiny !negative !small !proline,[9e6800]|9.0,9,charged negative polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[dfbc00]|11.0,*,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !small !positive !proline,[ffe600]|11.0,*,proline small  !tiny !polar !aromatic !hydrophobic !negative !charged !positive !aliphatic,[ffe600]|9.0,9,hydrophobic aromatic  !tiny !negative !charged !small !positive !aliphatic !proline,[dfbc00]|11.0,*,small polar tiny  !aromatic !hydrophobic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic  !tiny !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,positive charged polar  !tiny !aromatic !hydrophobic !negative !small !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small polar tiny  !aromatic !hydrophobic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic  !tiny !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small polar tiny  !aromatic !hydrophobic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small polar tiny  !aromatic !hydrophobic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic  !tiny !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|11.0,*,positive charged hydrophobic polar  !tiny !aromatic !negative !small !aliphatic !proline,[ffe600]|9.0,9,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[dfbc00]|3.0,3, !aromatic !negative !proline,[7d3f00]|7.0,7,small  !aromatic !negative !charged !positive !aliphatic !proline,[be9200]|11.0,*,small hydrophobic tiny  !polar !aromatic !negative !charged !positive !aliphatic !proline,[ffe600]|3.0,3, !positive !aliphatic !proline,[7d3f00]|9.0,9,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !positive !proline,[dfbc00]|8.0,8,small polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[cea700]|11.0,*,polar  !tiny !aromatic !hydrophobic !negative !charged !small !positive !aliphatic !proline,[ffe600]|6.0,6,polar  !aromatic !hydrophobic !positive !aliphatic !proline,[ae7d00]|11.0,*,small charged negative polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[ffe600]|4.0,4, !aromatic !positive !aliphatic !proline,[8d5300]|5.0,5,polar  !aromatic !negative !aliphatic !proline,[9e6800]|9.0,9,hydrophobic aromatic  !tiny !negative !charged !small !positive !aliphatic !proline,[dfbc00]|11.0,*,aliphatic hydrophobic  !tiny !polar !aromatic !negative !charged !small !positive !proline,[ffe600]|8.0,8,small polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[cea700]|9.0,9,charged negative polar  !tiny !aromatic !hydrophobic !positive !aliphatic !proline,[dfbc00]|0.0,0,[4d0000]|1.0,1,polar ,[5d1500]|0.0,0,[4d0000]|0.0,0,[4d0000]|0.0,0,[4d0000]|3.0,3,small hydrophobic tiny ,[7d3f00]|2.0,2,hydrophobic aromatic ,[6d2a00]|3.0,3,aliphatic small hydrophobic ,[7d3f00]|2.0,2,aliphatic hydrophobic ,[6d2a00]|2.0,2,small polar ,[6d2a00]|2.0,2,small hydrophobic ,[6d2a00]|1.0,1,hydrophobic ,[5d1500]|3.0,3,small hydrophobic tiny ,[7d3f00]|2.0,2,hydrophobic aromatic ,[6d2a00]|2.0,2,proline small ,[6d2a00]|0.0,0,[4d0000]|1.0,1,small ,[5d1500]|4.0,4,small charged negative polar ,[8d5300]|3.0,3,aliphatic small hydrophobic ,[7d3f00]|1.0,1,small ,[5d1500]|2.0,2,aliphatic hydrophobic ,[6d2a00]|3.0,3,charged negative polar ,[7d3f00]|2.0,2,small polar ,[6d2a00]|5.0,5,positive charged hydrophobic aromatic polar ,[9e6800]|3.0,3,positive charged polar ,[7d3f00]|3.0,3,charged negative polar ,[7d3f00]|0.0,0,[4d0000]|0.0,0,[4d0000]|1.0,1,hydrophobic ,[5d1500]|0.0,0,[4d0000]|0.0,-,[4d0000]|0.0,-,[4d0000]|
+BAR_GRAPH      Quality Alignment Quality based on Blosum62 scores      29.151815,29.151815,[cba200]|30.574812,30.574812,[d1aa00]|14.400199,14.400199,[8b5000]|16.93248,16.93248,[965e00]|2.1220763,2.1220763,[560c00]|2.2049963,2.2049963,[560c00]|3.647952,3.647952,[5c1400]|4.814642,4.814642,[611b00]|18.351393,18.351393,[9c6600]|17.532412,17.532412,[996200]|7.5054855,7.5054855,[6d2a00]|15.490477,15.490477,[905600]|14.241707,14.241707,[8a4f00]|9.905579,9.905579,[773700]|20.354017,20.354017,[a57100]|26.870352,26.870352,[c19600]|24.969187,24.969187,[b98b00]|27.419409,27.419409,[c39900]|15.350427,15.350427,[8f5600]|21.116522,21.116522,[a87600]|9.34032,9.34032,[753400]|14.1895275,14.1895275,[8a4f00]|10.104505,10.104505,[783800]|8.587312,8.587312,[723000]|18.694708,18.694708,[9e6800]|11.420612,11.420612,[7e4000]|6.8467255,6.8467255,[6a2600]|17.449827,17.449827,[986100]|16.825909,16.825909,[955e00]|2.4334474,2.4334474,[570e00]|15.685622,15.685622,[915700]|9.836516,9.836516,[773700]|3.4712791,3.4712791,[5c1300]|4.531816,4.531816,[601900]|7.8744216,7.8744216,[6f2c00]|0.0,0.0,[4d0000]|9.01113,9.01113,[743200]|3.174218,3.174218,[5a1200]|2.0395048,2.0395048,[550b00]|2.1654668,2.1654668,[560c00]|21.517344,21.517344,[aa7800]|15.738462,15.738462,[915800]|14.844854,14.844854,[8d5300]|22.159096,22.159096,[ad7c00]|13.956608,13.956608,[894e00]|20.147892,20.147892,[a47000]|25.067545,25.067545,[b98c00]|2.0943506,2.0943506,[560c00]|20.30842,20.30842,[a57100]|10.254437,10.254437,[793900]|6.5836596,6.5836596,[692500]|19.446732,19.446732,[a16c00]|6.2202287,6.2202287,[672300]|9.796006,9.796006,[773700]|6.0385494,6.0385494,[672200]|13.963727,13.963727,[894e00]|13.838549,13.838549,[884d00]|18.48424,18.48424,[9d6700]|18.302633,18.302633,[9c6600]|41.172745,41.172745,[ffe600]|32.59908,32.59908,[dab600]|41.172745,41.172745,[ffe600]|34.495945,34.495945,[e2c000]|41.172745,41.172745,[ffe600]|33.501804,33.501804,[debb00]|27.034466,27.034466,[c29700]|40.020737,40.020737,[fadf00]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|29.252739,29.252739,[cba300]|41.172745,41.172745,[ffe600]|14.935498,14.935498,[8d5300]|0.88449144,0.88449144,[500500]|41.172745,41.172745,[ffe600]|20.81991,20.81991,[a77400]|31.73346,31.73346,[d6b100]|29.757969,29.757969,[cea600]|16.279755,16.279755,[935b00]|32.647984,32.647984,[dab600]|38.352337,38.352337,[f3d600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|39.6125,39.6125,[f8dd00]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|9.671661,9.671661,[763600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|11.17141,11.17141,[7d3e00]|41.172745,41.172745,[ffe600]|3.2054348,3.2054348,[5a1200]|38.569283,38.569283,[f4d700]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|39.707684,39.707684,[f9dd00]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|41.172745,41.172745,[ffe600]|39.447525,39.447525,[f8dc00]|21.229778,21.229778,[a97600]|27.779364,27.779364,[c59b00]|41.172745,41.172745,[ffe600]|24.149143,24.149143,[b58700]|39.447525,39.447525,[f8dc00]|33.857655,33.857655,[dfbd00]|41.172745,41.172745,[ffe600]|28.69976,28.69976,[c9a000]|41.172745,41.172745,[ffe600]|14.611241,14.611241,[8c5100]|32.346375,32.346375,[d9b400]|39.24055,39.24055,[f7db00]|41.172745,41.172745,[ffe600]|38.352337,38.352337,[f3d600]|38.569283,38.569283,[f4d700]|22.374107,22.374107,[ae7d00]|36.98438,36.98438,[edce00]|12.34415,12.34415,[824500]|11.811655,11.811655,[804200]|14.798897,14.798897,[8d5200]|36.60138,36.60138,[ebcc00]|14.0762415,14.0762415,[8a4e00]|36.817875,36.817875,[eccd00]|36.53897,36.53897,[ebcc00]|37.583706,37.583706,[efd100]|35.536423,35.536423,[e7c600]|18.004925,18.004925,[9b6400]|37.633095,37.633095,[f0d200]|34.738743,34.738743,[e3c200]|36.451622,36.451622,[ebcb00]|19.948801,19.948801,[a36f00]|28.285,28.285,[c79e00]|35.93151,35.93151,[e8c800]|36.817875,36.817875,[eccd00]|26.762383,26.762383,[c19500]|36.37101,36.37101,[eacb00]|36.413998,36.413998,[eacb00]|37.583706,37.583706,[efd100]|36.282784,36.282784,[eaca00]|34.729824,34.729824,[e3c200]|36.413998,36.413998,[eacb00]|24.348654,24.348654,[b68800]|24.349539,24.349539,[b68800]|34.091675,34.091675,[e0be00]|21.114677,21.114677,[a87600]|13.676696,13.676696,[884c00]|2.1107035,2.1107035,[560c00]|
+BAR_GRAPH      Consensus       PID     80.0,M,M 80%|80.0,A,A 80%|20.0,+,[AST] 20%|53.333332,T,T 53%|6.6666665,L,L 6%|6.6666665,G,G 6%|13.333333,T,T 13%|20.0,P,P 20%|40.0,A,A 40%|40.0,L,L 40%|46.666668,S,S 46%|40.0,G,G 40%|33.333332,T,T 33%|20.0,+,[AIM] 20%|33.333332,V,V 33%|66.666664,S,S 66%|66.666664,T,T 66%|66.666664,S,S 66%|66.666664,F,F 66%|46.666668,L,L 46%|46.666668,R,R 46%|46.666668,R,R 46%|26.666666,Q,Q 26%|46.666668,P,P 46%|40.0,A,A 40%|60.0,P,P 60%|26.666666,T,T 26%|53.333332,S,S 53%|40.0,L,L 40%|20.0,R,R 20%|26.666666,S,S 26%|33.333332,L,L 33%|40.0,P,P 40%|26.666666,S,S 26%|33.333332,+,[AN] 33%|26.666666,V,V 26%|33.333332,G,G 33%|20.0,+,[EQ] 20%|6.6666665,F,F 6%|6.6666665,P,P 6%|33.333332,+,[AS] 33%|53.333332,L,L 53%|60.0,F,F 60%|73.333336,G,G 73%|66.666664,L,L 66%|66.666664,K,K 66%|53.333332,S,S 53%|6.6666665,V,V 6%|40.0,S,S 40%|26.666666,T,T 26%|20.0,A,A 20%|66.666664,R,R 66%|40.0,G,G 40%|53.333332,G,G 53%|46.666668,R,R 46%|33.333332,V,V 33%|46.666668,T,T 46%|53.333332,A,A 53%|66.666664,M,M 66%|100.0,A,A 100%|53.333332,T,T 53%|100.0,Y,Y 100%|86.666664,K,K 86%|100.0,V,V 100%|86.666664,K,K 86%|66.666664,L,L 66%|80.0,I,I 80%|100.0,T,T 100%|100.0,P,P 100%|66.666664,E,E 66%|100.0,G,G 100%|46.666668,E,E 46%|46.666668,Q,Q 46%|100.0,E,E 100%|46.666668,F,F 46%|60.0,E,E 60%|86.666664,C,C 86%|66.666664,P,P 66%|80.0,D,D 80%|93.333336,D,D 93%|100.0,V,V 100%|100.0,Y,Y 100%|66.666664,I,I 66%|100.0,L,L 100%|100.0,D,D 100%|46.666668,A,A 46%|100.0,A,A 100%|100.0,E,E 100%|100.0,E,E 100%|53.333332,A,A 53%|100.0,G,G 100%|60.0,I,I 60%|93.333336,D,D 93%|100.0,L,L 100%|100.0,P,P 100%|93.333336,Y,Y 93%|100.0,S,S 100%|100.0,C,C 100%|100.0,R,R 100%|100.0,A,A 100%|100.0,G,G 100%|100.0,S,S 100%|100.0,C,C 100%|100.0,S,S 100%|100.0,S,S 100%|100.0,C,C 100%|100.0,A,A 100%|100.0,G,G 100%|100.0,K,K 100%|80.0,V,V 80%|60.0,V,V 60%|53.333332,S,S 53%|100.0,G,G 100%|60.0,S,S 60%|80.0,V,V 80%|80.0,D,D 80%|100.0,Q,Q 100%|66.666664,S,S 66%|100.0,D,D 100%|46.666668,+,[GQ] 46%|73.333336,S,S 73%|93.333336,F,F 93%|100.0,L,L 100%|93.333336,D,D 93%|93.333336,D,D 93%|53.333332,D,D 53%|93.333336,Q,Q 93%|53.333332,I,I 53%|40.0,A,A 40%|53.333332,E,E 53%|93.333336,G,G 93%|46.666668,W,W 46%|93.333336,V,V 93%|93.333336,L,L 93%|93.333336,T,T 93%|93.333336,C,C 93%|53.333332,V,V 53%|93.333336,A,A 93%|86.666664,Y,Y 86%|93.333336,P,P 93%|60.0,T,T 60%|73.333336,S,S 73%|93.333336,D,D 93%|93.333336,V,V 93%|66.666664,T,T 66%|93.333336,I,I 93%|93.333336,E,E 93%|93.333336,T,T 93%|93.333336,H,H 93%|86.666664,K,K 86%|93.333336,E,E 93%|73.333336,E,E 73%|60.0,E,E 60%|73.333336,L,L 73%|46.666668,T,T 46%|40.0,A,A 40%|6.6666665,A,A 6%|
+
+SEQUENCE_GROUP JGroup:666531415        14      37      -1      FER_CAPAN       FER1_SOLLC      Q93XJ9_SOLTU    FER1_PEA        Q7XA98_TRIPR    
+PROPERTIES     JGroup:666531415        colour=Zappo    outlineColour=000000    displayBoxes=true       displayText=true        colourText=false        showUnconserved=false   
+
diff --git a/examples/uniref50_test_features b/examples/uniref50_test_features
new file mode 100644 (file)
index 0000000..60f995f
--- /dev/null
@@ -0,0 +1,5 @@
+FER1_SOLLC     Jalview test_feature    34      47      0.0     .       .
+Q93XJ9_SOLTU   Jalview test_feature    34      47      0.0     .       .
+FER1_PEA       Jalview test_feature    37      52      0.0     .       .
+Q7XA98_TRIPR   Jalview test_feature    39      55      0.0     .       .
+FER1_MESCR     Jalview test_feature    37      51      0.0     .       .
diff --git a/examples/uniref50_test_tree b/examples/uniref50_test_tree
new file mode 100644 (file)
index 0000000..585b68b
--- /dev/null
@@ -0,0 +1 @@
+(((FER_BRANA:112.15387,FER3_RAPSA:110.84613):46.4375,FER_CAPAA:144.0625):177.2998,(O80429_MAIZE:184.40039,(FER1_MAIZE:195.79102,(((FER1_SPIOL:111.687515,FER1_MESCR:84.312485):51.929688,((Q93Z60_ARATH:398.14285,(FER2_ARATH:53.65625,FER1_ARATH:48.34375):0.0):86.725006,(Q7XA98_TRIPR:78.65277,FER1_PEA:68.34723):63.774994):7.7578125):0.58332825,((Q93XJ9_SOLTU:23.647736,FER1_SOLLC:20.352264):31.71875,FER_CAPAN:52.28125):101.7448):41.498047):37.208984):177.2998);
index c5f42df..1ece1cc 100644 (file)
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  -->
 <head>
-<title>Filter Columns by Annotation</title>
+<title>Select/Hide Columns by Annotation</title>
 </head>
 
 <body>
        <p>
-               <strong> Filter Columns by Annotation </strong>
+               <strong> Select/Hide Columns by Annotation </strong>
        </p>
-       <p>Jalview allows the columns of an alignment to be filtered using
-               any annotation rows added to that alignment.</p>
-       From &quot;Select&quot; menu
-       <strong>&#8594;</strong> &quot;Select by Annotation...&quot; to bring
-       up the Select by Annotation window. The filter options vary depending
+       <p>From Jalview 2.9 columns of an alignment can be filtered using
+               any annotation row added to that alignment.</p>
+       To carry out this operation, navigate to &quot;<b>Select</b><strong><b>&#8594;</b></strong><b>Select/Hide Columns by Annotation...</b>&quot; to bring
+       up the 'Select/Hide by Annotation' window. The filter options vary depending
        on the type of annotation selected. If an annotation that has a numeric
        values is selected, the threshold filter option is activated as seen in the
-       figure on the right below.
+       figure on the right below, otherwise the dialog will exclude the threshold filter option as seen in the figure on the left.
        <br>
-       <br> 
+       <br>
+       <table>
+               <tr>
+                       <td><img src="annotationColumnSelectionWithoutSM.gif"></td>
+                       <td><img src="annotationColumnSelectionWithSM.gif"></td>
+               </tr>
+       </table>
 
-       <div style="width: 48%; float: left; margin-left: 4%">
-               <img src="annotationColumnSelectionWithoutSM.gif">
-       </div>
-       <div style="width: 48%; float: right">
-               <img src="annotationColumnSelectionWithSM.gif">
-       </div>
-       <div>&nbsp</div>
 
        <ul>
-               <li>Select which annotation to base the filtering on using the
-                       top-most selection box.</li>
+               <li>The target annotation row can be selected using the drop-down option menu in the top-most part of the window.</li>
 
                <li><strong>Search Filter</strong>
                        <ul>
-                               <li>When a text is entered in the textfield on the search
-                                       filter section, the &quot;Display Label&quot; and &quot;Description&quot;
-                                       checkboxes becomes selectable.</li>
-                               <li>On selecting any of the checkboxes, a regular expresion
+                               <li>When a text is entered in the text box within the Search
+                                       Filter section, the 'Display Label' and 'Description'
+                                       options becomes enabled for selection. </li>
+                               <li>On selecting any of the options, a regular expression
                                        search (RegEx) is executed on the specified field of the current
                                        annotation row selected, and the matching columns will be highlighted
                                        in the alignment.</li>
@@ -63,7 +60,7 @@
                <li><strong>Structure Filter</strong>
                        <ul>
                                <li>Alignment columns can also be filtered by the type of
-                                       secondary structure present in a choosen annotation row.</li>
+                                       secondary structure present in a target annotation row.</li>
                                <li>This can be achieved by ticking the type of structure you
                                        wish to filter by under the structures filter section.</li>
                        </ul>
@@ -71,7 +68,7 @@
                        <ul>
                                <li>This filter is only activated for annotation which contain
                                        numeric values</li>
-                               <li>Select whether to Filter the alignment above or below an
+                               <li>Select whether to filter the alignment above or below an
                                        adjustable threshold with the selection box within the threshold
                                        filter section.</li>
                                <li>Change the threshold value with the slider, or enter the
                        </ul>
                <li><strong>Actions</strong>
                        <ul>
-                               <li>The &quot;Select&quot; and &quot;Hide&quot; radio buttons
+                               <li>The 'Select' and 'Hide' radio buttons
                                        determines the action that will be carried out on the matching
                                        columns in the alignment during the filtering process.</li>
-                               <li>The default option is &quot;Select&quot; and this simply
+                               <li>The default option is 'Select' and this simply
                                        enables column selection on the matching alignment column.</li>
-                               <li>While the &quot;Hide&quot; option enables the matching columns to
+                               <li>While the 'Hide' option enables the matching columns to
                                        be hidden automatically during the filtering process.</li>
-                               <li>The &quot;Ok&quot; button applies the filter when clicked.</li>
-                               <li>And finally, The &quot;Cancel&quot; button restores the alignment to its previous state before the filtering when clicked. 
+                               <li>The 'Ok' button applies the filter when clicked.</li>
+                               <li>And finally, the 'Cancel' button restores the alignment to its previous state before any filtering was applied. 
                        </ul></li>
        </ul>
 
diff --git a/help/html/features/bioJsonFormat.html b/help/html/features/bioJsonFormat.html
new file mode 100644 (file)
index 0000000..a91955b
--- /dev/null
@@ -0,0 +1,52 @@
+<html>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * 
+ * This file is part of Jalview.
+ * 
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *  
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * PURPOSE.  See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ -->
+<head>
+<title>BioJSON-1.0</title>
+</head>
+<body>
+       <h1>BioJSON</h1>
+       BioJSON is a standardise JavaScript Object Notation (JSON) format for exchange of Bio-informatics Sequence Alignment data.      
+       BioJSON-1.0 schema/documentation is available at <a href="#">http://www.jalview.org/builds/develop/examples/biojson-doc/</a>.
+       You can keep up to date with BioJSON development and latest news at <a href="#">https://github.com/jalview/biojson/wiki</a>.
+       
+       <h2>Features supported</h2>
+       Export/Import of the following alignment elements are supported in BioJSON-1.0:
+       <ul>
+               <li>Alignment Annotations</li>
+               <li>Alignment Features</li>
+               <li>Alignment Sequences</li>
+               <li>Color Scheme</li>
+               <li>Hidden Columns</li>
+               <li>Hidden Sequences</li>
+               <li>Sequence Groups</li>
+       </ul>
+
+       <h2>Features not yet supported</h2>
+       Export/Import of the following alignment elements are not supported in BioJSON-1.0:
+       <ul>
+               <li>Reference sequence</li>
+               <li>Representative sequence</li>
+               <li>Trees</li>
+               <li>3D Structures</li>
+       </ul>
+</body>
+</html>
index 8a72d4d..16b0dc0 100644 (file)
  <td><div align="center">-blc FILE</div></td>
  <td><div align="left">Create alignment file FILE in BLC format.</div></td>
  </tr>
+  <tr> 
+ <td><div align="center">-json FILE</div></td>
+ <td><div align="left">Create alignment file FILE in JSON format.</div></td>
+ </tr>
  <tr> 
  <td><div align="center">-jalview FILE</div></td>
 
index 15dc2c6..ce7d96e 100644 (file)
 <body>
 
        <strong>PDB Sequence Fetcher</strong>
-       <p>From Jalview 2.x.x a speciliased interface was introduced for
+       <p>From Jalview 2.9, a specialised interface was introduced for
                fast and efficient discovery/retrieval of sequence data from the PDB
                database. The introduced interface enables live querying of PDB data
                on-the-fly thereby eliminating the need to memorise database accession
-               or to cross-reference other bioinformatics websites before retrieving
-               a sequence data in jalview. The underlying technology is provided by
+               or to manually cross-reference other bioinformatics websites before retrieving
+               sequence data in Jalview. The underlying infrastructure is provided by
                EBI and is based on Apache Solr which is a text based search engine.</p>
        <p>
-               The PDB Sequence Fetcher interface can be opened by selecting <strong>PDB</strong>
-               as the choice database from the <strong>'Select Database
-                       Retrieval Source'</strong> interface of <a href="seqfetch.html">Sequence
-                       Fetcher</a>.
+               The PDB Sequence Fetcher interface can be accessed from <b>&quot;File &#8594;Fetch  Sequence(s) &#8594;Select Database &#8594;PDB&quot;</b> click the ok button after selecting PDB from the  'Select Database
+                       Retrieval Source' interface.
        </p>
        <p>
                <img src="pdbseqfetcher.png" align="left"
-                       alt="PDB sequence fetcher (introduced in Jalview 2.x.x)">
+                       alt="PDB sequence fetcher (introduced in Jalview 2.9)">
        </p>
 
-       <strong>Searching the PDB Database</strong>
-       <br> Once the interface is opened, typing in the search text box
-       will execute a live query to the PDB database and display the results
-       on-the-fly as seen in the screen-shot above. Use the drop-down menu to
-       select a specific field to search by in the PDB database, the default
-       option is
-       <strong>'ALL'</strong>. Furthermore, the PDB search interface also
-       provides the following functionalities:
+       <p><strong>Searching the PDB Database</strong></p>
+       <p>When the interface is opened, a live query to the PDB database is 
+       executed every time a character is typed into the search text box, and 
+       a result is displayed on-the-fly as seen in the screenshot above.</p>
+       
+       <p>Use the drop-down menu to select a specific field to search by in the PDB database, the default
+       option is 'ALL'.</p>
+       
+       <p> Furthermore, the PDB search interface also provides the following functionalities:</p>
        <ul>
                <li>Retrieving a unique chain for a PDB entry: <br>To
                        retrieve a specific chain for a PDB entry, append the PDB ID with a
        </ul>
        <p>
                <strong>Customising displayed meta-data</strong> <br>To change
-               the displayed meta-data in the search result, click the <strong>'Configure
-                       Displayed Columns'</strong> tab, then tick off the options wanted.
+               the displayed meta-data in the search result, click the 'Configure
+                       Displayed Columns' tab, then tick off the options wanted.
        </p>
        <p>
                <strong>Importing Sequence</strong><br> After querying the PDB
                database, to import the found data into Jalview, select the entries
-               you wish to import then click the ok button at the bottom of the
+               you wish to import then click the 'Ok' button at the bottom of the
                interface.
        </p>
        <p>
                <em>The PDB Sequence Fetcher interface was introduced in Jalview
-                       2.x.x.</em>
+                       2.9</em>
        </p>
 </body>
 </html>
\ No newline at end of file
index 68c5520..2516f3f 100755 (executable)
@@ -49,7 +49,7 @@ WSDBFetch service provided by the European Bioinformatics Institute, or, since J
   one or more accession ids (as a semi-colon separated list), or press the 
   &quot;Example&quot; button to paste the example accession for the currently selected database into the retrieval box.
    Finally, press &quot;OK&quot; to initiate the retrieval.</p>
-   <p>Since Jalview 2.x.x if  PDB is selected as the sequence database, a specialised interface - <a href="pdbsequencefetcher.html">PDB Sequence Fetcher</a>  is used for discovering and retrieving the sequenec data. </p>
+   <p>Since Jalview 2.9 if  PDB is selected as the sequence database, a specialised interface - <a href="pdbsequencefetcher.html">PDB Sequence Fetcher</a>  is used for discovering and retrieving the sequenec data. </p>
        <p><strong>Specifying chains for PDB IDs</strong>
   If you are retrieving sequences from the PDB, you can retrieve
   specific chains by appending a colon and the chain id to the PDB
index 7dd69c1..1bf9f32 100644 (file)
 
 
        <strong>Associating PDB files with Sequences</strong><br>
-       Discovery/Association of PDB entries to a sequence happens
+       Discovery/Association of PDB entries to a sequence now happens
        automatically during the initialisation of the Structure Chooser
-       Interface. Jalview uses the sequence's ID to query the PDB Rest API,
+       Interface. Jalview uses the sequence's ID to query the PDB Rest API
        provided by the EBI to discover PDB Ids associated with the sequence.
 
 <br><br>
        <strong>Configuring displayed  meta-data for  Structures</strong><br>
-       To configure the visible meta-data displayed for the discovered structures, click the <strong>'Configure Displayed Columns'</strong> tab, then tick the options which you intend to make visible.
+       To configure the visible meta-data displayed for the discovered structures, click the 'Configure Displayed Columns' tab, then tick the options which you intend to make visible.
 
 <br><br>
        <strong>Auto-selection of best Structures</strong>
        <br> Jalview can automatically filter and select the best structures using various metric categories avaialble from the meta-data
        of the structures. To perform this simply select any of the following options from the drop-down menu in the Structure
        Chooser interface: Best Uniprot coverage, Higest Resolution, 
-
-       Best Quality, Highest Protein Chain etc. When the <strong>'Invert'</strong> option is selected, Jalview returns an inverse result for the current selected option in the drop-down menu.<p>
+       Best Quality, Highest Protein Chain etc. When the 'Invert' option is selected, Jalview returns an inverse result for the current selected option in the drop-down menu.<p>
+       
                <img src="schooser_main.png" style="width: 464px; height: 369px;">
                <!-- <p><img src="schooser_config.png" style="width: 463px; height: 369px; ">
        <p><img src="schooser_drop-down.png" style="width: 464px; height: 368px; ">
        </ul>
 
        <p>
-               <em>The Structure Chooser interface was introduced in Jalview 2.x.x.
+               <em>The Structure Chooser interface was introduced in Jalview 2.9.
                </em>
        </p>
 </body>
index ae56945..b457adf 100755 (executable)
@@ -77,6 +77,11 @@ THISISASEQUENCE<br></td>
 <em>...</em><br>//</td>
 <td width="23%">.phy</td>
 </tr>
+<tr>
+<td width="17%">JSON</td>
+<td width="60%">Data starts with '{' <br>Data  ends with '}' <br><br>See <a href="../features/bioJsonFormat.html">BioJson</a> for more info about Jalview JSON format <br></td>
+<td width="23%">.json</td>
+</tr>
 </table>
 <p>The file extensions are used to associate jalview alignment icons
 with alignment files: <img src="file.png" width=12 height=12 >
index a2cb603..8b50d9e 100755 (executable)
@@ -72,6 +72,7 @@
                                                <li><strong>AMSA</strong></li>
                                                <li><strong>STH</strong></li>
                                                <li><strong>Phylip</strong></li>
+                                               <li><strong>JSON</strong></li>
                                        </ul></li>
                                <li><strong>Print (Control P)<br> </strong><em>Jalview
                                                will print the alignment using the current fonts and colours of
index b2bf58b..822d574 100644 (file)
@@ -677,7 +677,8 @@ label.text_colour = Text Colour
 label.structure = Structure
 label.view_structure = View Structure
 label.view_protein_structure = View Protein Structure
-label.view_rna_structure = View Nucleotide Structure
+label.show_pdbstruct_dialog = 3D Structure Data ...
+label.view_rna_structure = VARNA 2D Structure
 label.clustalx_colours = Clustalx colours
 label.above_identity_percentage = Above % Identity
 label.create_sequence_details_report_annotation_for = Annotation for {0}
@@ -771,7 +772,7 @@ label.transformed_points_for_params = Transformed points for {0}
 label.graduated_color_for_params = Graduated Feature Colour for {0}
 label.select_backgroud_colour = Select Background Colour
 label.invalid_font = Invalid Font
-label.separate_multiple_accession_ids = Enter one or more PDB Ids
+label.separate_multiple_accession_ids = Enter one or more accession IDs
 label.separate_multiple_query_values = Enter one or more {0}s separated by a semi-colon ";"
 label.search_all = Enter one or more search values separated by a semi-colon ";" (Note: This Searches the entire PDB database)
 label.replace_commas_semicolons = Replace commas with semi-colons
@@ -1245,3 +1246,7 @@ info.enter_search_text_to_enable = Enter Search Text to Enable
 info.search_in_annotation_label = Search in {0} Label
 info.search_in_annotation_description = Search in {0} Description
 info.change_threshold_mode_to_enable = Change Threshold Mode to Enable
+label.null_or_unidentifiable_data = Null or unidentifiable data content pasted!
+label.unidentifiable_data = Unidentifiable Data
+label.null_or_invalid_alignment = Null or invalid alignment data!
+label.unable_to_create_alignment = Unable to create alignment
index f6d0099..177d56f 100755 (executable)
@@ -109,7 +109,14 @@ public class Jalview
       System.setProperty("java.awt.headless", "true");
       headless = true;
     }
-    Cache.loadProperties(aparser.getValue("props")); // must do this before
+    String usrPropsFile = aparser.getValue("props");
+    Cache.loadProperties(usrPropsFile); // must do this before
+    if (usrPropsFile != null)
+    {
+      System.out.println("CMD [-props " + usrPropsFile
+              + "] executed successfully!");
+    }
+
     // anything else!
 
     final String jabawsUrl = aparser.getValue("jabaws");
@@ -118,6 +125,8 @@ public class Jalview
       try
       {
         Jws2Discoverer.getDiscoverer().setPreferredUrl(jabawsUrl);
+        System.out.println("CMD [-jabaws " + jabawsUrl
+                + "] executed successfully!");
       } catch (MalformedURLException e)
       {
         System.err.println("Invalid jabaws parameter: " + jabawsUrl
@@ -195,6 +204,11 @@ public class Jalview
       {
         startUsageStats(desktop);
       }
+      else
+      {
+        System.err.println("CMD [-nousagestats] executed successfully!");
+      }
+
       if (!aparser.contains("noquestionnaire"))
       {
         String url = aparser.getValue("questionnaire");
@@ -204,6 +218,8 @@ public class Jalview
           // questionnaire
           Cache.log.debug("Starting questionnaire url at " + url);
           desktop.checkForQuestionnaire(url);
+          System.out.println("CMD questionnaire[-" + url
+                  + "] executed successfully!");
         }
         else
         {
@@ -222,6 +238,11 @@ public class Jalview
           }
         }
       }
+      else
+      {
+        System.err
+.println("CMD [-noquestionnaire] executed successfully!");
+      }
       desktop.checkForNews();
     }
 
@@ -340,7 +361,7 @@ public class Jalview
         desktop.setProgressBar(MessageManager.getString("status.processing_commandline_args"),
                 progress = System.currentTimeMillis());
       }
-      System.out.println("Opening file: " + file);
+      System.out.println("CMD [-open " + file + "] executed successfully!");
 
       if (!file.startsWith("http://"))
       {
@@ -382,8 +403,11 @@ public class Jalview
             ucs.parseAppletParameter(data);
             cs = ucs;
           }
-
-          System.out.println("colour is " + data);
+          else
+          {
+            System.out.println("CMD [-color " + data
+                    + "] executed successfully!");
+          }
           af.changeColour(cs);
         }
 
@@ -393,34 +417,55 @@ public class Jalview
         {
           af.parseFeaturesFile(data,
                   jalview.io.AppletFormatAdapter.checkProtocol(data));
-          System.out.println("Added " + data);
+          // System.out.println("Added " + data);
+          System.out.println("CMD groups[-" + data
+                  + "]  executed successfully!");
         }
         data = aparser.getValue("features", true);
         if (data != null)
         {
           af.parseFeaturesFile(data,
                   jalview.io.AppletFormatAdapter.checkProtocol(data));
-          System.out.println("Added " + data);
+          // System.out.println("Added " + data);
+          System.out.println("CMD [-features " + data
+                  + "]  executed successfully!");
         }
 
         data = aparser.getValue("annotations", true);
         if (data != null)
         {
           af.loadJalviewDataFile(data, null, null, null);
-          System.out.println("Added " + data);
+          // System.out.println("Added " + data);
+          System.out.println("CMD [-annotations " + data
+                  + "] executed successfully!");
         }
         // set or clear the sortbytree flag.
         if (aparser.contains("sortbytree"))
         {
           af.getViewport().setSortByTree(true);
+          if (af.getViewport().getSortByTree())
+          {
+            System.out
+.println("CMD [-sortbytree] executed successfully!");
+          }
         }
         if (aparser.contains("no-annotation"))
         {
           af.getViewport().setShowAnnotation(false);
+          if (!af.getViewport().isShowAnnotation())
+          {
+            System.out
+.println("CMD no-annotation executed successfully!");
+          }
         }
         if (aparser.contains("nosortbytree"))
         {
           af.getViewport().setSortByTree(false);
+          if (!af.getViewport().getSortByTree())
+          {
+            System.out
+                    .println("CMD [-nosortbytree] executed successfully!");
+          }
         }
         data = aparser.getValue("tree", true);
         if (data != null)
@@ -428,13 +473,14 @@ public class Jalview
           jalview.io.NewickFile fin = null;
           try
           {
+            System.out.println("CMD [-tree " + data
+                    + "] executed successfully!");
             fin = new jalview.io.NewickFile(data,
                     jalview.io.AppletFormatAdapter.checkProtocol(data));
             if (fin != null)
             {
               af.getViewport().setCurrentTree(
                       af.ShowNewickTree(fin, data).getTree());
-              System.out.println("Added tree " + data);
             }
           } catch (IOException ex)
           {
@@ -475,6 +521,9 @@ public class Jalview
             System.out.println("Executing script " + groovyscript);
             executeGroovyScript(groovyscript, new Object[]
             { desktop, af });
+
+            System.out.println("CMD groovy[" + groovyscript
+                    + "] executed successfully!");
           }
           else
           {
@@ -644,6 +693,7 @@ public class Jalview
                     + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
                     + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
                     + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
+                    + "-json FILE\tCreate alignment file FILE in JSON format.\n"
                     + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
                     + "-png FILE\tCreate PNG image FILE from alignment.\n"
                     + "-svg FILE\tCreate SVG image FILE from alignment.\n"
@@ -930,6 +980,8 @@ public class Jalview
         }
         source.addElement(nickname);
       }
+      System.out.println("CMD [-dasserver " + data
+              + "] executed successfully!");
     } // loop until no more server entries are found.
     if (locsources != null && locsources.indexOf('|') > -1)
     {
index 81046f1..15df67b 100755 (executable)
  */
 package jalview.datamodel;
 
+import jalview.analysis.AlignmentUtils;
+import jalview.io.FastaFile;
+import jalview.util.MessageManager;
+
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashSet;
@@ -30,10 +34,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.Vector;
 
-import jalview.analysis.AlignmentUtils;
-import jalview.io.FastaFile;
-import jalview.util.MessageManager;
-
 /**
  * Data structure to hold and manipulate a multiple sequence alignment
  */
@@ -1734,4 +1734,19 @@ public class Alignment implements AlignmentI
     }
     return names;
   }
+
+  @Override
+  public boolean hasValidSequence()
+  {
+    boolean hasValidSeq = false;
+    for (SequenceI seq : getSequences())
+    {
+      if (seq.getSequenceAsString().matches("(-*[a-zA-Z]-*){1}[a-zA-Z-]*"))
+      {
+        hasValidSeq = true;
+        break;
+      }
+    }
+    return hasValidSeq;
+  }
 }
index 67e5743..8194bf0 100755 (executable)
@@ -517,4 +517,12 @@ public interface AlignmentI extends AnnotatedCollectionI
    * @return
    */
   Set<String> getSequenceNames();
+
+  /**
+   * Checks if the alignment has at least one sequence with one non-gaped
+   * residue
+   * 
+   * @return
+   */
+  public boolean hasValidSequence();
 }
index 979d1aa..e08bfcd 100644 (file)
@@ -24,6 +24,7 @@ import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.api.ComplexAlignFile;
 import jalview.api.FeaturesDisplayedI;
+import jalview.bin.Jalview;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.SequenceI;
@@ -202,6 +203,21 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
     }
 
     String format = new IdentifyFile().Identify(text, "Paste");
+    if (format == null || format.equalsIgnoreCase("EMPTY DATA FILE"))
+    {
+      System.err.println(MessageManager
+              .getString("label.null_or_unidentifiable_data"));
+      if (!Jalview.isHeadlessMode())
+      {
+        JOptionPane.showMessageDialog(null,
+ MessageManager
+                .getString("label.null_or_unidentifiable_data"),
+                MessageManager.getString("label.unidentifiable_data"),
+                JOptionPane.ERROR_MESSAGE);
+      }
+      return;
+    }
+
     // TODO: identify feature, annotation or tree file and parse appropriately.
     AlignmentI al = null;
 
@@ -224,7 +240,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
       }
     }
 
-    if (al != null)
+    if (al != null && al.hasValidSequence())
     {
       String title = MessageManager.formatMessage(
               "label.input_cut_paste_params", new String[]
@@ -276,6 +292,22 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
         }
       }
     }
+    else
+    {
+      System.err.println(MessageManager
+              .getString("label.null_or_invalid_alignment"));
+      if (!Jalview.isHeadlessMode())
+      {
+        JOptionPane
+                .showMessageDialog(
+                        null,
+                        MessageManager
+                                .getString("label.null_or_invalid_alignment"),
+                        MessageManager
+                                .getString("label.unable_to_create_alignment"),
+                        JOptionPane.ERROR_MESSAGE);
+      }
+    }
   }
 
 
index ad3d6af..5699d9e 100644 (file)
  */
 package jalview.gui;
 
-import java.awt.Color;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Vector;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JColorChooser;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPopupMenu;
-import javax.swing.JRadioButtonMenuItem;
-
 import jalview.analysis.AAFrequency;
 import jalview.analysis.AlignmentAnnotationUtils;
 import jalview.analysis.AlignmentUtils;
@@ -80,6 +59,27 @@ import jalview.util.GroupUrlLink.UrlStringTooLongException;
 import jalview.util.MessageManager;
 import jalview.util.UrlLink;
 
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JColorChooser;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPopupMenu;
+import javax.swing.JRadioButtonMenuItem;
+
 /**
  * DOCUMENT ME!
  * 
@@ -204,7 +204,7 @@ public class PopupMenu extends JPopupMenu
 
   JMenu jMenu1 = new JMenu();
 
-  JMenuItem proteinStructureMenu = new JMenuItem();
+  JMenuItem pdbStructureDialog = new JMenuItem();
 
   JMenu rnaStructureMenu = new JMenu();
 
@@ -328,6 +328,7 @@ public class PopupMenu extends JPopupMenu
       }
       else
       {
+        int origCount = rnaStructureMenu.getItemCount();
         /*
          * add menu items to 2D-render any alignment or sequence secondary
          * structure annotation
@@ -388,6 +389,10 @@ public class PopupMenu extends JPopupMenu
             }
           }
         }
+        if (rnaStructureMenu.getItemCount() == origCount)
+        {
+          remove(rnaStructureMenu);
+        }
       }
 
       menuItem = new JMenuItem(
@@ -600,7 +605,7 @@ public class PopupMenu extends JPopupMenu
     if (seq == null)
     {
       sequenceMenu.setVisible(false);
-      proteinStructureMenu.setVisible(false);
+      pdbStructureDialog.setVisible(false);
       rnaStructureMenu.setVisible(false);
     }
 
@@ -1342,9 +1347,9 @@ public class PopupMenu extends JPopupMenu
       }
     });
     jMenu1.setText(MessageManager.getString("label.group"));
-    proteinStructureMenu.setText(MessageManager
-            .getString("label.view_protein_structure"));
-    proteinStructureMenu.addActionListener(new ActionListener()
+    pdbStructureDialog.setText(MessageManager
+            .getString("label.show_pdbstruct_dialog"));
+    pdbStructureDialog.addActionListener(new ActionListener()
     {
       @Override
       public void actionPerformed(ActionEvent actionEvent)
@@ -1405,7 +1410,7 @@ public class PopupMenu extends JPopupMenu
     add(groupMenu);
     add(sequenceMenu);
     add(rnaStructureMenu);
-    add(proteinStructureMenu);
+    add(pdbStructureDialog);
     if (sequence!=null)
     {
       add(hideInsertions);
index 90400f4..02de02e 100755 (executable)
@@ -205,6 +205,10 @@ public class AppletFormatAdapter
   public static final boolean isValidFormat(String format,
           boolean forwriting)
   {
+    if (format == null)
+    {
+      return false;
+    }
     boolean valid = false;
     String[] format_list = (forwriting) ? WRITEABLE_FORMATS
             : READABLE_FORMATS;
index 3aded05..73c10df 100755 (executable)
@@ -265,11 +265,12 @@ public class FileLoader implements Runnable
       {
         Desktop.instance.stopLoading();
         System.err.println("The input file \"" + file
-                + "\" has no data content!");
+                + "\" has null or unidentifiable data content!");
         if (!Jalview.isHeadlessMode())
         {
-          JOptionPane.showMessageDialog(null, "The input file \""
-                  + file + "\" has no data content!", "Empty data file",
+          JOptionPane.showMessageDialog(null, "The input file \"" + file
+                  + "\" has null or unidentifiable data content!",
+                  "Empty data file",
                   JOptionPane.ERROR_MESSAGE);
         }
         return;
index 4c83ac1..17ba32e 100755 (executable)
@@ -84,7 +84,7 @@ public class IdentifyFile
    */
   public String Identify(FileParse source, boolean closeSource)
   {
-    String reply = "PFAM";
+    String reply = null;
     String data;
     int length = 0;
     boolean lineswereskipped = false;
@@ -142,19 +142,35 @@ public class IdentifyFile
           reply = "STH";
           break;
         }
-        // if (data.matches("<(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
-        if (data.matches("<(?i)html(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
-        {
-          reply = HtmlFile.FILE_DESC;
-          break;
-        }
 
-        if (data.matches("<(?i)rnaml (\"[^\"]*\"|'[^']*'|[^'\">])*>"))
+        if ((data.indexOf("<") > -1)) // possible Markup Language data i.e HTML,
+                                      // RNAML, XML
         {
-          reply = "RNAML";
-          break;
+          boolean identified = false;
+          do
+          {
+            if (data.matches("<(?i)html(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
+            {
+              reply = HtmlFile.FILE_DESC;
+              identified = true;
+              break;
+            }
+
+            if (data.matches("<(?i)rnaml (\"[^\"]*\"|'[^']*'|[^'\">])*>"))
+            {
+              reply = "RNAML";
+              identified = true;
+              break;
+            }
+          } while ((data = source.nextLine()) != null);
+
+          if (identified)
+          {
+            break;
+          }
         }
 
+
          if (data.indexOf("{\"") > -1)
          {
          reply = JSONFile.FILE_DESC;
index 3359678..61194ce 100644 (file)
@@ -47,6 +47,12 @@ import com.stevesoft.pat.Regex;
 
 public class AnnotationRenderer
 {
+  private static final int UPPER_TO_LOWER = 'a' - 'A'; // 32
+
+  private static final int CHAR_A = 'A'; // 65
+
+  private static final int CHAR_Z = 'Z'; // 90
+
   /**
    * flag indicating if timing and redraw parameter info should be output
    */
@@ -715,14 +721,14 @@ public class AnnotationRenderer
 
               }
             }
-            if (ss >= 65)
+            if (isRNA && (ss >= CHAR_A) && (ss <= CHAR_Z))
             {
               // distinguish between forward/backward base-pairing
-              if (displayChar.indexOf(ss + 32) > -1)
+              int ssLowerCase = ss + UPPER_TO_LOWER;
+              // TODO would .equals() be safer here? or charAt(0)?
+              if (displayChar.indexOf(ssLowerCase) > -1)
               {
-
-                ss = (char) (ss + 32);
-
+                ss = (char) ssLowerCase;
               }
             }
 
index 3582dc5..8bd484a 100644 (file)
@@ -24,11 +24,10 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.util.ArrayList;
 
 import org.testng.Assert;
 import org.testng.FileAssert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -36,15 +35,7 @@ import org.testng.annotations.Test;
 public class CommandLineOperations
 {
 
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception
-  {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception
-  {
-  }
+  private ArrayList<String> successfulCMDs = new ArrayList<String>();
 
   /***
    * from
@@ -57,7 +48,8 @@ public class CommandLineOperations
   private static class Worker extends Thread
   {
     private final Process process;
-
+    private BufferedReader outputReader;
+    private BufferedReader errorReader;
     private Integer exit;
 
     private Worker(Process process)
@@ -75,36 +67,63 @@ public class CommandLineOperations
         return;
       }
     }
+
+    public BufferedReader getOutputReader()
+    {
+      return outputReader;
+    }
+
+    public void setOutputReader(BufferedReader outputReader)
+    {
+      this.outputReader = outputReader;
+    }
+
+    public BufferedReader getErrorReader()
+    {
+      return errorReader;
+    }
+
+    public void setErrorReader(BufferedReader errorReader)
+    {
+      this.errorReader = errorReader;
+    }
   }
 
   private Worker jalviewDesktopRunner(boolean withAwt, String cmd,
-          int timeout) throws InterruptedException, IOException
+          int timeout)
   {
     String _cmd = "java "
             + (withAwt ? "-Djava.awt.headless=true" : "")
             + " -Djava.ext.dirs=./lib -classpath ./classes jalview.bin.Jalview ";
-    System.out.println("############ Testing Jalview CMD: " + _cmd + cmd);
-    Process ls2_proc = Runtime.getRuntime().exec(_cmd + cmd);
-    BufferedReader outputReader = new BufferedReader(new InputStreamReader(
-            ls2_proc.getInputStream()));
-
-    BufferedReader errorReader = new BufferedReader(new InputStreamReader(
-            ls2_proc.getErrorStream()));
-    Worker worker = new Worker(ls2_proc);
-    worker.start();
-    worker.join(timeout);
-    // System.out.println("Output:  ");
-    // String ln = null;
-    // while ((ln = outputReader.readLine()) != null)
-    // {
-    // System.out.println(ln);
-    // }
-    //
-    // System.out.println("Error:  ");
-    // while ((ln = errorReader.readLine()) != null)
-    // {
-    // System.out.println(ln);
-    // }
+    System.out.println("CMD [" + cmd + "]");
+    Process ls2_proc = null;
+    Worker worker = null;
+    try
+    {
+      ls2_proc = Runtime.getRuntime().exec(_cmd + cmd);
+    } catch (IOException e1)
+    {
+      e1.printStackTrace();
+    }
+    if (ls2_proc != null)
+    {
+      BufferedReader outputReader = new BufferedReader(
+              new InputStreamReader(ls2_proc.getInputStream()));
+
+      BufferedReader errorReader = new BufferedReader(
+              new InputStreamReader(ls2_proc.getErrorStream()));
+      worker = new Worker(ls2_proc);
+      worker.start();
+      try
+      {
+        worker.join(timeout);
+      } catch (InterruptedException e)
+      {
+        // e.printStackTrace();
+      }
+      worker.setOutputReader(outputReader);
+      worker.setErrorReader(errorReader);
+    }
     return worker;
   }
 
@@ -114,25 +133,65 @@ public class CommandLineOperations
     new CommandLineOperations();
   }
 
-  @Test(groups =
-  { "Functional" }, dataProvider = "headlessModeOutputParams")
-  public void testHeadlessModeOutputs(String harg, String type,
-          String fileName, boolean withAWT, int expectedMinFileSize)
+  
+  @BeforeTest
+  public void setUpForHeadlessCommandLineInputOperations()
+          throws IOException
   {
-    String cmd = harg + type + " " + fileName;
-    // System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
-    File file = new File(fileName);
-    Worker worker = null;
-    try
+    String cmds = "nodisplay -open examples/uniref50.fa -sortbytree -props FILE -colour zappo "
+            + "-jabaws http://www.compbio.dundee.ac.uk/jabaws -nosortbytree -dasserver nickname=www.test.com "
+            + "-features examples/uniref50_test_features -annotations examples/uniref50_test_annot -tree examples/uniref50_test_tree";
+    Worker worker = jalviewDesktopRunner(true, cmds, 9000);
+    String ln = null;
+    while ((ln = worker.getOutputReader().readLine()) != null)
     {
-      worker = jalviewDesktopRunner(withAWT, cmd, 9000);
-    } catch (InterruptedException e)
+      System.out.println(ln);
+      successfulCMDs.add(ln);
+    }
+  }
+
+  @BeforeTest
+  public void setUpForCommandLineInputOperations() throws IOException
+  {
+    String cmds = "-open examples/uniref50.fa -noquestionnaire -nousagestats";
+    Worker worker = jalviewDesktopRunner(false, cmds, 9000);
+    String ln = null;
+    int count = 0;
+    while ((ln = worker.getErrorReader().readLine()) != null)
     {
-      e.printStackTrace();
-    } catch (IOException e)
+      System.out.println(ln);
+      successfulCMDs.add(ln);
+      if (++count > 5)
+      {
+        break;
+      }
+    }
+    if (worker != null && worker.exit == null)
     {
-      e.printStackTrace();
+      worker.interrupt();
+      Thread.currentThread().interrupt();
+      worker.process.destroy();
     }
+  }
+
+  @Test(groups =
+  { "Functional" }, dataProvider = "allInputOpearationsData")
+  public void testAllInputOperations(String expectedString,
+          String failureMsg)
+  {
+    Assert.assertTrue(successfulCMDs.contains(expectedString), failureMsg);
+  }
+
+  @Test(groups =
+  { "Functional" }, dataProvider = "headlessModeOutputOperationsData")
+  public void testHeadlessModeOutputOperations(String harg, String type,
+          String fileName, boolean withAWT, int expectedMinFileSize,
+          int timeout)
+  {
+    String cmd = harg + type + " " + fileName;
+    // System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
+    File file = new File(fileName);
+    Worker worker = jalviewDesktopRunner(withAWT, cmd, timeout);
 
     FileAssert.assertFile(file, "Didn't create an output" + type
             + " file.[" + harg + "]");
@@ -142,7 +201,7 @@ public class CommandLineOperations
       worker.interrupt();
       Thread.currentThread().interrupt();
       worker.process.destroy();
-      Assert.fail("Jalview did not exit after  "
+      Assert.fail("Jalview did not exit after "
               + type
               + " generation (try running test again to verify - timeout at 9000ms). ["
               + harg + "]");
@@ -150,69 +209,82 @@ public class CommandLineOperations
     new File(fileName).delete();
   }
 
-  @DataProvider(name = "headlessModeOutputParams")
-  public static Object[][] headlessModeOutput()
+
+  @DataProvider(name = "allInputOpearationsData")
+  public Object[][] getHeadlessModeInputParams()
+  {
+    return new Object[][]
+    {
+        // headless mode input operations
+        { "CMD [-color zappo] executed successfully!",
+            "Failed command : -color zappo" },
+        { "CMD [-props FILE] executed successfully!",
+            "Failed command : -props File" },
+        { "CMD [-sortbytree] executed successfully!",
+            "Failed command : -sortbytree" },
+        {
+            "CMD [-jabaws http://www.compbio.dundee.ac.uk/jabaws] executed successfully!",
+            "Failed command : -jabaws http://www.compbio.dundee.ac.uk/jabaws" },
+        { "CMD [-open examples/uniref50.fa] executed successfully!",
+            "Failed command : -open examples/uniref50.fa" },
+        { "CMD [-nosortbytree] executed successfully!",
+            "Failed command : -nosortbytree" },
+        { "CMD [-dasserver nickname=www.test.com] executed successfully!",
+            "Failed command : -dasserver nickname=www.test.com" },
+        {
+            "CMD [-features examples/uniref50_test_features]  executed successfully!",
+            "Failed command : -features examples/uniref50_test_features" },
+        {
+            "CMD [-annotations examples/uniref50_test_annot] executed successfully!",
+            "Failed command : -annotations examples/uniref50_test_annot" },
+        { "CMD [-tree examples/uniref50_test_tree] executed successfully!",
+            "Failed command : -tree examples/uniref50_test_tree" },
+        // non headless mode input operations
+        { "CMD [-nousagestats] executed successfully!",
+            "Failed command : -nousagestats" },
+        { "CMD [-noquestionnaire] executed successfully!",
+            "Failed command : -noquestionnaire nickname=www.test.com" }
+    };
+
+  }
+   
+  @DataProvider(name = "headlessModeOutputOperationsData")
+  public static Object[][] getHeadlessModeOutputParams()
   {
     return new Object[][]
     {
         { "nodisplay -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", true, 4096 },
+            "test_uniref50_out.eps", true, 4096, 4000 },
         { "nodisplay -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", false, 4096 },
-        { "headless -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", true, 4096 },
-        { "headless -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", false, 4096 },
+            "test_uniref50_out.eps", false, 4096, 4000 },
         { "nogui -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", true, 4096 },
+            "test_uniref50_out.eps", true, 4096, 4000 },
         { "nogui -open examples/uniref50.fa", " -eps",
-            "test_uniref50_out.eps", false, 4096 },
-        { "headless -open examples/uniref50.fa", " -svg",
-            "test_uniref50_out.svg", true, 4096 },
+            "test_uniref50_out.eps", false, 4096, 4000 },
+        { "headless -open examples/uniref50.fa", " -eps",
+            "test_uniref50_out.eps", true, 4096, 4000 },
         { "headless -open examples/uniref50.fa", " -svg",
-            "test_uniref50_out.svg", false, 4096 },
+            "test_uniref50_out.svg", false, 4096, 3000 },
         { "headless -open examples/uniref50.fa", " -png",
-            "test_uniref50_out.png", true, 4096 },
-        { "headless -open examples/uniref50.fa", " -png",
-            "test_uniref50_out.png", false, 4096 },
-        { "headless -open examples/uniref50.fa", " -html",
-            "test_uniref50_out.html", true, 4096 },
+            "test_uniref50_out.png", true, 4096, 3000 },
         { "headless -open examples/uniref50.fa", " -html",
-            "test_uniref50_out.html", false, 4096 },
+            "test_uniref50_out.html", true, 4096, 3000 },
         { "headless -open examples/uniref50.fa", " -fasta",
-            "test_uniref50_out.mfa", true, 2096 },
-        { "headless -open examples/uniref50.fa", " -fasta",
-            "test_uniref50_out.mfa", false, 2096 },
-        { "headless -open examples/uniref50.fa", " -clustal",
-            "test_uniref50_out.aln", true, 2096 },
+            "test_uniref50_out.mfa", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -clustal",
-            "test_uniref50_out.aln", false, 2096 },
-        { "headless -open examples/uniref50.fa", " -msf",
-            "test_uniref50_out.msf", true, 2096 },
+            "test_uniref50_out.aln", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -msf",
-            "test_uniref50_out.msf", false, 2096 },
+            "test_uniref50_out.msf", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -pileup",
-            "test_uniref50_out.aln", true, 2096 },
-        { "headless -open examples/uniref50.fa", " -pileup",
-            "test_uniref50_out.aln", false, 2096 },
-        { "headless -open examples/uniref50.fa", " -pir",
-            "test_uniref50_out.pir", true, 2096 },
+            "test_uniref50_out.aln", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -pir",
-            "test_uniref50_out.pir", false, 2096 },
+            "test_uniref50_out.pir", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -pfam",
-            "test_uniref50_out.pfam", true, 2096 },
-        { "headless -open examples/uniref50.fa", " -pfam",
-            "test_uniref50_out.pfam", false, 2096 },
-        { "headless -open examples/uniref50.fa", " -blc",
-            "test_uniref50_out.blc", true, 2096 },
+            "test_uniref50_out.pfam", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -blc",
-            "test_uniref50_out.blc", false, 2096 },
-        { "headless -open examples/uniref50.fa", " -jalview",
-            "test_uniref50_out.jvp", true, 2096 },
+            "test_uniref50_out.blc", true, 2096, 3000 },
         { "headless -open examples/uniref50.fa", " -jalview",
-            "test_uniref50_out.jvp", false, 2096 },
+            "test_uniref50_out.jvp", true, 2096, 3000 },
     };
   }
-
-
 }
index 3591648..ee2a581 100644 (file)
@@ -30,7 +30,8 @@ public class EditCommandTest
 
   private Alignment al;
 
-  @BeforeMethod
+  @BeforeMethod(groups =
+  { "Functional" })
   public void setUp()
   {
     testee = new EditCommand();