From: Jalview build Manager Date: Wed, 23 Oct 2013 10:52:42 +0000 (+0100) Subject: Merge branch 'JAL-1403' into develop X-Git-Tag: Jalview_2_9~217 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6235128370382f0fecdf3ba1cc683052c5aa11e7;hp=83e674697584cab7ed9625ed2d42618827fbeecd;p=jalview.git Merge branch 'JAL-1403' into develop --- diff --git a/.classpath b/.classpath index 6cffc21..dd90b49 100644 --- a/.classpath +++ b/.classpath @@ -39,14 +39,16 @@ - - + + + + + - diff --git a/.externalToolBuilders/Jalview Release 2.7 build.xml [Builder].launch b/.externalToolBuilders/Jalview Release 2.7 build.xml [Builder].launch new file mode 100644 index 0000000..b280175 --- /dev/null +++ b/.externalToolBuilders/Jalview Release 2.7 build.xml [Builder].launch @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore index 3407192..9841761 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /dist /classes .externalToolBuilders/Jalview Release indices [Builder].launch +/.DS_Store +/.com.apple.timemachine.supported diff --git a/.project b/.project index 5f4b511..d0dfc7e 100644 --- a/.project +++ b/.project @@ -6,23 +6,13 @@ - org.eclipse.wst.common.project.facet.core.builder - - - - org.eclipse.jdt.core.javabuilder - org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, + org.eclipse.wst.common.project.facet.core.builder - - LaunchConfigHandle - <project>/.externalToolBuilders/Jalview Release indices [Builder].launch - @@ -31,7 +21,7 @@ LaunchConfigHandle - <project>/.externalToolBuilders/buildapplet [Builder].launch + <project>/.externalToolBuilders/Jalview Release indices [Builder].launch diff --git a/THIRDPARTYLIBS b/THIRDPARTYLIBS index bedd23a..57aad05 100644 --- a/THIRDPARTYLIBS +++ b/THIRDPARTYLIBS @@ -33,7 +33,7 @@ vamsas-client.jar wsdl4j.jar xercesImpl.jar xml-apis.jar - +json_simple-1.1.jar : Apache 2.0 license : downloaded from https://code.google.com/p/json-simple/downloads/list (will move to 1.1.1 version when jalview is mavenised and osgi-ised) Additional dependencies examples/javascript/deployJava.js : http://java.com/js/deployJava.js diff --git a/build.xml b/build.xml index 0f81af7..81971bd 100755 --- a/build.xml +++ b/build.xml @@ -91,7 +91,8 @@ - + + @@ -104,6 +105,7 @@ + @@ -133,6 +135,7 @@ + @@ -154,6 +157,8 @@ + + @@ -454,12 +459,14 @@ + excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/ext/paradise/**" /> + + @@ -471,6 +478,7 @@ + diff --git a/doc/AnnotationPostAnalysis.txt b/doc/AnnotationPostAnalysis.txt new file mode 100644 index 0000000..f53533f --- /dev/null +++ b/doc/AnnotationPostAnalysis.txt @@ -0,0 +1,39 @@ +Init. +optimise rendering - use same model as alignment but with vertical binary sweep to select range of annotation to render: +Vertical interval list +. run length compress the sizes -> n_i * v_height_i -> label each node - total and accumulated total vertical pos (under current visibility settings ?) +--> ins/delete/hide/show of one or more contiguous individual rows causes local -> global update of position sums. +-- +. +indexOf(VPosition in annotation display window), +VPositionOf(AnnotationI) + +0. +i. Hide/show by whole annotation set id +ii. move to top/bottom +iii. + +1. Summarising annotation +{ Annotation Class ID +|_ { Type string } } +-> + +Simple modal : +- Proportion of sequences with most frequent symbol +- symbol logo +[ option to drill down and subselect based on particular symbol or subdivide by all symbols ] + +3. Clustering based on annotation +A few routes: +use built in PCA calculation to do scalar product based analysis of one or many annotation vectors. +Sliding window over alignment doing pca at each point. Analyse trajectories through PCA ? (see maximum/minimum and stretches of local similarity) + + +* ''' ACCESS ALL MENUS ''' +-> allow context popup to show all window submenus +{ local relevant } +{ Parent window -> file,edit,etc } +{ Desktop -> File, Tools, ... } +{ other areas more distant - e.g. sequence/annotation ID popup from middle of alignment/annotation area } + + \ No newline at end of file diff --git a/doc/i18n.html b/doc/i18n.html new file mode 100644 index 0000000..d2a7420 --- /dev/null +++ b/doc/i18n.html @@ -0,0 +1,47 @@ + + + + Jalview i18n + +

Best practices

+
    +
  1. Follow the standards described in this guide
  2. +
  3. Always use properties files for user interface text; never include displayable text in code
  4. +
  5. Use properties files only for user interface text (Messages_xx.properties) and config files for configuration settings (jalview.properties).
  6. +
  7. Use a proper naming schema for keys in your resource bundles. The name of the keys should provide some information about the context of the displayed text. This helps the translators during the translation process.
  8. +
  9. Group keys by view, ie. edit.title, edit.instructions, list.title, list.instructions, create.title, etc
  10. +
  11. Never use displayable text when executing comparisons within the logic of the tool (separate codified values from displayable text)
  12. +
  13. Always use the MessageManager class for retrieving properties values, and invoke MessageManager methods dynamically, to accommodate dynamic user preferences (see MessageManager below).
  14. +
  15. All numbers and dates should be formatted specific to the user's locale (e.g. java.text.NumberFormat and java.text.DateFormat)
  16. +
  17. Test code in more than one language
  18. +
+

MessageManager

+

The jalview.util.MessageManager class is a wrapper class for the ResourceBundle class. It provides dynamic language/locale support for individual users, and is recommended for all Jalview code.

+

To use it within your code, you only have to invoke MessageManager with the text key in Messages_xx.properties:

+

JButton ok = new JButton(MessageManager.getString("button.ok"));

+

This will set JButton text to the one included at button.ok key. In English JButton text will be OK, while in Spanish will be Aceptar. This is the big thing of i18n. :)

+

How to translate Jalview

+

Anyone interested in localizing/translating Jalview is strongly encouraged to join the Jalview Development List list. We would recommend that you read this entire page before proceeding.

+

If you are planning on working on a Jalview translation, please send us an email (Jalview Development List). There may be someone else already working on translating Jalview to your target language.

+

Once you have downloaded the source code (available at http://www.jalview.org/download), you must edit {jalview.home}/resources/lang/Messages_xx.properties, where xx refers to your language country code. If it doesn't exits, rename Messages.properties to Messages_xx.properties.

+

Next step...start transtalation!

+

Once you have it translated, we would appreciate if you contribute it forwarding the file to Jalview Development List. We will commit it to the code base as soon as possible. Thanks so much for this in advance!

+ + + diff --git a/examples/2GIS.pdb b/examples/2GIS.pdb new file mode 100644 index 0000000..7a51ef1 --- /dev/null +++ b/examples/2GIS.pdb @@ -0,0 +1,2693 @@ +HEADER RNA 29-MAR-06 2GIS +TITLE STRUCTURE OF THE S-ADENOSYLMETHIONINE RIBOSWITCH MRNA +TITLE 2 REGULATORY ELEMENT +COMPND MOL_ID: 1; +COMPND 2 MOLECULE: SAM-I RIBOSWITCH; +COMPND 3 CHAIN: A; +COMPND 4 ENGINEERED: YES +SOURCE MOL_ID: 1; +SOURCE 2 SYNTHETIC: YES; +SOURCE 3 OTHER_DETAILS: THIS SEQUENCE WAS ENGINEERED BASED ON THE +SOURCE 4 SAM-I RIBOSWITCH FROM THE METF-METH OPERON IN +SOURCE 5 THERMOANAEROBACTER TENGCONGENSIS +KEYWDS MRNA, RIBOSWITCH, S-ADENOSYLMETHIONINE, SAM, RNA-LIGAND +KEYWDS 2 COMPLEX +EXPDTA X-RAY DIFFRACTION +AUTHOR R.K.MONTANGE,R.T.BATEY +REVDAT 2 24-FEB-09 2GIS 1 VERSN +REVDAT 1 04-JUL-06 2GIS 0 +JRNL AUTH R.K.MONTANGE,R.T.BATEY +JRNL TITL STRUCTURE OF THE S-ADENOSYLMETHIONINE RIBOSWITCH +JRNL TITL 2 REGULATORY MRNA ELEMENT. +JRNL REF NATURE V. 441 1172 2006 +JRNL REFN ISSN 0028-0836 +JRNL PMID 16810258 +JRNL DOI 10.1038/NATURE04819 +REMARK 1 +REMARK 2 +REMARK 2 RESOLUTION. 2.90 ANGSTROMS. +REMARK 3 +REMARK 3 REFINEMENT. +REMARK 3 PROGRAM : CNS 1.1 +REMARK 3 AUTHORS : BRUNGER,ADAMS,CLORE,DELANO,GROS,GROSSE- +REMARK 3 : KUNSTLEVE,JIANG,KUSZEWSKI,NILGES, PANNU, +REMARK 3 : READ,RICE,SIMONSON,WARREN +REMARK 3 +REMARK 3 REFINEMENT TARGET : ENGH & HUBER +REMARK 3 +REMARK 3 DATA USED IN REFINEMENT. +REMARK 3 RESOLUTION RANGE HIGH (ANGSTROMS) : 2.90 +REMARK 3 RESOLUTION RANGE LOW (ANGSTROMS) : 49.32 +REMARK 3 DATA CUTOFF (SIGMA(F)) : 0.000 +REMARK 3 DATA CUTOFF HIGH (ABS(F)) : 441185.100 +REMARK 3 DATA CUTOFF LOW (ABS(F)) : 0.0000 +REMARK 3 COMPLETENESS (WORKING+TEST) (%) : 99.3 +REMARK 3 NUMBER OF REFLECTIONS : 13415 +REMARK 3 +REMARK 3 FIT TO DATA USED IN REFINEMENT. +REMARK 3 CROSS-VALIDATION METHOD : THROUGHOUT +REMARK 3 FREE R VALUE TEST SET SELECTION : RANDOM +REMARK 3 R VALUE (WORKING SET) : 0.266 +REMARK 3 FREE R VALUE : 0.289 +REMARK 3 FREE R VALUE TEST SET SIZE (%) : 7.400 +REMARK 3 FREE R VALUE TEST SET COUNT : 999 +REMARK 3 ESTIMATED ERROR OF FREE R VALUE : 0.009 +REMARK 3 +REMARK 3 FIT IN THE HIGHEST RESOLUTION BIN. +REMARK 3 TOTAL NUMBER OF BINS USED : 6 +REMARK 3 BIN RESOLUTION RANGE HIGH (A) : 2.90 +REMARK 3 BIN RESOLUTION RANGE LOW (A) : 3.08 +REMARK 3 BIN COMPLETENESS (WORKING+TEST) (%) : 98.90 +REMARK 3 REFLECTIONS IN BIN (WORKING SET) : 2056 +REMARK 3 BIN R VALUE (WORKING SET) : 0.4270 +REMARK 3 BIN FREE R VALUE : 0.4160 +REMARK 3 BIN FREE R VALUE TEST SET SIZE (%) : 7.30 +REMARK 3 BIN FREE R VALUE TEST SET COUNT : 162 +REMARK 3 ESTIMATED ERROR OF BIN FREE R VALUE : 0.033 +REMARK 3 +REMARK 3 NUMBER OF NON-HYDROGEN ATOMS USED IN REFINEMENT. +REMARK 3 PROTEIN ATOMS : 0 +REMARK 3 NUCLEIC ACID ATOMS : 2029 +REMARK 3 HETEROGEN ATOMS : 57 +REMARK 3 SOLVENT ATOMS : 88 +REMARK 3 +REMARK 3 B VALUES. +REMARK 3 FROM WILSON PLOT (A**2) : 139.30 +REMARK 3 MEAN B VALUE (OVERALL, A**2) : 69.60 +REMARK 3 OVERALL ANISOTROPIC B VALUE. +REMARK 3 B11 (A**2) : 11.87000 +REMARK 3 B22 (A**2) : 11.87000 +REMARK 3 B33 (A**2) : -23.74000 +REMARK 3 B12 (A**2) : 0.00000 +REMARK 3 B13 (A**2) : 0.00000 +REMARK 3 B23 (A**2) : 0.00000 +REMARK 3 +REMARK 3 ESTIMATED COORDINATE ERROR. +REMARK 3 ESD FROM LUZZATI PLOT (A) : 0.39 +REMARK 3 ESD FROM SIGMAA (A) : 0.39 +REMARK 3 LOW RESOLUTION CUTOFF (A) : 5.00 +REMARK 3 +REMARK 3 CROSS-VALIDATED ESTIMATED COORDINATE ERROR. +REMARK 3 ESD FROM C-V LUZZATI PLOT (A) : 0.48 +REMARK 3 ESD FROM C-V SIGMAA (A) : 0.35 +REMARK 3 +REMARK 3 RMS DEVIATIONS FROM IDEAL VALUES. +REMARK 3 BOND LENGTHS (A) : 0.010 +REMARK 3 BOND ANGLES (DEGREES) : 1.60 +REMARK 3 DIHEDRAL ANGLES (DEGREES) : 17.30 +REMARK 3 IMPROPER ANGLES (DEGREES) : 2.31 +REMARK 3 +REMARK 3 ISOTROPIC THERMAL MODEL : RESTRAINED +REMARK 3 +REMARK 3 ISOTROPIC THERMAL FACTOR RESTRAINTS. RMS SIGMA +REMARK 3 MAIN-CHAIN BOND (A**2) : 1.380 ; 1.500 +REMARK 3 MAIN-CHAIN ANGLE (A**2) : 2.560 ; 2.000 +REMARK 3 SIDE-CHAIN BOND (A**2) : 1.630 ; 2.000 +REMARK 3 SIDE-CHAIN ANGLE (A**2) : 2.610 ; 2.500 +REMARK 3 +REMARK 3 BULK SOLVENT MODELING. +REMARK 3 METHOD USED : FLAT MODEL +REMARK 3 KSOL : 0.88 +REMARK 3 BSOL : 300.00 +REMARK 3 +REMARK 3 NCS MODEL : NULL +REMARK 3 +REMARK 3 NCS RESTRAINTS. RMS SIGMA/WEIGHT +REMARK 3 GROUP 1 POSITIONAL (A) : NULL ; NULL +REMARK 3 GROUP 1 B-FACTOR (A**2) : NULL ; NULL +REMARK 3 +REMARK 3 PARAMETER FILE 1 : DNA-RNA_REP.PARAM +REMARK 3 PARAMETER FILE 2 : ION2.PARAM +REMARK 3 PARAMETER FILE 3 : SAM3.PARAM +REMARK 3 PARAMETER FILE 4 : WATER_REP.PARAM +REMARK 3 PARAMETER FILE 5 : NULL +REMARK 3 TOPOLOGY FILE 1 : DNA-RNA_REP.TOP +REMARK 3 TOPOLOGY FILE 2 : ION2.TOP +REMARK 3 TOPOLOGY FILE 3 : SAM3.TOP +REMARK 3 TOPOLOGY FILE 4 : WATER_REP.TOP +REMARK 3 TOPOLOGY FILE 5 : NULL +REMARK 3 +REMARK 3 OTHER REFINEMENT REMARKS: NULL +REMARK 4 +REMARK 4 2GIS COMPLIES WITH FORMAT V. 3.15, 01-DEC-08 +REMARK 100 +REMARK 100 THIS ENTRY HAS BEEN PROCESSED BY RCSB ON 14-APR-06. +REMARK 100 THE RCSB ID CODE IS RCSB037170. +REMARK 200 +REMARK 200 EXPERIMENTAL DETAILS +REMARK 200 EXPERIMENT TYPE : X-RAY DIFFRACTION +REMARK 200 DATE OF DATA COLLECTION : 11-NOV-05 +REMARK 200 TEMPERATURE (KELVIN) : 100 +REMARK 200 PH : NULL +REMARK 200 NUMBER OF CRYSTALS USED : 1 +REMARK 200 +REMARK 200 SYNCHROTRON (Y/N) : Y +REMARK 200 RADIATION SOURCE : ALS +REMARK 200 BEAMLINE : 8.2.1 +REMARK 200 X-RAY GENERATOR MODEL : NULL +REMARK 200 MONOCHROMATIC OR LAUE (M/L) : M +REMARK 200 WAVELENGTH OR RANGE (A) : 1.10532, 1.10573 +REMARK 200 MONOCHROMATOR : NULL +REMARK 200 OPTICS : NULL +REMARK 200 +REMARK 200 DETECTOR TYPE : CCD +REMARK 200 DETECTOR MANUFACTURER : ADSC QUANTUM 315 +REMARK 200 INTENSITY-INTEGRATION SOFTWARE : BOS +REMARK 200 DATA SCALING SOFTWARE : D*TREK +REMARK 200 +REMARK 200 NUMBER OF UNIQUE REFLECTIONS : 14940 +REMARK 200 RESOLUTION RANGE HIGH (A) : 2.900 +REMARK 200 RESOLUTION RANGE LOW (A) : 49.320 +REMARK 200 REJECTION CRITERIA (SIGMA(I)) : 3.000 +REMARK 200 +REMARK 200 OVERALL. +REMARK 200 COMPLETENESS FOR RANGE (%) : 99.6 +REMARK 200 DATA REDUNDANCY : 14.640 +REMARK 200 R MERGE (I) : 0.07200 +REMARK 200 R SYM (I) : NULL +REMARK 200 FOR THE DATA SET : 17.9000 +REMARK 200 +REMARK 200 IN THE HIGHEST RESOLUTION SHELL. +REMARK 200 HIGHEST RESOLUTION SHELL, RANGE HIGH (A) : 2.90 +REMARK 200 HIGHEST RESOLUTION SHELL, RANGE LOW (A) : 3.08 +REMARK 200 COMPLETENESS FOR SHELL (%) : 99.9 +REMARK 200 DATA REDUNDANCY IN SHELL : 11.74 +REMARK 200 R MERGE FOR SHELL (I) : 0.42600 +REMARK 200 R SYM FOR SHELL (I) : NULL +REMARK 200 FOR SHELL : 4.400 +REMARK 200 +REMARK 200 DIFFRACTION PROTOCOL: MAD +REMARK 200 METHOD USED TO DETERMINE THE STRUCTURE: MAD +REMARK 200 SOFTWARE USED: CNS +REMARK 200 STARTING MODEL: NULL +REMARK 200 +REMARK 200 REMARK: NULL +REMARK 280 +REMARK 280 CRYSTAL +REMARK 280 SOLVENT CONTENT, VS (%): 52.20 +REMARK 280 MATTHEWS COEFFICIENT, VM (ANGSTROMS**3/DA): 2.57 +REMARK 280 +REMARK 280 CRYSTALLIZATION CONDITIONS: NULL +REMARK 290 +REMARK 290 CRYSTALLOGRAPHIC SYMMETRY +REMARK 290 SYMMETRY OPERATORS FOR SPACE GROUP: P 43 21 2 +REMARK 290 +REMARK 290 SYMOP SYMMETRY +REMARK 290 NNNMMM OPERATOR +REMARK 290 1555 X,Y,Z +REMARK 290 2555 -X,-Y,Z+1/2 +REMARK 290 3555 -Y+1/2,X+1/2,Z+3/4 +REMARK 290 4555 Y+1/2,-X+1/2,Z+1/4 +REMARK 290 5555 -X+1/2,Y+1/2,-Z+3/4 +REMARK 290 6555 X+1/2,-Y+1/2,-Z+1/4 +REMARK 290 7555 Y,X,-Z +REMARK 290 8555 -Y,-X,-Z+1/2 +REMARK 290 +REMARK 290 WHERE NNN -> OPERATOR NUMBER +REMARK 290 MMM -> TRANSLATION VECTOR +REMARK 290 +REMARK 290 CRYSTALLOGRAPHIC SYMMETRY TRANSFORMATIONS +REMARK 290 THE FOLLOWING TRANSFORMATIONS OPERATE ON THE ATOM/HETATM +REMARK 290 RECORDS IN THIS ENTRY TO PRODUCE CRYSTALLOGRAPHICALLY +REMARK 290 RELATED MOLECULES. +REMARK 290 SMTRY1 1 1.000000 0.000000 0.000000 0.00000 +REMARK 290 SMTRY2 1 0.000000 1.000000 0.000000 0.00000 +REMARK 290 SMTRY3 1 0.000000 0.000000 1.000000 0.00000 +REMARK 290 SMTRY1 2 -1.000000 0.000000 0.000000 0.00000 +REMARK 290 SMTRY2 2 0.000000 -1.000000 0.000000 0.00000 +REMARK 290 SMTRY3 2 0.000000 0.000000 1.000000 79.48350 +REMARK 290 SMTRY1 3 0.000000 -1.000000 0.000000 31.45050 +REMARK 290 SMTRY2 3 1.000000 0.000000 0.000000 31.45050 +REMARK 290 SMTRY3 3 0.000000 0.000000 1.000000 119.22525 +REMARK 290 SMTRY1 4 0.000000 1.000000 0.000000 31.45050 +REMARK 290 SMTRY2 4 -1.000000 0.000000 0.000000 31.45050 +REMARK 290 SMTRY3 4 0.000000 0.000000 1.000000 39.74175 +REMARK 290 SMTRY1 5 -1.000000 0.000000 0.000000 31.45050 +REMARK 290 SMTRY2 5 0.000000 1.000000 0.000000 31.45050 +REMARK 290 SMTRY3 5 0.000000 0.000000 -1.000000 119.22525 +REMARK 290 SMTRY1 6 1.000000 0.000000 0.000000 31.45050 +REMARK 290 SMTRY2 6 0.000000 -1.000000 0.000000 31.45050 +REMARK 290 SMTRY3 6 0.000000 0.000000 -1.000000 39.74175 +REMARK 290 SMTRY1 7 0.000000 1.000000 0.000000 0.00000 +REMARK 290 SMTRY2 7 1.000000 0.000000 0.000000 0.00000 +REMARK 290 SMTRY3 7 0.000000 0.000000 -1.000000 0.00000 +REMARK 290 SMTRY1 8 0.000000 -1.000000 0.000000 0.00000 +REMARK 290 SMTRY2 8 -1.000000 0.000000 0.000000 0.00000 +REMARK 290 SMTRY3 8 0.000000 0.000000 -1.000000 79.48350 +REMARK 290 +REMARK 290 REMARK: NULL +REMARK 300 +REMARK 300 BIOMOLECULE: 1 +REMARK 300 SEE REMARK 350 FOR THE AUTHOR PROVIDED AND/OR PROGRAM +REMARK 300 GENERATED ASSEMBLY INFORMATION FOR THE STRUCTURE IN +REMARK 300 THIS ENTRY. THE REMARK MAY ALSO PROVIDE INFORMATION ON +REMARK 300 BURIED SURFACE AREA. +REMARK 350 +REMARK 350 COORDINATES FOR A COMPLETE MULTIMER REPRESENTING THE KNOWN +REMARK 350 BIOLOGICALLY SIGNIFICANT OLIGOMERIZATION STATE OF THE +REMARK 350 MOLECULE CAN BE GENERATED BY APPLYING BIOMT TRANSFORMATIONS +REMARK 350 GIVEN BELOW. BOTH NON-CRYSTALLOGRAPHIC AND +REMARK 350 CRYSTALLOGRAPHIC OPERATIONS ARE GIVEN. +REMARK 350 +REMARK 350 BIOMOLECULE: 1 +REMARK 350 AUTHOR DETERMINED BIOLOGICAL UNIT: MONOMERIC +REMARK 350 APPLY THE FOLLOWING TO CHAINS: A +REMARK 350 BIOMT1 1 1.000000 0.000000 0.000000 0.00000 +REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000 +REMARK 350 BIOMT3 1 0.000000 0.000000 1.000000 0.00000 +REMARK 500 +REMARK 500 GEOMETRY AND STEREOCHEMISTRY +REMARK 500 SUBTOPIC: CLOSE CONTACTS IN SAME ASYMMETRIC UNIT +REMARK 500 +REMARK 500 THE FOLLOWING ATOMS ARE IN CLOSE CONTACT. +REMARK 500 +REMARK 500 ATM1 RES C SSEQI ATM2 RES C SSEQI DISTANCE +REMARK 500 O2' A A 20 O4' G A 21 2.13 +REMARK 500 O2' A A 20 OP2 G A 21 2.18 +REMARK 500 +REMARK 500 REMARK: NULL +REMARK 500 +REMARK 500 GEOMETRY AND STEREOCHEMISTRY +REMARK 500 SUBTOPIC: CLOSE CONTACTS +REMARK 500 +REMARK 500 THE FOLLOWING ATOMS THAT ARE RELATED BY CRYSTALLOGRAPHIC +REMARK 500 SYMMETRY ARE IN CLOSE CONTACT. AN ATOM LOCATED WITHIN 0.15 +REMARK 500 ANGSTROMS OF A SYMMETRY RELATED ATOM IS ASSUMED TO BE ON A +REMARK 500 SPECIAL POSITION AND IS, THEREFORE, LISTED IN REMARK 375 +REMARK 500 INSTEAD OF REMARK 500. ATOMS WITH NON-BLANK ALTERNATE +REMARK 500 LOCATION INDICATORS ARE NOT INCLUDED IN THE CALCULATIONS. +REMARK 500 +REMARK 500 DISTANCE CUTOFF: +REMARK 500 2.2 ANGSTROMS FOR CONTACTS NOT INVOLVING HYDROGEN ATOMS +REMARK 500 1.6 ANGSTROMS FOR CONTACTS INVOLVING HYDROGEN ATOMS +REMARK 500 +REMARK 500 ATM1 RES C SSEQI ATM2 RES C SSEQI SSYMOP DISTANCE +REMARK 500 N3 IRI A 201 N3 IRI A 201 7555 1.02 +REMARK 500 IR IRI A 201 N3 IRI A 201 7555 2.10 +REMARK 500 +REMARK 500 REMARK: NULL +REMARK 500 +REMARK 500 GEOMETRY AND STEREOCHEMISTRY +REMARK 500 SUBTOPIC: COVALENT BOND LENGTHS +REMARK 500 +REMARK 500 THE STEREOCHEMICAL PARAMETERS OF THE FOLLOWING RESIDUES +REMARK 500 HAVE VALUES WHICH DEVIATE FROM EXPECTED VALUES BY MORE +REMARK 500 THAN 6*RMSD (M=MODEL NUMBER; RES=RESIDUE NAME; C=CHAIN +REMARK 500 IDENTIFIER; SSEQ=SEQUENCE NUMBER; I=INSERTION CODE). +REMARK 500 +REMARK 500 STANDARD TABLE: +REMARK 500 FORMAT: (10X,I3,1X,2(A3,1X,A1,I4,A1,1X,A4,3X),1X,F6.3) +REMARK 500 +REMARK 500 EXPECTED VALUES PROTEIN: ENGH AND HUBER, 1999 +REMARK 500 EXPECTED VALUES NUCLEIC ACID: CLOWNEY ET AL 1996 +REMARK 500 +REMARK 500 M RES CSSEQI ATM1 RES CSSEQI ATM2 DEVIATION +REMARK 500 G A 1 P G A 1 OP3 -0.078 +REMARK 500 +REMARK 500 REMARK: NULL +REMARK 500 +REMARK 500 GEOMETRY AND STEREOCHEMISTRY +REMARK 500 SUBTOPIC: COVALENT BOND ANGLES +REMARK 500 +REMARK 500 THE STEREOCHEMICAL PARAMETERS OF THE FOLLOWING RESIDUES +REMARK 500 HAVE VALUES WHICH DEVIATE FROM EXPECTED VALUES BY MORE +REMARK 500 THAN 6*RMSD (M=MODEL NUMBER; RES=RESIDUE NAME; C=CHAIN +REMARK 500 IDENTIFIER; SSEQ=SEQUENCE NUMBER; I=INSERTION CODE). +REMARK 500 +REMARK 500 STANDARD TABLE: +REMARK 500 FORMAT: (10X,I3,1X,A3,1X,A1,I4,A1,3(1X,A4,2X),12X,F5.1) +REMARK 500 +REMARK 500 EXPECTED VALUES PROTEIN: ENGH AND HUBER, 1999 +REMARK 500 EXPECTED VALUES NUCLEIC ACID: CLOWNEY ET AL 1996 +REMARK 500 +REMARK 500 M RES CSSEQI ATM1 ATM2 ATM3 +REMARK 500 A A 9 C2' - C3' - O3' ANGL. DEV. = 12.3 DEGREES +REMARK 500 A A 33 C2' - C3' - O3' ANGL. DEV. = 12.6 DEGREES +REMARK 500 G A 50 C4' - C3' - O3' ANGL. DEV. = 13.7 DEGREES +REMARK 500 G A 50 C2' - C3' - O3' ANGL. DEV. = 10.0 DEGREES +REMARK 500 G A 50 N9 - C1' - C2' ANGL. DEV. = -8.2 DEGREES +REMARK 500 U A 63 C2' - C3' - O3' ANGL. DEV. = 15.3 DEGREES +REMARK 500 G A 74 C4' - C3' - O3' ANGL. DEV. = 12.7 DEGREES +REMARK 500 G A 74 C2' - C3' - O3' ANGL. DEV. = 11.3 DEGREES +REMARK 500 G A 74 N9 - C1' - C2' ANGL. DEV. = -7.3 DEGREES +REMARK 500 +REMARK 500 REMARK: NULL +REMARK 500 +REMARK 500 GEOMETRY AND STEREOCHEMISTRY +REMARK 500 SUBTOPIC: PLANAR GROUPS +REMARK 500 +REMARK 500 PLANAR GROUPS IN THE FOLLOWING RESIDUES HAVE A TOTAL +REMARK 500 RMS DISTANCE OF ALL ATOMS FROM THE BEST-FIT PLANE +REMARK 500 BY MORE THAN AN EXPECTED VALUE OF 6*RMSD, WITH AN +REMARK 500 RMSD 0.02 ANGSTROMS, OR AT LEAST ONE ATOM HAS +REMARK 500 AN RMSD GREATER THAN THIS VALUE +REMARK 500 (M=MODEL NUMBER; RES=RESIDUE NAME; C=CHAIN IDENTIFIER; +REMARK 500 SSEQ=SEQUENCE NUMBER; I=INSERTION CODE). +REMARK 500 +REMARK 500 M RES CSSEQI RMS TYPE +REMARK 500 G A 19 0.05 SIDE_CHAIN +REMARK 500 G A 35 0.06 SIDE_CHAIN +REMARK 500 G A 50 0.07 SIDE_CHAIN +REMARK 500 U A 67 0.08 SIDE_CHAIN +REMARK 500 G A 74 0.08 SIDE_CHAIN +REMARK 500 +REMARK 500 REMARK: NULL +REMARK 620 +REMARK 620 METAL COORDINATION +REMARK 620 (M=MODEL NUMBER; RES=RESIDUE NAME; C=CHAIN IDENTIFIER; +REMARK 620 SSEQ=SEQUENCE NUMBER; I=INSERTION CODE): +REMARK 620 +REMARK 620 COORDINATION ANGLES FOR: M RES CSSEQI METAL +REMARK 620 MG A 205 MG +REMARK 620 N RES CSSEQI ATOM +REMARK 620 1 A A 10 OP2 +REMARK 620 2 U A 63 O3' 95.0 +REMARK 620 3 U A 64 OP2 133.2 53.2 +REMARK 620 N 1 2 +REMARK 620 +REMARK 620 COORDINATION ANGLES FOR: M RES CSSEQI METAL +REMARK 620 MG A 206 MG +REMARK 620 N RES CSSEQI ATOM +REMARK 620 1 A A 84 O5' +REMARK 620 2 A A 84 O3' 115.5 +REMARK 620 3 A A 85 OP2 130.4 63.5 +REMARK 620 4 A A 84 OP1 62.8 164.4 130.5 +REMARK 620 N 1 2 3 +REMARK 800 +REMARK 800 SITE +REMARK 800 SITE_IDENTIFIER: AC1 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE MG A 205 +REMARK 800 SITE_IDENTIFIER: AC2 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE MG A 206 +REMARK 800 SITE_IDENTIFIER: AC3 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE IRI A 201 +REMARK 800 SITE_IDENTIFIER: AC4 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE IRI A 202 +REMARK 800 SITE_IDENTIFIER: AC5 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE IRI A 203 +REMARK 800 SITE_IDENTIFIER: AC6 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE IRI A 204 +REMARK 800 SITE_IDENTIFIER: AC7 +REMARK 800 EVIDENCE_CODE: SOFTWARE +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE SAM A 301 +DBREF 2GIS A 1 94 PDB 2GIS 2GIS 1 94 +SEQRES 1 A 94 G G C U U A U C A A G A G +SEQRES 2 A 94 A G G U G G A G G G A C U +SEQRES 3 A 94 G G C C C G A U G A A A C +SEQRES 4 A 94 C C G G C A A C C A G A A +SEQRES 5 A 94 A U G G U G C C A A U U C +SEQRES 6 A 94 C U G C A G C G G A A A C +SEQRES 7 A 94 G U U G A A A G A U G A G +SEQRES 8 A 94 C C A +HET MG A 205 1 +HET MG A 206 1 +HET IRI A 201 7 +HET IRI A 202 7 +HET IRI A 203 7 +HET IRI A 204 7 +HET SAM A 301 27 +HETNAM MG MAGNESIUM ION +HETNAM IRI IRIDIUM HEXAMMINE ION +HETNAM SAM S-ADENOSYLMETHIONINE +FORMUL 2 MG 2(MG 2+) +FORMUL 4 IRI 4(H18 IR N6 3+) +FORMUL 8 SAM C15 H22 N6 O5 S +FORMUL 9 HOH *88(H2 O) +LINK MG MG A 205 OP2 A A 10 1555 1555 2.88 +LINK MG MG A 205 O3' U A 63 1555 1555 2.88 +LINK MG MG A 205 OP2 U A 64 1555 1555 2.42 +LINK MG MG A 206 O5' A A 84 1555 1555 1.93 +LINK MG MG A 206 O3' A A 84 1555 1555 2.35 +LINK MG MG A 206 OP2 A A 85 1555 1555 2.46 +LINK MG MG A 206 OP1 A A 84 1555 1555 2.71 +SITE 1 AC1 4 A A 9 A A 10 U A 63 U A 64 +SITE 1 AC2 2 A A 84 A A 85 +SITE 1 AC3 5 C A 31 G A 32 A A 33 U A 34 +SITE 2 AC3 5 HOH A 448 +SITE 1 AC4 6 G A 15 G A 16 U A 17 G A 18 +SITE 2 AC4 6 A A 36 A A 38 +SITE 1 AC5 6 G A 23 C A 25 U A 26 G A 27 +SITE 2 AC5 6 G A 28 C A 29 +SITE 1 AC6 6 U A 4 U A 5 A A 6 U A 88 +SITE 2 AC6 6 G A 89 HOH A 475 +SITE 1 AC7 11 U A 7 G A 11 A A 45 A A 46 +SITE 2 AC7 11 C A 47 U A 57 G A 58 C A 59 +SITE 3 AC7 11 U A 88 G A 89 HOH A 437 +CRYST1 62.901 62.901 158.967 90.00 90.00 90.00 P 43 21 2 8 +ORIGX1 1.000000 0.000000 0.000000 0.00000 +ORIGX2 0.000000 1.000000 0.000000 0.00000 +ORIGX3 0.000000 0.000000 1.000000 0.00000 +SCALE1 0.015898 0.000000 0.000000 0.00000 +SCALE2 0.000000 0.015898 0.000000 0.00000 +SCALE3 0.000000 0.000000 0.006291 0.00000 +ATOM 1 OP3 G A 1 66.836 54.358 31.023 1.00 83.72 O +ATOM 2 P G A 1 66.932 54.717 32.506 1.00 83.64 P +ATOM 3 OP1 G A 1 68.009 55.754 32.789 1.00 83.61 O +ATOM 4 OP2 G A 1 65.585 55.074 33.126 1.00 82.16 O +ATOM 5 O5' G A 1 67.440 53.379 33.287 1.00 79.65 O +ATOM 6 C5' G A 1 68.672 52.742 32.913 1.00 73.57 C +ATOM 7 C4' G A 1 69.247 51.962 34.076 1.00 70.37 C +ATOM 8 O4' G A 1 69.770 52.884 35.073 1.00 66.83 O +ATOM 9 C3' G A 1 68.269 51.092 34.851 1.00 68.85 C +ATOM 10 O3' G A 1 68.072 49.836 34.215 1.00 68.87 O +ATOM 11 C2' G A 1 68.974 50.952 36.194 1.00 66.89 C +ATOM 12 O2' G A 1 70.032 50.011 36.151 1.00 66.32 O +ATOM 13 C1' G A 1 69.560 52.353 36.371 1.00 64.13 C +ATOM 14 N9 G A 1 68.630 53.226 37.076 1.00 60.62 N +ATOM 15 C8 G A 1 67.918 54.269 36.547 1.00 60.07 C +ATOM 16 N7 G A 1 67.123 54.838 37.412 1.00 59.30 N +ATOM 17 C5 G A 1 67.331 54.130 38.585 1.00 57.00 C +ATOM 18 C6 G A 1 66.738 54.282 39.860 1.00 55.77 C +ATOM 19 O6 G A 1 65.881 55.106 40.221 1.00 56.93 O +ATOM 20 N1 G A 1 67.233 53.352 40.767 1.00 54.01 N +ATOM 21 C2 G A 1 68.178 52.396 40.480 1.00 55.22 C +ATOM 22 N2 G A 1 68.526 51.581 41.489 1.00 54.38 N +ATOM 23 N3 G A 1 68.740 52.247 39.288 1.00 56.29 N +ATOM 24 C4 G A 1 68.270 53.140 38.397 1.00 57.86 C +ATOM 25 P G A 2 66.612 49.156 34.222 1.00 69.18 P +ATOM 26 OP1 G A 2 66.706 47.977 33.323 1.00 70.02 O +ATOM 27 OP2 G A 2 65.566 50.194 33.985 1.00 68.86 O +ATOM 28 O5' G A 2 66.442 48.597 35.701 1.00 66.97 O +ATOM 29 C5' G A 2 67.276 47.544 36.152 1.00 62.30 C +ATOM 30 C4' G A 2 67.252 47.457 37.651 1.00 59.60 C +ATOM 31 O4' G A 2 67.506 48.784 38.198 1.00 56.42 O +ATOM 32 C3' G A 2 65.898 47.105 38.233 1.00 59.17 C +ATOM 33 O3' G A 2 65.645 45.711 38.175 1.00 60.55 O +ATOM 34 C2' G A 2 66.007 47.655 39.650 1.00 56.90 C +ATOM 35 O2' G A 2 66.780 46.829 40.499 1.00 57.29 O +ATOM 36 C1' G A 2 66.787 48.946 39.405 1.00 54.02 C +ATOM 37 N9 G A 2 65.942 50.127 39.299 1.00 50.64 N +ATOM 38 C8 G A 2 65.753 50.932 38.206 1.00 50.83 C +ATOM 39 N7 G A 2 64.944 51.936 38.442 1.00 50.61 N +ATOM 40 C5 G A 2 64.573 51.774 39.768 1.00 48.72 C +ATOM 41 C6 G A 2 63.723 52.556 40.584 1.00 48.85 C +ATOM 42 O6 G A 2 63.108 53.584 40.289 1.00 50.52 O +ATOM 43 N1 G A 2 63.627 52.034 41.866 1.00 48.14 N +ATOM 44 C2 G A 2 64.268 50.902 42.311 1.00 47.93 C +ATOM 45 N2 G A 2 64.035 50.543 43.580 1.00 47.56 N +ATOM 46 N3 G A 2 65.071 50.172 41.568 1.00 48.14 N +ATOM 47 C4 G A 2 65.177 50.661 40.312 1.00 49.83 C +ATOM 48 P C A 3 64.129 45.193 38.109 1.00 60.96 P +ATOM 49 OP1 C A 3 64.118 43.738 37.817 1.00 60.20 O +ATOM 50 OP2 C A 3 63.355 46.126 37.249 1.00 61.70 O +ATOM 51 O5' C A 3 63.587 45.427 39.585 1.00 60.54 O +ATOM 52 C5' C A 3 63.884 44.512 40.626 1.00 55.75 C +ATOM 53 C4' C A 3 63.184 44.934 41.889 1.00 53.73 C +ATOM 54 O4' C A 3 63.549 46.312 42.172 1.00 52.44 O +ATOM 55 C3' C A 3 61.674 45.025 41.777 1.00 53.43 C +ATOM 56 O3' C A 3 61.022 43.789 41.941 1.00 55.57 O +ATOM 57 C2' C A 3 61.321 45.978 42.898 1.00 51.46 C +ATOM 58 O2' C A 3 61.402 45.337 44.151 1.00 52.96 O +ATOM 59 C1' C A 3 62.458 46.978 42.787 1.00 49.83 C +ATOM 60 N1 C A 3 62.072 48.135 41.979 1.00 46.39 N +ATOM 61 C2 C A 3 61.207 49.065 42.547 1.00 45.76 C +ATOM 62 O2 C A 3 60.800 48.861 43.692 1.00 47.45 O +ATOM 63 N3 C A 3 60.831 50.152 41.837 1.00 43.39 N +ATOM 64 C4 C A 3 61.290 50.323 40.602 1.00 44.39 C +ATOM 65 N4 C A 3 60.911 51.413 39.948 1.00 44.48 N +ATOM 66 C5 C A 3 62.168 49.382 39.986 1.00 45.55 C +ATOM 67 C6 C A 3 62.534 48.309 40.707 1.00 46.04 C +ATOM 68 P U A 4 59.622 43.553 41.204 1.00 57.98 P +ATOM 69 OP1 U A 4 59.364 42.082 41.244 1.00 57.52 O +ATOM 70 OP2 U A 4 59.681 44.265 39.900 1.00 59.29 O +ATOM 71 O5' U A 4 58.561 44.348 42.088 1.00 53.55 O +ATOM 72 C5' U A 4 58.363 44.011 43.446 1.00 53.36 C +ATOM 73 C4' U A 4 57.410 44.981 44.081 1.00 55.02 C +ATOM 74 O4' U A 4 57.989 46.313 44.050 1.00 55.96 O +ATOM 75 C3' U A 4 56.097 45.142 43.346 1.00 57.18 C +ATOM 76 O3' U A 4 55.179 44.108 43.677 1.00 60.33 O +ATOM 77 C2' U A 4 55.642 46.516 43.814 1.00 54.53 C +ATOM 78 O2' U A 4 55.165 46.437 45.140 1.00 55.14 O +ATOM 79 C1' U A 4 56.967 47.272 43.829 1.00 52.98 C +ATOM 80 N1 U A 4 57.269 47.986 42.580 1.00 49.42 N +ATOM 81 C2 U A 4 56.614 49.174 42.350 1.00 47.24 C +ATOM 82 O2 U A 4 55.771 49.612 43.103 1.00 45.38 O +ATOM 83 N3 U A 4 56.978 49.829 41.207 1.00 46.59 N +ATOM 84 C4 U A 4 57.903 49.416 40.282 1.00 48.90 C +ATOM 85 O4 U A 4 58.117 50.111 39.282 1.00 50.34 O +ATOM 86 C5 U A 4 58.523 48.162 40.580 1.00 48.98 C +ATOM 87 C6 U A 4 58.187 47.505 41.691 1.00 49.39 C +ATOM 88 P U A 5 54.205 43.531 42.537 1.00 60.31 P +ATOM 89 OP1 U A 5 53.567 42.301 43.067 1.00 60.80 O +ATOM 90 OP2 U A 5 54.982 43.466 41.269 1.00 61.31 O +ATOM 91 O5' U A 5 53.102 44.672 42.382 1.00 57.62 O +ATOM 92 C5' U A 5 52.176 44.937 43.427 1.00 56.18 C +ATOM 93 C4' U A 5 51.450 46.221 43.143 1.00 55.97 C +ATOM 94 O4' U A 5 52.432 47.275 43.039 1.00 55.58 O +ATOM 95 C3' U A 5 50.695 46.272 41.826 1.00 56.58 C +ATOM 96 O3' U A 5 49.393 45.733 41.981 1.00 58.63 O +ATOM 97 C2' U A 5 50.663 47.767 41.536 1.00 55.50 C +ATOM 98 O2' U A 5 49.696 48.452 42.301 1.00 56.71 O +ATOM 99 C1' U A 5 52.048 48.188 42.023 1.00 54.24 C +ATOM 100 N1 U A 5 53.071 48.125 40.974 1.00 50.31 N +ATOM 101 C2 U A 5 53.197 49.208 40.124 1.00 48.81 C +ATOM 102 O2 U A 5 52.488 50.194 40.204 1.00 48.14 O +ATOM 103 N3 U A 5 54.188 49.091 39.181 1.00 47.64 N +ATOM 104 C4 U A 5 55.044 48.019 39.011 1.00 49.86 C +ATOM 105 O4 U A 5 55.897 48.060 38.122 1.00 53.10 O +ATOM 106 C5 U A 5 54.843 46.933 39.930 1.00 49.29 C +ATOM 107 C6 U A 5 53.886 47.020 40.854 1.00 48.98 C +ATOM 108 P A A 6 48.651 45.080 40.719 1.00 60.24 P +ATOM 109 OP1 A A 6 47.527 44.256 41.233 1.00 60.47 O +ATOM 110 OP2 A A 6 49.696 44.440 39.882 1.00 58.91 O +ATOM 111 O5' A A 6 48.047 46.341 39.956 1.00 56.95 O +ATOM 112 C5' A A 6 47.050 47.139 40.571 1.00 55.21 C +ATOM 113 C4' A A 6 46.808 48.385 39.760 1.00 56.41 C +ATOM 114 O4' A A 6 47.992 49.219 39.787 1.00 56.16 O +ATOM 115 C3' A A 6 46.574 48.148 38.285 1.00 57.58 C +ATOM 116 O3' A A 6 45.232 47.755 38.032 1.00 59.85 O +ATOM 117 C2' A A 6 46.960 49.491 37.679 1.00 55.59 C +ATOM 118 O2' A A 6 45.980 50.474 37.905 1.00 56.04 O +ATOM 119 C1' A A 6 48.163 49.859 38.536 1.00 53.99 C +ATOM 120 N9 A A 6 49.425 49.404 37.958 1.00 52.37 N +ATOM 121 C8 A A 6 50.091 48.223 38.172 1.00 52.73 C +ATOM 122 N7 A A 6 51.212 48.119 37.495 1.00 50.40 N +ATOM 123 C5 A A 6 51.282 49.309 36.791 1.00 48.95 C +ATOM 124 C6 A A 6 52.220 49.810 35.895 1.00 49.10 C +ATOM 125 N6 A A 6 53.319 49.157 35.543 1.00 49.07 N +ATOM 126 N1 A A 6 51.991 51.030 35.360 1.00 49.55 N +ATOM 127 C2 A A 6 50.892 51.689 35.721 1.00 49.92 C +ATOM 128 N3 A A 6 49.936 51.324 36.564 1.00 51.13 N +ATOM 129 C4 A A 6 50.192 50.108 37.068 1.00 50.04 C +ATOM 130 P U A 7 44.942 46.678 36.880 1.00 60.77 P +ATOM 131 OP1 U A 7 43.556 46.166 37.041 1.00 62.34 O +ATOM 132 OP2 U A 7 46.083 45.727 36.862 1.00 60.86 O +ATOM 133 O5' U A 7 45.014 47.576 35.575 1.00 58.27 O +ATOM 134 C5' U A 7 44.309 48.807 35.537 1.00 56.31 C +ATOM 135 C4' U A 7 44.796 49.660 34.396 1.00 55.63 C +ATOM 136 O4' U A 7 46.124 50.175 34.690 1.00 53.71 O +ATOM 137 C3' U A 7 44.989 48.897 33.106 1.00 55.41 C +ATOM 138 O3' U A 7 43.761 48.723 32.432 1.00 57.39 O +ATOM 139 C2' U A 7 45.975 49.781 32.356 1.00 54.03 C +ATOM 140 O2' U A 7 45.344 50.895 31.752 1.00 54.05 O +ATOM 141 C1' U A 7 46.877 50.253 33.497 1.00 51.60 C +ATOM 142 N1 U A 7 48.069 49.414 33.644 1.00 48.98 N +ATOM 143 C2 U A 7 49.147 49.744 32.880 1.00 47.41 C +ATOM 144 O2 U A 7 49.125 50.684 32.101 1.00 50.13 O +ATOM 145 N3 U A 7 50.245 48.941 33.048 1.00 44.70 N +ATOM 146 C4 U A 7 50.360 47.854 33.884 1.00 44.88 C +ATOM 147 O4 U A 7 51.421 47.226 33.925 1.00 43.14 O +ATOM 148 C5 U A 7 49.192 47.568 34.642 1.00 45.41 C +ATOM 149 C6 U A 7 48.109 48.343 34.502 1.00 48.51 C +ATOM 150 P C A 8 43.662 47.638 31.261 1.00 59.85 P +ATOM 151 OP1 C A 8 42.278 47.710 30.723 1.00 61.02 O +ATOM 152 OP2 C A 8 44.188 46.346 31.770 1.00 59.29 O +ATOM 153 O5' C A 8 44.678 48.182 30.158 1.00 58.48 O +ATOM 154 C5' C A 8 44.351 49.334 29.392 1.00 56.82 C +ATOM 155 C4' C A 8 45.288 49.473 28.222 1.00 58.23 C +ATOM 156 O4' C A 8 46.602 49.835 28.707 1.00 57.92 O +ATOM 157 C3' C A 8 45.519 48.211 27.410 1.00 58.66 C +ATOM 158 O3' C A 8 44.512 48.077 26.413 1.00 61.50 O +ATOM 159 C2' C A 8 46.870 48.491 26.771 1.00 57.69 C +ATOM 160 O2' C A 8 46.744 49.342 25.647 1.00 56.83 O +ATOM 161 C1' C A 8 47.593 49.232 27.896 1.00 56.12 C +ATOM 162 N1 C A 8 48.418 48.363 28.744 1.00 53.94 N +ATOM 163 C2 C A 8 49.783 48.292 28.489 1.00 52.97 C +ATOM 164 O2 C A 8 50.251 48.967 27.565 1.00 54.92 O +ATOM 165 N3 C A 8 50.560 47.493 29.251 1.00 50.44 N +ATOM 166 C4 C A 8 50.013 46.784 30.242 1.00 49.28 C +ATOM 167 N4 C A 8 50.812 46.013 30.966 1.00 47.57 N +ATOM 168 C5 C A 8 48.619 46.840 30.530 1.00 50.26 C +ATOM 169 C6 C A 8 47.865 47.635 29.762 1.00 52.95 C +ATOM 170 P A A 9 44.220 46.636 25.756 1.00 62.39 P +ATOM 171 OP1 A A 9 43.364 45.868 26.691 1.00 62.54 O +ATOM 172 OP2 A A 9 45.505 46.055 25.302 1.00 62.79 O +ATOM 173 O5' A A 9 43.321 46.991 24.492 1.00 64.20 O +ATOM 174 C5' A A 9 43.849 46.942 23.173 1.00 69.12 C +ATOM 175 C4' A A 9 42.837 47.488 22.188 1.00 71.94 C +ATOM 176 O4' A A 9 41.791 46.511 21.961 1.00 74.83 O +ATOM 177 C3' A A 9 42.121 48.739 22.656 1.00 71.21 C +ATOM 178 O3' A A 9 42.375 49.964 21.965 1.00 68.03 O +ATOM 179 C2' A A 9 40.779 48.297 23.235 1.00 73.66 C +ATOM 180 O2' A A 9 39.714 49.146 22.861 1.00 73.60 O +ATOM 181 C1' A A 9 40.588 46.912 22.594 1.00 77.57 C +ATOM 182 N9 A A 9 40.229 45.843 23.530 1.00 83.33 N +ATOM 183 C8 A A 9 40.530 45.749 24.869 1.00 84.98 C +ATOM 184 N7 A A 9 40.113 44.636 25.429 1.00 87.16 N +ATOM 185 C5 A A 9 39.485 43.954 24.394 1.00 88.00 C +ATOM 186 C6 A A 9 38.840 42.694 24.335 1.00 89.06 C +ATOM 187 N6 A A 9 38.726 41.864 25.379 1.00 88.96 N +ATOM 188 N1 A A 9 38.314 42.312 23.147 1.00 89.43 N +ATOM 189 C2 A A 9 38.439 43.138 22.097 1.00 89.45 C +ATOM 190 N3 A A 9 39.028 44.337 22.025 1.00 88.20 N +ATOM 191 C4 A A 9 39.536 44.692 23.221 1.00 86.70 C +ATOM 192 P A A 10 41.514 50.352 20.666 1.00 61.47 P +ATOM 193 OP1 A A 10 40.725 49.160 20.325 1.00 65.15 O +ATOM 194 OP2 A A 10 42.447 50.920 19.669 1.00 65.52 O +ATOM 195 O5' A A 10 40.538 51.510 21.159 1.00 61.29 O +ATOM 196 C5' A A 10 39.126 51.356 21.085 1.00 61.12 C +ATOM 197 C4' A A 10 38.435 52.547 21.702 1.00 61.27 C +ATOM 198 O4' A A 10 38.545 52.487 23.140 1.00 61.33 O +ATOM 199 C3' A A 10 39.017 53.894 21.326 1.00 60.56 C +ATOM 200 O3' A A 10 38.418 54.348 20.136 1.00 62.31 O +ATOM 201 C2' A A 10 38.590 54.770 22.486 1.00 60.01 C +ATOM 202 O2' A A 10 37.262 55.220 22.354 1.00 61.63 O +ATOM 203 C1' A A 10 38.702 53.795 23.654 1.00 60.36 C +ATOM 204 N9 A A 10 39.993 53.847 24.327 1.00 60.66 N +ATOM 205 C8 A A 10 40.916 52.837 24.411 1.00 60.47 C +ATOM 206 N7 A A 10 41.969 53.145 25.124 1.00 62.84 N +ATOM 207 C5 A A 10 41.727 54.453 25.533 1.00 62.66 C +ATOM 208 C6 A A 10 42.457 55.346 26.339 1.00 62.24 C +ATOM 209 N6 A A 10 43.621 55.042 26.911 1.00 63.38 N +ATOM 210 N1 A A 10 41.939 56.573 26.545 1.00 62.82 N +ATOM 211 C2 A A 10 40.765 56.873 25.983 1.00 62.56 C +ATOM 212 N3 A A 10 39.981 56.121 25.217 1.00 62.85 N +ATOM 213 C4 A A 10 40.523 54.905 25.030 1.00 62.24 C +ATOM 214 P G A 11 39.283 55.186 19.092 1.00 64.09 P +ATOM 215 OP1 G A 11 38.517 55.279 17.830 1.00 67.46 O +ATOM 216 OP2 G A 11 40.632 54.579 19.093 1.00 65.72 O +ATOM 217 O5' G A 11 39.385 56.634 19.737 1.00 64.27 O +ATOM 218 C5' G A 11 38.238 57.286 20.263 1.00 65.57 C +ATOM 219 C4' G A 11 38.672 58.430 21.142 1.00 66.04 C +ATOM 220 O4' G A 11 39.266 57.913 22.356 1.00 66.05 O +ATOM 221 C3' G A 11 39.753 59.293 20.527 1.00 66.30 C +ATOM 222 O3' G A 11 39.131 60.294 19.737 1.00 68.41 O +ATOM 223 C2' G A 11 40.417 59.895 21.755 1.00 65.85 C +ATOM 224 O2' G A 11 39.667 60.970 22.273 1.00 68.84 O +ATOM 225 C1' G A 11 40.345 58.737 22.749 1.00 65.15 C +ATOM 226 N9 G A 11 41.537 57.901 22.820 1.00 64.75 N +ATOM 227 C8 G A 11 41.777 56.766 22.093 1.00 63.49 C +ATOM 228 N7 G A 11 42.910 56.195 22.394 1.00 64.89 N +ATOM 229 C5 G A 11 43.455 57.007 23.378 1.00 64.88 C +ATOM 230 C6 G A 11 44.666 56.884 24.103 1.00 64.13 C +ATOM 231 O6 G A 11 45.526 55.999 24.029 1.00 64.41 O +ATOM 232 N1 G A 11 44.830 57.926 25.000 1.00 64.36 N +ATOM 233 C2 G A 11 43.947 58.946 25.189 1.00 65.00 C +ATOM 234 N2 G A 11 44.297 59.851 26.098 1.00 68.08 N +ATOM 235 N3 G A 11 42.807 59.069 24.535 1.00 65.84 N +ATOM 236 C4 G A 11 42.627 58.071 23.645 1.00 65.62 C +ATOM 237 P A A 12 39.589 60.508 18.216 1.00 72.17 P +ATOM 238 OP1 A A 12 38.441 61.088 17.469 1.00 72.28 O +ATOM 239 OP2 A A 12 40.202 59.237 17.756 1.00 71.67 O +ATOM 240 O5' A A 12 40.736 61.612 18.310 1.00 73.09 O +ATOM 241 C5' A A 12 40.436 62.931 18.755 1.00 74.99 C +ATOM 242 C4' A A 12 41.689 63.630 19.220 1.00 76.06 C +ATOM 243 O4' A A 12 42.252 62.910 20.347 1.00 75.60 O +ATOM 244 C3' A A 12 42.811 63.640 18.200 1.00 77.69 C +ATOM 245 O3' A A 12 42.666 64.736 17.314 1.00 84.06 O +ATOM 246 C2' A A 12 44.049 63.806 19.063 1.00 76.03 C +ATOM 247 O2' A A 12 44.266 65.155 19.407 1.00 74.27 O +ATOM 248 C1' A A 12 43.669 62.990 20.300 1.00 75.72 C +ATOM 249 N9 A A 12 44.223 61.636 20.328 1.00 75.30 N +ATOM 250 C8 A A 12 44.108 60.649 19.388 1.00 74.14 C +ATOM 251 N7 A A 12 44.736 59.544 19.705 1.00 74.09 N +ATOM 252 C5 A A 12 45.300 59.823 20.941 1.00 74.63 C +ATOM 253 C6 A A 12 46.096 59.060 21.819 1.00 74.42 C +ATOM 254 N6 A A 12 46.478 57.808 21.578 1.00 72.95 N +ATOM 255 N1 A A 12 46.490 59.638 22.971 1.00 74.65 N +ATOM 256 C2 A A 12 46.104 60.888 23.220 1.00 74.97 C +ATOM 257 N3 A A 12 45.361 61.704 22.480 1.00 75.87 N +ATOM 258 C4 A A 12 44.989 61.105 21.338 1.00 75.00 C +ATOM 259 P G A 13 42.588 64.456 15.747 1.00 89.08 P +ATOM 260 OP1 G A 13 41.214 63.997 15.432 1.00 89.24 O +ATOM 261 OP2 G A 13 43.757 63.599 15.410 1.00 88.56 O +ATOM 262 O5' G A 13 42.840 65.858 15.051 1.00 92.85 O +ATOM 263 C5' G A 13 43.609 65.918 13.855 1.00 99.27 C +ATOM 264 C4' G A 13 44.119 67.311 13.644 1.00103.14 C +ATOM 265 O4' G A 13 44.653 67.791 14.898 1.00103.90 O +ATOM 266 C3' G A 13 45.283 67.411 12.672 1.00105.04 C +ATOM 267 O3' G A 13 44.800 67.565 11.345 1.00108.37 O +ATOM 268 C2' G A 13 45.964 68.692 13.125 1.00105.26 C +ATOM 269 O2' G A 13 45.315 69.841 12.618 1.00104.89 O +ATOM 270 C1' G A 13 45.756 68.625 14.639 1.00104.73 C +ATOM 271 N9 G A 13 46.891 68.187 15.441 1.00104.87 N +ATOM 272 C8 G A 13 47.268 66.915 15.809 1.00104.80 C +ATOM 273 N7 G A 13 48.320 66.902 16.586 1.00104.77 N +ATOM 274 C5 G A 13 48.654 68.244 16.726 1.00104.42 C +ATOM 275 C6 G A 13 49.696 68.877 17.464 1.00103.88 C +ATOM 276 O6 G A 13 50.565 68.363 18.184 1.00102.76 O +ATOM 277 N1 G A 13 49.657 70.262 17.305 1.00104.10 N +ATOM 278 C2 G A 13 48.734 70.949 16.541 1.00104.31 C +ATOM 279 N2 G A 13 48.843 72.280 16.483 1.00103.88 N +ATOM 280 N3 G A 13 47.769 70.373 15.873 1.00104.42 N +ATOM 281 C4 G A 13 47.787 69.036 16.008 1.00104.66 C +ATOM 282 P A A 14 44.891 66.334 10.322 1.00111.53 P +ATOM 283 OP1 A A 14 43.610 65.588 10.429 1.00111.71 O +ATOM 284 OP2 A A 14 46.174 65.631 10.568 1.00111.96 O +ATOM 285 O5' A A 14 44.952 67.015 8.880 1.00113.37 O +ATOM 286 C5' A A 14 46.163 67.595 8.388 1.00115.63 C +ATOM 287 C4' A A 14 45.863 68.602 7.295 1.00117.25 C +ATOM 288 O4' A A 14 45.362 67.887 6.140 1.00118.63 O +ATOM 289 C3' A A 14 44.811 69.629 7.703 1.00117.39 C +ATOM 290 O3' A A 14 45.367 70.922 7.924 1.00115.58 O +ATOM 291 C2' A A 14 43.702 69.579 6.645 1.00118.52 C +ATOM 292 O2' A A 14 43.661 70.767 5.878 1.00117.82 O +ATOM 293 C1' A A 14 44.122 68.423 5.730 1.00119.51 C +ATOM 294 N9 A A 14 43.165 67.322 5.573 1.00120.87 N +ATOM 295 C8 A A 14 43.339 66.006 5.934 1.00121.79 C +ATOM 296 N7 A A 14 42.327 65.231 5.622 1.00122.72 N +ATOM 297 C5 A A 14 41.418 66.095 5.023 1.00122.75 C +ATOM 298 C6 A A 14 40.141 65.887 4.464 1.00122.97 C +ATOM 299 N6 A A 14 39.545 64.692 4.404 1.00123.09 N +ATOM 300 N1 A A 14 39.493 66.962 3.957 1.00122.70 N +ATOM 301 C2 A A 14 40.097 68.157 4.010 1.00122.76 C +ATOM 302 N3 A A 14 41.296 68.477 4.503 1.00122.66 N +ATOM 303 C4 A A 14 41.914 67.389 4.999 1.00122.06 C +ATOM 304 P G A 15 46.313 71.178 9.199 1.00114.09 P +ATOM 305 OP1 G A 15 47.669 70.679 8.842 1.00113.11 O +ATOM 306 OP2 G A 15 45.634 70.652 10.411 1.00113.63 O +ATOM 307 O5' G A 15 46.392 72.765 9.299 1.00110.78 O +ATOM 308 C5' G A 15 47.622 73.436 9.083 1.00106.55 C +ATOM 309 C4' G A 15 47.841 74.474 10.147 1.00104.29 C +ATOM 310 O4' G A 15 47.457 73.923 11.434 1.00103.66 O +ATOM 311 C3' G A 15 49.285 74.901 10.335 1.00103.12 C +ATOM 312 O3' G A 15 49.677 75.893 9.400 1.00102.02 O +ATOM 313 C2' G A 15 49.282 75.408 11.769 1.00102.62 C +ATOM 314 O2' G A 15 48.760 76.718 11.867 1.00102.61 O +ATOM 315 C1' G A 15 48.341 74.398 12.438 1.00102.79 C +ATOM 316 N9 G A 15 49.064 73.248 12.975 1.00102.03 N +ATOM 317 C8 G A 15 48.919 71.930 12.610 1.00101.72 C +ATOM 318 N7 G A 15 49.732 71.131 13.246 1.00101.59 N +ATOM 319 C5 G A 15 50.453 71.971 14.085 1.00101.16 C +ATOM 320 C6 G A 15 51.487 71.679 15.022 1.00101.10 C +ATOM 321 O6 G A 15 51.994 70.575 15.304 1.00101.15 O +ATOM 322 N1 G A 15 51.932 72.833 15.662 1.00100.41 N +ATOM 323 C2 G A 15 51.449 74.098 15.432 1.00 99.93 C +ATOM 324 N2 G A 15 51.999 75.086 16.142 1.00 99.94 N +ATOM 325 N3 G A 15 50.493 74.377 14.567 1.00100.17 N +ATOM 326 C4 G A 15 50.045 73.278 13.935 1.00100.88 C +ATOM 327 P G A 16 51.026 75.682 8.551 1.00101.42 P +ATOM 328 OP1 G A 16 50.682 75.731 7.109 1.00102.83 O +ATOM 329 OP2 G A 16 51.725 74.492 9.095 1.00101.20 O +ATOM 330 O5' G A 16 51.919 76.949 8.908 1.00100.66 O +ATOM 331 C5' G A 16 53.321 76.916 8.702 1.00100.34 C +ATOM 332 C4' G A 16 54.036 77.485 9.896 1.00100.56 C +ATOM 333 O4' G A 16 53.436 76.981 11.111 1.00 99.81 O +ATOM 334 C3' G A 16 55.491 77.080 9.985 1.00101.38 C +ATOM 335 O3' G A 16 56.265 77.979 9.201 1.00103.43 O +ATOM 336 C2' G A 16 55.778 77.206 11.477 1.00100.28 C +ATOM 337 O2' G A 16 56.066 78.524 11.885 1.00101.05 O +ATOM 338 C1' G A 16 54.443 76.770 12.086 1.00 99.62 C +ATOM 339 N9 G A 16 54.369 75.375 12.509 1.00 98.45 N +ATOM 340 C8 G A 16 53.508 74.423 12.025 1.00 97.73 C +ATOM 341 N7 G A 16 53.644 73.266 12.608 1.00 96.93 N +ATOM 342 C5 G A 16 54.659 73.463 13.530 1.00 96.67 C +ATOM 343 C6 G A 16 55.243 72.561 14.451 1.00 96.34 C +ATOM 344 O6 G A 16 54.965 71.373 14.646 1.00 96.14 O +ATOM 345 N1 G A 16 56.247 73.169 15.195 1.00 96.64 N +ATOM 346 C2 G A 16 56.637 74.479 15.071 1.00 97.14 C +ATOM 347 N2 G A 16 57.623 74.875 15.890 1.00 96.62 N +ATOM 348 N3 G A 16 56.099 75.334 14.211 1.00 97.69 N +ATOM 349 C4 G A 16 55.123 74.760 13.478 1.00 97.40 C +ATOM 350 P U A 17 57.613 77.465 8.504 1.00105.06 P +ATOM 351 OP1 U A 17 58.306 78.633 7.898 1.00106.21 O +ATOM 352 OP2 U A 17 57.264 76.299 7.656 1.00105.45 O +ATOM 353 O5' U A 17 58.481 76.978 9.742 1.00104.29 O +ATOM 354 C5' U A 17 59.030 77.934 10.631 1.00105.27 C +ATOM 355 C4' U A 17 60.024 77.281 11.542 1.00106.09 C +ATOM 356 O4' U A 17 59.313 76.526 12.556 1.00106.80 O +ATOM 357 C3' U A 17 60.896 76.236 10.865 1.00106.38 C +ATOM 358 O3' U A 17 61.999 76.794 10.166 1.00105.97 O +ATOM 359 C2' U A 17 61.333 75.377 12.039 1.00107.09 C +ATOM 360 O2' U A 17 62.390 75.956 12.777 1.00107.37 O +ATOM 361 C1' U A 17 60.062 75.368 12.886 1.00107.53 C +ATOM 362 N1 U A 17 59.249 74.171 12.641 1.00108.23 N +ATOM 363 C2 U A 17 59.727 72.987 13.165 1.00108.78 C +ATOM 364 O2 U A 17 60.774 72.918 13.788 1.00108.71 O +ATOM 365 N3 U A 17 58.941 71.889 12.933 1.00109.36 N +ATOM 366 C4 U A 17 57.756 71.849 12.242 1.00109.57 C +ATOM 367 O4 U A 17 57.161 70.773 12.132 1.00109.52 O +ATOM 368 C5 U A 17 57.327 73.116 11.719 1.00109.14 C +ATOM 369 C6 U A 17 58.072 74.209 11.933 1.00108.45 C +ATOM 370 P G A 18 62.500 76.096 8.807 1.00105.66 P +ATOM 371 OP1 G A 18 63.661 76.851 8.267 1.00106.51 O +ATOM 372 OP2 G A 18 61.283 75.919 7.968 1.00105.50 O +ATOM 373 O5' G A 18 63.018 74.668 9.285 1.00103.99 O +ATOM 374 C5' G A 18 64.021 74.559 10.291 1.00102.43 C +ATOM 375 C4' G A 18 64.199 73.117 10.695 1.00101.12 C +ATOM 376 O4' G A 18 62.949 72.618 11.238 1.00100.63 O +ATOM 377 C3' G A 18 64.527 72.165 9.556 1.00100.12 C +ATOM 378 O3' G A 18 65.928 72.132 9.335 1.00 99.74 O +ATOM 379 C2' G A 18 64.031 70.830 10.098 1.00 99.32 C +ATOM 380 O2' G A 18 64.952 70.220 10.976 1.00 98.70 O +ATOM 381 C1' G A 18 62.774 71.261 10.858 1.00 99.21 C +ATOM 382 N9 G A 18 61.557 71.174 10.058 1.00 97.34 N +ATOM 383 C8 G A 18 61.041 72.135 9.221 1.00 96.69 C +ATOM 384 N7 G A 18 59.926 71.773 8.650 1.00 96.07 N +ATOM 385 C5 G A 18 59.693 70.496 9.136 1.00 95.84 C +ATOM 386 C6 G A 18 58.632 69.595 8.875 1.00 95.53 C +ATOM 387 O6 G A 18 57.654 69.753 8.139 1.00 94.90 O +ATOM 388 N1 G A 18 58.790 68.401 9.575 1.00 95.75 N +ATOM 389 C2 G A 18 59.837 68.113 10.420 1.00 95.59 C +ATOM 390 N2 G A 18 59.815 66.907 10.994 1.00 95.41 N +ATOM 391 N3 G A 18 60.830 68.947 10.676 1.00 95.69 N +ATOM 392 C4 G A 18 60.695 70.110 10.004 1.00 96.38 C +ATOM 393 P G A 19 66.529 72.627 7.927 1.00100.83 P +ATOM 394 OP1 G A 19 67.023 74.021 8.096 1.00101.74 O +ATOM 395 OP2 G A 19 65.531 72.332 6.866 1.00 99.87 O +ATOM 396 O5' G A 19 67.784 71.666 7.719 1.00 98.72 O +ATOM 397 C5' G A 19 67.715 70.548 6.836 1.00 95.36 C +ATOM 398 C4' G A 19 67.006 69.387 7.504 1.00 92.73 C +ATOM 399 O4' G A 19 65.677 69.803 7.898 1.00 92.37 O +ATOM 400 C3' G A 19 66.784 68.160 6.634 1.00 90.61 C +ATOM 401 O3' G A 19 67.898 67.278 6.715 1.00 88.58 O +ATOM 402 C2' G A 19 65.571 67.513 7.282 1.00 90.73 C +ATOM 403 O2' G A 19 65.939 66.784 8.435 1.00 91.75 O +ATOM 404 C1' G A 19 64.761 68.740 7.698 1.00 90.64 C +ATOM 405 N9 G A 19 63.754 69.219 6.755 1.00 88.83 N +ATOM 406 C8 G A 19 63.909 70.246 5.855 1.00 87.97 C +ATOM 407 N7 G A 19 62.804 70.558 5.236 1.00 87.34 N +ATOM 408 C5 G A 19 61.865 69.664 5.732 1.00 87.12 C +ATOM 409 C6 G A 19 60.486 69.532 5.442 1.00 86.28 C +ATOM 410 O6 G A 19 59.791 70.206 4.678 1.00 85.66 O +ATOM 411 N1 G A 19 59.914 68.489 6.154 1.00 86.49 N +ATOM 412 C2 G A 19 60.577 67.680 7.038 1.00 87.60 C +ATOM 413 N2 G A 19 59.838 66.725 7.615 1.00 88.67 N +ATOM 414 N3 G A 19 61.863 67.797 7.332 1.00 87.70 N +ATOM 415 C4 G A 19 62.442 68.805 6.647 1.00 87.88 C +ATOM 416 P A A 20 67.943 65.983 5.777 1.00 86.58 P +ATOM 417 OP1 A A 20 69.331 65.483 5.704 1.00 86.40 O +ATOM 418 OP2 A A 20 67.232 66.383 4.539 1.00 86.39 O +ATOM 419 O5' A A 20 67.063 64.896 6.537 1.00 85.63 O +ATOM 420 C5' A A 20 67.650 63.993 7.479 1.00 83.85 C +ATOM 421 C4' A A 20 66.922 62.667 7.448 1.00 82.33 C +ATOM 422 O4' A A 20 65.507 62.890 7.680 1.00 81.16 O +ATOM 423 C3' A A 20 66.983 61.952 6.114 1.00 81.89 C +ATOM 424 O3' A A 20 68.221 61.231 6.041 1.00 83.05 O +ATOM 425 C2' A A 20 65.712 61.108 6.103 1.00 81.15 C +ATOM 426 O2' A A 20 65.786 59.824 6.656 1.00 83.37 O +ATOM 427 C1' A A 20 64.744 61.986 6.902 1.00 80.09 C +ATOM 428 N9 A A 20 63.779 62.755 6.122 1.00 77.26 N +ATOM 429 C8 A A 20 63.909 64.014 5.592 1.00 76.84 C +ATOM 430 N7 A A 20 62.844 64.431 4.955 1.00 76.08 N +ATOM 431 C5 A A 20 61.958 63.373 5.068 1.00 75.98 C +ATOM 432 C6 A A 20 60.651 63.184 4.598 1.00 75.86 C +ATOM 433 N6 A A 20 59.982 64.094 3.882 1.00 76.10 N +ATOM 434 N1 A A 20 60.045 62.012 4.888 1.00 75.42 N +ATOM 435 C2 A A 20 60.720 61.100 5.602 1.00 76.18 C +ATOM 436 N3 A A 20 61.952 61.161 6.096 1.00 76.33 N +ATOM 437 C4 A A 20 62.522 62.336 5.786 1.00 76.27 C +ATOM 438 P G A 21 68.416 59.835 6.842 1.00 83.99 P +ATOM 439 OP1 G A 21 69.871 59.617 7.084 1.00 82.93 O +ATOM 440 OP2 G A 21 67.632 58.787 6.129 1.00 85.06 O +ATOM 441 O5' G A 21 67.758 60.103 8.267 1.00 81.30 O +ATOM 442 C5' G A 21 67.378 59.027 9.123 1.00 78.72 C +ATOM 443 C4' G A 21 66.027 59.321 9.725 1.00 78.10 C +ATOM 444 O4' G A 21 65.080 59.521 8.640 1.00 78.26 O +ATOM 445 C3' G A 21 65.380 58.242 10.572 1.00 76.75 C +ATOM 446 O3' G A 21 65.797 58.230 11.918 1.00 75.15 O +ATOM 447 C2' G A 21 63.914 58.615 10.469 1.00 77.51 C +ATOM 448 O2' G A 21 63.635 59.759 11.250 1.00 78.02 O +ATOM 449 C1' G A 21 63.821 58.986 8.994 1.00 78.22 C +ATOM 450 N9 G A 21 63.595 57.775 8.211 1.00 78.46 N +ATOM 451 C8 G A 21 64.527 57.004 7.558 1.00 78.61 C +ATOM 452 N7 G A 21 64.008 55.947 6.988 1.00 79.65 N +ATOM 453 C5 G A 21 62.651 56.035 7.272 1.00 79.52 C +ATOM 454 C6 G A 21 61.569 55.176 6.920 1.00 79.20 C +ATOM 455 O6 G A 21 61.593 54.121 6.262 1.00 77.93 O +ATOM 456 N1 G A 21 60.362 55.653 7.420 1.00 79.94 N +ATOM 457 C2 G A 21 60.211 56.801 8.162 1.00 80.08 C +ATOM 458 N2 G A 21 58.978 57.110 8.559 1.00 80.92 N +ATOM 459 N3 G A 21 61.202 57.597 8.494 1.00 79.71 N +ATOM 460 C4 G A 21 62.383 57.161 8.020 1.00 79.25 C +ATOM 461 P G A 22 65.553 56.907 12.788 1.00 75.22 P +ATOM 462 OP1 G A 22 66.079 57.154 14.161 1.00 76.23 O +ATOM 463 OP2 G A 22 66.048 55.739 12.002 1.00 74.26 O +ATOM 464 O5' G A 22 63.966 56.780 12.860 1.00 74.14 O +ATOM 465 C5' G A 22 63.189 57.768 13.513 1.00 71.88 C +ATOM 466 C4' G A 22 61.736 57.364 13.541 1.00 70.11 C +ATOM 467 O4' G A 22 61.245 57.258 12.173 1.00 69.75 O +ATOM 468 C3' G A 22 61.479 55.972 14.091 1.00 69.37 C +ATOM 469 O3' G A 22 61.441 55.892 15.497 1.00 68.01 O +ATOM 470 C2' G A 22 60.128 55.634 13.493 1.00 69.71 C +ATOM 471 O2' G A 22 59.080 56.284 14.172 1.00 69.55 O +ATOM 472 C1' G A 22 60.269 56.226 12.097 1.00 70.83 C +ATOM 473 N9 G A 22 60.698 55.184 11.167 1.00 71.65 N +ATOM 474 C8 G A 22 61.942 54.973 10.631 1.00 71.65 C +ATOM 475 N7 G A 22 61.995 53.916 9.865 1.00 72.21 N +ATOM 476 C5 G A 22 60.704 53.408 9.890 1.00 71.92 C +ATOM 477 C6 G A 22 60.149 52.278 9.247 1.00 71.25 C +ATOM 478 O6 G A 22 60.704 51.471 8.496 1.00 71.85 O +ATOM 479 N1 G A 22 58.797 52.130 9.550 1.00 71.46 N +ATOM 480 C2 G A 22 58.071 52.964 10.362 1.00 71.45 C +ATOM 481 N2 G A 22 56.779 52.662 10.534 1.00 71.19 N +ATOM 482 N3 G A 22 58.578 54.021 10.962 1.00 72.00 N +ATOM 483 C4 G A 22 59.891 54.181 10.684 1.00 72.15 C +ATOM 484 P G A 23 61.563 54.455 16.191 1.00 67.32 P +ATOM 485 OP1 G A 23 61.633 54.663 17.661 1.00 67.78 O +ATOM 486 OP2 G A 23 62.665 53.751 15.493 1.00 67.92 O +ATOM 487 O5' G A 23 60.178 53.745 15.842 1.00 66.55 O +ATOM 488 C5' G A 23 58.959 54.370 16.209 1.00 66.95 C +ATOM 489 C4' G A 23 57.770 53.491 15.901 1.00 66.33 C +ATOM 490 O4' G A 23 57.553 53.426 14.460 1.00 66.90 O +ATOM 491 C3' G A 23 57.922 52.034 16.291 1.00 66.34 C +ATOM 492 O3' G A 23 57.682 51.787 17.656 1.00 69.23 O +ATOM 493 C2' G A 23 56.884 51.359 15.412 1.00 64.38 C +ATOM 494 O2' G A 23 55.584 51.547 15.920 1.00 61.23 O +ATOM 495 C1' G A 23 57.037 52.146 14.114 1.00 64.35 C +ATOM 496 N9 G A 23 57.967 51.457 13.227 1.00 63.89 N +ATOM 497 C8 G A 23 59.306 51.697 13.043 1.00 63.75 C +ATOM 498 N7 G A 23 59.868 50.849 12.223 1.00 64.11 N +ATOM 499 C5 G A 23 58.831 50.010 11.833 1.00 62.97 C +ATOM 500 C6 G A 23 58.825 48.887 10.958 1.00 62.43 C +ATOM 501 O6 G A 23 59.769 48.388 10.326 1.00 63.41 O +ATOM 502 N1 G A 23 57.556 48.332 10.852 1.00 61.36 N +ATOM 503 C2 G A 23 56.437 48.785 11.502 1.00 60.60 C +ATOM 504 N2 G A 23 55.296 48.112 11.268 1.00 60.05 N +ATOM 505 N3 G A 23 56.431 49.822 12.322 1.00 61.58 N +ATOM 506 C4 G A 23 57.652 50.383 12.437 1.00 62.69 C +ATOM 507 P A A 24 58.081 50.365 18.262 1.00 70.89 P +ATOM 508 OP1 A A 24 58.882 49.647 17.244 1.00 73.17 O +ATOM 509 OP2 A A 24 56.848 49.740 18.787 1.00 72.21 O +ATOM 510 O5' A A 24 59.039 50.727 19.478 1.00 71.11 O +ATOM 511 C5' A A 24 60.110 51.657 19.320 1.00 70.21 C +ATOM 512 C4' A A 24 61.356 51.123 19.985 1.00 68.55 C +ATOM 513 O4' A A 24 61.028 50.722 21.337 1.00 67.16 O +ATOM 514 C3' A A 24 61.944 49.873 19.358 1.00 69.42 C +ATOM 515 O3' A A 24 62.824 50.253 18.304 1.00 71.85 O +ATOM 516 C2' A A 24 62.695 49.249 20.531 1.00 67.92 C +ATOM 517 O2' A A 24 63.935 49.871 20.803 1.00 69.68 O +ATOM 518 C1' A A 24 61.752 49.558 21.688 1.00 64.41 C +ATOM 519 N9 A A 24 60.780 48.506 21.963 1.00 60.75 N +ATOM 520 C8 A A 24 59.468 48.471 21.572 1.00 59.22 C +ATOM 521 N7 A A 24 58.812 47.425 22.015 1.00 59.13 N +ATOM 522 C5 A A 24 59.761 46.720 22.737 1.00 58.33 C +ATOM 523 C6 A A 24 59.689 45.530 23.474 1.00 58.17 C +ATOM 524 N6 A A 24 58.567 44.818 23.625 1.00 58.76 N +ATOM 525 N1 A A 24 60.816 45.090 24.067 1.00 58.32 N +ATOM 526 C2 A A 24 61.931 45.814 23.930 1.00 60.28 C +ATOM 527 N3 A A 24 62.122 46.959 23.277 1.00 61.00 N +ATOM 528 C4 A A 24 60.983 47.364 22.697 1.00 60.30 C +ATOM 529 P C A 25 63.295 49.164 17.228 1.00 72.52 P +ATOM 530 OP1 C A 25 64.442 49.734 16.487 1.00 70.92 O +ATOM 531 OP2 C A 25 62.101 48.674 16.477 1.00 74.42 O +ATOM 532 O5' C A 25 63.825 47.968 18.134 1.00 71.83 O +ATOM 533 C5' C A 25 65.165 47.952 18.598 1.00 72.62 C +ATOM 534 C4' C A 25 65.485 46.606 19.185 1.00 74.39 C +ATOM 535 O4' C A 25 64.558 46.356 20.273 1.00 73.10 O +ATOM 536 C3' C A 25 65.263 45.426 18.250 1.00 76.56 C +ATOM 537 O3' C A 25 66.392 45.192 17.419 1.00 81.10 O +ATOM 538 C2' C A 25 65.043 44.274 19.223 1.00 74.88 C +ATOM 539 O2' C A 25 66.249 43.738 19.735 1.00 75.19 O +ATOM 540 C1' C A 25 64.261 44.972 20.335 1.00 72.77 C +ATOM 541 N1 C A 25 62.813 44.801 20.227 1.00 71.71 N +ATOM 542 C2 C A 25 62.260 43.662 20.760 1.00 71.83 C +ATOM 543 O2 C A 25 63.013 42.827 21.270 1.00 73.95 O +ATOM 544 N3 C A 25 60.927 43.481 20.711 1.00 70.88 N +ATOM 545 C4 C A 25 60.155 44.391 20.139 1.00 69.84 C +ATOM 546 N4 C A 25 58.841 44.155 20.123 1.00 70.13 N +ATOM 547 C5 C A 25 60.695 45.576 19.562 1.00 69.41 C +ATOM 548 C6 C A 25 62.022 45.740 19.626 1.00 70.68 C +ATOM 549 P U A 26 66.238 44.250 16.126 1.00 85.16 P +ATOM 550 OP1 U A 26 67.594 43.929 15.605 1.00 84.53 O +ATOM 551 OP2 U A 26 65.243 44.884 15.235 1.00 85.22 O +ATOM 552 O5' U A 26 65.582 42.908 16.686 1.00 83.10 O +ATOM 553 C5' U A 26 66.404 41.853 17.168 1.00 83.06 C +ATOM 554 C4' U A 26 65.751 40.520 16.911 1.00 82.90 C +ATOM 555 O4' U A 26 64.618 40.350 17.795 1.00 83.33 O +ATOM 556 C3' U A 26 65.164 40.371 15.525 1.00 82.05 C +ATOM 557 O3' U A 26 66.184 39.990 14.616 1.00 81.59 O +ATOM 558 C2' U A 26 64.113 39.289 15.737 1.00 82.83 C +ATOM 559 O2' U A 26 64.643 37.983 15.780 1.00 83.21 O +ATOM 560 C1' U A 26 63.594 39.639 17.129 1.00 83.33 C +ATOM 561 N1 U A 26 62.387 40.475 17.115 1.00 84.07 N +ATOM 562 C2 U A 26 61.168 39.833 17.084 1.00 84.45 C +ATOM 563 O2 U A 26 61.060 38.619 17.070 1.00 84.31 O +ATOM 564 N3 U A 26 60.076 40.662 17.073 1.00 84.96 N +ATOM 565 C4 U A 26 60.082 42.039 17.090 1.00 85.37 C +ATOM 566 O4 U A 26 59.012 42.648 17.081 1.00 85.84 O +ATOM 567 C5 U A 26 61.383 42.627 17.120 1.00 84.60 C +ATOM 568 C6 U A 26 62.465 41.842 17.132 1.00 84.27 C +ATOM 569 P G A 27 66.132 40.515 13.104 1.00 81.65 P +ATOM 570 OP1 G A 27 67.350 40.038 12.413 1.00 83.23 O +ATOM 571 OP2 G A 27 65.837 41.963 13.132 1.00 82.55 O +ATOM 572 O5' G A 27 64.885 39.731 12.503 1.00 80.51 O +ATOM 573 C5' G A 27 64.935 38.317 12.376 1.00 78.28 C +ATOM 574 C4' G A 27 63.552 37.741 12.178 1.00 77.67 C +ATOM 575 O4' G A 27 62.747 38.009 13.362 1.00 77.49 O +ATOM 576 C3' G A 27 62.728 38.306 11.023 1.00 76.44 C +ATOM 577 O3' G A 27 63.058 37.664 9.795 1.00 75.91 O +ATOM 578 C2' G A 27 61.311 37.972 11.470 1.00 76.07 C +ATOM 579 O2' G A 27 61.007 36.613 11.242 1.00 74.28 O +ATOM 580 C1' G A 27 61.397 38.227 12.979 1.00 76.21 C +ATOM 581 N9 G A 27 61.016 39.598 13.319 1.00 74.43 N +ATOM 582 C8 G A 27 61.838 40.697 13.410 1.00 74.12 C +ATOM 583 N7 G A 27 61.190 41.800 13.682 1.00 73.38 N +ATOM 584 C5 G A 27 59.863 41.404 13.788 1.00 72.40 C +ATOM 585 C6 G A 27 58.695 42.162 14.067 1.00 71.55 C +ATOM 586 O6 G A 27 58.592 43.386 14.280 1.00 70.85 O +ATOM 587 N1 G A 27 57.559 41.356 14.086 1.00 70.35 N +ATOM 588 C2 G A 27 57.544 40.002 13.863 1.00 70.15 C +ATOM 589 N2 G A 27 56.350 39.400 13.926 1.00 68.30 N +ATOM 590 N3 G A 27 58.623 39.288 13.598 1.00 71.70 N +ATOM 591 C4 G A 27 59.740 40.047 13.577 1.00 72.98 C +ATOM 592 P G A 28 62.365 38.133 8.409 1.00 76.89 P +ATOM 593 OP1 G A 28 62.160 36.878 7.623 1.00 77.47 O +ATOM 594 OP2 G A 28 63.124 39.269 7.796 1.00 75.40 O +ATOM 595 O5' G A 28 60.924 38.672 8.823 1.00 76.26 O +ATOM 596 C5' G A 28 60.164 39.487 7.926 1.00 73.92 C +ATOM 597 C4' G A 28 58.705 39.462 8.314 1.00 71.92 C +ATOM 598 O4' G A 28 58.573 39.835 9.714 1.00 71.54 O +ATOM 599 C3' G A 28 57.811 40.439 7.565 1.00 70.88 C +ATOM 600 O3' G A 28 57.367 39.868 6.331 1.00 69.61 O +ATOM 601 C2' G A 28 56.656 40.616 8.546 1.00 70.99 C +ATOM 602 O2' G A 28 55.717 39.557 8.480 1.00 71.07 O +ATOM 603 C1' G A 28 57.387 40.587 9.894 1.00 71.11 C +ATOM 604 N9 G A 28 57.746 41.916 10.380 1.00 70.31 N +ATOM 605 C8 G A 28 58.962 42.543 10.281 1.00 70.75 C +ATOM 606 N7 G A 28 58.958 43.747 10.782 1.00 70.48 N +ATOM 607 C5 G A 28 57.663 43.920 11.251 1.00 69.56 C +ATOM 608 C6 G A 28 57.055 45.027 11.906 1.00 69.08 C +ATOM 609 O6 G A 28 57.557 46.119 12.224 1.00 68.50 O +ATOM 610 N1 G A 28 55.724 44.771 12.202 1.00 69.21 N +ATOM 611 C2 G A 28 55.060 43.608 11.915 1.00 69.07 C +ATOM 612 N2 G A 28 53.767 43.555 12.280 1.00 68.80 N +ATOM 613 N3 G A 28 55.616 42.572 11.315 1.00 69.71 N +ATOM 614 C4 G A 28 56.906 42.797 11.014 1.00 69.55 C +ATOM 615 P C A 29 57.271 40.780 5.008 1.00 67.90 P +ATOM 616 OP1 C A 29 56.896 39.914 3.864 1.00 70.57 O +ATOM 617 OP2 C A 29 58.508 41.596 4.940 1.00 69.03 O +ATOM 618 O5' C A 29 56.055 41.759 5.299 1.00 66.35 O +ATOM 619 C5' C A 29 54.758 41.248 5.567 1.00 62.83 C +ATOM 620 C4' C A 29 53.946 42.279 6.308 1.00 62.09 C +ATOM 621 O4' C A 29 54.537 42.496 7.619 1.00 59.41 O +ATOM 622 C3' C A 29 53.949 43.661 5.684 1.00 62.50 C +ATOM 623 O3' C A 29 53.018 43.803 4.618 1.00 64.25 O +ATOM 624 C2' C A 29 53.618 44.546 6.876 1.00 61.37 C +ATOM 625 O2' C A 29 52.234 44.525 7.187 1.00 61.74 O +ATOM 626 C1' C A 29 54.421 43.860 7.981 1.00 59.52 C +ATOM 627 N1 C A 29 55.777 44.424 8.092 1.00 59.57 N +ATOM 628 C2 C A 29 55.950 45.631 8.772 1.00 59.50 C +ATOM 629 O2 C A 29 54.973 46.175 9.280 1.00 60.54 O +ATOM 630 N3 C A 29 57.180 46.174 8.858 1.00 59.71 N +ATOM 631 C4 C A 29 58.225 45.562 8.299 1.00 59.10 C +ATOM 632 N4 C A 29 59.412 46.152 8.405 1.00 56.50 N +ATOM 633 C5 C A 29 58.091 44.321 7.607 1.00 59.16 C +ATOM 634 C6 C A 29 56.856 43.790 7.529 1.00 59.74 C +ATOM 635 P C A 30 53.015 45.164 3.761 1.00 65.71 P +ATOM 636 OP1 C A 30 51.995 45.078 2.682 1.00 66.48 O +ATOM 637 OP2 C A 30 54.428 45.487 3.422 1.00 64.15 O +ATOM 638 O5' C A 30 52.539 46.252 4.817 1.00 66.68 O +ATOM 639 C5' C A 30 52.834 47.619 4.624 1.00 66.07 C +ATOM 640 C4' C A 30 52.552 48.383 5.883 1.00 64.24 C +ATOM 641 O4' C A 30 53.379 47.875 6.961 1.00 63.99 O +ATOM 642 C3' C A 30 52.853 49.863 5.817 1.00 63.38 C +ATOM 643 O3' C A 30 51.704 50.500 5.285 1.00 63.48 O +ATOM 644 C2' C A 30 53.060 50.195 7.287 1.00 63.64 C +ATOM 645 O2' C A 30 51.818 50.289 7.955 1.00 63.72 O +ATOM 646 C1' C A 30 53.793 48.945 7.782 1.00 63.35 C +ATOM 647 N1 C A 30 55.243 49.051 7.628 1.00 63.96 N +ATOM 648 C2 C A 30 55.945 49.948 8.418 1.00 64.30 C +ATOM 649 O2 C A 30 55.330 50.610 9.257 1.00 66.15 O +ATOM 650 N3 C A 30 57.280 50.073 8.250 1.00 64.07 N +ATOM 651 C4 C A 30 57.909 49.334 7.339 1.00 63.26 C +ATOM 652 N4 C A 30 59.218 49.497 7.206 1.00 63.72 N +ATOM 653 C5 C A 30 57.220 48.395 6.526 1.00 63.27 C +ATOM 654 C6 C A 30 55.897 48.284 6.704 1.00 64.28 C +ATOM 655 P C A 31 51.870 51.754 4.306 1.00 64.41 P +ATOM 656 OP1 C A 31 50.528 52.130 3.784 1.00 63.20 O +ATOM 657 OP2 C A 31 52.983 51.484 3.365 1.00 63.17 O +ATOM 658 O5' C A 31 52.369 52.895 5.282 1.00 63.89 O +ATOM 659 C5' C A 31 51.578 53.280 6.382 1.00 63.36 C +ATOM 660 C4' C A 31 52.287 54.339 7.160 1.00 63.12 C +ATOM 661 O4' C A 31 53.352 53.730 7.927 1.00 63.91 O +ATOM 662 C3' C A 31 53.003 55.344 6.284 1.00 61.70 C +ATOM 663 O3' C A 31 52.113 56.345 5.844 1.00 61.08 O +ATOM 664 C2' C A 31 54.052 55.885 7.231 1.00 62.18 C +ATOM 665 O2' C A 31 53.483 56.788 8.145 1.00 62.99 O +ATOM 666 C1' C A 31 54.443 54.622 7.990 1.00 63.19 C +ATOM 667 N1 C A 31 55.620 53.977 7.410 1.00 63.84 N +ATOM 668 C2 C A 31 56.831 54.589 7.597 1.00 63.43 C +ATOM 669 O2 C A 31 56.855 55.634 8.245 1.00 64.84 O +ATOM 670 N3 C A 31 57.946 54.041 7.081 1.00 63.21 N +ATOM 671 C4 C A 31 57.872 52.902 6.402 1.00 64.27 C +ATOM 672 N4 C A 31 59.010 52.390 5.922 1.00 64.98 N +ATOM 673 C5 C A 31 56.633 52.238 6.190 1.00 65.15 C +ATOM 674 C6 C A 31 55.535 52.809 6.707 1.00 64.47 C +ATOM 675 P G A 32 52.458 57.185 4.523 1.00 62.37 P +ATOM 676 OP1 G A 32 51.396 58.213 4.397 1.00 60.41 O +ATOM 677 OP2 G A 32 52.715 56.238 3.403 1.00 60.94 O +ATOM 678 O5' G A 32 53.835 57.910 4.866 1.00 63.18 O +ATOM 679 C5' G A 32 53.847 59.093 5.641 1.00 62.39 C +ATOM 680 C4' G A 32 55.228 59.676 5.680 1.00 63.39 C +ATOM 681 O4' G A 32 56.105 58.751 6.367 1.00 64.76 O +ATOM 682 C3' G A 32 55.889 59.815 4.326 1.00 64.49 C +ATOM 683 O3' G A 32 55.509 60.970 3.617 1.00 65.91 O +ATOM 684 C2' G A 32 57.362 59.837 4.675 1.00 65.04 C +ATOM 685 O2' G A 32 57.780 61.102 5.143 1.00 64.75 O +ATOM 686 C1' G A 32 57.404 58.811 5.800 1.00 64.89 C +ATOM 687 N9 G A 32 57.744 57.503 5.264 1.00 66.38 N +ATOM 688 C8 G A 32 56.907 56.435 5.060 1.00 68.11 C +ATOM 689 N7 G A 32 57.510 55.412 4.521 1.00 69.20 N +ATOM 690 C5 G A 32 58.823 55.836 4.361 1.00 68.47 C +ATOM 691 C6 G A 32 59.932 55.175 3.806 1.00 69.12 C +ATOM 692 O6 G A 32 59.980 54.056 3.304 1.00 71.60 O +ATOM 693 N1 G A 32 61.076 55.961 3.856 1.00 69.48 N +ATOM 694 C2 G A 32 61.139 57.234 4.358 1.00 69.13 C +ATOM 695 N2 G A 32 62.336 57.831 4.314 1.00 68.48 N +ATOM 696 N3 G A 32 60.103 57.870 4.863 1.00 68.83 N +ATOM 697 C4 G A 32 58.984 57.116 4.833 1.00 67.70 C +ATOM 698 P A A 33 55.228 60.837 2.054 1.00 67.60 P +ATOM 699 OP1 A A 33 53.763 60.625 1.905 1.00 65.92 O +ATOM 700 OP2 A A 33 56.180 59.801 1.567 1.00 67.33 O +ATOM 701 O5' A A 33 55.593 62.258 1.434 1.00 67.76 O +ATOM 702 C5' A A 33 56.865 62.878 1.641 1.00 69.76 C +ATOM 703 C4' A A 33 56.994 64.038 0.684 1.00 71.33 C +ATOM 704 O4' A A 33 58.204 64.805 0.937 1.00 71.47 O +ATOM 705 C3' A A 33 57.125 63.544 -0.740 1.00 72.06 C +ATOM 706 O3' A A 33 56.034 63.736 -1.619 1.00 74.07 O +ATOM 707 C2' A A 33 58.602 63.589 -1.112 1.00 71.79 C +ATOM 708 O2' A A 33 58.810 64.058 -2.429 1.00 71.97 O +ATOM 709 C1' A A 33 59.144 64.615 -0.110 1.00 70.81 C +ATOM 710 N9 A A 33 60.441 64.313 0.492 1.00 69.50 N +ATOM 711 C8 A A 33 61.506 65.166 0.616 1.00 69.12 C +ATOM 712 N7 A A 33 62.547 64.634 1.211 1.00 68.67 N +ATOM 713 C5 A A 33 62.140 63.340 1.497 1.00 68.66 C +ATOM 714 C6 A A 33 62.789 62.260 2.126 1.00 67.48 C +ATOM 715 N6 A A 33 64.024 62.321 2.622 1.00 67.34 N +ATOM 716 N1 A A 33 62.112 61.104 2.236 1.00 66.36 N +ATOM 717 C2 A A 33 60.863 61.047 1.756 1.00 68.99 C +ATOM 718 N3 A A 33 60.140 61.993 1.155 1.00 68.41 N +ATOM 719 C4 A A 33 60.845 63.127 1.054 1.00 69.05 C +ATOM 720 P U A 34 55.824 65.152 -2.328 1.00 74.88 P +ATOM 721 OP1 U A 34 55.020 64.908 -3.544 1.00 76.95 O +ATOM 722 OP2 U A 34 57.139 65.818 -2.430 1.00 77.84 O +ATOM 723 O5' U A 34 54.926 65.989 -1.318 1.00 78.42 O +ATOM 724 C5' U A 34 54.185 65.351 -0.295 1.00 81.29 C +ATOM 725 C4' U A 34 52.728 65.677 -0.440 1.00 83.18 C +ATOM 726 O4' U A 34 52.277 65.244 -1.744 1.00 85.09 O +ATOM 727 C3' U A 34 51.830 64.944 0.538 1.00 84.70 C +ATOM 728 O3' U A 34 51.739 65.734 1.721 1.00 86.22 O +ATOM 729 C2' U A 34 50.492 64.920 -0.195 1.00 85.34 C +ATOM 730 O2' U A 34 49.750 66.116 -0.048 1.00 86.46 O +ATOM 731 C1' U A 34 50.941 64.780 -1.652 1.00 85.85 C +ATOM 732 N1 U A 34 50.856 63.449 -2.274 1.00 86.02 N +ATOM 733 C2 U A 34 49.694 62.731 -2.110 1.00 86.35 C +ATOM 734 O2 U A 34 48.760 63.134 -1.441 1.00 86.70 O +ATOM 735 N3 U A 34 49.663 61.521 -2.759 1.00 86.83 N +ATOM 736 C4 U A 34 50.662 60.967 -3.534 1.00 86.45 C +ATOM 737 O4 U A 34 50.500 59.849 -4.031 1.00 85.04 O +ATOM 738 C5 U A 34 51.837 61.771 -3.643 1.00 86.54 C +ATOM 739 C6 U A 34 51.894 62.951 -3.021 1.00 85.75 C +ATOM 740 P G A 35 52.152 65.101 3.133 1.00 86.03 P +ATOM 741 OP1 G A 35 53.057 63.962 2.842 1.00 87.58 O +ATOM 742 OP2 G A 35 50.900 64.870 3.900 1.00 86.93 O +ATOM 743 O5' G A 35 52.992 66.243 3.851 1.00 82.44 O +ATOM 744 C5' G A 35 53.697 65.970 5.055 1.00 82.21 C +ATOM 745 C4' G A 35 54.954 65.202 4.743 1.00 80.34 C +ATOM 746 O4' G A 35 55.443 65.620 3.455 1.00 81.24 O +ATOM 747 C3' G A 35 56.105 65.432 5.709 1.00 80.16 C +ATOM 748 O3' G A 35 56.017 64.446 6.733 1.00 78.85 O +ATOM 749 C2' G A 35 57.326 65.138 4.843 1.00 81.09 C +ATOM 750 O2' G A 35 57.613 63.762 4.756 1.00 84.00 O +ATOM 751 C1' G A 35 56.852 65.607 3.468 1.00 81.14 C +ATOM 752 N9 G A 35 57.345 66.850 2.883 1.00 80.09 N +ATOM 753 C8 G A 35 56.599 67.774 2.191 1.00 79.74 C +ATOM 754 N7 G A 35 57.324 68.703 1.637 1.00 79.94 N +ATOM 755 C5 G A 35 58.624 68.394 2.016 1.00 78.91 C +ATOM 756 C6 G A 35 59.843 69.026 1.693 1.00 78.16 C +ATOM 757 O6 G A 35 60.033 70.005 0.961 1.00 79.05 O +ATOM 758 N1 G A 35 60.919 68.399 2.305 1.00 76.96 N +ATOM 759 C2 G A 35 60.834 67.298 3.114 1.00 77.37 C +ATOM 760 N2 G A 35 61.990 66.850 3.623 1.00 76.36 N +ATOM 761 N3 G A 35 59.702 66.685 3.407 1.00 78.05 N +ATOM 762 C4 G A 35 58.645 67.280 2.825 1.00 78.58 C +ATOM 763 P A A 36 56.302 64.840 8.264 1.00 76.30 P +ATOM 764 OP1 A A 36 54.975 64.874 8.942 1.00 75.67 O +ATOM 765 OP2 A A 36 57.180 66.045 8.282 1.00 77.08 O +ATOM 766 O5' A A 36 57.155 63.624 8.842 1.00 72.20 O +ATOM 767 C5' A A 36 56.630 62.304 8.880 1.00 69.65 C +ATOM 768 C4' A A 36 57.735 61.338 9.196 1.00 67.97 C +ATOM 769 O4' A A 36 58.775 61.499 8.202 1.00 68.85 O +ATOM 770 C3' A A 36 58.432 61.569 10.525 1.00 67.41 C +ATOM 771 O3' A A 36 57.747 60.830 11.524 1.00 67.02 O +ATOM 772 C2' A A 36 59.815 60.974 10.276 1.00 67.37 C +ATOM 773 O2' A A 36 59.886 59.573 10.441 1.00 66.90 O +ATOM 774 C1' A A 36 60.045 61.341 8.808 1.00 67.53 C +ATOM 775 N9 A A 36 60.752 62.600 8.641 1.00 66.76 N +ATOM 776 C8 A A 36 60.375 63.652 7.852 1.00 67.45 C +ATOM 777 N7 A A 36 61.191 64.671 7.908 1.00 66.96 N +ATOM 778 C5 A A 36 62.172 64.259 8.794 1.00 66.08 C +ATOM 779 C6 A A 36 63.311 64.889 9.276 1.00 66.19 C +ATOM 780 N6 A A 36 63.665 66.125 8.928 1.00 67.40 N +ATOM 781 N1 A A 36 64.087 64.205 10.142 1.00 66.85 N +ATOM 782 C2 A A 36 63.716 62.966 10.495 1.00 66.08 C +ATOM 783 N3 A A 36 62.657 62.268 10.111 1.00 65.19 N +ATOM 784 C4 A A 36 61.917 62.982 9.248 1.00 65.98 C +ATOM 785 P A A 37 57.509 61.470 12.975 1.00 68.44 P +ATOM 786 OP1 A A 37 56.864 60.414 13.806 1.00 68.71 O +ATOM 787 OP2 A A 37 56.818 62.771 12.773 1.00 66.15 O +ATOM 788 O5' A A 37 58.982 61.698 13.553 1.00 69.51 O +ATOM 789 C5' A A 37 59.702 60.597 14.106 1.00 72.39 C +ATOM 790 C4' A A 37 61.083 61.004 14.590 1.00 73.88 C +ATOM 791 O4' A A 37 61.842 61.585 13.493 1.00 74.64 O +ATOM 792 C3' A A 37 61.133 62.080 15.665 1.00 75.34 C +ATOM 793 O3' A A 37 60.948 61.522 16.963 1.00 77.76 O +ATOM 794 C2' A A 37 62.544 62.635 15.506 1.00 74.93 C +ATOM 795 O2' A A 37 63.525 61.813 16.108 1.00 73.93 O +ATOM 796 C1' A A 37 62.730 62.569 13.995 1.00 75.06 C +ATOM 797 N9 A A 37 62.515 63.833 13.299 1.00 76.44 N +ATOM 798 C8 A A 37 61.475 64.214 12.492 1.00 77.47 C +ATOM 799 N7 A A 37 61.604 65.421 12.002 1.00 77.88 N +ATOM 800 C5 A A 37 62.808 65.868 12.528 1.00 78.70 C +ATOM 801 C6 A A 37 63.516 67.076 12.386 1.00 79.68 C +ATOM 802 N6 A A 37 63.093 68.103 11.641 1.00 80.75 N +ATOM 803 N1 A A 37 64.689 67.195 13.045 1.00 80.31 N +ATOM 804 C2 A A 37 65.112 66.167 13.792 1.00 80.01 C +ATOM 805 N3 A A 37 64.538 64.987 14.002 1.00 79.09 N +ATOM 806 C4 A A 37 63.376 64.900 13.332 1.00 78.07 C +ATOM 807 P A A 38 60.393 62.448 18.155 1.00 79.26 P +ATOM 808 OP1 A A 38 60.704 61.769 19.430 1.00 80.61 O +ATOM 809 OP2 A A 38 58.991 62.817 17.844 1.00 79.34 O +ATOM 810 O5' A A 38 61.291 63.760 18.070 1.00 79.38 O +ATOM 811 C5' A A 38 62.553 63.820 18.730 1.00 81.15 C +ATOM 812 C4' A A 38 63.073 65.228 18.704 1.00 81.79 C +ATOM 813 O4' A A 38 63.352 65.593 17.331 1.00 81.63 O +ATOM 814 C3' A A 38 62.094 66.283 19.177 1.00 82.49 C +ATOM 815 O3' A A 38 62.076 66.412 20.583 1.00 84.40 O +ATOM 816 C2' A A 38 62.616 67.524 18.479 1.00 82.22 C +ATOM 817 O2' A A 38 63.767 68.030 19.123 1.00 83.01 O +ATOM 818 C1' A A 38 62.993 66.945 17.115 1.00 80.98 C +ATOM 819 N9 A A 38 61.822 66.947 16.243 1.00 78.84 N +ATOM 820 C8 A A 38 60.905 65.942 16.088 1.00 78.39 C +ATOM 821 N7 A A 38 59.915 66.249 15.289 1.00 77.70 N +ATOM 822 C5 A A 38 60.210 67.540 14.875 1.00 77.24 C +ATOM 823 C6 A A 38 59.546 68.437 14.018 1.00 77.01 C +ATOM 824 N6 A A 38 58.390 68.170 13.407 1.00 76.37 N +ATOM 825 N1 A A 38 60.117 69.640 13.812 1.00 77.26 N +ATOM 826 C2 A A 38 61.268 69.918 14.433 1.00 77.25 C +ATOM 827 N3 A A 38 61.981 69.165 15.263 1.00 77.22 N +ATOM 828 C4 A A 38 61.391 67.974 15.444 1.00 77.56 C +ATOM 829 P C A 39 60.743 66.942 21.298 1.00 86.61 P +ATOM 830 OP1 C A 39 60.919 66.819 22.766 1.00 87.75 O +ATOM 831 OP2 C A 39 59.580 66.302 20.641 1.00 86.54 O +ATOM 832 O5' C A 39 60.712 68.487 20.936 1.00 86.18 O +ATOM 833 C5' C A 39 61.720 69.347 21.428 1.00 85.71 C +ATOM 834 C4' C A 39 61.518 70.740 20.903 1.00 86.21 C +ATOM 835 O4' C A 39 61.657 70.721 19.457 1.00 85.21 O +ATOM 836 C3' C A 39 60.124 71.312 21.113 1.00 86.52 C +ATOM 837 O3' C A 39 59.927 71.874 22.399 1.00 87.69 O +ATOM 838 C2' C A 39 60.063 72.379 20.039 1.00 86.39 C +ATOM 839 O2' C A 39 60.788 73.527 20.422 1.00 87.59 O +ATOM 840 C1' C A 39 60.782 71.680 18.888 1.00 85.69 C +ATOM 841 N1 C A 39 59.790 71.009 18.040 1.00 85.17 N +ATOM 842 C2 C A 39 59.112 71.781 17.103 1.00 85.98 C +ATOM 843 O2 C A 39 59.424 72.977 16.983 1.00 88.51 O +ATOM 844 N3 C A 39 58.140 71.218 16.353 1.00 85.49 N +ATOM 845 C4 C A 39 57.847 69.928 16.510 1.00 84.91 C +ATOM 846 N4 C A 39 56.868 69.416 15.759 1.00 84.63 N +ATOM 847 C5 C A 39 58.543 69.105 17.445 1.00 84.88 C +ATOM 848 C6 C A 39 59.503 69.681 18.179 1.00 84.74 C +ATOM 849 P C A 40 58.440 71.960 23.004 1.00 87.52 P +ATOM 850 OP1 C A 40 58.530 72.443 24.403 1.00 87.13 O +ATOM 851 OP2 C A 40 57.789 70.663 22.722 1.00 88.65 O +ATOM 852 O5' C A 40 57.724 73.076 22.125 1.00 87.10 O +ATOM 853 C5' C A 40 58.160 74.423 22.184 1.00 87.69 C +ATOM 854 C4' C A 40 57.305 75.294 21.301 1.00 88.35 C +ATOM 855 O4' C A 40 57.424 74.836 19.927 1.00 88.43 O +ATOM 856 C3' C A 40 55.811 75.229 21.578 1.00 89.15 C +ATOM 857 O3' C A 40 55.427 76.080 22.652 1.00 89.80 O +ATOM 858 C2' C A 40 55.221 75.672 20.247 1.00 89.22 C +ATOM 859 O2' C A 40 55.242 77.071 20.063 1.00 90.74 O +ATOM 860 C1' C A 40 56.184 75.016 19.259 1.00 89.11 C +ATOM 861 N1 C A 40 55.680 73.714 18.791 1.00 89.08 N +ATOM 862 C2 C A 40 54.720 73.712 17.784 1.00 88.89 C +ATOM 863 O2 C A 40 54.357 74.800 17.312 1.00 88.07 O +ATOM 864 N3 C A 40 54.214 72.537 17.349 1.00 88.17 N +ATOM 865 C4 C A 40 54.640 71.394 17.881 1.00 87.25 C +ATOM 866 N4 C A 40 54.111 70.259 17.420 1.00 86.84 N +ATOM 867 C5 C A 40 55.627 71.365 18.910 1.00 87.49 C +ATOM 868 C6 C A 40 56.118 72.537 19.329 1.00 88.37 C +ATOM 869 P C A 41 54.296 75.590 23.687 1.00 91.70 P +ATOM 870 OP1 C A 41 54.317 76.506 24.848 1.00 92.23 O +ATOM 871 OP2 C A 41 54.484 74.132 23.905 1.00 92.16 O +ATOM 872 O5' C A 41 52.921 75.809 22.911 1.00 89.93 O +ATOM 873 C5' C A 41 52.470 77.118 22.601 1.00 89.57 C +ATOM 874 C4' C A 41 51.643 77.101 21.344 1.00 89.19 C +ATOM 875 O4' C A 41 52.410 76.440 20.301 1.00 89.84 O +ATOM 876 C3' C A 41 50.360 76.288 21.406 1.00 88.65 C +ATOM 877 O3' C A 41 49.269 76.984 21.992 1.00 87.24 O +ATOM 878 C2' C A 41 50.117 75.978 19.940 1.00 89.20 C +ATOM 879 O2' C A 41 49.606 77.084 19.234 1.00 90.10 O +ATOM 880 C1' C A 41 51.538 75.698 19.463 1.00 89.86 C +ATOM 881 N1 C A 41 51.817 74.263 19.619 1.00 90.67 N +ATOM 882 C2 C A 41 51.094 73.376 18.829 1.00 90.46 C +ATOM 883 O2 C A 41 50.292 73.835 18.017 1.00 90.97 O +ATOM 884 N3 C A 41 51.280 72.049 18.972 1.00 90.17 N +ATOM 885 C4 C A 41 52.155 71.592 19.865 1.00 91.13 C +ATOM 886 N4 C A 41 52.292 70.264 19.975 1.00 91.98 N +ATOM 887 C5 C A 41 52.927 72.476 20.683 1.00 91.06 C +ATOM 888 C6 C A 41 52.730 73.795 20.523 1.00 90.74 C +ATOM 889 P G A 42 48.270 76.196 22.975 1.00 87.44 P +ATOM 890 OP1 G A 42 47.291 77.141 23.567 1.00 89.10 O +ATOM 891 OP2 G A 42 49.134 75.380 23.871 1.00 88.78 O +ATOM 892 O5' G A 42 47.474 75.205 22.013 1.00 86.64 O +ATOM 893 C5' G A 42 46.541 75.702 21.061 1.00 83.77 C +ATOM 894 C4' G A 42 45.922 74.562 20.279 1.00 82.63 C +ATOM 895 O4' G A 42 46.960 73.869 19.533 1.00 81.47 O +ATOM 896 C3' G A 42 45.236 73.476 21.096 1.00 81.18 C +ATOM 897 O3' G A 42 43.883 73.838 21.383 1.00 79.00 O +ATOM 898 C2' G A 42 45.304 72.282 20.150 1.00 81.50 C +ATOM 899 O2' G A 42 44.294 72.313 19.164 1.00 82.78 O +ATOM 900 C1' G A 42 46.671 72.484 19.489 1.00 81.61 C +ATOM 901 N9 G A 42 47.741 71.774 20.181 1.00 81.64 N +ATOM 902 C8 G A 42 48.763 72.326 20.911 1.00 81.07 C +ATOM 903 N7 G A 42 49.539 71.435 21.463 1.00 81.18 N +ATOM 904 C5 G A 42 49.003 70.221 21.061 1.00 81.25 C +ATOM 905 C6 G A 42 49.410 68.898 21.358 1.00 81.50 C +ATOM 906 O6 G A 42 50.354 68.526 22.067 1.00 81.74 O +ATOM 907 N1 G A 42 48.589 67.959 20.740 1.00 81.55 N +ATOM 908 C2 G A 42 47.512 68.257 19.943 1.00 81.83 C +ATOM 909 N2 G A 42 46.847 67.214 19.438 1.00 82.10 N +ATOM 910 N3 G A 42 47.119 69.488 19.664 1.00 81.24 N +ATOM 911 C4 G A 42 47.904 70.414 20.254 1.00 81.41 C +ATOM 912 P G A 43 43.122 73.181 22.637 1.00 79.16 P +ATOM 913 OP1 G A 43 41.728 73.681 22.656 1.00 80.54 O +ATOM 914 OP2 G A 43 43.981 73.361 23.831 1.00 80.58 O +ATOM 915 O5' G A 43 43.054 71.627 22.294 1.00 78.89 O +ATOM 916 C5' G A 43 42.267 71.158 21.205 1.00 76.22 C +ATOM 917 C4' G A 43 42.432 69.665 21.035 1.00 73.95 C +ATOM 918 O4' G A 43 43.825 69.361 20.731 1.00 73.16 O +ATOM 919 C3' G A 43 42.147 68.845 22.284 1.00 72.25 C +ATOM 920 O3' G A 43 40.760 68.556 22.410 1.00 70.37 O +ATOM 921 C2' G A 43 42.934 67.568 22.021 1.00 72.79 C +ATOM 922 O2' G A 43 42.252 66.676 21.167 1.00 72.66 O +ATOM 923 C1' G A 43 44.169 68.108 21.301 1.00 73.72 C +ATOM 924 N9 G A 43 45.326 68.263 22.176 1.00 74.90 N +ATOM 925 C8 G A 43 45.959 69.425 22.531 1.00 75.68 C +ATOM 926 N7 G A 43 46.978 69.231 23.326 1.00 76.53 N +ATOM 927 C5 G A 43 47.014 67.856 23.511 1.00 76.40 C +ATOM 928 C6 G A 43 47.904 67.046 24.278 1.00 77.11 C +ATOM 929 O6 G A 43 48.872 67.395 24.964 1.00 77.75 O +ATOM 930 N1 G A 43 47.576 65.697 24.188 1.00 77.74 N +ATOM 931 C2 G A 43 46.535 65.187 23.456 1.00 77.07 C +ATOM 932 N2 G A 43 46.377 63.863 23.507 1.00 75.92 N +ATOM 933 N3 G A 43 45.705 65.927 22.731 1.00 77.52 N +ATOM 934 C4 G A 43 46.002 67.244 22.807 1.00 76.21 C +ATOM 935 P C A 44 40.195 67.977 23.797 1.00 69.28 P +ATOM 936 OP1 C A 44 38.714 67.902 23.774 1.00 70.40 O +ATOM 937 OP2 C A 44 40.874 68.768 24.857 1.00 71.31 O +ATOM 938 O5' C A 44 40.754 66.488 23.872 1.00 68.86 O +ATOM 939 C5' C A 44 40.391 65.506 22.905 1.00 66.43 C +ATOM 940 C4' C A 44 41.060 64.188 23.236 1.00 63.86 C +ATOM 941 O4' C A 44 42.501 64.360 23.212 1.00 61.55 O +ATOM 942 C3' C A 44 40.764 63.664 24.631 1.00 62.52 C +ATOM 943 O3' C A 44 39.610 62.844 24.610 1.00 63.93 O +ATOM 944 C2' C A 44 41.970 62.790 24.921 1.00 61.24 C +ATOM 945 O2' C A 44 41.822 61.512 24.348 1.00 60.87 O +ATOM 946 C1' C A 44 43.089 63.572 24.232 1.00 60.02 C +ATOM 947 N1 C A 44 43.846 64.470 25.117 1.00 57.66 N +ATOM 948 C2 C A 44 44.654 63.921 26.119 1.00 56.64 C +ATOM 949 O2 C A 44 44.654 62.698 26.294 1.00 55.06 O +ATOM 950 N3 C A 44 45.410 64.740 26.872 1.00 56.82 N +ATOM 951 C4 C A 44 45.372 66.056 26.665 1.00 57.91 C +ATOM 952 N4 C A 44 46.153 66.830 27.420 1.00 58.97 N +ATOM 953 C5 C A 44 44.533 66.641 25.676 1.00 57.75 C +ATOM 954 C6 C A 44 43.788 65.821 24.938 1.00 57.21 C +ATOM 955 P A A 45 38.915 62.435 25.990 1.00 67.24 P +ATOM 956 OP1 A A 45 37.920 61.357 25.739 1.00 66.87 O +ATOM 957 OP2 A A 45 38.473 63.720 26.574 1.00 68.09 O +ATOM 958 O5' A A 45 40.101 61.855 26.886 1.00 64.88 O +ATOM 959 C5' A A 45 40.493 60.486 26.806 1.00 61.73 C +ATOM 960 C4' A A 45 41.533 60.188 27.856 1.00 60.43 C +ATOM 961 O4' A A 45 42.672 61.053 27.651 1.00 58.62 O +ATOM 962 C3' A A 45 41.106 60.425 29.294 1.00 60.22 C +ATOM 963 O3' A A 45 40.583 59.206 29.787 1.00 62.36 O +ATOM 964 C2' A A 45 42.432 60.692 29.984 1.00 58.55 C +ATOM 965 O2' A A 45 43.085 59.476 30.257 1.00 60.38 O +ATOM 966 C1' A A 45 43.194 61.456 28.902 1.00 57.88 C +ATOM 967 N9 A A 45 43.076 62.911 28.943 1.00 57.39 N +ATOM 968 C8 A A 45 42.160 63.673 28.261 1.00 56.72 C +ATOM 969 N7 A A 45 42.351 64.962 28.378 1.00 55.38 N +ATOM 970 C5 A A 45 43.445 65.058 29.218 1.00 55.87 C +ATOM 971 C6 A A 45 44.141 66.154 29.716 1.00 56.96 C +ATOM 972 N6 A A 45 43.820 67.421 29.438 1.00 57.41 N +ATOM 973 N1 A A 45 45.196 65.909 30.525 1.00 57.38 N +ATOM 974 C2 A A 45 45.510 64.636 30.807 1.00 56.39 C +ATOM 975 N3 A A 45 44.925 63.522 30.402 1.00 56.23 N +ATOM 976 C4 A A 45 43.888 63.803 29.596 1.00 56.50 C +ATOM 977 P A A 46 39.689 59.199 31.111 1.00 66.16 P +ATOM 978 OP1 A A 46 39.133 57.830 31.270 1.00 64.50 O +ATOM 979 OP2 A A 46 38.779 60.365 30.994 1.00 65.42 O +ATOM 980 O5' A A 46 40.701 59.506 32.306 1.00 67.24 O +ATOM 981 C5' A A 46 41.462 58.484 32.965 1.00 66.66 C +ATOM 982 C4' A A 46 42.341 59.140 34.004 1.00 66.99 C +ATOM 983 O4' A A 46 43.028 60.224 33.349 1.00 67.35 O +ATOM 984 C3' A A 46 41.625 59.765 35.195 1.00 67.72 C +ATOM 985 O3' A A 46 41.669 58.959 36.376 1.00 68.21 O +ATOM 986 C2' A A 46 42.564 60.890 35.577 1.00 69.03 C +ATOM 987 O2' A A 46 43.607 60.394 36.401 1.00 72.13 O +ATOM 988 C1' A A 46 43.082 61.336 34.209 1.00 66.39 C +ATOM 989 N9 A A 46 42.276 62.348 33.564 1.00 62.89 N +ATOM 990 C8 A A 46 41.084 62.169 32.918 1.00 62.52 C +ATOM 991 N7 A A 46 40.653 63.243 32.308 1.00 62.67 N +ATOM 992 C5 A A 46 41.614 64.200 32.605 1.00 62.01 C +ATOM 993 C6 A A 46 41.747 65.544 32.251 1.00 61.96 C +ATOM 994 N6 A A 46 40.877 66.192 31.482 1.00 64.57 N +ATOM 995 N1 A A 46 42.823 66.214 32.714 1.00 62.07 N +ATOM 996 C2 A A 46 43.697 65.565 33.480 1.00 62.26 C +ATOM 997 N3 A A 46 43.684 64.298 33.881 1.00 63.14 N +ATOM 998 C4 A A 46 42.603 63.665 33.400 1.00 62.84 C +ATOM 999 P C A 47 42.413 57.528 36.388 1.00 67.72 P +ATOM 1000 OP1 C A 47 42.629 56.988 35.028 1.00 70.69 O +ATOM 1001 OP2 C A 47 41.663 56.714 37.372 1.00 70.77 O +ATOM 1002 O5' C A 47 43.856 57.748 37.034 1.00 64.73 O +ATOM 1003 C5' C A 47 44.558 56.596 37.540 1.00 62.38 C +ATOM 1004 C4' C A 47 46.022 56.881 37.836 1.00 60.75 C +ATOM 1005 O4' C A 47 46.726 57.283 36.632 1.00 57.34 O +ATOM 1006 C3' C A 47 46.301 58.002 38.819 1.00 61.65 C +ATOM 1007 O3' C A 47 46.215 57.517 40.147 1.00 66.33 O +ATOM 1008 C2' C A 47 47.730 58.398 38.472 1.00 58.98 C +ATOM 1009 O2' C A 47 48.710 57.539 39.015 1.00 59.79 O +ATOM 1010 C1' C A 47 47.729 58.226 36.961 1.00 56.15 C +ATOM 1011 N1 C A 47 47.460 59.483 36.270 1.00 52.42 N +ATOM 1012 C2 C A 47 48.401 60.504 36.371 1.00 52.13 C +ATOM 1013 O2 C A 47 49.423 60.304 37.044 1.00 51.95 O +ATOM 1014 N3 C A 47 48.179 61.672 35.738 1.00 50.89 N +ATOM 1015 C4 C A 47 47.062 61.832 35.031 1.00 51.44 C +ATOM 1016 N4 C A 47 46.861 62.994 34.431 1.00 52.10 N +ATOM 1017 C5 C A 47 46.091 60.804 34.911 1.00 51.28 C +ATOM 1018 C6 C A 47 46.326 59.658 35.541 1.00 51.11 C +ATOM 1019 P C A 48 45.766 58.513 41.317 1.00 69.35 P +ATOM 1020 OP1 C A 48 45.485 57.695 42.529 1.00 67.22 O +ATOM 1021 OP2 C A 48 44.703 59.395 40.751 1.00 67.82 O +ATOM 1022 O5' C A 48 47.058 59.411 41.569 1.00 67.80 O +ATOM 1023 C5' C A 48 48.244 58.859 42.135 1.00 66.18 C +ATOM 1024 C4' C A 48 49.242 59.962 42.373 1.00 65.53 C +ATOM 1025 O4' C A 48 49.635 60.527 41.099 1.00 62.77 O +ATOM 1026 C3' C A 48 48.679 61.145 43.136 1.00 66.13 C +ATOM 1027 O3' C A 48 48.741 60.923 44.527 1.00 71.49 O +ATOM 1028 C2' C A 48 49.582 62.286 42.698 1.00 63.22 C +ATOM 1029 O2' C A 48 50.818 62.332 43.383 1.00 63.14 O +ATOM 1030 C1' C A 48 49.807 61.927 41.231 1.00 60.44 C +ATOM 1031 N1 C A 48 48.843 62.587 40.347 1.00 55.14 N +ATOM 1032 C2 C A 48 49.088 63.893 39.966 1.00 54.49 C +ATOM 1033 O2 C A 48 50.090 64.465 40.414 1.00 55.34 O +ATOM 1034 N3 C A 48 48.233 64.509 39.125 1.00 52.59 N +ATOM 1035 C4 C A 48 47.161 63.865 38.679 1.00 51.17 C +ATOM 1036 N4 C A 48 46.362 64.510 37.843 1.00 50.44 N +ATOM 1037 C5 C A 48 46.871 62.531 39.070 1.00 52.11 C +ATOM 1038 C6 C A 48 47.732 61.933 39.898 1.00 54.08 C +ATOM 1039 P A A 49 47.654 61.613 45.471 1.00 74.04 P +ATOM 1040 OP1 A A 49 47.893 61.129 46.859 1.00 75.80 O +ATOM 1041 OP2 A A 49 46.338 61.389 44.821 1.00 75.26 O +ATOM 1042 O5' A A 49 48.017 63.156 45.395 1.00 72.61 O +ATOM 1043 C5' A A 49 49.222 63.621 45.964 1.00 73.43 C +ATOM 1044 C4' A A 49 49.383 65.087 45.696 1.00 74.37 C +ATOM 1045 O4' A A 49 49.425 65.301 44.263 1.00 73.83 O +ATOM 1046 C3' A A 49 48.229 65.975 46.115 1.00 76.55 C +ATOM 1047 O3' A A 49 48.233 66.240 47.513 1.00 80.22 O +ATOM 1048 C2' A A 49 48.525 67.223 45.299 1.00 75.25 C +ATOM 1049 O2' A A 49 49.601 67.966 45.824 1.00 76.33 O +ATOM 1050 C1' A A 49 48.953 66.608 43.969 1.00 73.01 C +ATOM 1051 N9 A A 49 47.835 66.511 43.031 1.00 71.22 N +ATOM 1052 C8 A A 49 47.031 65.426 42.781 1.00 71.73 C +ATOM 1053 N7 A A 49 46.081 65.663 41.907 1.00 70.51 N +ATOM 1054 C5 A A 49 46.280 66.989 41.550 1.00 69.33 C +ATOM 1055 C6 A A 49 45.599 67.839 40.664 1.00 69.09 C +ATOM 1056 N6 A A 49 44.545 67.453 39.944 1.00 69.34 N +ATOM 1057 N1 A A 49 46.044 69.110 40.540 1.00 69.39 N +ATOM 1058 C2 A A 49 47.106 69.484 41.260 1.00 70.23 C +ATOM 1059 N3 A A 49 47.833 68.775 42.123 1.00 70.98 N +ATOM 1060 C4 A A 49 47.360 67.522 42.226 1.00 69.91 C +ATOM 1061 P G A 50 46.846 66.209 48.339 1.00 82.72 P +ATOM 1062 OP1 G A 50 47.164 66.087 49.785 1.00 82.86 O +ATOM 1063 OP2 G A 50 45.964 65.198 47.703 1.00 81.94 O +ATOM 1064 O5' G A 50 46.219 67.654 48.091 1.00 81.41 O +ATOM 1065 C5' G A 50 45.935 68.105 46.777 1.00 84.37 C +ATOM 1066 C4' G A 50 45.652 69.584 46.784 1.00 86.37 C +ATOM 1067 O4' G A 50 45.672 70.042 45.399 1.00 85.92 O +ATOM 1068 C3' G A 50 44.276 69.971 47.302 1.00 88.18 C +ATOM 1069 O3' G A 50 43.942 70.325 48.632 1.00 92.03 O +ATOM 1070 C2' G A 50 43.367 70.206 46.117 1.00 86.73 C +ATOM 1071 O2' G A 50 42.687 71.428 46.274 1.00 86.89 O +ATOM 1072 C1' G A 50 44.351 70.323 44.948 1.00 84.88 C +ATOM 1073 N9 G A 50 43.925 69.272 44.029 1.00 81.15 N +ATOM 1074 C8 G A 50 44.114 67.917 44.173 1.00 79.88 C +ATOM 1075 N7 G A 50 43.441 67.213 43.306 1.00 79.00 N +ATOM 1076 C5 G A 50 42.810 68.160 42.516 1.00 78.27 C +ATOM 1077 C6 G A 50 41.925 67.995 41.442 1.00 78.52 C +ATOM 1078 O6 G A 50 41.491 66.941 40.959 1.00 78.22 O +ATOM 1079 N1 G A 50 41.521 69.220 40.921 1.00 78.77 N +ATOM 1080 C2 G A 50 41.922 70.445 41.387 1.00 78.84 C +ATOM 1081 N2 G A 50 41.425 71.512 40.756 1.00 79.59 N +ATOM 1082 N3 G A 50 42.748 70.610 42.398 1.00 78.54 N +ATOM 1083 C4 G A 50 43.143 69.435 42.917 1.00 78.68 C +ATOM 1084 P A A 51 42.880 69.415 49.453 1.00 96.02 P +ATOM 1085 OP1 A A 51 42.446 70.195 50.660 1.00 95.76 O +ATOM 1086 OP2 A A 51 43.467 68.046 49.625 1.00 96.17 O +ATOM 1087 O5' A A 51 41.609 69.253 48.500 1.00 94.71 O +ATOM 1088 C5' A A 51 40.743 68.118 48.626 1.00 93.44 C +ATOM 1089 C4' A A 51 39.313 68.526 48.358 1.00 92.36 C +ATOM 1090 O4' A A 51 38.931 69.502 49.358 1.00 90.16 O +ATOM 1091 C3' A A 51 39.090 69.216 47.018 1.00 92.54 C +ATOM 1092 O3' A A 51 38.742 68.280 46.002 1.00 96.31 O +ATOM 1093 C2' A A 51 37.939 70.159 47.316 1.00 90.20 C +ATOM 1094 O2' A A 51 36.698 69.487 47.304 1.00 89.63 O +ATOM 1095 C1' A A 51 38.293 70.602 48.737 1.00 86.88 C +ATOM 1096 N9 A A 51 39.245 71.707 48.758 1.00 82.36 N +ATOM 1097 C8 A A 51 40.528 71.680 49.247 1.00 80.40 C +ATOM 1098 N7 A A 51 41.164 72.817 49.124 1.00 78.33 N +ATOM 1099 C5 A A 51 40.236 73.652 48.517 1.00 77.49 C +ATOM 1100 C6 A A 51 40.296 74.995 48.117 1.00 75.83 C +ATOM 1101 N6 A A 51 41.375 75.764 48.279 1.00 75.08 N +ATOM 1102 N1 A A 51 39.199 75.530 47.539 1.00 76.02 N +ATOM 1103 C2 A A 51 38.118 74.757 47.382 1.00 77.71 C +ATOM 1104 N3 A A 51 37.939 73.479 47.718 1.00 78.31 N +ATOM 1105 C4 A A 51 39.049 72.981 48.287 1.00 79.42 C +ATOM 1106 P A A 52 39.515 68.317 44.596 1.00 97.90 P +ATOM 1107 OP1 A A 52 39.960 66.929 44.294 1.00 98.51 O +ATOM 1108 OP2 A A 52 40.520 69.410 44.687 1.00 97.41 O +ATOM 1109 O5' A A 52 38.395 68.749 43.546 1.00 98.75 O +ATOM 1110 C5' A A 52 38.737 69.495 42.378 1.00100.86 C +ATOM 1111 C4' A A 52 37.985 70.804 42.367 1.00101.84 C +ATOM 1112 O4' A A 52 38.002 71.359 43.705 1.00100.72 O +ATOM 1113 C3' A A 52 38.535 71.905 41.465 1.00102.80 C +ATOM 1114 O3' A A 52 37.991 71.808 40.147 1.00105.83 O +ATOM 1115 C2' A A 52 38.020 73.163 42.155 1.00101.22 C +ATOM 1116 O2' A A 52 36.680 73.455 41.831 1.00102.17 O +ATOM 1117 C1' A A 52 38.111 72.767 43.631 1.00 99.83 C +ATOM 1118 N9 A A 52 39.367 73.140 44.269 1.00 97.90 N +ATOM 1119 C8 A A 52 40.197 72.318 44.981 1.00 96.81 C +ATOM 1120 N7 A A 52 41.251 72.923 45.460 1.00 96.75 N +ATOM 1121 C5 A A 52 41.110 74.232 45.031 1.00 96.25 C +ATOM 1122 C6 A A 52 41.900 75.370 45.216 1.00 95.31 C +ATOM 1123 N6 A A 52 43.037 75.365 45.910 1.00 94.72 N +ATOM 1124 N1 A A 52 41.481 76.527 44.657 1.00 95.37 N +ATOM 1125 C2 A A 52 40.338 76.521 43.962 1.00 96.12 C +ATOM 1126 N3 A A 52 39.505 75.511 43.719 1.00 96.85 N +ATOM 1127 C4 A A 52 39.955 74.381 44.291 1.00 97.01 C +ATOM 1128 P A A 53 38.666 72.624 38.930 1.00108.87 P +ATOM 1129 OP1 A A 53 37.810 72.491 37.721 1.00108.36 O +ATOM 1130 OP2 A A 53 40.093 72.223 38.866 1.00109.37 O +ATOM 1131 O5' A A 53 38.606 74.150 39.369 1.00107.46 O +ATOM 1132 C5' A A 53 38.058 75.137 38.499 1.00107.85 C +ATOM 1133 C4' A A 53 38.929 76.365 38.509 1.00108.27 C +ATOM 1134 O4' A A 53 39.209 76.699 39.891 1.00108.81 O +ATOM 1135 C3' A A 53 40.298 76.243 37.854 1.00108.40 C +ATOM 1136 O3' A A 53 40.239 76.517 36.456 1.00107.76 O +ATOM 1137 C2' A A 53 41.086 77.317 38.590 1.00108.67 C +ATOM 1138 O2' A A 53 40.806 78.618 38.112 1.00108.67 O +ATOM 1139 C1' A A 53 40.542 77.152 40.011 1.00109.27 C +ATOM 1140 N9 A A 53 41.277 76.108 40.718 1.00109.89 N +ATOM 1141 C8 A A 53 41.033 74.758 40.673 1.00110.42 C +ATOM 1142 N7 A A 53 41.870 74.045 41.382 1.00110.63 N +ATOM 1143 C5 A A 53 42.720 74.990 41.938 1.00110.94 C +ATOM 1144 C6 A A 53 43.826 74.875 42.795 1.00111.51 C +ATOM 1145 N6 A A 53 44.285 73.710 43.257 1.00112.10 N +ATOM 1146 N1 A A 53 44.452 76.014 43.167 1.00111.76 N +ATOM 1147 C2 A A 53 43.988 77.184 42.703 1.00111.34 C +ATOM 1148 N3 A A 53 42.958 77.419 41.892 1.00110.90 N +ATOM 1149 C4 A A 53 42.361 76.266 41.542 1.00110.47 C +ATOM 1150 P U A 54 40.720 75.399 35.403 1.00107.30 P +ATOM 1151 OP1 U A 54 40.655 75.985 34.040 1.00107.24 O +ATOM 1152 OP2 U A 54 39.952 74.165 35.708 1.00107.10 O +ATOM 1153 O5' U A 54 42.250 75.138 35.772 1.00104.79 O +ATOM 1154 C5' U A 54 43.228 76.148 35.560 1.00101.43 C +ATOM 1155 C4' U A 54 44.377 75.983 36.522 1.00 99.06 C +ATOM 1156 O4' U A 54 43.865 75.376 37.739 1.00 98.18 O +ATOM 1157 C3' U A 54 45.481 75.031 36.092 1.00 98.11 C +ATOM 1158 O3' U A 54 46.453 75.676 35.281 1.00 97.57 O +ATOM 1159 C2' U A 54 46.093 74.631 37.424 1.00 97.54 C +ATOM 1160 O2' U A 54 46.934 75.633 37.945 1.00 98.55 O +ATOM 1161 C1' U A 54 44.850 74.523 38.300 1.00 96.75 C +ATOM 1162 N1 U A 54 44.348 73.146 38.309 1.00 95.04 N +ATOM 1163 C2 U A 54 44.996 72.251 39.131 1.00 93.99 C +ATOM 1164 O2 U A 54 45.921 72.575 39.851 1.00 94.77 O +ATOM 1165 N3 U A 54 44.524 70.966 39.077 1.00 92.33 N +ATOM 1166 C4 U A 54 43.489 70.502 38.302 1.00 92.24 C +ATOM 1167 O4 U A 54 43.181 69.316 38.357 1.00 90.91 O +ATOM 1168 C5 U A 54 42.859 71.495 37.488 1.00 93.43 C +ATOM 1169 C6 U A 54 43.298 72.754 37.521 1.00 94.21 C +ATOM 1170 P G A 55 47.525 74.791 34.471 1.00 97.86 P +ATOM 1171 OP1 G A 55 48.367 75.702 33.647 1.00 97.40 O +ATOM 1172 OP2 G A 55 46.754 73.696 33.816 1.00 97.86 O +ATOM 1173 O5' G A 55 48.459 74.154 35.595 1.00 93.42 O +ATOM 1174 C5' G A 55 49.390 74.964 36.297 1.00 88.24 C +ATOM 1175 C4' G A 55 50.177 74.134 37.278 1.00 84.14 C +ATOM 1176 O4' G A 55 49.264 73.510 38.217 1.00 83.46 O +ATOM 1177 C3' G A 55 50.899 72.957 36.664 1.00 82.28 C +ATOM 1178 O3' G A 55 52.132 73.333 36.107 1.00 79.65 O +ATOM 1179 C2' G A 55 51.068 72.020 37.846 1.00 82.45 C +ATOM 1180 O2' G A 55 52.130 72.351 38.713 1.00 84.02 O +ATOM 1181 C1' G A 55 49.743 72.224 38.567 1.00 82.65 C +ATOM 1182 N9 G A 55 48.800 71.227 38.088 1.00 81.63 N +ATOM 1183 C8 G A 55 47.779 71.396 37.188 1.00 81.42 C +ATOM 1184 N7 G A 55 47.143 70.286 36.929 1.00 81.40 N +ATOM 1185 C5 G A 55 47.781 69.334 37.714 1.00 79.68 C +ATOM 1186 C6 G A 55 47.541 67.944 37.855 1.00 79.26 C +ATOM 1187 O6 G A 55 46.695 67.247 37.288 1.00 77.42 O +ATOM 1188 N1 G A 55 48.419 67.366 38.763 1.00 79.31 N +ATOM 1189 C2 G A 55 49.404 68.036 39.442 1.00 79.67 C +ATOM 1190 N2 G A 55 50.148 67.311 40.283 1.00 79.56 N +ATOM 1191 N3 G A 55 49.642 69.324 39.310 1.00 79.52 N +ATOM 1192 C4 G A 55 48.797 69.905 38.440 1.00 80.03 C +ATOM 1193 P G A 56 52.789 72.392 35.004 1.00 78.55 P +ATOM 1194 OP1 G A 56 54.080 72.967 34.550 1.00 77.49 O +ATOM 1195 OP2 G A 56 51.707 72.125 34.021 1.00 80.25 O +ATOM 1196 O5' G A 56 53.090 71.050 35.801 1.00 75.12 O +ATOM 1197 C5' G A 56 54.067 71.039 36.829 1.00 69.26 C +ATOM 1198 C4' G A 56 54.371 69.628 37.263 1.00 65.32 C +ATOM 1199 O4' G A 56 53.188 69.046 37.881 1.00 62.82 O +ATOM 1200 C3' G A 56 54.686 68.665 36.136 1.00 63.79 C +ATOM 1201 O3' G A 56 56.038 68.731 35.713 1.00 65.54 O +ATOM 1202 C2' G A 56 54.375 67.320 36.769 1.00 62.66 C +ATOM 1203 O2' G A 56 55.428 66.873 37.601 1.00 62.67 O +ATOM 1204 C1' G A 56 53.141 67.657 37.609 1.00 60.08 C +ATOM 1205 N9 G A 56 51.901 67.352 36.905 1.00 55.37 N +ATOM 1206 C8 G A 56 51.122 68.217 36.174 1.00 55.74 C +ATOM 1207 N7 G A 56 50.106 67.629 35.599 1.00 52.72 N +ATOM 1208 C5 G A 56 50.214 66.302 35.990 1.00 50.91 C +ATOM 1209 C6 G A 56 49.406 65.204 35.675 1.00 49.97 C +ATOM 1210 O6 G A 56 48.416 65.180 34.958 1.00 50.77 O +ATOM 1211 N1 G A 56 49.854 64.038 36.284 1.00 48.77 N +ATOM 1212 C2 G A 56 50.958 63.951 37.093 1.00 50.36 C +ATOM 1213 N2 G A 56 51.234 62.732 37.591 1.00 48.97 N +ATOM 1214 N3 G A 56 51.734 64.983 37.392 1.00 51.51 N +ATOM 1215 C4 G A 56 51.304 66.118 36.809 1.00 51.89 C +ATOM 1216 P U A 57 56.393 68.380 34.188 1.00 68.18 P +ATOM 1217 OP1 U A 57 57.633 67.563 34.126 1.00 68.19 O +ATOM 1218 OP2 U A 57 56.289 69.634 33.385 1.00 68.11 O +ATOM 1219 O5' U A 57 55.175 67.458 33.751 1.00 66.24 O +ATOM 1220 C5' U A 57 55.324 66.486 32.736 1.00 62.03 C +ATOM 1221 C4' U A 57 55.340 65.129 33.360 1.00 59.74 C +ATOM 1222 O4' U A 57 54.232 65.038 34.289 1.00 57.88 O +ATOM 1223 C3' U A 57 55.156 63.959 32.420 1.00 58.61 C +ATOM 1224 O3' U A 57 56.382 63.599 31.803 1.00 58.26 O +ATOM 1225 C2' U A 57 54.620 62.895 33.370 1.00 58.38 C +ATOM 1226 O2' U A 57 55.622 62.306 34.173 1.00 58.99 O +ATOM 1227 C1' U A 57 53.699 63.732 34.261 1.00 56.63 C +ATOM 1228 N1 U A 57 52.361 63.811 33.672 1.00 55.20 N +ATOM 1229 C2 U A 57 51.624 62.655 33.644 1.00 55.04 C +ATOM 1230 O2 U A 57 52.044 61.605 34.100 1.00 55.79 O +ATOM 1231 N3 U A 57 50.387 62.767 33.057 1.00 53.93 N +ATOM 1232 C4 U A 57 49.831 63.906 32.503 1.00 53.12 C +ATOM 1233 O4 U A 57 48.707 63.850 32.010 1.00 53.57 O +ATOM 1234 C5 U A 57 50.660 65.073 32.575 1.00 52.60 C +ATOM 1235 C6 U A 57 51.868 64.988 33.148 1.00 54.55 C +ATOM 1236 P G A 58 56.449 63.448 30.205 1.00 60.26 P +ATOM 1237 OP1 G A 58 57.754 62.807 29.877 1.00 60.58 O +ATOM 1238 OP2 G A 58 56.111 64.754 29.597 1.00 58.54 O +ATOM 1239 O5' G A 58 55.268 62.426 29.875 1.00 57.10 O +ATOM 1240 C5' G A 58 55.312 61.107 30.387 1.00 55.69 C +ATOM 1241 C4' G A 58 54.029 60.369 30.093 1.00 55.43 C +ATOM 1242 O4' G A 58 52.921 61.007 30.791 1.00 55.24 O +ATOM 1243 C3' G A 58 53.589 60.368 28.636 1.00 54.18 C +ATOM 1244 O3' G A 58 54.246 59.338 27.923 1.00 53.96 O +ATOM 1245 C2' G A 58 52.097 60.092 28.757 1.00 54.41 C +ATOM 1246 O2' G A 58 51.846 58.731 29.012 1.00 57.23 O +ATOM 1247 C1' G A 58 51.737 60.887 30.012 1.00 53.85 C +ATOM 1248 N9 G A 58 51.267 62.217 29.656 1.00 53.03 N +ATOM 1249 C8 G A 58 51.950 63.400 29.767 1.00 52.08 C +ATOM 1250 N7 G A 58 51.278 64.419 29.308 1.00 51.44 N +ATOM 1251 C5 G A 58 50.074 63.877 28.879 1.00 50.05 C +ATOM 1252 C6 G A 58 48.951 64.496 28.292 1.00 50.75 C +ATOM 1253 O6 G A 58 48.794 65.685 28.008 1.00 53.29 O +ATOM 1254 N1 G A 58 47.939 63.583 28.022 1.00 50.16 N +ATOM 1255 C2 G A 58 48.003 62.239 28.270 1.00 51.00 C +ATOM 1256 N2 G A 58 46.914 61.522 27.924 1.00 50.63 N +ATOM 1257 N3 G A 58 49.053 61.641 28.814 1.00 52.48 N +ATOM 1258 C4 G A 58 50.045 62.521 29.095 1.00 51.88 C +ATOM 1259 P C A 59 54.759 59.607 26.431 1.00 53.17 P +ATOM 1260 OP1 C A 59 55.673 58.491 26.089 1.00 55.70 O +ATOM 1261 OP2 C A 59 55.228 61.001 26.296 1.00 53.99 O +ATOM 1262 O5' C A 59 53.445 59.435 25.560 1.00 54.08 O +ATOM 1263 C5' C A 59 52.793 58.183 25.522 1.00 52.32 C +ATOM 1264 C4' C A 59 51.386 58.359 25.064 1.00 52.96 C +ATOM 1265 O4' C A 59 50.695 59.217 26.007 1.00 53.34 O +ATOM 1266 C3' C A 59 51.248 59.093 23.746 1.00 54.55 C +ATOM 1267 O3' C A 59 51.430 58.198 22.670 1.00 56.10 O +ATOM 1268 C2' C A 59 49.826 59.625 23.841 1.00 54.97 C +ATOM 1269 O2' C A 59 48.860 58.610 23.649 1.00 56.71 O +ATOM 1270 C1' C A 59 49.766 60.033 25.310 1.00 55.15 C +ATOM 1271 N1 C A 59 50.164 61.434 25.444 1.00 55.90 N +ATOM 1272 C2 C A 59 49.218 62.407 25.156 1.00 56.55 C +ATOM 1273 O2 C A 59 48.077 62.055 24.858 1.00 59.12 O +ATOM 1274 N3 C A 59 49.563 63.702 25.209 1.00 56.90 N +ATOM 1275 C4 C A 59 50.800 64.045 25.557 1.00 56.99 C +ATOM 1276 N4 C A 59 51.083 65.348 25.606 1.00 57.32 N +ATOM 1277 C5 C A 59 51.793 63.071 25.874 1.00 56.89 C +ATOM 1278 C6 C A 59 51.433 61.787 25.809 1.00 56.91 C +ATOM 1279 P C A 60 52.117 58.708 21.315 1.00 58.55 P +ATOM 1280 OP1 C A 60 52.566 57.477 20.623 1.00 60.10 O +ATOM 1281 OP2 C A 60 53.091 59.805 21.572 1.00 59.59 O +ATOM 1282 O5' C A 60 50.930 59.382 20.504 1.00 58.02 O +ATOM 1283 C5' C A 60 49.699 58.712 20.311 1.00 58.31 C +ATOM 1284 C4' C A 60 48.692 59.668 19.729 1.00 60.59 C +ATOM 1285 O4' C A 60 48.367 60.687 20.711 1.00 61.17 O +ATOM 1286 C3' C A 60 49.215 60.451 18.536 1.00 61.75 C +ATOM 1287 O3' C A 60 48.977 59.710 17.353 1.00 62.05 O +ATOM 1288 C2' C A 60 48.336 61.689 18.549 1.00 62.65 C +ATOM 1289 O2' C A 60 47.085 61.451 17.947 1.00 65.68 O +ATOM 1290 C1' C A 60 48.151 61.920 20.050 1.00 62.43 C +ATOM 1291 N1 C A 60 49.075 62.919 20.594 1.00 63.39 N +ATOM 1292 C2 C A 60 48.741 64.252 20.458 1.00 63.93 C +ATOM 1293 O2 C A 60 47.699 64.537 19.859 1.00 66.02 O +ATOM 1294 N3 C A 60 49.552 65.196 20.975 1.00 64.43 N +ATOM 1295 C4 C A 60 50.669 64.837 21.602 1.00 64.08 C +ATOM 1296 N4 C A 60 51.437 65.800 22.106 1.00 64.35 N +ATOM 1297 C5 C A 60 51.045 63.476 21.743 1.00 63.45 C +ATOM 1298 C6 C A 60 50.228 62.556 21.229 1.00 63.91 C +ATOM 1299 P A A 61 50.069 59.698 16.181 1.00 61.03 P +ATOM 1300 OP1 A A 61 51.287 59.065 16.739 1.00 62.45 O +ATOM 1301 OP2 A A 61 50.159 61.053 15.587 1.00 61.91 O +ATOM 1302 O5' A A 61 49.427 58.698 15.124 1.00 60.51 O +ATOM 1303 C5' A A 61 49.093 57.375 15.519 1.00 59.15 C +ATOM 1304 C4' A A 61 48.325 56.663 14.432 1.00 57.25 C +ATOM 1305 O4' A A 61 49.094 56.675 13.204 1.00 57.46 O +ATOM 1306 C3' A A 61 48.113 55.187 14.715 1.00 56.35 C +ATOM 1307 O3' A A 61 46.952 54.985 15.510 1.00 54.37 O +ATOM 1308 C2' A A 61 47.924 54.610 13.325 1.00 56.77 C +ATOM 1309 O2' A A 61 46.606 54.782 12.860 1.00 58.82 O +ATOM 1310 C1' A A 61 48.893 55.462 12.506 1.00 56.45 C +ATOM 1311 N9 A A 61 50.194 54.840 12.299 1.00 55.64 N +ATOM 1312 C8 A A 61 51.375 55.127 12.934 1.00 56.06 C +ATOM 1313 N7 A A 61 52.390 54.419 12.503 1.00 56.16 N +ATOM 1314 C5 A A 61 51.836 53.608 11.524 1.00 55.20 C +ATOM 1315 C6 A A 61 52.389 52.642 10.683 1.00 53.69 C +ATOM 1316 N6 A A 61 53.685 52.311 10.692 1.00 53.61 N +ATOM 1317 N1 A A 61 51.563 52.015 9.819 1.00 52.98 N +ATOM 1318 C2 A A 61 50.275 52.347 9.811 1.00 52.85 C +ATOM 1319 N3 A A 61 49.634 53.243 10.552 1.00 53.34 N +ATOM 1320 C4 A A 61 50.484 53.847 11.397 1.00 55.08 C +ATOM 1321 P A A 62 46.873 53.710 16.473 1.00 53.92 P +ATOM 1322 OP1 A A 62 45.603 53.723 17.227 1.00 56.55 O +ATOM 1323 OP2 A A 62 48.168 53.615 17.202 1.00 53.63 O +ATOM 1324 O5' A A 62 46.816 52.489 15.470 1.00 54.86 O +ATOM 1325 C5' A A 62 45.702 52.292 14.626 1.00 53.89 C +ATOM 1326 C4' A A 62 45.976 51.126 13.735 1.00 54.46 C +ATOM 1327 O4' A A 62 47.097 51.468 12.878 1.00 54.59 O +ATOM 1328 C3' A A 62 46.438 49.885 14.479 1.00 53.52 C +ATOM 1329 O3' A A 62 45.316 49.126 14.908 1.00 51.33 O +ATOM 1330 C2' A A 62 47.214 49.158 13.396 1.00 54.74 C +ATOM 1331 O2' A A 62 46.297 48.519 12.537 1.00 56.57 O +ATOM 1332 C1' A A 62 47.893 50.323 12.664 1.00 54.85 C +ATOM 1333 N9 A A 62 49.247 50.628 13.130 1.00 55.09 N +ATOM 1334 C8 A A 62 49.610 51.419 14.192 1.00 55.06 C +ATOM 1335 N7 A A 62 50.908 51.497 14.377 1.00 55.94 N +ATOM 1336 C5 A A 62 51.434 50.706 13.369 1.00 54.99 C +ATOM 1337 C6 A A 62 52.743 50.373 13.029 1.00 53.85 C +ATOM 1338 N6 A A 62 53.812 50.830 13.683 1.00 52.77 N +ATOM 1339 N1 A A 62 52.928 49.550 11.980 1.00 53.74 N +ATOM 1340 C2 A A 62 51.858 49.111 11.318 1.00 54.27 C +ATOM 1341 N3 A A 62 50.576 49.358 11.532 1.00 53.66 N +ATOM 1342 C4 A A 62 50.426 50.169 12.589 1.00 55.03 C +ATOM 1343 P U A 63 45.533 47.735 15.702 1.00 53.62 P +ATOM 1344 OP1 U A 63 46.808 47.065 15.295 1.00 52.97 O +ATOM 1345 OP2 U A 63 44.239 46.994 15.593 1.00 51.06 O +ATOM 1346 O5' U A 63 45.691 48.165 17.223 1.00 51.23 O +ATOM 1347 C5' U A 63 44.669 48.915 17.849 1.00 53.41 C +ATOM 1348 C4' U A 63 44.630 48.623 19.322 1.00 54.01 C +ATOM 1349 O4' U A 63 44.185 47.260 19.517 1.00 55.92 O +ATOM 1350 C3' U A 63 46.012 48.682 19.940 1.00 54.73 C +ATOM 1351 O3' U A 63 46.420 49.839 20.679 1.00 51.79 O +ATOM 1352 C2' U A 63 46.533 47.253 20.033 1.00 54.94 C +ATOM 1353 O2' U A 63 47.210 46.942 21.223 1.00 56.33 O +ATOM 1354 C1' U A 63 45.234 46.451 20.007 1.00 57.13 C +ATOM 1355 N1 U A 63 45.287 45.226 19.207 1.00 60.34 N +ATOM 1356 C2 U A 63 45.138 44.028 19.869 1.00 61.56 C +ATOM 1357 O2 U A 63 44.930 43.959 21.059 1.00 61.71 O +ATOM 1358 N3 U A 63 45.231 42.914 19.079 1.00 64.02 N +ATOM 1359 C4 U A 63 45.442 42.883 17.712 1.00 64.85 C +ATOM 1360 O4 U A 63 45.492 41.795 17.125 1.00 65.14 O +ATOM 1361 C5 U A 63 45.570 44.173 17.102 1.00 64.42 C +ATOM 1362 C6 U A 63 45.489 45.272 17.855 1.00 62.18 C +ATOM 1363 P U A 64 46.459 49.804 22.269 1.00 47.09 P +ATOM 1364 OP1 U A 64 45.474 48.814 22.740 1.00 49.72 O +ATOM 1365 OP2 U A 64 46.277 51.213 22.644 1.00 53.47 O +ATOM 1366 O5' U A 64 47.944 49.291 22.621 1.00 48.05 O +ATOM 1367 C5' U A 64 49.095 50.077 22.297 1.00 47.89 C +ATOM 1368 C4' U A 64 50.371 49.234 22.232 1.00 47.96 C +ATOM 1369 O4' U A 64 50.790 48.792 23.553 1.00 49.48 O +ATOM 1370 C3' U A 64 50.175 47.926 21.478 1.00 49.78 C +ATOM 1371 O3' U A 64 50.580 48.044 20.115 1.00 52.62 O +ATOM 1372 C2' U A 64 51.262 47.014 22.015 1.00 48.66 C +ATOM 1373 O2' U A 64 52.403 47.113 21.200 1.00 52.21 O +ATOM 1374 C1' U A 64 51.487 47.568 23.418 1.00 47.24 C +ATOM 1375 N1 U A 64 51.309 46.702 24.587 1.00 44.75 N +ATOM 1376 C2 U A 64 52.389 45.900 24.918 1.00 43.26 C +ATOM 1377 O2 U A 64 53.425 45.886 24.269 1.00 39.02 O +ATOM 1378 N3 U A 64 52.214 45.120 26.034 1.00 42.01 N +ATOM 1379 C4 U A 64 51.096 45.064 26.839 1.00 44.23 C +ATOM 1380 O4 U A 64 51.140 44.403 27.873 1.00 46.83 O +ATOM 1381 C5 U A 64 50.012 45.904 26.423 1.00 44.86 C +ATOM 1382 C6 U A 64 50.152 46.679 25.333 1.00 46.40 C +ATOM 1383 P C A 65 51.326 49.377 19.562 1.00 51.71 P +ATOM 1384 OP1 C A 65 52.793 49.248 19.702 1.00 52.59 O +ATOM 1385 OP2 C A 65 50.663 50.616 20.021 1.00 54.65 O +ATOM 1386 O5' C A 65 50.956 49.256 18.023 1.00 51.76 O +ATOM 1387 C5' C A 65 49.594 49.033 17.666 1.00 51.17 C +ATOM 1388 C4' C A 65 49.473 47.942 16.630 1.00 50.61 C +ATOM 1389 O4' C A 65 50.228 48.336 15.457 1.00 51.33 O +ATOM 1390 C3' C A 65 50.034 46.584 17.008 1.00 50.04 C +ATOM 1391 O3' C A 65 49.065 45.811 17.703 1.00 50.23 O +ATOM 1392 C2' C A 65 50.312 45.974 15.645 1.00 50.59 C +ATOM 1393 O2' C A 65 49.128 45.495 15.051 1.00 52.19 O +ATOM 1394 C1' C A 65 50.793 47.192 14.856 1.00 50.72 C +ATOM 1395 N1 C A 65 52.250 47.341 14.829 1.00 49.53 N +ATOM 1396 C2 C A 65 52.951 46.590 13.916 1.00 49.03 C +ATOM 1397 O2 C A 65 52.317 45.825 13.179 1.00 48.88 O +ATOM 1398 N3 C A 65 54.296 46.704 13.849 1.00 49.20 N +ATOM 1399 C4 C A 65 54.933 47.538 14.661 1.00 49.64 C +ATOM 1400 N4 C A 65 56.250 47.644 14.526 1.00 48.30 N +ATOM 1401 C5 C A 65 54.241 48.311 15.632 1.00 50.78 C +ATOM 1402 C6 C A 65 52.905 48.188 15.676 1.00 49.60 C +ATOM 1403 P C A 66 49.544 44.611 18.663 1.00 48.93 P +ATOM 1404 OP1 C A 66 48.423 44.178 19.537 1.00 48.42 O +ATOM 1405 OP2 C A 66 50.819 45.058 19.272 1.00 50.19 O +ATOM 1406 O5' C A 66 49.908 43.433 17.666 1.00 49.16 O +ATOM 1407 C5' C A 66 48.903 42.780 16.909 1.00 49.92 C +ATOM 1408 C4' C A 66 49.538 41.774 15.989 1.00 50.54 C +ATOM 1409 O4' C A 66 50.440 42.461 15.091 1.00 50.00 O +ATOM 1410 C3' C A 66 50.440 40.788 16.695 1.00 51.95 C +ATOM 1411 O3' C A 66 49.688 39.704 17.173 1.00 55.18 O +ATOM 1412 C2' C A 66 51.380 40.343 15.597 1.00 51.22 C +ATOM 1413 O2' C A 66 50.802 39.365 14.770 1.00 54.36 O +ATOM 1414 C1' C A 66 51.558 41.640 14.822 1.00 49.83 C +ATOM 1415 N1 C A 66 52.765 42.358 15.216 1.00 49.69 N +ATOM 1416 C2 C A 66 53.962 41.892 14.740 1.00 49.58 C +ATOM 1417 O2 C A 66 53.950 40.868 14.055 1.00 52.02 O +ATOM 1418 N3 C A 66 55.105 42.549 15.034 1.00 48.70 N +ATOM 1419 C4 C A 66 55.067 43.641 15.795 1.00 49.07 C +ATOM 1420 N4 C A 66 56.224 44.276 16.032 1.00 50.40 N +ATOM 1421 C5 C A 66 53.843 44.135 16.335 1.00 50.89 C +ATOM 1422 C6 C A 66 52.720 43.464 16.021 1.00 49.92 C +ATOM 1423 P U A 67 50.160 38.971 18.505 1.00 60.57 P +ATOM 1424 OP1 U A 67 49.141 37.934 18.832 1.00 59.64 O +ATOM 1425 OP2 U A 67 50.501 40.029 19.500 1.00 60.62 O +ATOM 1426 O5' U A 67 51.540 38.286 18.096 1.00 58.02 O +ATOM 1427 C5' U A 67 51.590 37.228 17.156 1.00 57.98 C +ATOM 1428 C4' U A 67 53.024 36.859 16.894 1.00 60.31 C +ATOM 1429 O4' U A 67 53.725 38.007 16.350 1.00 60.03 O +ATOM 1430 C3' U A 67 53.814 36.475 18.130 1.00 62.18 C +ATOM 1431 O3' U A 67 53.645 35.077 18.330 1.00 67.36 O +ATOM 1432 C2' U A 67 55.243 36.786 17.716 1.00 60.43 C +ATOM 1433 O2' U A 67 55.790 35.730 16.969 1.00 60.29 O +ATOM 1434 C1' U A 67 55.052 38.027 16.836 1.00 59.24 C +ATOM 1435 N1 U A 67 55.230 39.310 17.518 1.00 58.88 N +ATOM 1436 C2 U A 67 56.440 39.956 17.379 1.00 58.64 C +ATOM 1437 O2 U A 67 57.395 39.461 16.803 1.00 60.38 O +ATOM 1438 N3 U A 67 56.493 41.205 17.945 1.00 57.00 N +ATOM 1439 C4 U A 67 55.490 41.839 18.634 1.00 56.08 C +ATOM 1440 O4 U A 67 55.624 43.017 18.919 1.00 57.14 O +ATOM 1441 C5 U A 67 54.299 41.077 18.794 1.00 56.32 C +ATOM 1442 C6 U A 67 54.210 39.869 18.243 1.00 58.50 C +ATOM 1443 P G A 68 54.230 34.371 19.646 1.00 71.64 P +ATOM 1444 OP1 G A 68 53.897 32.933 19.519 1.00 71.19 O +ATOM 1445 OP2 G A 68 53.751 35.126 20.834 1.00 71.67 O +ATOM 1446 O5' G A 68 55.806 34.568 19.513 1.00 71.77 O +ATOM 1447 C5' G A 68 56.659 33.491 19.142 1.00 75.69 C +ATOM 1448 C4' G A 68 58.091 33.830 19.491 1.00 79.27 C +ATOM 1449 O4' G A 68 58.380 35.132 18.918 1.00 79.57 O +ATOM 1450 C3' G A 68 58.385 34.004 20.980 1.00 81.28 C +ATOM 1451 O3' G A 68 58.787 32.812 21.679 1.00 83.11 O +ATOM 1452 C2' G A 68 59.584 34.943 20.956 1.00 82.22 C +ATOM 1453 O2' G A 68 60.802 34.283 20.671 1.00 84.89 O +ATOM 1454 C1' G A 68 59.236 35.853 19.782 1.00 81.50 C +ATOM 1455 N9 G A 68 58.575 37.093 20.173 1.00 81.29 N +ATOM 1456 C8 G A 68 57.250 37.289 20.478 1.00 81.20 C +ATOM 1457 N7 G A 68 56.970 38.535 20.755 1.00 80.75 N +ATOM 1458 C5 G A 68 58.186 39.194 20.627 1.00 80.02 C +ATOM 1459 C6 G A 68 58.516 40.567 20.783 1.00 80.22 C +ATOM 1460 O6 G A 68 57.767 41.520 21.044 1.00 80.59 O +ATOM 1461 N1 G A 68 59.875 40.791 20.584 1.00 80.75 N +ATOM 1462 C2 G A 68 60.798 39.828 20.258 1.00 80.78 C +ATOM 1463 N2 G A 68 62.075 40.236 20.108 1.00 79.89 N +ATOM 1464 N3 G A 68 60.496 38.555 20.089 1.00 80.70 N +ATOM 1465 C4 G A 68 59.185 38.312 20.288 1.00 80.39 C +ATOM 1466 P C A 69 59.229 31.475 20.876 1.00 84.26 P +ATOM 1467 OP1 C A 69 60.580 31.681 20.282 1.00 80.96 O +ATOM 1468 OP2 C A 69 58.112 30.992 20.017 1.00 83.67 O +ATOM 1469 O5' C A 69 59.373 30.393 22.036 1.00 81.95 O +ATOM 1470 C5' C A 69 60.304 30.567 23.099 1.00 78.18 C +ATOM 1471 C4' C A 69 59.612 30.374 24.428 1.00 76.05 C +ATOM 1472 O4' C A 69 58.981 31.619 24.844 1.00 74.44 O +ATOM 1473 C3' C A 69 58.468 29.372 24.406 1.00 75.69 C +ATOM 1474 O3' C A 69 58.908 28.028 24.532 1.00 76.59 O +ATOM 1475 C2' C A 69 57.624 29.805 25.597 1.00 74.75 C +ATOM 1476 O2' C A 69 58.123 29.297 26.823 1.00 74.80 O +ATOM 1477 C1' C A 69 57.768 31.329 25.529 1.00 73.22 C +ATOM 1478 N1 C A 69 56.654 31.993 24.829 1.00 70.35 N +ATOM 1479 C2 C A 69 55.423 32.067 25.471 1.00 69.49 C +ATOM 1480 O2 C A 69 55.308 31.549 26.584 1.00 69.27 O +ATOM 1481 N3 C A 69 54.392 32.698 24.862 1.00 67.72 N +ATOM 1482 C4 C A 69 54.563 33.232 23.651 1.00 68.13 C +ATOM 1483 N4 C A 69 53.526 33.851 23.091 1.00 69.40 N +ATOM 1484 C5 C A 69 55.807 33.158 22.964 1.00 66.89 C +ATOM 1485 C6 C A 69 56.816 32.536 23.584 1.00 68.40 C +ATOM 1486 P A A 70 57.971 26.841 23.990 1.00 76.83 P +ATOM 1487 OP1 A A 70 58.699 25.566 24.172 1.00 76.97 O +ATOM 1488 OP2 A A 70 57.496 27.236 22.638 1.00 78.32 O +ATOM 1489 O5' A A 70 56.735 26.838 24.986 1.00 73.56 O +ATOM 1490 C5' A A 70 56.921 26.420 26.317 1.00 71.88 C +ATOM 1491 C4' A A 70 55.660 26.599 27.107 1.00 70.52 C +ATOM 1492 O4' A A 70 55.305 28.006 27.120 1.00 70.13 O +ATOM 1493 C3' A A 70 54.435 25.933 26.512 1.00 70.69 C +ATOM 1494 O3' A A 70 54.363 24.549 26.820 1.00 72.81 O +ATOM 1495 C2' A A 70 53.305 26.731 27.143 1.00 69.29 C +ATOM 1496 O2' A A 70 53.075 26.359 28.482 1.00 69.16 O +ATOM 1497 C1' A A 70 53.893 28.138 27.128 1.00 68.11 C +ATOM 1498 N9 A A 70 53.470 28.894 25.952 1.00 64.00 N +ATOM 1499 C8 A A 70 54.178 29.247 24.834 1.00 62.02 C +ATOM 1500 N7 A A 70 53.474 29.925 23.959 1.00 60.61 N +ATOM 1501 C5 A A 70 52.220 30.021 24.544 1.00 60.84 C +ATOM 1502 C6 A A 70 51.013 30.616 24.123 1.00 60.96 C +ATOM 1503 N6 A A 70 50.866 31.271 22.968 1.00 61.70 N +ATOM 1504 N1 A A 70 49.944 30.517 24.947 1.00 58.65 N +ATOM 1505 C2 A A 70 50.089 29.880 26.111 1.00 58.26 C +ATOM 1506 N3 A A 70 51.171 29.287 26.616 1.00 60.01 N +ATOM 1507 C4 A A 70 52.208 29.393 25.770 1.00 61.17 C +ATOM 1508 P G A 71 53.262 23.639 26.088 1.00 73.21 P +ATOM 1509 OP1 G A 71 53.410 22.249 26.575 1.00 75.65 O +ATOM 1510 OP2 G A 71 53.327 23.913 24.628 1.00 74.68 O +ATOM 1511 O5' G A 71 51.889 24.194 26.658 1.00 73.13 O +ATOM 1512 C5' G A 71 51.545 23.948 28.006 1.00 73.66 C +ATOM 1513 C4' G A 71 50.085 24.200 28.222 1.00 74.68 C +ATOM 1514 O4' G A 71 49.834 25.619 28.061 1.00 74.96 O +ATOM 1515 C3' G A 71 49.168 23.560 27.196 1.00 74.87 C +ATOM 1516 O3' G A 71 48.900 22.193 27.431 1.00 77.06 O +ATOM 1517 C2' G A 71 47.926 24.423 27.302 1.00 74.74 C +ATOM 1518 O2' G A 71 47.160 24.095 28.450 1.00 73.45 O +ATOM 1519 C1' G A 71 48.557 25.807 27.466 1.00 74.47 C +ATOM 1520 N9 G A 71 48.732 26.500 26.190 1.00 73.18 N +ATOM 1521 C8 G A 71 49.893 26.651 25.465 1.00 72.22 C +ATOM 1522 N7 G A 71 49.730 27.362 24.379 1.00 71.34 N +ATOM 1523 C5 G A 71 48.381 27.690 24.382 1.00 70.99 C +ATOM 1524 C6 G A 71 47.614 28.457 23.459 1.00 70.89 C +ATOM 1525 O6 G A 71 47.990 29.025 22.425 1.00 70.62 O +ATOM 1526 N1 G A 71 46.279 28.535 23.845 1.00 70.13 N +ATOM 1527 C2 G A 71 45.746 27.955 24.973 1.00 71.44 C +ATOM 1528 N2 G A 71 44.437 28.147 25.177 1.00 71.27 N +ATOM 1529 N3 G A 71 46.448 27.240 25.840 1.00 70.99 N +ATOM 1530 C4 G A 71 47.749 27.153 25.486 1.00 71.48 C +ATOM 1531 P C A 72 48.570 21.242 26.182 1.00 78.06 P +ATOM 1532 OP1 C A 72 48.427 19.843 26.654 1.00 79.10 O +ATOM 1533 OP2 C A 72 49.597 21.571 25.154 1.00 77.70 O +ATOM 1534 O5' C A 72 47.129 21.735 25.716 1.00 76.34 O +ATOM 1535 C5' C A 72 46.020 21.583 26.588 1.00 74.73 C +ATOM 1536 C4' C A 72 44.789 22.243 26.020 1.00 74.94 C +ATOM 1537 O4' C A 72 44.999 23.681 25.940 1.00 74.18 O +ATOM 1538 C3' C A 72 44.435 21.873 24.594 1.00 74.74 C +ATOM 1539 O3' C A 72 43.818 20.614 24.463 1.00 77.63 O +ATOM 1540 C2' C A 72 43.573 23.046 24.163 1.00 72.71 C +ATOM 1541 O2' C A 72 42.275 23.012 24.727 1.00 72.93 O +ATOM 1542 C1' C A 72 44.345 24.199 24.789 1.00 70.56 C +ATOM 1543 N1 C A 72 45.366 24.656 23.839 1.00 65.60 N +ATOM 1544 C2 C A 72 44.983 25.549 22.825 1.00 62.36 C +ATOM 1545 O2 C A 72 43.796 25.935 22.781 1.00 60.28 O +ATOM 1546 N3 C A 72 45.908 25.962 21.926 1.00 58.47 N +ATOM 1547 C4 C A 72 47.160 25.518 22.012 1.00 58.31 C +ATOM 1548 N4 C A 72 48.035 25.941 21.095 1.00 57.64 N +ATOM 1549 C5 C A 72 47.575 24.616 23.042 1.00 58.81 C +ATOM 1550 C6 C A 72 46.656 24.215 23.923 1.00 61.58 C +ATOM 1551 P G A 73 44.246 19.681 23.238 1.00 79.51 P +ATOM 1552 OP1 G A 73 43.644 18.340 23.446 1.00 79.13 O +ATOM 1553 OP2 G A 73 45.725 19.817 23.084 1.00 78.76 O +ATOM 1554 O5' G A 73 43.539 20.372 21.992 1.00 77.35 O +ATOM 1555 C5' G A 73 42.142 20.629 22.020 1.00 74.33 C +ATOM 1556 C4' G A 73 41.738 21.509 20.863 1.00 72.37 C +ATOM 1557 O4' G A 73 42.458 22.769 20.932 1.00 70.30 O +ATOM 1558 C3' G A 73 42.087 21.020 19.470 1.00 72.08 C +ATOM 1559 O3' G A 73 41.194 20.013 19.012 1.00 72.84 O +ATOM 1560 C2' G A 73 41.929 22.305 18.670 1.00 70.65 C +ATOM 1561 O2' G A 73 40.567 22.611 18.440 1.00 71.39 O +ATOM 1562 C1' G A 73 42.536 23.329 19.632 1.00 67.90 C +ATOM 1563 N9 G A 73 43.929 23.628 19.311 1.00 64.50 N +ATOM 1564 C8 G A 73 45.070 23.161 19.922 1.00 62.79 C +ATOM 1565 N7 G A 73 46.169 23.599 19.359 1.00 61.48 N +ATOM 1566 C5 G A 73 45.722 24.411 18.322 1.00 61.69 C +ATOM 1567 C6 G A 73 46.448 25.169 17.342 1.00 59.71 C +ATOM 1568 O6 G A 73 47.679 25.276 17.188 1.00 57.76 O +ATOM 1569 N1 G A 73 45.588 25.842 16.485 1.00 59.01 N +ATOM 1570 C2 G A 73 44.216 25.798 16.549 1.00 61.75 C +ATOM 1571 N2 G A 73 43.552 26.506 15.635 1.00 62.68 N +ATOM 1572 N3 G A 73 43.537 25.106 17.443 1.00 62.36 N +ATOM 1573 C4 G A 73 44.344 24.442 18.288 1.00 62.76 C +ATOM 1574 P G A 74 41.787 18.637 18.416 1.00 74.17 P +ATOM 1575 OP1 G A 74 40.716 17.600 18.506 1.00 74.30 O +ATOM 1576 OP2 G A 74 43.117 18.392 19.042 1.00 71.62 O +ATOM 1577 O5' G A 74 42.045 18.934 16.875 1.00 72.80 O +ATOM 1578 C5' G A 74 42.905 19.983 16.477 1.00 71.35 C +ATOM 1579 C4' G A 74 42.600 20.383 15.067 1.00 68.80 C +ATOM 1580 O4' G A 74 43.028 21.760 14.917 1.00 69.15 O +ATOM 1581 C3' G A 74 43.339 19.614 13.992 1.00 68.58 C +ATOM 1582 O3' G A 74 42.846 18.468 13.299 1.00 71.01 O +ATOM 1583 C2' G A 74 44.522 20.455 13.553 1.00 67.98 C +ATOM 1584 O2' G A 74 44.576 20.558 12.143 1.00 68.13 O +ATOM 1585 C1' G A 74 44.203 21.839 14.136 1.00 66.63 C +ATOM 1586 N9 G A 74 45.323 22.134 15.022 1.00 63.24 N +ATOM 1587 C8 G A 74 45.492 21.692 16.311 1.00 60.66 C +ATOM 1588 N7 G A 74 46.701 21.882 16.760 1.00 60.19 N +ATOM 1589 C5 G A 74 47.349 22.547 15.729 1.00 60.81 C +ATOM 1590 C6 G A 74 48.677 23.004 15.635 1.00 61.76 C +ATOM 1591 O6 G A 74 49.584 22.902 16.473 1.00 65.71 O +ATOM 1592 N1 G A 74 48.918 23.642 14.418 1.00 60.45 N +ATOM 1593 C2 G A 74 47.989 23.822 13.425 1.00 58.92 C +ATOM 1594 N2 G A 74 48.406 24.479 12.330 1.00 58.54 N +ATOM 1595 N3 G A 74 46.741 23.391 13.503 1.00 58.36 N +ATOM 1596 C4 G A 74 46.494 22.764 14.674 1.00 60.52 C +ATOM 1597 P A A 75 43.733 17.113 13.257 1.00 71.98 P +ATOM 1598 OP1 A A 75 43.102 16.200 12.276 1.00 73.52 O +ATOM 1599 OP2 A A 75 43.955 16.648 14.649 1.00 72.26 O +ATOM 1600 O5' A A 75 45.151 17.547 12.672 1.00 68.58 O +ATOM 1601 C5' A A 75 46.255 16.653 12.710 1.00 65.94 C +ATOM 1602 C4' A A 75 47.133 16.874 11.504 1.00 65.49 C +ATOM 1603 O4' A A 75 46.434 16.429 10.319 1.00 66.68 O +ATOM 1604 C3' A A 75 47.472 18.333 11.260 1.00 65.46 C +ATOM 1605 O3' A A 75 48.720 18.628 11.864 1.00 64.21 O +ATOM 1606 C2' A A 75 47.592 18.420 9.750 1.00 64.16 C +ATOM 1607 O2' A A 75 48.875 18.031 9.336 1.00 65.40 O +ATOM 1608 C1' A A 75 46.555 17.396 9.295 1.00 64.67 C +ATOM 1609 N9 A A 75 45.227 17.950 9.094 1.00 64.06 N +ATOM 1610 C8 A A 75 44.138 17.744 9.898 1.00 64.00 C +ATOM 1611 N7 A A 75 43.056 18.349 9.486 1.00 66.17 N +ATOM 1612 C5 A A 75 43.463 19.001 8.332 1.00 65.71 C +ATOM 1613 C6 A A 75 42.781 19.821 7.424 1.00 65.96 C +ATOM 1614 N6 A A 75 41.490 20.141 7.546 1.00 67.52 N +ATOM 1615 N1 A A 75 43.476 20.311 6.375 1.00 66.21 N +ATOM 1616 C2 A A 75 44.770 19.991 6.260 1.00 66.15 C +ATOM 1617 N3 A A 75 45.520 19.231 7.050 1.00 66.38 N +ATOM 1618 C4 A A 75 44.799 18.763 8.080 1.00 64.69 C +ATOM 1619 P A A 76 48.870 19.950 12.740 1.00 62.82 P +ATOM 1620 OP1 A A 76 50.069 19.832 13.600 1.00 63.15 O +ATOM 1621 OP2 A A 76 47.539 20.165 13.362 1.00 59.79 O +ATOM 1622 O5' A A 76 49.159 21.073 11.650 1.00 60.99 O +ATOM 1623 C5' A A 76 50.435 21.172 11.023 1.00 58.74 C +ATOM 1624 C4' A A 76 50.317 21.995 9.775 1.00 57.81 C +ATOM 1625 O4' A A 76 49.237 21.437 8.991 1.00 57.97 O +ATOM 1626 C3' A A 76 49.940 23.455 9.967 1.00 56.91 C +ATOM 1627 O3' A A 76 51.121 24.238 10.118 1.00 57.19 O +ATOM 1628 C2' A A 76 49.263 23.779 8.643 1.00 56.44 C +ATOM 1629 O2' A A 76 50.201 24.001 7.608 1.00 54.76 O +ATOM 1630 C1' A A 76 48.515 22.475 8.363 1.00 55.29 C +ATOM 1631 N9 A A 76 47.162 22.417 8.897 1.00 53.64 N +ATOM 1632 C8 A A 76 46.775 21.938 10.128 1.00 53.02 C +ATOM 1633 N7 A A 76 45.476 21.937 10.309 1.00 53.29 N +ATOM 1634 C5 A A 76 44.974 22.466 9.127 1.00 53.22 C +ATOM 1635 C6 A A 76 43.668 22.715 8.684 1.00 53.02 C +ATOM 1636 N6 A A 76 42.582 22.451 9.400 1.00 52.94 N +ATOM 1637 N1 A A 76 43.513 23.251 7.456 1.00 54.02 N +ATOM 1638 C2 A A 76 44.606 23.509 6.723 1.00 53.06 C +ATOM 1639 N3 A A 76 45.885 23.312 7.024 1.00 53.73 N +ATOM 1640 C4 A A 76 46.004 22.782 8.255 1.00 54.00 C +ATOM 1641 P A A 77 51.041 25.690 10.808 1.00 57.22 P +ATOM 1642 OP1 A A 77 52.362 26.338 10.668 1.00 56.31 O +ATOM 1643 OP2 A A 77 50.451 25.502 12.167 1.00 57.57 O +ATOM 1644 O5' A A 77 50.023 26.495 9.880 1.00 57.05 O +ATOM 1645 C5' A A 77 50.484 27.150 8.697 1.00 55.43 C +ATOM 1646 C4' A A 77 49.318 27.660 7.869 1.00 55.21 C +ATOM 1647 O4' A A 77 48.395 26.566 7.621 1.00 55.90 O +ATOM 1648 C3' A A 77 48.457 28.764 8.470 1.00 54.93 C +ATOM 1649 O3' A A 77 48.994 30.044 8.166 1.00 55.04 O +ATOM 1650 C2' A A 77 47.149 28.572 7.719 1.00 55.16 C +ATOM 1651 O2' A A 77 47.237 29.094 6.409 1.00 54.30 O +ATOM 1652 C1' A A 77 47.068 27.048 7.639 1.00 54.33 C +ATOM 1653 N9 A A 77 46.406 26.464 8.801 1.00 53.13 N +ATOM 1654 C8 A A 77 46.987 26.001 9.955 1.00 52.87 C +ATOM 1655 N7 A A 77 46.127 25.506 10.817 1.00 53.79 N +ATOM 1656 C5 A A 77 44.899 25.658 10.187 1.00 52.32 C +ATOM 1657 C6 A A 77 43.586 25.329 10.578 1.00 52.60 C +ATOM 1658 N6 A A 77 43.286 24.748 11.739 1.00 55.40 N +ATOM 1659 N1 A A 77 42.580 25.618 9.722 1.00 52.52 N +ATOM 1660 C2 A A 77 42.887 26.202 8.552 1.00 52.91 C +ATOM 1661 N3 A A 77 44.085 26.561 8.072 1.00 52.18 N +ATOM 1662 C4 A A 77 45.056 26.256 8.949 1.00 52.16 C +ATOM 1663 P C A 78 49.484 31.004 9.354 1.00 55.69 P +ATOM 1664 OP1 C A 78 49.843 32.325 8.764 1.00 54.67 O +ATOM 1665 OP2 C A 78 50.489 30.262 10.161 1.00 56.60 O +ATOM 1666 O5' C A 78 48.186 31.175 10.259 1.00 54.42 O +ATOM 1667 C5' C A 78 47.035 31.822 9.746 1.00 53.71 C +ATOM 1668 C4' C A 78 45.790 31.247 10.370 1.00 53.69 C +ATOM 1669 O4' C A 78 45.943 29.803 10.457 1.00 54.25 O +ATOM 1670 C3' C A 78 45.529 31.646 11.808 1.00 53.72 C +ATOM 1671 O3' C A 78 44.893 32.906 11.911 1.00 53.94 O +ATOM 1672 C2' C A 78 44.636 30.518 12.292 1.00 53.88 C +ATOM 1673 O2' C A 78 43.308 30.647 11.805 1.00 54.27 O +ATOM 1674 C1' C A 78 45.305 29.325 11.623 1.00 52.32 C +ATOM 1675 N1 C A 78 46.318 28.721 12.494 1.00 50.20 N +ATOM 1676 C2 C A 78 45.883 27.995 13.596 1.00 48.56 C +ATOM 1677 O2 C A 78 44.666 27.900 13.787 1.00 47.16 O +ATOM 1678 N3 C A 78 46.789 27.419 14.418 1.00 48.57 N +ATOM 1679 C4 C A 78 48.092 27.546 14.162 1.00 50.34 C +ATOM 1680 N4 C A 78 48.958 26.946 14.992 1.00 49.92 N +ATOM 1681 C5 C A 78 48.571 28.290 13.040 1.00 51.43 C +ATOM 1682 C6 C A 78 47.654 28.859 12.238 1.00 49.99 C +ATOM 1683 P G A 79 45.068 33.757 13.257 1.00 52.92 P +ATOM 1684 OP1 G A 79 44.602 35.126 12.971 1.00 55.12 O +ATOM 1685 OP2 G A 79 46.464 33.538 13.738 1.00 54.61 O +ATOM 1686 O5' G A 79 44.053 33.066 14.268 1.00 52.03 O +ATOM 1687 C5' G A 79 42.681 32.970 13.939 1.00 52.92 C +ATOM 1688 C4' G A 79 41.965 32.101 14.936 1.00 53.20 C +ATOM 1689 O4' G A 79 42.600 30.794 14.948 1.00 54.24 O +ATOM 1690 C3' G A 79 42.120 32.560 16.371 1.00 54.77 C +ATOM 1691 O3' G A 79 41.208 33.586 16.721 1.00 56.81 O +ATOM 1692 C2' G A 79 41.863 31.284 17.147 1.00 54.49 C +ATOM 1693 O2' G A 79 40.484 31.015 17.176 1.00 56.96 O +ATOM 1694 C1' G A 79 42.546 30.252 16.255 1.00 53.50 C +ATOM 1695 N9 G A 79 43.889 29.889 16.704 1.00 51.11 N +ATOM 1696 C8 G A 79 45.106 30.274 16.195 1.00 50.11 C +ATOM 1697 N7 G A 79 46.120 29.761 16.851 1.00 48.60 N +ATOM 1698 C5 G A 79 45.529 28.995 17.849 1.00 47.30 C +ATOM 1699 C6 G A 79 46.111 28.202 18.879 1.00 46.07 C +ATOM 1700 O6 G A 79 47.321 28.008 19.130 1.00 45.96 O +ATOM 1701 N1 G A 79 45.139 27.600 19.665 1.00 43.73 N +ATOM 1702 C2 G A 79 43.785 27.738 19.492 1.00 48.40 C +ATOM 1703 N2 G A 79 42.983 27.078 20.352 1.00 51.24 N +ATOM 1704 N3 G A 79 43.236 28.469 18.544 1.00 49.81 N +ATOM 1705 C4 G A 79 44.158 29.064 17.767 1.00 49.45 C +ATOM 1706 P U A 80 41.696 34.744 17.718 1.00 57.91 P +ATOM 1707 OP1 U A 80 40.668 35.811 17.699 1.00 58.33 O +ATOM 1708 OP2 U A 80 43.105 35.066 17.387 1.00 55.86 O +ATOM 1709 O5' U A 80 41.666 34.031 19.139 1.00 59.76 O +ATOM 1710 C5' U A 80 40.441 33.510 19.646 1.00 60.84 C +ATOM 1711 C4' U A 80 40.693 32.611 20.834 1.00 61.61 C +ATOM 1712 O4' U A 80 41.480 31.465 20.405 1.00 61.05 O +ATOM 1713 C3' U A 80 41.535 33.217 21.943 1.00 62.84 C +ATOM 1714 O3' U A 80 40.767 34.025 22.818 1.00 67.34 O +ATOM 1715 C2' U A 80 42.082 31.983 22.640 1.00 61.11 C +ATOM 1716 O2' U A 80 41.107 31.381 23.464 1.00 61.83 O +ATOM 1717 C1' U A 80 42.354 31.067 21.450 1.00 58.89 C +ATOM 1718 N1 U A 80 43.737 31.189 20.978 1.00 55.50 N +ATOM 1719 C2 U A 80 44.688 30.431 21.622 1.00 53.56 C +ATOM 1720 O2 U A 80 44.415 29.688 22.539 1.00 54.05 O +ATOM 1721 N3 U A 80 45.971 30.581 21.159 1.00 50.66 N +ATOM 1722 C4 U A 80 46.386 31.399 20.140 1.00 50.72 C +ATOM 1723 O4 U A 80 47.579 31.424 19.832 1.00 49.30 O +ATOM 1724 C5 U A 80 45.339 32.157 19.520 1.00 52.21 C +ATOM 1725 C6 U A 80 44.078 32.027 19.950 1.00 54.00 C +ATOM 1726 P U A 81 41.512 35.096 23.759 1.00 69.99 P +ATOM 1727 OP1 U A 81 40.440 35.890 24.422 1.00 70.01 O +ATOM 1728 OP2 U A 81 42.570 35.792 22.973 1.00 68.74 O +ATOM 1729 O5' U A 81 42.243 34.197 24.853 1.00 69.66 O +ATOM 1730 C5' U A 81 41.492 33.546 25.869 1.00 69.69 C +ATOM 1731 C4' U A 81 42.411 32.874 26.858 1.00 70.12 C +ATOM 1732 O4' U A 81 43.154 31.827 26.185 1.00 70.30 O +ATOM 1733 C3' U A 81 43.492 33.765 27.442 1.00 71.48 C +ATOM 1734 O3' U A 81 43.008 34.521 28.543 1.00 73.23 O +ATOM 1735 C2' U A 81 44.548 32.755 27.868 1.00 71.16 C +ATOM 1736 O2' U A 81 44.243 32.119 29.088 1.00 72.71 O +ATOM 1737 C1' U A 81 44.455 31.733 26.740 1.00 69.65 C +ATOM 1738 N1 U A 81 45.445 32.005 25.694 1.00 67.60 N +ATOM 1739 C2 U A 81 46.694 31.456 25.857 1.00 67.36 C +ATOM 1740 O2 U A 81 46.984 30.751 26.806 1.00 69.28 O +ATOM 1741 N3 U A 81 47.595 31.762 24.873 1.00 65.88 N +ATOM 1742 C4 U A 81 47.377 32.543 23.770 1.00 64.36 C +ATOM 1743 O4 U A 81 48.298 32.741 22.977 1.00 63.94 O +ATOM 1744 C5 U A 81 46.053 33.070 23.668 1.00 66.08 C +ATOM 1745 C6 U A 81 45.152 32.786 24.610 1.00 67.30 C +ATOM 1746 P G A 82 43.833 35.803 29.047 1.00 74.81 P +ATOM 1747 OP1 G A 82 43.043 36.432 30.132 1.00 76.99 O +ATOM 1748 OP2 G A 82 44.213 36.612 27.861 1.00 76.87 O +ATOM 1749 O5' G A 82 45.157 35.176 29.671 1.00 72.53 O +ATOM 1750 C5' G A 82 45.067 34.297 30.782 1.00 72.61 C +ATOM 1751 C4' G A 82 46.398 33.635 31.056 1.00 73.05 C +ATOM 1752 O4' G A 82 46.808 32.836 29.908 1.00 72.32 O +ATOM 1753 C3' G A 82 47.550 34.606 31.244 1.00 73.03 C +ATOM 1754 O3' G A 82 47.600 35.046 32.591 1.00 73.81 O +ATOM 1755 C2' G A 82 48.762 33.750 30.917 1.00 71.15 C +ATOM 1756 O2' G A 82 49.183 32.982 32.016 1.00 71.55 O +ATOM 1757 C1' G A 82 48.219 32.851 29.809 1.00 70.45 C +ATOM 1758 N9 G A 82 48.606 33.304 28.483 1.00 69.22 N +ATOM 1759 C8 G A 82 47.862 34.024 27.586 1.00 68.93 C +ATOM 1760 N7 G A 82 48.523 34.307 26.494 1.00 68.74 N +ATOM 1761 C5 G A 82 49.772 33.732 26.686 1.00 66.17 C +ATOM 1762 C6 G A 82 50.914 33.717 25.853 1.00 65.71 C +ATOM 1763 O6 G A 82 51.064 34.234 24.737 1.00 67.39 O +ATOM 1764 N1 G A 82 51.960 33.015 26.437 1.00 65.06 N +ATOM 1765 C2 G A 82 51.910 32.409 27.667 1.00 65.49 C +ATOM 1766 N2 G A 82 53.019 31.776 28.066 1.00 66.07 N +ATOM 1767 N3 G A 82 50.854 32.422 28.450 1.00 65.40 N +ATOM 1768 C4 G A 82 49.832 33.098 27.902 1.00 67.06 C +ATOM 1769 P A A 83 48.714 36.110 33.037 1.00 75.74 P +ATOM 1770 OP1 A A 83 48.454 36.457 34.461 1.00 76.19 O +ATOM 1771 OP2 A A 83 48.787 37.192 32.017 1.00 75.92 O +ATOM 1772 O5' A A 83 50.084 35.306 32.950 1.00 73.07 O +ATOM 1773 C5' A A 83 51.311 35.996 32.798 1.00 71.48 C +ATOM 1774 C4' A A 83 52.389 35.042 32.352 1.00 72.32 C +ATOM 1775 O4' A A 83 52.006 34.431 31.092 1.00 71.90 O +ATOM 1776 C3' A A 83 53.717 35.706 32.044 1.00 72.39 C +ATOM 1777 O3' A A 83 54.479 35.854 33.223 1.00 73.75 O +ATOM 1778 C2' A A 83 54.367 34.722 31.088 1.00 71.88 C +ATOM 1779 O2' A A 83 55.011 33.652 31.742 1.00 73.47 O +ATOM 1780 C1' A A 83 53.158 34.234 30.289 1.00 70.66 C +ATOM 1781 N9 A A 83 52.993 34.981 29.046 1.00 68.56 N +ATOM 1782 C8 A A 83 51.908 35.688 28.594 1.00 67.12 C +ATOM 1783 N7 A A 83 52.100 36.253 27.425 1.00 66.12 N +ATOM 1784 C5 A A 83 53.397 35.888 27.088 1.00 66.03 C +ATOM 1785 C6 A A 83 54.198 36.164 25.971 1.00 66.42 C +ATOM 1786 N6 A A 83 53.795 36.897 24.937 1.00 66.62 N +ATOM 1787 N1 A A 83 55.448 35.651 25.951 1.00 66.47 N +ATOM 1788 C2 A A 83 55.854 34.913 26.993 1.00 65.81 C +ATOM 1789 N3 A A 83 55.194 34.582 28.094 1.00 66.02 N +ATOM 1790 C4 A A 83 53.956 35.106 28.078 1.00 66.63 C +ATOM 1791 P A A 84 55.352 37.173 33.429 1.00 74.69 P +ATOM 1792 OP1 A A 84 56.069 37.043 34.725 1.00 74.75 O +ATOM 1793 OP2 A A 84 54.440 38.322 33.207 1.00 72.53 O +ATOM 1794 O5' A A 84 56.405 37.108 32.237 1.00 72.08 O +ATOM 1795 C5' A A 84 57.422 36.109 32.201 1.00 70.69 C +ATOM 1796 C4' A A 84 58.311 36.343 31.007 1.00 69.31 C +ATOM 1797 O4' A A 84 57.606 35.966 29.799 1.00 68.54 O +ATOM 1798 C3' A A 84 58.703 37.790 30.786 1.00 69.05 C +ATOM 1799 O3' A A 84 59.818 38.159 31.581 1.00 71.70 O +ATOM 1800 C2' A A 84 58.992 37.827 29.289 1.00 67.78 C +ATOM 1801 O2' A A 84 60.283 37.385 28.923 1.00 68.74 O +ATOM 1802 C1' A A 84 57.912 36.881 28.759 1.00 66.10 C +ATOM 1803 N9 A A 84 56.685 37.615 28.467 1.00 62.63 N +ATOM 1804 C8 A A 84 55.570 37.709 29.260 1.00 60.97 C +ATOM 1805 N7 A A 84 54.624 38.454 28.752 1.00 60.47 N +ATOM 1806 C5 A A 84 55.149 38.877 27.539 1.00 58.77 C +ATOM 1807 C6 A A 84 54.633 39.693 26.524 1.00 57.48 C +ATOM 1808 N6 A A 84 53.422 40.254 26.573 1.00 58.08 N +ATOM 1809 N1 A A 84 55.411 39.919 25.444 1.00 57.00 N +ATOM 1810 C2 A A 84 56.628 39.354 25.400 1.00 57.46 C +ATOM 1811 N3 A A 84 57.223 38.568 26.295 1.00 58.36 N +ATOM 1812 C4 A A 84 56.419 38.367 27.352 1.00 59.63 C +ATOM 1813 P A A 85 60.045 39.705 31.960 1.00 72.98 P +ATOM 1814 OP1 A A 85 61.385 39.797 32.591 1.00 74.48 O +ATOM 1815 OP2 A A 85 58.855 40.226 32.685 1.00 72.40 O +ATOM 1816 O5' A A 85 60.110 40.435 30.548 1.00 70.44 O +ATOM 1817 C5' A A 85 61.253 40.307 29.714 1.00 66.23 C +ATOM 1818 C4' A A 85 61.044 41.084 28.441 1.00 64.90 C +ATOM 1819 O4' A A 85 59.882 40.545 27.748 1.00 62.64 O +ATOM 1820 C3' A A 85 60.699 42.549 28.626 1.00 62.94 C +ATOM 1821 O3' A A 85 61.844 43.363 28.835 1.00 63.23 O +ATOM 1822 C2' A A 85 59.984 42.868 27.322 1.00 61.52 C +ATOM 1823 O2' A A 85 60.881 43.020 26.246 1.00 61.55 O +ATOM 1824 C1' A A 85 59.174 41.592 27.113 1.00 58.58 C +ATOM 1825 N9 A A 85 57.869 41.712 27.755 1.00 55.06 N +ATOM 1826 C8 A A 85 57.468 41.210 28.962 1.00 53.46 C +ATOM 1827 N7 A A 85 56.235 41.526 29.280 1.00 53.24 N +ATOM 1828 C5 A A 85 55.794 42.281 28.202 1.00 51.20 C +ATOM 1829 C6 A A 85 54.571 42.927 27.926 1.00 51.15 C +ATOM 1830 N6 A A 85 53.514 42.908 28.743 1.00 50.33 N +ATOM 1831 N1 A A 85 54.469 43.605 26.763 1.00 51.08 N +ATOM 1832 C2 A A 85 55.521 43.623 25.939 1.00 49.66 C +ATOM 1833 N3 A A 85 56.712 43.057 26.085 1.00 51.02 N +ATOM 1834 C4 A A 85 56.787 42.396 27.253 1.00 52.63 C +ATOM 1835 P G A 86 61.717 44.687 29.747 1.00 63.01 P +ATOM 1836 OP1 G A 86 63.080 45.233 29.962 1.00 63.49 O +ATOM 1837 OP2 G A 86 60.860 44.331 30.912 1.00 62.23 O +ATOM 1838 O5' G A 86 60.926 45.717 28.830 1.00 60.62 O +ATOM 1839 C5' G A 86 61.397 46.003 27.524 1.00 57.16 C +ATOM 1840 C4' G A 86 60.338 46.713 26.717 1.00 54.53 C +ATOM 1841 O4' G A 86 59.166 45.857 26.587 1.00 53.07 O +ATOM 1842 C3' G A 86 59.774 47.960 27.371 1.00 53.14 C +ATOM 1843 O3' G A 86 60.618 49.084 27.216 1.00 51.63 O +ATOM 1844 C2' G A 86 58.432 48.112 26.672 1.00 52.73 C +ATOM 1845 O2' G A 86 58.570 48.629 25.368 1.00 50.58 O +ATOM 1846 C1' G A 86 57.994 46.657 26.559 1.00 51.72 C +ATOM 1847 N9 G A 86 57.100 46.230 27.628 1.00 50.07 N +ATOM 1848 C8 G A 86 57.353 45.289 28.594 1.00 50.13 C +ATOM 1849 N7 G A 86 56.333 45.083 29.386 1.00 49.23 N +ATOM 1850 C5 G A 86 55.355 45.948 28.923 1.00 48.44 C +ATOM 1851 C6 G A 86 54.036 46.158 29.377 1.00 50.00 C +ATOM 1852 O6 G A 86 53.447 45.603 30.304 1.00 52.45 O +ATOM 1853 N1 G A 86 53.379 47.127 28.628 1.00 49.28 N +ATOM 1854 C2 G A 86 53.924 47.806 27.575 1.00 48.05 C +ATOM 1855 N2 G A 86 53.121 48.698 27.001 1.00 46.91 N +ATOM 1856 N3 G A 86 55.161 47.618 27.128 1.00 47.93 N +ATOM 1857 C4 G A 86 55.814 46.677 27.847 1.00 48.84 C +ATOM 1858 P A A 87 60.528 50.278 28.276 1.00 48.22 P +ATOM 1859 OP1 A A 87 61.493 51.324 27.903 1.00 50.47 O +ATOM 1860 OP2 A A 87 60.599 49.663 29.612 1.00 48.71 O +ATOM 1861 O5' A A 87 59.072 50.870 28.036 1.00 47.96 O +ATOM 1862 C5' A A 87 58.810 51.665 26.888 1.00 45.52 C +ATOM 1863 C4' A A 87 57.420 52.245 26.944 1.00 45.17 C +ATOM 1864 O4' A A 87 56.474 51.163 27.023 1.00 44.86 O +ATOM 1865 C3' A A 87 57.104 53.065 28.183 1.00 47.55 C +ATOM 1866 O3' A A 87 57.553 54.398 28.043 1.00 48.74 O +ATOM 1867 C2' A A 87 55.590 52.985 28.257 1.00 45.69 C +ATOM 1868 O2' A A 87 54.966 53.829 27.315 1.00 46.31 O +ATOM 1869 C1' A A 87 55.363 51.547 27.819 1.00 43.13 C +ATOM 1870 N9 A A 87 55.242 50.601 28.918 1.00 40.51 N +ATOM 1871 C8 A A 87 56.174 49.711 29.374 1.00 40.58 C +ATOM 1872 N7 A A 87 55.738 48.948 30.344 1.00 41.86 N +ATOM 1873 C5 A A 87 54.439 49.376 30.546 1.00 38.70 C +ATOM 1874 C6 A A 87 53.436 48.953 31.422 1.00 38.67 C +ATOM 1875 N6 A A 87 53.591 47.957 32.293 1.00 38.56 N +ATOM 1876 N1 A A 87 52.246 49.589 31.368 1.00 40.88 N +ATOM 1877 C2 A A 87 52.088 50.575 30.477 1.00 41.68 C +ATOM 1878 N3 A A 87 52.958 51.054 29.589 1.00 40.58 N +ATOM 1879 C4 A A 87 54.126 50.402 29.681 1.00 39.79 C +ATOM 1880 P U A 88 58.198 55.136 29.302 1.00 48.29 P +ATOM 1881 OP1 U A 88 58.993 56.266 28.738 1.00 47.03 O +ATOM 1882 OP2 U A 88 58.870 54.083 30.122 1.00 47.21 O +ATOM 1883 O5' U A 88 56.917 55.689 30.075 1.00 47.92 O +ATOM 1884 C5' U A 88 56.127 56.707 29.482 1.00 47.38 C +ATOM 1885 C4' U A 88 54.808 56.850 30.197 1.00 47.01 C +ATOM 1886 O4' U A 88 54.078 55.598 30.095 1.00 47.37 O +ATOM 1887 C3' U A 88 54.903 57.067 31.692 1.00 47.34 C +ATOM 1888 O3' U A 88 55.161 58.407 32.052 1.00 47.14 O +ATOM 1889 C2' U A 88 53.536 56.615 32.152 1.00 46.01 C +ATOM 1890 O2' U A 88 52.617 57.604 31.753 1.00 46.16 O +ATOM 1891 C1' U A 88 53.334 55.384 31.278 1.00 44.84 C +ATOM 1892 N1 U A 88 53.835 54.171 31.938 1.00 43.85 N +ATOM 1893 C2 U A 88 53.089 53.677 32.974 1.00 44.35 C +ATOM 1894 O2 U A 88 52.073 54.213 33.349 1.00 47.48 O +ATOM 1895 N3 U A 88 53.572 52.538 33.563 1.00 42.79 N +ATOM 1896 C4 U A 88 54.705 51.864 33.226 1.00 43.22 C +ATOM 1897 O4 U A 88 55.018 50.851 33.858 1.00 44.99 O +ATOM 1898 C5 U A 88 55.436 52.443 32.140 1.00 43.46 C +ATOM 1899 C6 U A 88 54.985 53.554 31.549 1.00 43.73 C +ATOM 1900 P G A 89 56.009 58.702 33.383 1.00 46.16 P +ATOM 1901 OP1 G A 89 56.494 60.099 33.290 1.00 45.41 O +ATOM 1902 OP2 G A 89 56.980 57.592 33.512 1.00 42.04 O +ATOM 1903 O5' G A 89 54.938 58.588 34.557 1.00 45.55 O +ATOM 1904 C5' G A 89 53.772 59.397 34.546 1.00 45.93 C +ATOM 1905 C4' G A 89 52.792 58.945 35.610 1.00 47.23 C +ATOM 1906 O4' G A 89 52.385 57.568 35.369 1.00 48.15 O +ATOM 1907 C3' G A 89 53.329 58.926 37.034 1.00 47.10 C +ATOM 1908 O3' G A 89 53.245 60.232 37.593 1.00 48.88 O +ATOM 1909 C2' G A 89 52.396 57.933 37.723 1.00 46.50 C +ATOM 1910 O2' G A 89 51.145 58.503 38.102 1.00 44.07 O +ATOM 1911 C1' G A 89 52.178 56.906 36.608 1.00 45.89 C +ATOM 1912 N9 G A 89 53.064 55.750 36.658 1.00 43.74 N +ATOM 1913 C8 G A 89 54.217 55.571 35.944 1.00 43.64 C +ATOM 1914 N7 G A 89 54.781 54.412 36.166 1.00 43.02 N +ATOM 1915 C5 G A 89 53.952 53.797 37.091 1.00 41.41 C +ATOM 1916 C6 G A 89 54.056 52.525 37.720 1.00 41.45 C +ATOM 1917 O6 G A 89 54.923 51.659 37.572 1.00 42.99 O +ATOM 1918 N1 G A 89 53.011 52.301 38.601 1.00 40.30 N +ATOM 1919 C2 G A 89 51.997 53.182 38.846 1.00 43.16 C +ATOM 1920 N2 G A 89 51.077 52.782 39.723 1.00 44.32 N +ATOM 1921 N3 G A 89 51.887 54.375 38.271 1.00 43.05 N +ATOM 1922 C4 G A 89 52.893 54.612 37.411 1.00 41.85 C +ATOM 1923 P A A 90 54.261 60.673 38.754 1.00 49.33 P +ATOM 1924 OP1 A A 90 53.796 62.025 39.132 1.00 50.89 O +ATOM 1925 OP2 A A 90 55.663 60.483 38.318 1.00 50.02 O +ATOM 1926 O5' A A 90 53.920 59.654 39.935 1.00 48.11 O +ATOM 1927 C5' A A 90 52.697 59.783 40.661 1.00 46.82 C +ATOM 1928 C4' A A 90 52.547 58.662 41.657 1.00 46.54 C +ATOM 1929 O4' A A 90 52.472 57.405 40.938 1.00 46.05 O +ATOM 1930 C3' A A 90 53.729 58.460 42.584 1.00 48.87 C +ATOM 1931 O3' A A 90 53.706 59.332 43.695 1.00 53.87 O +ATOM 1932 C2' A A 90 53.565 57.013 43.002 1.00 47.31 C +ATOM 1933 O2' A A 90 52.561 56.871 43.985 1.00 50.65 O +ATOM 1934 C1' A A 90 53.097 56.384 41.694 1.00 43.08 C +ATOM 1935 N9 A A 90 54.200 55.832 40.911 1.00 39.20 N +ATOM 1936 C8 A A 90 54.964 56.432 39.942 1.00 37.90 C +ATOM 1937 N7 A A 90 55.882 55.642 39.432 1.00 35.96 N +ATOM 1938 C5 A A 90 55.706 54.448 40.111 1.00 34.77 C +ATOM 1939 C6 A A 90 56.367 53.206 40.038 1.00 37.49 C +ATOM 1940 N6 A A 90 57.370 52.939 39.203 1.00 40.40 N +ATOM 1941 N1 A A 90 55.950 52.227 40.865 1.00 37.63 N +ATOM 1942 C2 A A 90 54.933 52.484 41.695 1.00 37.37 C +ATOM 1943 N3 A A 90 54.233 53.606 41.850 1.00 35.09 N +ATOM 1944 C4 A A 90 54.677 54.554 41.023 1.00 35.63 C +ATOM 1945 P G A 91 55.092 59.795 44.359 1.00 56.70 P +ATOM 1946 OP1 G A 91 54.771 60.922 45.270 1.00 57.70 O +ATOM 1947 OP2 G A 91 56.117 59.995 43.298 1.00 55.05 O +ATOM 1948 O5' G A 91 55.497 58.514 45.213 1.00 54.40 O +ATOM 1949 C5' G A 91 54.652 58.066 46.257 1.00 55.05 C +ATOM 1950 C4' G A 91 55.146 56.755 46.819 1.00 57.40 C +ATOM 1951 O4' G A 91 54.959 55.689 45.845 1.00 57.63 O +ATOM 1952 C3' G A 91 56.630 56.703 47.121 1.00 58.60 C +ATOM 1953 O3' G A 91 56.928 57.302 48.366 1.00 62.00 O +ATOM 1954 C2' G A 91 56.905 55.208 47.110 1.00 57.65 C +ATOM 1955 O2' G A 91 56.449 54.586 48.296 1.00 61.81 O +ATOM 1956 C1' G A 91 56.021 54.752 45.950 1.00 56.16 C +ATOM 1957 N9 G A 91 56.782 54.738 44.704 1.00 51.72 N +ATOM 1958 C8 G A 91 56.926 55.756 43.791 1.00 49.57 C +ATOM 1959 N7 G A 91 57.738 55.451 42.813 1.00 47.94 N +ATOM 1960 C5 G A 91 58.138 54.151 43.090 1.00 47.47 C +ATOM 1961 C6 G A 91 59.021 53.291 42.388 1.00 48.13 C +ATOM 1962 O6 G A 91 59.639 53.516 41.342 1.00 49.59 O +ATOM 1963 N1 G A 91 59.152 52.056 43.022 1.00 46.53 N +ATOM 1964 C2 G A 91 58.509 51.695 44.184 1.00 45.93 C +ATOM 1965 N2 G A 91 58.759 50.457 44.657 1.00 43.94 N +ATOM 1966 N3 G A 91 57.678 52.491 44.842 1.00 46.16 N +ATOM 1967 C4 G A 91 57.544 53.693 44.244 1.00 48.37 C +ATOM 1968 P C A 92 58.460 57.535 48.781 1.00 65.24 P +ATOM 1969 OP1 C A 92 58.483 58.295 50.060 1.00 65.63 O +ATOM 1970 OP2 C A 92 59.219 58.050 47.604 1.00 65.80 O +ATOM 1971 O5' C A 92 58.959 56.063 49.081 1.00 61.36 O +ATOM 1972 C5' C A 92 60.332 55.789 49.189 1.00 58.00 C +ATOM 1973 C4' C A 92 60.583 54.344 48.883 1.00 54.97 C +ATOM 1974 O4' C A 92 59.894 53.989 47.667 1.00 54.29 O +ATOM 1975 C3' C A 92 62.029 54.026 48.617 1.00 55.01 C +ATOM 1976 O3' C A 92 62.681 53.819 49.854 1.00 55.30 O +ATOM 1977 C2' C A 92 61.934 52.781 47.754 1.00 53.19 C +ATOM 1978 O2' C A 92 61.752 51.585 48.477 1.00 54.48 O +ATOM 1979 C1' C A 92 60.689 53.090 46.926 1.00 52.53 C +ATOM 1980 N1 C A 92 61.028 53.742 45.664 1.00 49.85 N +ATOM 1981 C2 C A 92 61.710 53.010 44.726 1.00 49.42 C +ATOM 1982 O2 C A 92 61.987 51.826 44.989 1.00 51.77 O +ATOM 1983 N3 C A 92 62.054 53.592 43.561 1.00 49.14 N +ATOM 1984 C4 C A 92 61.722 54.858 43.328 1.00 49.22 C +ATOM 1985 N4 C A 92 62.086 55.389 42.166 1.00 49.50 N +ATOM 1986 C5 C A 92 61.004 55.632 44.276 1.00 49.21 C +ATOM 1987 C6 C A 92 60.683 55.041 45.421 1.00 49.19 C +ATOM 1988 P C A 93 64.095 54.516 50.109 1.00 55.71 P +ATOM 1989 OP1 C A 93 64.369 54.474 51.568 1.00 57.76 O +ATOM 1990 OP2 C A 93 64.088 55.822 49.397 1.00 55.38 O +ATOM 1991 O5' C A 93 65.104 53.533 49.376 1.00 55.30 O +ATOM 1992 C5' C A 93 65.215 52.186 49.814 1.00 55.96 C +ATOM 1993 C4' C A 93 66.119 51.421 48.893 1.00 57.33 C +ATOM 1994 O4' C A 93 65.506 51.340 47.586 1.00 56.23 O +ATOM 1995 C3' C A 93 67.453 52.093 48.646 1.00 58.35 C +ATOM 1996 O3' C A 93 68.358 51.720 49.676 1.00 60.91 O +ATOM 1997 C2' C A 93 67.859 51.519 47.295 1.00 56.28 C +ATOM 1998 O2' C A 93 68.444 50.245 47.419 1.00 56.69 O +ATOM 1999 C1' C A 93 66.505 51.408 46.587 1.00 53.87 C +ATOM 2000 N1 C A 93 66.164 52.519 45.689 1.00 50.29 N +ATOM 2001 C2 C A 93 66.553 52.449 44.357 1.00 48.90 C +ATOM 2002 O2 C A 93 67.196 51.459 43.974 1.00 49.47 O +ATOM 2003 N3 C A 93 66.219 53.459 43.516 1.00 47.11 N +ATOM 2004 C4 C A 93 65.528 54.508 43.973 1.00 45.79 C +ATOM 2005 N4 C A 93 65.205 55.474 43.112 1.00 47.26 N +ATOM 2006 C5 C A 93 65.134 54.610 45.330 1.00 45.95 C +ATOM 2007 C6 C A 93 65.467 53.599 46.149 1.00 48.81 C +ATOM 2008 P A A 94 69.700 52.565 49.893 1.00 63.26 P +ATOM 2009 OP1 A A 94 70.472 51.929 51.000 1.00 63.03 O +ATOM 2010 OP2 A A 94 69.311 54.001 49.989 1.00 63.37 O +ATOM 2011 O5' A A 94 70.490 52.381 48.519 1.00 61.77 O +ATOM 2012 C5' A A 94 71.326 51.253 48.283 1.00 61.29 C +ATOM 2013 C4' A A 94 72.146 51.475 47.027 1.00 62.44 C +ATOM 2014 O4' A A 94 71.241 51.538 45.895 1.00 61.92 O +ATOM 2015 C3' A A 94 72.937 52.778 46.954 1.00 63.29 C +ATOM 2016 O3' A A 94 74.230 52.643 47.539 1.00 63.03 O +ATOM 2017 C2' A A 94 73.070 52.992 45.454 1.00 63.82 C +ATOM 2018 O2' A A 94 74.136 52.237 44.902 1.00 65.97 O +ATOM 2019 C1' A A 94 71.721 52.471 44.948 1.00 62.06 C +ATOM 2020 N9 A A 94 70.717 53.521 44.818 1.00 60.30 N +ATOM 2021 C8 A A 94 69.962 54.073 45.821 1.00 60.55 C +ATOM 2022 N7 A A 94 69.162 55.030 45.415 1.00 59.61 N +ATOM 2023 C5 A A 94 69.401 55.106 44.053 1.00 59.00 C +ATOM 2024 C6 A A 94 68.872 55.924 43.063 1.00 58.81 C +ATOM 2025 N6 A A 94 67.974 56.874 43.310 1.00 59.79 N +ATOM 2026 N1 A A 94 69.307 55.745 41.796 1.00 58.99 N +ATOM 2027 C2 A A 94 70.230 54.798 41.564 1.00 59.88 C +ATOM 2028 N3 A A 94 70.812 53.965 42.421 1.00 59.48 N +ATOM 2029 C4 A A 94 70.348 54.174 43.666 1.00 59.71 C +TER 2030 A A 94 +HETATM 2031 MG MG A 205 44.673 52.089 21.066 1.00 52.79 MG +HETATM 2032 MG MG A 206 57.959 37.961 33.008 1.00 75.51 MG +HETATM 2033 IR IRI A 201 53.885 56.740 -0.635 1.00 98.98 IR +HETATM 2034 N1 IRI A 201 52.485 58.054 -1.822 1.00 97.67 N +HETATM 2035 N2 IRI A 201 54.266 58.382 0.816 1.00 98.55 N +HETATM 2036 N3 IRI A 201 55.233 55.348 0.506 1.00 98.59 N +HETATM 2037 N4 IRI A 201 53.497 55.076 -2.135 1.00 99.01 N +HETATM 2038 N5 IRI A 201 52.127 56.049 0.598 1.00 98.22 N +HETATM 2039 N6 IRI A 201 55.669 57.413 -1.820 1.00 99.00 N +HETATM 2040 IR IRI A 202 53.580 69.128 10.808 1.00 85.21 IR +HETATM 2041 N1 IRI A 202 51.863 70.294 9.931 1.00 85.46 N +HETATM 2042 N2 IRI A 202 53.979 70.743 12.294 1.00 85.76 N +HETATM 2043 N3 IRI A 202 55.263 67.867 11.657 1.00 84.55 N +HETATM 2044 N4 IRI A 202 53.191 67.483 9.307 1.00 85.84 N +HETATM 2045 N5 IRI A 202 52.135 68.142 12.244 1.00 85.61 N +HETATM 2046 N6 IRI A 202 55.040 70.069 9.391 1.00 85.28 N +HETATM 2047 IR IRI A 203 61.715 45.974 13.576 1.00 89.54 IR +HETATM 2048 N1 IRI A 203 60.528 47.751 14.317 1.00 90.96 N +HETATM 2049 N2 IRI A 203 60.570 44.590 14.901 1.00 90.31 N +HETATM 2050 N3 IRI A 203 62.943 44.257 12.747 1.00 91.15 N +HETATM 2051 N4 IRI A 203 62.898 47.359 12.224 1.00 90.58 N +HETATM 2052 N5 IRI A 203 60.217 45.694 11.915 1.00 90.65 N +HETATM 2053 N6 IRI A 203 63.229 46.280 15.197 1.00 90.26 N +HETATM 2054 IR IRI A 204 58.679 49.493 35.312 1.00 49.00 IR +HETATM 2055 N1 IRI A 204 57.796 50.488 33.496 1.00 51.75 N +HETATM 2056 N2 IRI A 204 56.792 49.834 36.443 1.00 50.76 N +HETATM 2057 N3 IRI A 204 59.668 48.489 37.085 1.00 53.82 N +HETATM 2058 N4 IRI A 204 60.576 49.136 34.184 1.00 51.33 N +HETATM 2059 N5 IRI A 204 57.947 47.503 34.598 1.00 53.62 N +HETATM 2060 N6 IRI A 204 59.488 51.435 36.079 1.00 53.26 N +HETATM 2061 N SAM A 301 48.661 58.442 29.234 1.00 71.76 N +HETATM 2062 CA SAM A 301 48.892 57.767 27.953 1.00 71.83 C +HETATM 2063 C SAM A 301 47.728 58.043 27.018 1.00 73.09 C +HETATM 2064 O SAM A 301 47.747 57.608 25.870 1.00 74.98 O +HETATM 2065 OXT SAM A 301 46.793 58.755 27.385 1.00 73.14 O +HETATM 2066 CB SAM A 301 49.051 56.247 28.156 1.00 70.42 C +HETATM 2067 CG SAM A 301 49.924 55.993 29.384 1.00 68.18 C +HETATM 2068 SD SAM A 301 50.180 54.222 29.811 1.00 68.57 S +HETATM 2069 CE SAM A 301 49.547 53.321 28.362 1.00 68.16 C +HETATM 2070 C5' SAM A 301 48.781 54.097 30.945 1.00 63.51 C +HETATM 2071 C4' SAM A 301 49.142 54.393 32.411 1.00 61.14 C +HETATM 2072 O4' SAM A 301 49.826 55.679 32.483 1.00 59.00 O +HETATM 2073 C3' SAM A 301 47.793 54.604 33.049 1.00 59.63 C +HETATM 2074 O3' SAM A 301 47.357 53.395 33.671 1.00 61.69 O +HETATM 2075 C2' SAM A 301 48.045 55.680 34.098 1.00 58.07 C +HETATM 2076 O2' SAM A 301 48.258 55.128 35.392 1.00 60.89 O +HETATM 2077 C1' SAM A 301 49.315 56.473 33.618 1.00 56.29 C +HETATM 2078 N9 SAM A 301 49.019 57.807 33.055 1.00 52.35 N +HETATM 2079 C8 SAM A 301 49.941 58.804 32.897 1.00 49.96 C +HETATM 2080 N7 SAM A 301 49.391 59.863 32.379 1.00 49.17 N +HETATM 2081 C5 SAM A 301 48.084 59.618 32.158 1.00 49.87 C +HETATM 2082 C6 SAM A 301 47.000 60.356 31.619 1.00 49.12 C +HETATM 2083 N6 SAM A 301 47.179 61.649 31.181 1.00 49.12 N +HETATM 2084 N1 SAM A 301 45.794 59.770 31.541 1.00 48.62 N +HETATM 2085 C2 SAM A 301 45.596 58.512 31.950 1.00 48.26 C +HETATM 2086 N3 SAM A 301 46.578 57.797 32.476 1.00 48.84 N +HETATM 2087 C4 SAM A 301 47.821 58.293 32.591 1.00 50.12 C +HETATM 2088 O HOH A 401 57.434 67.701 5.730 1.00 62.83 O +HETATM 2089 O HOH A 402 66.189 60.895 3.390 1.00102.86 O +HETATM 2090 O HOH A 403 41.692 28.822 12.775 1.00 79.78 O +HETATM 2091 O HOH A 404 58.520 32.372 29.001 1.00 87.70 O +HETATM 2092 O HOH A 405 41.683 78.187 34.648 1.00 90.77 O +HETATM 2093 O HOH A 406 39.116 52.800 26.854 1.00 47.35 O +HETATM 2094 O HOH A 407 60.473 27.307 22.789 1.00 55.76 O +HETATM 2095 O HOH A 408 66.992 61.289 13.604 1.00 74.35 O +HETATM 2096 O HOH A 409 54.344 44.338 21.904 1.00 44.49 O +HETATM 2097 O HOH A 410 44.691 72.338 12.049 1.00 50.99 O +HETATM 2098 O HOH A 411 40.751 63.603 43.590 1.00 89.83 O +HETATM 2099 O HOH A 412 53.645 41.356 9.844 1.00 90.63 O +HETATM 2100 O HOH A 413 59.949 37.796 24.955 1.00 70.80 O +HETATM 2101 O HOH A 415 51.339 54.431 20.373 1.00 76.96 O +HETATM 2102 O HOH A 416 37.653 77.331 42.105 1.00104.47 O +HETATM 2103 O HOH A 417 52.864 38.162 12.617 1.00 80.23 O +HETATM 2104 O HOH A 418 70.042 75.630 9.251 1.00 96.14 O +HETATM 2105 O HOH A 419 57.849 36.827 16.245 1.00 55.25 O +HETATM 2106 O HOH A 420 51.199 53.647 16.824 1.00 68.61 O +HETATM 2107 O HOH A 421 46.270 42.361 39.422 1.00 86.08 O +HETATM 2108 O HOH A 422 39.748 46.501 33.723 1.00 90.52 O +HETATM 2109 O HOH A 423 55.402 30.310 22.335 1.00153.77 O +HETATM 2110 O HOH A 424 62.850 37.633 36.622 1.00 93.90 O +HETATM 2111 O HOH A 425 52.620 28.934 10.172 1.00 66.53 O +HETATM 2112 O HOH A 426 46.043 72.059 15.009 1.00 81.11 O +HETATM 2113 O HOH A 427 44.504 24.559 13.975 1.00 95.67 O +HETATM 2114 O HOH A 428 64.390 51.541 8.357 1.00 96.89 O +HETATM 2115 O HOH A 429 62.387 43.098 34.217 1.00 62.96 O +HETATM 2116 O HOH A 430 40.781 42.498 19.177 1.00 95.04 O +HETATM 2117 O HOH A 431 51.714 28.135 30.983 1.00 99.10 O +HETATM 2118 O HOH A 432 56.277 41.684 42.172 1.00 76.07 O +HETATM 2119 O HOH A 433 71.383 70.114 4.691 1.00115.24 O +HETATM 2120 O HOH A 434 43.954 36.036 19.243 1.00 60.36 O +HETATM 2121 O HOH A 435 42.927 80.090 37.718 1.00 93.62 O +HETATM 2122 O HOH A 436 57.157 36.207 23.849 1.00 66.99 O +HETATM 2123 O HOH A 437 50.487 54.395 35.797 1.00115.03 O +HETATM 2124 O HOH A 438 42.557 37.639 16.483 1.00104.97 O +HETATM 2125 O HOH A 439 52.517 25.349 8.099 1.00 83.24 O +HETATM 2126 O HOH A 440 43.812 69.893 17.618 1.00 74.07 O +HETATM 2127 O HOH A 441 42.386 49.215 25.612 1.00 87.62 O +HETATM 2128 O HOH A 442 43.738 47.793 12.611 1.00 97.20 O +HETATM 2129 O HOH A 443 56.851 56.881 11.453 1.00 65.45 O +HETATM 2130 O HOH A 444 41.494 28.883 24.574 1.00 68.68 O +HETATM 2131 O HOH A 445 66.299 67.845 11.185 1.00119.36 O +HETATM 2132 O HOH A 446 44.327 43.962 37.114 1.00 59.00 O +HETATM 2133 O HOH A 447 55.964 29.615 20.081 1.00 95.39 O +HETATM 2134 O HOH A 448 57.973 59.050 -2.009 1.00109.16 O +HETATM 2135 O HOH A 449 59.402 59.312 31.449 1.00 68.84 O +HETATM 2136 O HOH A 450 43.007 16.103 21.017 1.00106.73 O +HETATM 2137 O HOH A 451 42.422 49.150 15.212 1.00 78.44 O +HETATM 2138 O HOH A 452 70.835 47.923 38.230 1.00 80.61 O +HETATM 2139 O HOH A 453 61.705 64.436 22.275 1.00 84.32 O +HETATM 2140 O HOH A 454 46.943 51.613 25.671 1.00 73.11 O +HETATM 2141 O HOH A 455 54.648 46.163 19.618 1.00 62.24 O +HETATM 2142 O HOH A 456 38.484 46.751 20.701 1.00 56.54 O +HETATM 2143 O HOH A 457 60.794 35.462 31.358 1.00109.99 O +HETATM 2144 O HOH A 458 44.895 54.912 35.019 1.00 81.53 O +HETATM 2145 O HOH A 459 60.469 54.509 19.865 1.00 78.35 O +HETATM 2146 O HOH A 460 40.557 49.152 31.709 1.00 94.98 O +HETATM 2147 O HOH A 461 49.564 72.961 7.126 1.00127.46 O +HETATM 2148 O HOH A 462 38.911 32.924 24.206 1.00 94.52 O +HETATM 2149 O HOH A 463 44.840 67.115 17.805 1.00 64.28 O +HETATM 2150 O HOH A 464 59.959 60.408 29.152 1.00 87.28 O +HETATM 2151 O HOH A 465 47.480 63.127 48.379 1.00106.79 O +HETATM 2152 O HOH A 466 41.379 47.530 27.555 1.00 63.18 O +HETATM 2153 O HOH A 467 55.256 41.519 33.323 1.00 88.02 O +HETATM 2154 O HOH A 468 46.278 35.257 34.883 1.00103.21 O +HETATM 2155 O HOH A 469 50.168 44.685 11.400 1.00 84.54 O +HETATM 2156 O HOH A 470 55.140 23.817 9.150 1.00 80.25 O +HETATM 2157 O HOH A 471 59.853 74.716 4.618 1.00 98.69 O +HETATM 2158 O HOH A 472 50.122 40.345 41.076 1.00 96.48 O +HETATM 2159 O HOH A 473 65.972 41.974 36.431 1.00117.24 O +HETATM 2160 O HOH A 474 55.172 63.267 37.006 1.00103.99 O +HETATM 2161 O HOH A 475 57.260 52.484 35.826 1.00 36.48 O +HETATM 2162 O HOH A 476 47.778 19.952 7.533 1.00 98.79 O +HETATM 2163 O HOH A 477 61.467 73.402 3.421 1.00 91.53 O +HETATM 2164 O HOH A 478 58.411 68.300 -1.259 1.00 79.23 O +HETATM 2165 O HOH A 479 41.220 45.034 19.654 1.00104.86 O +HETATM 2166 O HOH A 480 55.599 58.758 22.542 1.00 99.09 O +HETATM 2167 O HOH A 481 53.744 43.835 45.686 1.00120.41 O +HETATM 2168 O HOH A 482 59.195 65.528 18.099 1.00 79.51 O +HETATM 2169 O HOH A 483 61.286 41.409 39.993 1.00 90.87 O +HETATM 2170 O HOH A 484 49.047 34.291 16.948 1.00101.95 O +HETATM 2171 O HOH A 485 51.730 71.388 25.674 1.00 52.14 O +HETATM 2172 O HOH A 486 49.629 29.507 20.165 1.00 58.18 O +HETATM 2173 O HOH A 487 39.919 50.462 26.232 1.00 67.53 O +HETATM 2174 O HOH A 488 64.965 67.977 4.650 1.00 80.20 O +HETATM 2175 O HOH A 489 48.890 37.269 24.529 1.00 49.39 O +CONECT 194 2031 +CONECT 1351 2031 +CONECT 1365 2031 +CONECT 1792 2032 +CONECT 1794 2032 +CONECT 1799 2032 +CONECT 1815 2032 +CONECT 2031 194 1351 1365 +CONECT 2032 1792 1794 1799 1815 +CONECT 2033 2034 2035 2036 2037 +CONECT 2033 2038 2039 +CONECT 2034 2033 +CONECT 2035 2033 +CONECT 2036 2033 +CONECT 2037 2033 +CONECT 2038 2033 +CONECT 2039 2033 +CONECT 2040 2041 2042 2043 2044 +CONECT 2040 2045 2046 +CONECT 2041 2040 +CONECT 2042 2040 +CONECT 2043 2040 +CONECT 2044 2040 +CONECT 2045 2040 +CONECT 2046 2040 +CONECT 2047 2048 2049 2050 2051 +CONECT 2047 2052 2053 +CONECT 2048 2047 +CONECT 2049 2047 +CONECT 2050 2047 +CONECT 2051 2047 +CONECT 2052 2047 +CONECT 2053 2047 +CONECT 2054 2055 2056 2057 2058 +CONECT 2054 2059 2060 +CONECT 2055 2054 +CONECT 2056 2054 +CONECT 2057 2054 +CONECT 2058 2054 +CONECT 2059 2054 +CONECT 2060 2054 +CONECT 2061 2062 +CONECT 2062 2061 2063 2066 +CONECT 2063 2062 2064 2065 +CONECT 2064 2063 +CONECT 2065 2063 +CONECT 2066 2062 2067 +CONECT 2067 2066 2068 +CONECT 2068 2067 2069 2070 +CONECT 2069 2068 +CONECT 2070 2068 2071 +CONECT 2071 2070 2072 2073 +CONECT 2072 2071 2077 +CONECT 2073 2071 2074 2075 +CONECT 2074 2073 +CONECT 2075 2073 2076 2077 +CONECT 2076 2075 +CONECT 2077 2072 2075 2078 +CONECT 2078 2077 2079 2087 +CONECT 2079 2078 2080 +CONECT 2080 2079 2081 +CONECT 2081 2080 2082 2087 +CONECT 2082 2081 2083 2084 +CONECT 2083 2082 +CONECT 2084 2082 2085 +CONECT 2085 2084 2086 +CONECT 2086 2085 2087 +CONECT 2087 2078 2081 2086 +MASTER 373 0 7 0 0 0 13 6 2174 1 68 8 +END diff --git a/examples/exampleFile_2_3.jar b/examples/exampleFile_2_3.jar index 8c6114d..adf707e 100644 Binary files a/examples/exampleFile_2_3.jar and b/examples/exampleFile_2_3.jar differ diff --git a/examples/exampleFile_2_7.jar b/examples/exampleFile_2_7.jar index 3c1ea42..71967a5 100644 Binary files a/examples/exampleFile_2_7.jar and b/examples/exampleFile_2_7.jar differ diff --git a/examples/unfolded_RF00031.aln b/examples/unfolded_RF00031.aln new file mode 100644 index 0000000..69a7850 --- /dev/null +++ b/examples/unfolded_RF00031.aln @@ -0,0 +1,126 @@ +CLUSTAL + +B.taurus.1/1-64 C-UUGCGUU--AAUGAGAACAGAAACG-UAAA--CUAUAA-CCUAG-G---------GGU +D.melanogaster.3/1-68 G-UGGCGCU--UAUGACGCAGUUGUCU-UAAA-CUCGAAC--UCGA-GC--------GGG +D.melanogaster.2/1-63 C-AUUCAACU-UAUGAGGAUUAUUUCU-UAAA-GGCCUCU---GGC--U-------CGGA +D.melanogaster.1/1-65 G-AGCC-CU---AUGAUCGAUGAUUGG-CAAA-UCCUCUC--GAGG--A-------ACCG +R.norvegicus.7/1-66 C-CGGCACU--CAUGACGGUCUGCCUG-AAAA-CCAGCCC--GCUG-GU--------GGG +R.norvegicus.6/1-67 G-CCGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUCA-AAGAC--C-----UGUGGU +R.norvegicus.5/1-62 G-UUUUUCC---AUGACGGUGUUUCCUCUAAA--UUUAC----AUG-----------GAG +R.norvegicus.4/1-61 G-UCAGAUG---AUGACGGCCUGUGCA-GAAA-CCCCCAC-GUGGG--C--------UGC +R.norvegicus.3/1-67 U-UUGCAUU--AAUGAGGAUUACACAG-AAAA-CCUUUGU--UAAGGGU--------UUG +R.norvegicus.2/1-64 G-UUACAUU--GAUGAGAACAGAAACA-UAAA--CUAUGA-CCUAG-G---------GGU +R.norvegicus.1/1-61 A-UAUUUGUU-UAUGAUGGUCACAGUG-UAAA--GUUCA----CAC-----------AGC +O.aries.1/1-68 G-ACGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUCU-UGGAC-GC------CUGGU +M.musculus.9/1-66 C-CGGCACU--CAUGAAGGUCUGCUUG-AAAA-CCAGCCU--GCUG-GU--------GGG +M.musculus.8/1-67 U-UUGCAUU--AAUGAGGAUUACACAG-AAAA-CCUUUGU--UAAG-GA-------CUUG +O.niloticus.3/1-65 G-UGUCUCU---GUGAAGUUCGGUUUU-UAAA-AGGGUCA---UCC--A-------GAAA +M.musculus.7/1-64 G-UGUCUCU---AUGAAGGAGGGGCCC-GAAG-CCCUUGU---GGG--C--------GGG +O.niloticus.2/1-61 U-GUUUAUU--AAUGACGGCUACAGAU-UAAA--CCUUU----AGC-----------CUC +M.musculus.6/1-61 G-UCAGAUG---AUGAUGGCCUGGGCA-GAAA-CCCCAUG--UGGG--C--------CGC +O.niloticus.1/1-59 G-UUUCUCA---GUGAAGGCUACAGAU-UAAA--CCUCU----GGC-----------CUC +M.musculus.5/1-66 G-CCGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUUA---GAC--C-----UGUGGU +M.musculus.4/1-65 G-UGUGCGA---AUGAUAACUACUGAC-GAAA-GAGCUGU-CUGCU--C-------AGUC +M.musculus.3/1-64 G-GUUCUUC--CAUGAUGGUGUUUCCUCUAAA--UUUGC----ACG-----------GAG +M.musculus.2/1-64 G-UUACAUU--AAUGAGAACAGAAACA-UAAA--CUAUGA-CCUAG-G---------GGU +M.musculus.1/1-64 G-UCACCGA---AUGAUCUGCUCUGGU-CAAA-UCCUUCU---AUG--C------CAGCC +C.elegans.1/1-64 G-AGGCAGCUUUGUGACGACCUUUGGC-UAAA-CUCCAUC--GUGA-GC--------GCC +H.sapiens.15/1-63 U-UUUCAUC--UAUGAGGGUGUUUCCUCUAAA--CCUACG---AGG-----------GAG +H.sapiens.14/1-62 C-ACUGCUG---AUGACGAACUAUCUC-UAAC-UGGUCUU--GACC--A-------CGAG +H.sapiens.13/1-64 G-UCACUGC---AUGAUCCGCUCUGGU-CAAA-CCCUUCC---AGG--C------CAGCC +H.sapiens.12/1-67 C-UCUGUUA---AUGACGUCUCUCCCUCUAAA-CCCCAUU-AAGGA--C--------UGG +D.rerio.1/1-66 A-UGUGGUCUUUAUGAAGGCAGGUGCA-GAAA-CUAUGCA---CUA-GU--------GGU +H.sapiens.11/1-63 G-CCGGAUG---AUGACGACCUGGGUG-GAAA-CCUACCC-UGUGG--G--------CAC +H.sapiens.10/1-62 C-CGGCACU--CAUGACGGCCUGCCUG-CAAA--CCUGC----UGG--U--------GGG +S.mansoni.1/1-67 C-UCGCUAU---AUGACGAUGGCAAUC-UCAA--AUGUU----CAU--U--------GGU +S.scrofa.4/1-64 C-UGGCACC--CAUGACAGUCUGCCUA-AAAA-CCAGCC----CUG-GU--------GGG +S.scrofa.3/1-63 A-UUUUAUC--CAUGAAAGUGUUUCCUCUAAA--CCUAU----GUG-----------GAG +S.scrofa.2/1-65 C-UGGCACC--CAUGACAGUCUGCCUA-AAAA-CCAGCCC---CUG-GU--------GGG +S.scrofa.1/1-68 G-ACGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUUG-UGGAC-GC------CUGGU +H.sapiens.9/1-58 U-AUUUGUU--UAUGAUGGCCACAGCC-UAAA--GUACA----CAC-----------GGC +H.sapiens.8/1-67 U-UUGCUUU--AAUGAGAAUAGAAACG-UAAA--CUAUGA-CCUAG-G---------GGU +X.laevis.1/1-67 G-UGUUUGCA-AAUGACGACCGAUUUU-GAAA-UGGUCUCACGGCC--A-------AAAA +H.sapiens.7/1-70 U-GGCGUCUU-CAUGAGGGAGGGGCCC--AAA-GCCCUUG--UGGG--C--------GGA +H.sapiens.6/1-66 G-UGUGCGG---AUGAUAACUACUGAC-GAAAGAGUCAUC---GAC--C-----UCAGUU +H.sapiens.5/1-57 U-UCACAGA---AUGAUGGCACCUUCC-UAA---ACCCU----CAU-----------GGG +H.sapiens.4/1-71 G-ACUGACAU-UAUGAAGGCCUGUACU-GAAG-ACAGCAA--GCUG--U-------UAGU +H.sapiens.3/1-68 G-ACGCUUC---AUGAUAGGAAGGACU-GAAA-AGUCUUG-UGGAC--A-----CCUGGU +H.sapiens.2/1-65 G-UGUGCGG---AUGAUAACUACUGAC-GAAA-GAGUCAU-CGACU--C-------AGUU +H.sapiens.1/1-63 G-CCAGAUG---AUGACGACCUGGGUG-GAAA-CCUACCC-UGUGG--G--------CAC +M.musculus.14/1-67 C-UCUGAUA---AUGAUGUCUCUCCCU-CUAA-CUCCCAGUAAGGA--C--------UGG +M.musculus.13/1-60 C-AUGCGUC--CAUGAAGUCACUGGCC-UCAA-GCCCAA----GUG-GU--------GGG +M.musculus.12/1-65 C-UCAGCAG--GAUGAUGAGAAGGGCU-GAAA-UGCUGCC--AAAC--C-------AGGU +M.musculus.11/1-63 U-AUUUGUG--UAUGAUGGUCACAGUG-UAAA--GUUCC----CAC-----------AGC +M.musculus.10/1-66 C-CGGCACU--CAUGAAGGUCUGCCUG-AAAA-CCAGCCU--GCUG-GU--------GGG +B.taurus.7/1-61 U-UUUGCCC---AUGAAGGUGUUCCCUCUAAA--CCUAC----GUG-----------GAG +B.taurus.6/1-67 G-AUGCGUC--CAUGAAGUCACCAGCC-CCAA-GCCCCUC---GUG-GU--------GGG +B.taurus.5/1-61 G-CCAGAUG---AUGAGGACCUGUGCG-GAAA-CCCCCCG--CGGG--C--------UGC +B.taurus.4/1-64 ACUUGCGUU--AAUGAGAACAGAAACG-UAAA--CUAUAA-CCUAG-G---------GGU +G.gallus.3/1-73 U-AUUUCUU--UGUGAUGACCGAUUUU-GAAA-UGGGUUU---CUC--UAAUGCCAGGAA +B.taurus.3/1-66 C-CCGGUGCC-UAUGACGGUCUGUCUG-AAAA-CCAGCCC---CUG-GU--------GGG +G.gallus.2/1-60 U-AUUUGUC---AUGACAGUCACAGCA-UAAA--GCGCA----GAC-----------GGC +B.taurus.2/1-64 C-UUGCGUU--AAUGAGAACAGAAACG-AAAA--CUAUAA-CCUAG-G---------GGU +G.gallus.1/1-63 G-UGUGUUU---AUGAAGAGCACUAAC-AAAA-GAGUAAU-UGACU--C-------AGUU + +B.taurus.1/1-64 UUC-U-G-UUGGAU--GGUUG-------GCAAC +D.melanogaster.3/1-68 CAA-U-U-GCUGAU---UACG---AUUAACCAC +D.melanogaster.2/1-63 AAU-A-G-UCUGAA---CCU--------UAUUG +D.melanogaster.1/1-65 AUC-G-U-UGAGAA--CCCCU-----UUGCCUU +R.norvegicus.7/1-66 GCA-G-U-CCCGAG-GACCUG-------GCGUG +R.norvegicus.6/1-67 CUU-U-C-UUCGAU--GUUCU-------GCGGC +R.norvegicus.5/1-62 AAA-C-A-CCUGAU-UUCCAG------AAAAAU +R.norvegicus.4/1-61 -CA-G-G-UUUGAA---CCC--------CUGGC +R.norvegicus.3/1-67 UGUCG-A-UCUGCU--AAUUG-------GCAAA +R.norvegicus.2/1-64 UUC-U-G-UUGGAU--AGCUC-------GUAAU +R.norvegicus.1/1-61 UGU-G-A-CUUGAU--UUUUA-------AAAAU +O.aries.1/1-68 CCU-U-C-CUUGAU--GUUCU------CACGGC +M.musculus.9/1-66 GCA-G-U-CCUGAG-GACCUG-------GCGUG +M.musculus.8/1-67 UGU-AGA-UCUGAU--AAUUG-------GCAAA +O.niloticus.3/1-65 ACC-G-ACACUGAU--GUUUC------CGACAC +M.musculus.7/1-64 CCU-C-C-CCUGAG---CCCG----UCUGUGGU +O.niloticus.2/1-61 UGG-A-G-CCAGAU--GCAUU------CAAACA +M.musculus.6/1-61 CCA-G-G-UUUGAA---CCC--------CUGGC +O.niloticus.1/1-59 UGG-A-G-CCAGAU--GCAUU-------GAAAC +M.musculus.5/1-66 CUU-U-C-CUCGAU--GUUCC------UGCGGC +M.musculus.4/1-65 UGU-G-G-UUGGAU---GUAG------UCACAC +M.musculus.3/1-64 AAA-C-A-CCUGAU-UUCCAG-----GAAAAUC +M.musculus.2/1-64 UUC-U-G-UUGGAU--AGCUU-------GUAAU +M.musculus.1/1-64 AGG-G-U-GGUGAU--GACCC-------GUGAC +C.elegans.1/1-64 UCU-G-G-UCUGAU---GC---------GCCUC +H.sapiens.15/1-63 GAA-C-A-CCUGAU---CUUA-----CAGAAAA +H.sapiens.14/1-62 CUA-G-U-UCUGAA---UU-G-------CAGGG +H.sapiens.13/1-64 AGA-G-U-GGGGAU--GGUCU-------GUGAC +H.sapiens.12/1-67 GAG-A-G-GCAGAGCAAGCCU-------CAGAG +D.rerio.1/1-66 GUC-U-G-UCUGAU--GUUUG-------GCCAU +H.sapiens.11/1-63 CCA-U-G-UCCGAG---CCCC-------CUGGC +H.sapiens.10/1-62 GCA-G-A-CCCGAA-AAUCCA-------GCGUG +S.mansoni.1/1-67 UGC-C-A-UUUGAU--GAAAUCAGUUUUGUGUG +S.scrofa.4/1-64 GCA-G-A-CUCGAG-AACCUG-------GCGUG +S.scrofa.3/1-63 GAA-C-A-CCUGAU-GUCCAG------GAAAAU +S.scrofa.2/1-65 GCA-G-A-CUCGAG-AACCUG-------GCGUG +S.scrofa.1/1-68 CCU-U-C-CCUGAU--GUUCU------CAUGGC +H.sapiens.9/1-58 UGU-G-A-CUUGAU---UCA--------AAAGA +H.sapiens.8/1-67 UUC-U-G-UUGGAU-AAUUAG-----CAGUUUA +X.laevis.1/1-67 CUC-GUG-UCCGAC---AUC--------AACCC +H.sapiens.7/1-70 CCU-C-C-CCUGAG---CCUGUCUGAGGGGCCA +H.sapiens.6/1-66 AGU-G-G-UUGGAU---GUAG------UCACAU +H.sapiens.5/1-57 UGG-U-G-UCUGAG--AGGC--------GUGAA +H.sapiens.4/1-71 ACA-G-A-CCAGAU--GCUUU--CUUGGCAGGC +H.sapiens.3/1-68 CUU-U-C-CCUGAU--GUUCU------CGUGGC +H.sapiens.2/1-65 AGU-G-G-UUGGAU---GUAG------UCACAU +H.sapiens.1/1-63 CCA-U-G-UCCGAG---CCCC-------CUGGC +M.musculus.14/1-67 GAG-A-G-GCUGAACAAACCU-------CAGAG +M.musculus.13/1-60 CAG-U-G-ACAGAA---GA---------GCUGC +M.musculus.12/1-65 CCU-U-U-UCUGAU--GGUGG-------CUGGG +M.musculus.11/1-63 UGU-G-A-CUUGAU--UUUUA----AAAAUGUC +M.musculus.10/1-66 GCA-G-U-CCUGAG-GACCUG-------GCGUG +B.taurus.7/1-61 GAA-U-G-CCUGAU-GUCCAG-------GAAAA +B.taurus.6/1-67 UGG-U-G-AUGGAA-CCGUCA-----AAGCAGU +B.taurus.5/1-61 CCA-U-G-UCUGAG---CCC--------CUGGC +B.taurus.4/1-64 UUC-U-G-UUGGAU--GGUUG-------GCAA- +G.gallus.3/1-73 AUC-GUG-UCUGAU---GUUG-----UCAAGUA +B.taurus.3/1-66 GCA-G-A-CCUGAG-AACCUG-------GCGUG +G.gallus.2/1-60 UGU-G-A-CCUGAU--UUUAG------AAAAUA +B.taurus.2/1-64 UUC-U-G-UUGGAU--GGUUG-------GCAAC +G.gallus.1/1-63 GGU-G-U-UCAGAU--GCU---------CUCAC + diff --git a/help/help.jhm b/help/help.jhm index b850b79..aaaaaf8 100755 --- a/help/help.jhm +++ b/help/help.jhm @@ -37,6 +37,7 @@ + diff --git a/help/helpTOC.xml b/help/helpTOC.xml index 0d2e096..e27d41a 100755 --- a/help/helpTOC.xml +++ b/help/helpTOC.xml @@ -22,6 +22,7 @@ + @@ -65,6 +66,7 @@ + diff --git a/help/html/menus/alignmentMenu.html b/help/html/menus/alignmentMenu.html index 9ec5adc..d53b3eb 100755 --- a/help/html/menus/alignmentMenu.html +++ b/help/html/menus/alignmentMenu.html @@ -235,17 +235,21 @@ Any columns currently not selected will replace the current column selection. -
  • Undefine Groups (Control U)
    The - alignment will be reset with no defined groups.
    WARNING: - This cannot be undone.
    -
  • -
  • Make Groups
    The currently +
  • Create Group (Control G)
    + Create a group containing the currently selected sequences.
  • +
  • Remove Group (Shift Control G)
    + Ungroup the currently selected sequence group. (Create/Remove group new in Jalview 2.8.1)
  • +
  • Make Groups for selection
    The currently selected groups of the alignment will be subdivided according to the contents of the currently selected region.
    Use this to subdivide an alignment based on the different combinations of residues observed at specific positions. (new in jalview 2.5)
  • - +
  • Undefine Groups (Control U)
    The + alignment will be reset with no defined groups.
    WARNING: + This cannot be undone.
    +
  • +
  • View
    • New View (Control T)
      diff --git a/help/html/menus/alwselect.html b/help/html/menus/alwselect.html index c4b3002..bd17fa7 100644 --- a/help/html/menus/alwselect.html +++ b/help/html/menus/alwselect.html @@ -38,11 +38,16 @@
    • Invert Column Selection (Control Alt I)
      Any columns currently not selected will replace the current column selection.
    • -
    • Undefine Groups (Control U)
      -
      The alignment will be reset with no defined groups.
      - WARNING: This cannot be undone.
    • -
    • Make Groups
      +
    • Create Group (Control G)
      + Create a group containing the currently selected sequences.
    • +
    • Remove Group (Shift Control G)
      + Ungroup the currently selected sequence group. (Create/Remove group new in Jalview 2.8.1)
    • +
    • Make Groups for selection
      The currently selected groups of the alignment will be subdivided according to the contents of the currently selected region.
      Use this to subdivide an alignment based on the different combinations of residues observed at specific positions. (new in jalview 2.5)
    • +
    • Undefine Groups (Control U)
      +
      The alignment will be reset with no defined groups.
      + WARNING: This cannot be undone.
    • +
    diff --git a/help/html/menus/popupMenu.html b/help/html/menus/popupMenu.html index 7c3db2c..8eab2d0 100755 --- a/help/html/menus/popupMenu.html +++ b/help/html/menus/popupMenu.html @@ -59,18 +59,22 @@ not be accessible when in 'Cursor Mode' (toggled with the F2 key).

  • Create Sequence Feature...
    Opens the dialog box for creating sequence features over the currently selected region on each selected sequence.
  • -
  • Group
    - Group Operations -
      -
    • GroupThis is the first entry in the - menu, and will display the currently selected group's - name. Selecting it displays a window allowing the name and - description for this group to be edited. Click OK to set the - new name and decription, and cancel to leave the existing - name and description unchanged.
    • +
    • Create Group
      +
      This will define a new group from the current selection. +
    • Remove Group
      This will undefine the selected group.
    • +
    • Edit (New) Group
      + Group Editing Menu
      Options in this menu modify + the name and display properties of the currently selected group, or + a new group defined using the current selection. +
        +
      • Name: <Group> or Edit name and description
        The first entry in the + menu displays the name for the currently selected group, if it has one. Selecting this option opens a window allowing the name and + description for this group to be edited. Click OK to set the + new name and decription, and cancel to leave the existing + name and description unchanged.
      • Group Colour
        Sets the colour of the group.
      • diff --git a/help/html/webServices/RNAalifold.html b/help/html/webServices/RNAalifold.html new file mode 100644 index 0000000..ac9df34 --- /dev/null +++ b/help/html/webServices/RNAalifold.html @@ -0,0 +1,74 @@ + + + + +RNAalifold Web Service + + + RNAalifold RNA Alignment Secondary Structure + Prediction Service +

        + RNAalifold is part of the Vienna + RNA Secondary Structure Prediction and Comparison Package. It was + described in 2008 by Ivo L. Hofacker, Sebastian Will, Andreas R. + Gruber, and Peter F. Stadler, RNAalifold: Improved consensus + structure prediction for RNA alignments. (BMC + Bioinformatics, 9:474, 2008). +

        +

        + Example RNAalifold Output
        + RNAalifold prints a consensus alignment and mfe structure to stdout with its + associated energy. Depending on the arguments given, other information such as + alternate structures are displayed below while base pairing probabilities (-p or --MEA + options) are stored in a separate 'alifold.out' file.
        +


        +G_UUUCAUU___AUGACGGCCUGUGCU_UAAA__CCUCC____GAG__C________GGGUCA_G_G_UCUGAU___CUUG_______GAGAC +(.((((...........(((((((((........(((......)))............))))).).).))..................))))) (-19.16 = -11.80 + -7.36) +(.((((...........(((((((((........(((......)))............))))).).).))..................))))) [-19.32] + frequency of mfe structure in ensemble 0.765639 +(.((((...........(((((((((........(((......)))............))))).).).))..................))))) -19.16 {-11.80 + -7.36} +(.((((...........(((((((((........(((......)))............))))).).).))..................))))) { 13.20 MEA=92.14} + +Alifold.out + 6 89 9 99.2% 0.023 CG:29 GC:14 UA:9 + 4 91 11 99.1% 0.028 CG:20 GC:11 UG:2 UA:17 + 3 92 18 96.9% 0.090 CG:5 GC:2 GU:1 UG:4 AU:6 UA:25 + 35 46 3 93.3% 0.195 CG:31 GC:16 UG:2 AU:5 UA:4 + 36 45 10 93.6% 0.185 CG:16 GC:6 GU:1 UG:2 AU:8 UA:18 + . + . + . +
        +

        +

        + Running RNAalifold from Jalview
        + To run RNAalifold go to Webservices→RNA Structure Prediction + and choose RNAalifold Defaults to run with no arguments or + edit settings and run ... to adjust the parameters before running. + Details of all the RNAalifold parameters can be found in the + RNAalifold Manpage. + JABAWS and Jalview support a selection of the RNAalifold arguments only. +

        +

        Supported Arguments which give alternate structures

        +

        + Partition Function (-p)
        + Calculate the Partition Function and base pairing probability matrix in addition to the mfe + structure. A coarse representation of the pair probabilities in the from of a psuedo + bracket notation, as well as the centroid structure derived from the pair probabilities + are displayed. The most likely base pairings are stored in a separate file by RNAalifold + and represented in Jalview by a bar graph annotation line labelled 'Contact Probabilities'. +

        +

        + Maximum Expected Accuracy Structure (--MEA)
        + Calculate an MEA structure where the expected Accuracy is computed from the base pair + probabilities. A more detailed description is found in the + RNAfold documentation. +

        +

        Example RNAalifold Structure Annotation rows

        + +

        +
        + + + \ No newline at end of file diff --git a/help/html/webServices/RNAalifoldAnnotationRows.png b/help/html/webServices/RNAalifoldAnnotationRows.png new file mode 100644 index 0000000..5077d19 Binary files /dev/null and b/help/html/webServices/RNAalifoldAnnotationRows.png differ diff --git a/lib/Jmol-12.2.4.jar b/lib/Jmol-12.2.4.jar index 755365a..39019b4 100644 Binary files a/lib/Jmol-12.2.4.jar and b/lib/Jmol-12.2.4.jar differ diff --git a/lib/VARNAv3-9-dev.jar b/lib/VARNAv3-9-dev.jar deleted file mode 100644 index 6ae57bf..0000000 Binary files a/lib/VARNAv3-9-dev.jar and /dev/null differ diff --git a/lib/VARNAv3-9.jar b/lib/VARNAv3-9.jar new file mode 100644 index 0000000..86ac411 Binary files /dev/null and b/lib/VARNAv3-9.jar differ diff --git a/lib/json_simple-1.1.jar b/lib/json_simple-1.1.jar new file mode 100644 index 0000000..f395f41 Binary files /dev/null and b/lib/json_simple-1.1.jar differ diff --git a/lib/min-jaba-client-2.0.jar b/lib/min-jaba-client-2.0.jar deleted file mode 100644 index 4ba3f33..0000000 Binary files a/lib/min-jaba-client-2.0.jar and /dev/null differ diff --git a/lib/min-jabaws-client-2.1.0.jar b/lib/min-jabaws-client-2.1.0.jar new file mode 100644 index 0000000..7ad030a Binary files /dev/null and b/lib/min-jabaws-client-2.1.0.jar differ diff --git a/nbproject/project.properties b/nbproject/project.properties index 8bee743..b505d62 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -71,7 +71,7 @@ file.reference.wsdl4j.jar=lib/wsdl4j.jar file.reference.xercesImpl.jar=lib/xercesImpl.jar file.reference.xml-apis.jar=lib/xml-apis.jar file.reference.miglayout-4.0-swing.jar=lib/miglayout-4.0-swing.jar -file.reference.varna-3.9-dev.jar=lib/VARNAv3.9-dev.jar +file.reference.varna-3.9-dev.jar=lib/VARNAv3.9.jar includes=** jar.compress=false javac.classpath=\ diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties new file mode 100644 index 0000000..53a05dd --- /dev/null +++ b/resources/lang/Messages.properties @@ -0,0 +1,389 @@ +action.cancel = Cancel +action.create = Create +action.update = Update +action.delete = Delete +action.snapshot = Snapshot +action.clear = Clear +action.accept = Accept +action.select_ddbb = --- Select Database --- +action.undo = Undo +action.redo = Redo +action.reset = Reset +action.remove_left = Remove left +action.remove_right = Remove right +action.remove_empty_columns = Remove Empty Columns +action.remove_all_gaps = Remove All Gaps +action.boxes = Boxes +action.text = Text +action.by_pairwise_id = by Pairwise Identity +action.by_id = by Id +action.by_length = by Length +action.by_group = by Group +action.remove_redundancy = Remove Redundancy... +action.pairwise_alignment = Pairwise Alignments... +action.by_rna_helixes = by RNA Helices +action.user_defined = User Defined... +action.by_conservation = By Conservation +action.wrap = Wrap +action.show_gaps = Show Gaps +action.find = Find... +action.undefine_groups = Undefine Groups +action.make_groups_selection = Make Groups For Selection +action.copy = Copy +action.cut = Cut +action.paste = Paste +action.font = Font... +action.scale_above = Scale Above +action.scale_left = Scale Left +action.scale_right = Scale Right +action.by_tree_order = By Tree Order +action.sort = Sort +action.calculate_tree = Calculate Tree +action.help = Help +action.by_annotation = by Annotation... +action.invert_sequence_selection = Invert Sequence Selection +action.invert_column_selection = Invert Column Selection +action.show = Show +action.hide = Hide +action.ok = OK +action.set_defaults = Defaults +action.create_group = Create Group +action.remove_group = Remove Group +action.edit_group = Edit Group +action.edit_new_group = Edit New Group +action.hide_sequences = Hide Sequences +action.reveal_all = Reveal All +action.reveal_sequences = Reveal Sequences +action.find_all = Find all +action.find_next = Find next +action.file = File +action.view = View +action.change_params = Change Parameters +action.apply = Apply +action.apply_threshold_all_groups = Apply threshold to all groups +action.apply_all_groups = Apply to all Groups +action.by_chain = By chain +action.by_sequence = By Sequence +action.paste_annotations = Paste Annotations +action.format = Format +action.select = Select +action.new_view = New View +action.close = Close +action.add = Add +action.save_as_default = Save as default +action.cancel_fetch = Cancel Fetch +action.save_omit_hidden_columns = Save / Omit Hidden Columns +action.change_font = Change Font +action.colour = Colour +action.calculate = Calculate +action.select_all = Select all +action.deselect_all = Deselect all +action.invert_selection = Invert selection +action.using_jmol = Using Jmol +action.link = Link +action.show_chain = Show Chain +label.str = Str: +label.seq = Seq: +label.structures_manager = Structures Manager +label.nickname = Nickname: +label.url = URL: +label.input_file_url = Enter URL or Input File +label.select_feature = Select feature: +label.name = Name: +label.name_param = Name: {0} +label.group = Group: +label.colour = Colour: +label.description = Description: +label.start = Start: +label.end = End: +label.current_parameter_set_name = Current parameter set name: +label.service_action = Service Action: +label.post_url = POST URL: +label.url_suffix = URL Suffix +label.sequence_source = Sequence Source +label.per_seq = per Sequence +label.result_vertically_separable = Results are vertically separable +label.amend = Amend +label.undo_command = Undo {0} +label.redo_command = Redo {0} +label.principal_component_analysis = Principal Component Analysis +label.average_distance_identity = Average Distance Using % Identity +label.neighbour_joining_identity = Neighbour Joining Using % Identity +label.status_bar = Status bar +label.out_to_textbox = Output to Textbox +label.clustalx = Clustalx +label.zappo = Zappo +label.taylor = Taylor +label.hydrophobicity = Hydrophobicity +label.helix_propensity = Helix Propensity +label.strand_propensity = Strand Propensity +label.turn_propensity = Turn Propensity +label.buried_index = Buried Index +label.purine_pyrimidine = Purine/Pyrimidine +label.percentage_identity = Percentage Identity +label.blosum62_score = BLOSUM62 Score +label.tcoffee_scores = T-Coffee Scores +label.average_distance_bloslum62 = Average Distance Using BLOSUM62 +label.neighbour_blosum62 = Neighbour Joining Using BLOSUM62 +label.show_annotations = Show annotations +label.colour_text = Colour Text +label.show_non_conversed = Show nonconserved +label.overview_window = Overview Window +label.none = None +label.above_identity_threshold = Above Identity Threshold +label.nucleotide = Nucleotide +label.to_new_alignment = To New Alignment +label.to_this_alignment = Add To This Alignment +label.apply_colour_to_all_groups = Apply Colour To All Groups +label.modify_identity_thereshold = Modify Identity Threshold... +label.modify_conservation_thereshold = Modify Conservation Threshold... +label.input_from_textbox = Input from textbox +label.centre_column_labels = Centre column labels +label.automatic_scrolling = Automatic Scrolling +label.documentation = Documentation +label.about = About... +label.show_sequence_limits = Show Sequence Limits +label.feature_settings = Feature Settings... +label.sequence_features = Sequence Features +label.all_columns = All Columns +label.all_sequences = All Sequences +label.selected_columns = Selected Columns +label.selected_sequences = Selected Sequences +label.all_but_selected_region = All but Selected Region (Shift+Ctrl+H) +label.selected_region = Selected Region +label.all_sequences_columns = All Sequences and Columns +label.group_consensus = Group Consensus +label.group_conservation = Group Conservation +label.show_consensus_histogram = Show Consensus Histogram +label.show_consensus_logo = Show Consensus Logo +label.norm_consensus_logo = Normalise Consensus Logo +label.apply_all_groups = Apply to all groups +label.autocalculated_annotation = Autocalculated Annotation +label.min_colour = Min Colour +label.max_colour = Max Colour +label.use_original_colours = Use Original Colours +label.threshold_minmax = Threshold is min/max +label.represent_group_with = Represent Group with +label.selection = Selection +label.group_colour = Group Colour +label.sequence = Sequence +label.view_pdb_structure = View PDB Structure +label.min = Min: +label.max = Max: +label.colour_by_label = Colour by label +label.new_feature = New Feature +label.match_case = Match Case +label.view_alignment_editor = View in alignment editor +label.labels = Labels +label.output_values = Output Values... +label.input_data = Input Data... +label.nucleotide_matrix = Nucleotide matrix +label.protein_matrix = Protein matrix +label.show_bootstrap_values = Show Bootstrap Values +label.show_distances = Show distances +label.mark_unassociated_leaves = Mark Unassociated Leaves +label.fit_to_window = Fit To Window +label.newick_format = Newick Format +label.colours = Colours +label.view_mapping = View Mapping +label.wireframe = Wireframe +label.depthcue = Depthcue +label.z_buffering = Z Buffering +label.charge_cysteine = Charge & Cysteine +label.all_chains_visible = All Chains Visible +label.successfully_added_features_alignment = Successfully added features to alignment +label.keyboard_editing_mode = Keyboard editing mode is {0} +label.paste_features_annotations_Tcoffee_here = Paste your features / annotations / T-coffee score file here. +label.removed_columns = Removed {0} columns. +label.removed_empty_columns = Removed {0} empty columns. +label.paste_newick_tree_file = Paste your Newick tree file here. +label.order_by_params = Order by {0} +label.html_content = {0} +label.paste_pdb_file= Paste your PDB file here. +label.paste_pdb_file_for_sequence = Paste PDB file for sequence {0} +label.could_not_parse_newick_file = Could not parse Newick file\!\n {0} +label.successfully_pasted_tcoffee_scores_to_alignment= Successfully pasted T-Coffee scores to alignment. +label.failed_add_tcoffee_scores = Failed to add T-Coffee scores: +label.successfully_pasted_annotation_to_alignment= Successfully pasted annotation to alignment. +label.successfully_pasted_alignment_file = Successfully pasted alignment file +label.paste_your_alignment_file = Paste your alignment file here +label.paste_your = Paste your +label.finished_searching = Finished searching +label.search_results= Search results {0} : {1} +label.found_match_for = Found match for {0} +label.font = Font: +label.size = Size: +label.style = Style: +label.enter_redundancy_threshold = Enter the redundancy threshold +label.calculating = Calculating.... +label.modify_conservation_visibility = Modify conservation visibility +label.colour_residues_above_occurence = Colour residues above % occurence +label.set_this_label_text = set this label text +label.sequences_from = Sequences from {0} +label.successfully_loaded_file = Successfully loaded file {0} +label.successfully_saved_to_file_in_format = Successfully saved to file: {0} in {1} format. +label.copied_sequences_to_clipboard = Copied {0} sequences to clipboard. +label.check_file_matches_sequence_ids_alignment = Check that the file matches sequence IDs in the alignment. +label.problem_reading_tcoffee_score_file = Problem reading T-COFFEE score file +label.source_to_target = {0} to '{1}' +label.per_sequence_only= Per-sequence only +label.to_file = to File +label.to_textbox = to Textbox +label.jalview = Jalview +label.csv_spreadsheet = CSV (Spreadsheet) +label.status = [Status] +label.channels = Channels +label.channel_title_item_count = {0} ({1}) +label.blog_item_published_on_date = {0} {1} +label.select_das_service_from_table = Select a DAS service from the table to read a full description here. +label.session_update = Session Update +label.new_vamsas_session = New Vamsas Session +label.groovy_console = Groovy Console... +label.lineart = Lineart +label.dont_ask_me_again = Don't ask me again +label.select_eps_character_rendering_style = Select EPS character rendering style +label.invert_selection = Invert Selection +label.optimise_order = Optimise Order +label.seq_sort_by_score = Seq sort by Score +label.load_colours = Load Colours +label.save_colours = Save Colours +label.fetch_das_features = Fetch DAS Features +label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} +label.database_param = Database: {0} +label.example_param = Example: {0} +label.select_file_format_before_saving = You must select a file format before saving! +label.file_format_not_specified = File format not specified +label.alignment_contains_hidden_columns = The Alignment contains hidden columns.\nDo you want to save only the visible alignment? +label.couldnt_save_file = Couldn't save file: {0} +label.error_saving_file = Error Saving File +label.remove_from_default_list = Remove from default list? +label.remove_user_defined_colour = Remove user defined colour +label.you_must_select_least_two_sequences = You must select at least 2 sequences. +label.invalid_selection = Invalid Selection +label.principal_component_analysis_must_take_least_four_input_sequences = Principal component analysis must take\nat least 4 input sequences. +label.sequence_selection_insufficient = Sequence selection insufficient +label.you_need_more_two_sequences_selected_build_tree = You need to have more than two sequences selected to build a tree! +label.not_enough_sequences = Not enough sequences +label.selected_region_to_tree_may_only_contain_residues_or_gaps = The selected region to create a tree may\nonly contain residues or gaps.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. +label.sequences_selection_not_aligned = Sequences in selection are not aligned +label.sequences_must_be_aligned_before_creating_tree = The sequences must be aligned before creating a tree.\nTry using the Pad function in the edit menu,\n or one of the multiple sequence alignment web services. +label.sequences_not_aligned = Sequences not aligned +label.problem_reading_tree_file = Problem reading tree file +label.possible_problem_with_tree_file = Possible problem with tree file +label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Please select at least three bases in at least one sequence in order to perform a cDNA translation. +label.translation_failed = Translation Failed +label.error_when_translating_sequences_submit_bug_report = Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace. +label.implementation_error = Implementation error: +label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name? +label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name +label.ignore_unmatched_dropped_files_info = Do you want to ignore the {0} files whose names did not match any sequence IDs ? +label.ignore_unmatched_dropped_files = Ignore unmatched dropped files? +label.enter_view_name = Enter View Name +label.enter_label = Enter label +label.enter_label_for_the_structure = Enter a label for the structure? +label.pdb_entry_is_already_displayed = {0} is already displayed.\nDo you want to re-use this viewer ? +label.map_sequences_to_visible_window = Map Sequences to Visible Window: {0} +label.add_pdbentry_to_view = Do you want to add {0} to the view called\n'{1}'\n +label.align_to_existing_structure_view = Align to existing structure view +label.pdb_entries_couldnt_be_retrieved = The following pdb entries could not be retrieved from the PDB\:\n{0}\nPlease try downloading them manually. +label.couldnt_load_file = Couldn't load file +label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure. +label.no_pdb_id_in_file = No PDB Id in File +label.couldnt_read_pasted_text = Couldn't read the pasted text {0} +label.error_parsing_text = Error parsing text +label.enter_local_das_source = Enter Nickname & URL of Local DAS Source +label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources! +label.public_das_source = Public DAS source - not editable +label.input_alignment_from_url = Input Alignment From URL +label.couldnt_import_as_vamsas_session = Couldn't import '{0}' as a new vamsas session. +label.vamsas_document_import_failed = Vamsas Document Import Failed +label.couldnt_locate = Couldn't locate {0} +label.url_not_found = URL not found +label.no_link_selected = No link selected +label.new_sequence_url_link = New sequence URL link +label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view +label.wrapped_view_no_edit = Wrapped view - no edit +label.error_retrieving_data = Error Retrieving Data +label.user_colour_scheme_must_have_name = User colour scheme must have a name +label.no_name_colour_scheme = No name for colour scheme +label.invalid_url = Invalid URL ! +label.error_loading_file = Error loading file +label.problems_opening_file = Encountered problems opening {0}!! +label.file_open_error = File open error +label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again. +label.no_das_sources_selected_title = No DAS Sources Selected +label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?" +label.duplicate_scheme_name = Duplicate scheme name +label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n +label.jalview_user_survey = Jalview User Survey +label.alignment_properties = Alignment Properties: {0} +label.alignment_props = Alignment Properties +label.input_cut_paste = Cut & Paste Input +label.alignment_output_command = Alignment output - {0} +label.annotations = Annotations +label.features = Features +label.overview_params = Overview {0} +label.paste_newick_file = Paste Newick file +label.load_tree_from_file = From File - +label.colour_by_annotation = Colour by Annotation +label.selection_output_command = Selection output - {0} +label.annotation_for_displayid =

        Annotation for {0}

        +label.pdb_sequence_mapping = PDB - Sequence Mapping +label.pca_details = PCA details +label.redundancy_threshold_selection = Redundancy threshold selection +label.user_defined_colours = User defined colours +label.jalviewLite_release = JalviewLite - Release {0} +label.jaview_build_date = Build date: {0} +label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, +label.jalview_authors_2 = Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. +label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK. +label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list +label.jalview_please_cite = If you use Jalview, please cite: +label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) +label.jalview_cite_1_title = Jalview Version 2 - a multiple sequence alignment editor and analysis workbench +label.jalview_cite_1_ref = Bioinformatics doi: 10.1093/bioinformatics/btp033 +label.right_click = Right click +label.to_add_annotation = to add annotation +label.alignment_has_no_annotations = Alignment has no annotations +label.retrieving_pdb_data = Retrieving PDB data... +label.label = Label +label.no_features_added_to_this_alignment = No Features added to this alignment!! +label.features_can_be_added_from_searches_1 = (Features can be added from searches or +label.features_can_be_added_from_searches_2 = from Jalview / GFF features files) +label.calculating_pca= Calculating PCA +label.reveal_columns = Reveal Columns +label.jalview_cannot_open_file = Jalview can't open file +label.jalview_applet = Jalview applet +label.loading_data = Loading data +label.memory_stats = Total Free Memory: {0} MB; Max Memory: {1} MB; {2} % +label.calculating_tree = Calculating tree +label.state_queueing = queuing +label.state_running = running +label.state_complete = complete +label.state_job_cancelled = job cancelled!! +label.state_job_error = job error! +label.server_error_try_later = Server Error! (try later) +label.error_loading_pdb_data = Error loading PDB data!! +label.fetching_pdb_data = Fetching PDB data... +label.structure_type = Structure_type +label.settings_for_type = Settings for {0} +label.view_full_application = View in Full Application +label.load_associated_tree = Load Associated Tree ... +label.load_features_annotations = Load Features/Annotations ... +label.export_features = Export Features ... +label.export_annotations = Export Annotations ... +label.jalview_copy = Copy (Jalview Only) +label.jalview_cut = Cut (Jalview Only) +label.to_upper_case = To Upper Case +label.to_lower_case = To Lower Case +label.toggle_case = Toggle Case +label.edit_name_description = Edit Name/Description +label.create_sequence_feature = Create Sequence Feature +label.edit_sequence = Edit Sequence +label.sequence_details = Sequence Details +label.jmol_help = Jmol Help +label.all = All +label.sort_by_score = Sort by Score +label.sort_by_density = Sort by Density +label.reveal = Reveal +label.hide_columns = Hide Columns diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties new file mode 100644 index 0000000..c1fb406 --- /dev/null +++ b/resources/lang/Messages_es.properties @@ -0,0 +1,7 @@ +action.cancel = Cancelar +action.create = Crear +action.update = Actualizar +action.delete = Borrar +action.snapshot = Captura +action.clear = Limpiar +action.accept = Aceptar diff --git a/schemas/jalview.xsd b/schemas/jalview.xsd index 03c5728..0138f63 100755 --- a/schemas/jalview.xsd +++ b/schemas/jalview.xsd @@ -292,6 +292,12 @@ type="xs:string" /> + + rna=new ArrayList(), prot=new ArrayList(); PDBChain tmpchain; String line = null; boolean modelFlag = false; @@ -156,6 +157,10 @@ public class PDBfile extends jalview.io.AlignFile dataset.setName(id + "|" + dataset.getName()); PDBEntry entry = new PDBEntry(); entry.setId(id); + entry.setProperty(new Hashtable()); + if (((PDBChain)chains.elementAt(i)).id!=null) { + entry.getProperty().put("CHAIN", ((PDBChain)chains.elementAt(i)).id); + } if (inFile != null) { entry.setFile(inFile.getAbsolutePath()); @@ -170,16 +175,52 @@ public class PDBfile extends jalview.io.AlignFile // maintain reference to // dataset seqs.addElement(chainseq); + if(isRNA(chainseq)==true) + { + rna.add(chainseq); + } else { + prot.add(chainseq); + } + AlignmentAnnotation[] chainannot = chainseq.getAnnotation(); + if (chainannot != null) { for (int ai = 0; ai < chainannot.length; ai++) { + chainannot[ai].visible = VisibleChainAnnotation; annotations.addElement(chainannot[ai]); } } } + if (rna.size()>0) + try { + processPdbFileWithAnnotate3d(rna); + } catch (Exception x) + { + System.err.println("Exceptions when dealing with RNA in pdb file"); + x.printStackTrace(); + + }; + if (prot.size()>0) + try { + processPdbFileWithJmol(prot); + } catch (Exception x) + { + System.err.println("Exceptions when dealing with RNA in pdb file"); + x.printStackTrace(); + + }; + if (prot.size()>0) + try { + processPdbFileWithJmol(prot); + } catch (Exception x) + { + System.err.println("Exceptions when dealing with RNA in pdb file"); + x.printStackTrace(); + + }; } catch (OutOfMemoryError er) { System.out.println("OUT OF MEMORY LOADING PDB FILE"); @@ -193,7 +234,94 @@ public class PDBfile extends jalview.io.AlignFile } } } - + private void processPdbFileWithJmol(ArrayList prot) throws Exception + { + try { + Class cl = Class.forName("jalview.ext.jmol.PDBFileWithJmol"); + if (cl!=null) + { + Object jmf = cl.getConstructor(new Class[] {FileParse.class}).newInstance(new Object[] {new FileParse(getDataName(),type)}); + Alignment al = new Alignment((SequenceI[]) cl.getMethod("getSeqsAsArray", new Class[] {}).invoke(jmf)); + cl.getMethod("addAnnotations",new Class[] {Alignment.class}).invoke(jmf, al); + replaceMatchingSeqsWith(prot, al, AlignSeq.PEP); + } + } catch (ClassNotFoundException q) + {} + } + private void processPdbFileWithAnnotate3d(ArrayList rna) throws Exception { +// System.out.println("this is a PDB format and RNA sequence"); + // note: we use reflection here so that the applet can compile and run without the HTTPClient bits and pieces needed for accessing Annotate3D web service + try { + Class cl = Class.forName("jalview.ws.jws1.Annotate3D"); + if (cl!=null) + { + // TODO: use the PDB ID of the structure if one is available, to save bandwidth and avoid uploading the whole structure to the service + Object annotate3d = cl.getConstructor(new Class[] {}).newInstance(new Object[] {}); + AlignmentI al = ((AlignmentI) cl.getMethod("getRNAMLFor", new Class[] { FileParse.class}).invoke(annotate3d, new Object[] { new FileParse(getDataName(),type)})); + replaceMatchingSeqsWith(rna, al, AlignSeq.DNA); + } + } catch (ClassNotFoundException x) + { + //ignore classnotfounds - occurs in applet + }; + } + private void replaceMatchingSeqsWith(ArrayList ochains, AlignmentI al, String dnaOrProtein) + { + if (al!=null && al.getHeight()>0) + { + ArrayList matches=new ArrayList(); + ArrayList aligns=new ArrayList(); + + for (SequenceI sq:ochains) + { + SequenceI bestm=null; + AlignSeq bestaseq=null; + int bestscore=0; + for (SequenceI msq:al.getSequences()) + { + AlignSeq aseq = AlignSeq.doGlobalNWAlignment(msq, sq, dnaOrProtein); + if (bestm==null || aseq.getMaxScore()>bestscore) + { + bestscore=aseq.getMaxScore(); + bestaseq= aseq; + bestm=msq; + } + } + System.out.println("Best Score for "+(matches.size()+1)+" :"+bestscore); + matches.add(bestm); + aligns.add(bestaseq); + al.deleteSequence(bestm); + } + for (int p=0,pSize=seqs.size();p-1) + { + seqs.set(p, sq=matches.get(q)); + sq.setName(sp.getName()); + sq.setDescription(sp.getDescription()); + sq.transferAnnotation(sp, aligns.get(q).getMappingFromS1(false)); + int inspos=-1; + for (int ap=0;ap0) { + percentage = ((float) maxCount * 100) / nongap; + residueHash.put(PID_NOGAPS, new Float(percentage)); + } result[i] = residueHash; } } @@ -194,14 +200,15 @@ public class AAFrequency * @param width * @param ignoreGapsInConsensusCalculation * @param includeAllConsSymbols + * @param nseq */ public static void completeConsensus(AlignmentAnnotation consensus, Hashtable[] hconsensus, int iStart, int width, boolean ignoreGapsInConsensusCalculation, - boolean includeAllConsSymbols) + boolean includeAllConsSymbols, long nseq) { completeConsensus(consensus, hconsensus, iStart, width, - ignoreGapsInConsensusCalculation, includeAllConsSymbols, null); // new + ignoreGapsInConsensusCalculation, includeAllConsSymbols, null, nseq); // new // char[] // { 'A', 'C', 'G', 'T', 'U' }); } @@ -209,7 +216,7 @@ public class AAFrequency public static void completeConsensus(AlignmentAnnotation consensus, Hashtable[] hconsensus, int iStart, int width, boolean ignoreGapsInConsensusCalculation, - boolean includeAllConsSymbols, char[] alphabet) + boolean includeAllConsSymbols, char[] alphabet, long nseq) { float tval, value; if (consensus == null || consensus.annotations == null @@ -219,6 +226,23 @@ public class AAFrequency // initialised properly return; } + String fmtstr="%3.1f"; + int precision=0; + while (nseq>=10) { + precision++; + nseq/=10; + } + final Format fmt; + if (precision>1) + { + //if (precision>2) + { + fmtstr = "%"+(2+precision)+"."+(precision)+"f"; + } + fmt = new Format(fmtstr); + } else { + fmt = null; + } for (int i = iStart; i < width; i++) { Hashtable hci; @@ -229,7 +253,6 @@ public class AAFrequency consensus.annotations[i] = null; continue; } - value = 0; Float fv; if (ignoreGapsInConsensusCalculation) @@ -265,7 +288,7 @@ public class AAFrequency tval = profile[0][alphabet[c]] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; mouseOver += ((c == 0) ? "" : "; ") + alphabet[c] + " " - + ((int) tval) + "%"; + + ((fmt!=null) ? fmt.form(tval) : ((int) tval)) + "%"; } } else @@ -288,7 +311,7 @@ public class AAFrequency * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; mouseOver += ((p == 0) ? "" : "; ") + ((char[]) ca[c])[0] - + " " + ((int) tval) + "%"; + + " " + ((fmt!=null) ? fmt.form(tval) : ((int) tval)) + "%"; p++; } @@ -298,7 +321,7 @@ public class AAFrequency } else { - mouseOver += ((int) value + "%"); + mouseOver += ((fmt!=null) ? fmt.form(value) : ((int) value)) + "%"; } consensus.annotations[i] = new Annotation(maxRes, mouseOver, ' ', value); diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index 4a8955b..6d8c0cd 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -16,7 +16,6 @@ * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.analysis; - import java.util.*; import java.awt.*; @@ -267,16 +266,11 @@ public class AlignSeq } /** - * DOCUMENT ME! - * - * @param s1 - * DOCUMENT ME! - * @param string1 - * - string to align for sequence1 - * @param s2 - * sequence 2 - * @param string2 - * - string to align for sequence2 + * Construct score matrix for sequences with standard DNA or PEPTIDE matrix + * @param s1 - sequence 1 + * @param string1 - string to use for s1 + * @param s2 - sequence 2 + * @param string2 - string to use for s2 * @param type * DNA or PEPTIDE */ @@ -289,6 +283,14 @@ public class AlignSeq SeqInit(string1, string2); } + /** + * Construct score matrix for sequences with custom substitution matrix + * @param s1 - sequence 1 + * @param string1 - string to use for s1 + * @param s2 - sequence 2 + * @param string2 - string to use for s2 + * @param scoreMatrix - substitution matrix to use for alignment + */ public void SeqInit(SequenceI s1, String string1, SequenceI s2, String string2, ScoreMatrix scoreMatrix) { @@ -302,7 +304,7 @@ public class AlignSeq * construct score matrix for string1 and string2 (after removing any existing * gaps * - * @param string1 + * @param string1 * @param string2 */ private void SeqInit(String string1, String string2) @@ -920,6 +922,94 @@ public class AlignSeq } /** + * Compute a globally optimal needleman and wunsch alignment between two + * sequences + * + * @param s1 + * @param s2 + * @param type + * AlignSeq.DNA or AlignSeq.PEP + */ + public static AlignSeq doGlobalNWAlignment(SequenceI s1, SequenceI s2, + String type) + { + AlignSeq as = new AlignSeq(s1, s2, type); + + as.calcScoreMatrix(); + as.traceAlignment(); + return as; + } + + /** + * + * @return mapping from positions in S1 to corresponding positions in S2 + */ + public jalview.datamodel.Mapping getMappingFromS1(boolean allowmismatch) + { + ArrayList as1 = new ArrayList(), as2 = new ArrayList(); + int pdbpos = s2.getStart() + getSeq2Start() - 2; + int alignpos = s1.getStart() + getSeq1Start() - 2; + int lp2 = pdbpos - 3, lp1 = alignpos - 3; + boolean lastmatch = false; + // and now trace the alignment onto the atom set. + for (int i = 0; i < astr1.length(); i++) + { + char c1 = astr1.charAt(i), c2 = astr2.charAt(i); + if (c1 != '-') + { + alignpos++; + } + + if (c2 != '-') + { + pdbpos++; + } + + if (allowmismatch || c1 == c2) + { + lastmatch = true; + // extend mapping interval. + if (lp1 + 1 != alignpos || lp2+1 !=pdbpos) + { + as1.add(Integer.valueOf(alignpos)); + as2.add(Integer.valueOf(pdbpos)); + } + lp1 = alignpos; + lp2 = pdbpos; + } + else + { + lastmatch = false; + } + } + // construct range pairs + int[] mapseq1 = new int[as1.size() + (lastmatch ? 1 : 0)], mapseq2 = new int[as2 + .size() + (lastmatch ? 1 : 0)]; + int i = 0; + for (Integer ip : as1) + { + mapseq1[i++] = ip; + } + ; + i = 0; + for (Integer ip : as2) + { + mapseq2[i++] = ip; + } + ; + if (lastmatch) + { + mapseq1[mapseq1.length - 1] = alignpos; + mapseq2[mapseq2.length - 1] = pdbpos; + } + MapList map = new MapList(mapseq1, mapseq2, 1, 1); + + jalview.datamodel.Mapping mapping = new Mapping(map); + mapping.setTo(s2); + return mapping; + } + + /** * compute the PID vector used by the redundancy filter. * * @param originalSequences diff --git a/src/jalview/analysis/Rna.java b/src/jalview/analysis/Rna.java index e386e5c..c5207f7 100644 --- a/src/jalview/analysis/Rna.java +++ b/src/jalview/analysis/Rna.java @@ -17,20 +17,66 @@ */ /* Author: Lauren Michelle Lui * Methods are based on RALEE methods http://personalpages.manchester.ac.uk/staff/sam.griffiths-jones/software/ralee/ + * Additional Author: Jan Engelhart (2011) - Structure consensus and bug fixing + * Additional Author: Anne Menard (2012) - Pseudoknot support and secondary structure consensus * */ package jalview.analysis; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; import java.util.Hashtable; import java.util.Stack; import java.util.Vector; + +import jalview.analysis.SecStrConsensus.SimpleBP; import jalview.datamodel.SequenceFeature; public class Rna { - static Hashtable pairHash = new Hashtable(); + + static Hashtable pairHash = new Hashtable(); + + private static final Character[] openingPars = {'(','[','{','<','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; + private static final Character[] closingPars = {')',']','}','>','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; + + private static HashSet openingParsSet = new HashSet(Arrays.asList(openingPars)); + private static HashSet closingParsSet = new HashSet(Arrays.asList(closingPars)); + private static Hashtable closingToOpening = new Hashtable() + // Initializing final data structure + { + private static final long serialVersionUID = 1L; + { + for(int i=0;i"+openingPars[i]); + put(closingPars[i],openingPars[i]); + } + }}; + + private static boolean isOpeningParenthesis(char c) + { + return openingParsSet.contains(c); + } + + private static boolean isClosingParenthesis(char c) + { + return closingParsSet.contains(c); + } + private static char matchingOpeningParenthesis(char closingParenthesis) throws WUSSParseException + { + if (!isClosingParenthesis(closingParenthesis)) + { + throw new WUSSParseException("Querying matching opening parenthesis for non-closing parenthesis character "+closingParenthesis, -1); + } + + return closingToOpening.get(closingParenthesis); + } + /** * Based off of RALEE code ralee-get-base-pairs. Keeps track of open bracket * positions in "stack" vector. When a close bracket is reached, pair this @@ -43,69 +89,89 @@ public class Rna * @return Array of SequenceFeature; type = RNA helix, begin is open base * pair, end is close base pair */ - public static SequenceFeature[] GetBasePairs(CharSequence line) - throws WUSSParseException + public static Vector GetSimpleBPs(CharSequence line) throws WUSSParseException { - Stack stack = new Stack(); - Vector pairs = new Vector(); - + System.out.println(line); + Hashtable> stacks = new Hashtable>(); + Vector pairs = new Vector(); int i = 0; while (i < line.length()) { char base = line.charAt(i); - - if ((base == '<') || (base == '(') || (base == '{') || (base == '[')) + + if (isOpeningParenthesis(base)) { - stack.push(i); + if (!stacks.containsKey(base)){ + stacks.put(base, new Stack()); + } + stacks.get(base).push(i); + } - else if ((base == '>') || (base == ')') || (base == '}') - || (base == ']')) + else if (isClosingParenthesis(base)) { - + + char opening = matchingOpeningParenthesis(base); + + if (!stacks.containsKey(opening)){ + throw new WUSSParseException("Mismatched (unseen) closing character "+base, i); + } + + Stack stack = stacks.get(opening); if (stack.isEmpty()) { // error whilst parsing i'th position. pass back - throw new WUSSParseException("Mismatched closing bracket", i); + throw new WUSSParseException("Mismatched closing character "+base, i); } - Object temp = stack.pop(); - pairs.addElement(temp); - pairs.addElement(i); + int temp = stack.pop(); + + pairs.add(new SimpleBP(temp,i)); } - i++; } - - int numpairs = pairs.size() / 2; - SequenceFeature[] outPairs = new SequenceFeature[numpairs]; - - // Convert pairs to array - for (int p = 0; p < pairs.size(); p += 2) + for(char opening: stacks.keySet()) { - int begin = Integer.parseInt(pairs.elementAt(p).toString()); - int end = Integer.parseInt(pairs.elementAt(p + 1).toString()); - - outPairs[p / 2] = new SequenceFeature("RNA helix", "", "", begin, - end, ""); - // pairHash.put(begin, end); - + Stack stack = stacks.get(opening); + if (!stack.empty()) + { + throw new WUSSParseException("Mismatched opening character "+opening+" at "+stack.pop(), i); + } + } + return pairs; + } + + public static SequenceFeature[] GetBasePairs(CharSequence line) throws WUSSParseException + { + Vector bps = GetSimpleBPs(line); + SequenceFeature[] outPairs = new SequenceFeature[bps.size()]; + for (int p = 0; p < bps.size(); p++) + { + SimpleBP bp = bps.elementAt(p); + outPairs[p] = new SequenceFeature("RNA helix", "", "", bp.getBP5(),bp.getBP3(), ""); } - return outPairs; } - + + + public static ArrayList GetModeleBP(CharSequence line) throws WUSSParseException + { + Vector bps = GetSimpleBPs(line); + return new ArrayList(bps); + } + + /** * Function to get the end position corresponding to a given start position - * - * @param indice - * - start position of a base pair + * @param indice - start position of a base pair * @return - end position of a base pair */ - /* - * makes no sense at the moment :( public int findEnd(int indice){ //TODO: - * Probably extend this to find the start to a given end? //could be done by - * putting everything twice to the hash ArrayList pair = new - * ArrayList(); return pairHash.get(indice); } - */ + /*makes no sense at the moment :( + public int findEnd(int indice){ + //TODO: Probably extend this to find the start to a given end? + //could be done by putting everything twice to the hash + ArrayList pair = new ArrayList(); + return pairHash.get(indice); + }*/ + /** * Figures out which helix each position belongs to and stores the helix @@ -189,3 +255,4 @@ public class Rna } } } + diff --git a/src/jalview/analysis/SecStrConsensus.java b/src/jalview/analysis/SecStrConsensus.java new file mode 100644 index 0000000..27c3f7e --- /dev/null +++ b/src/jalview/analysis/SecStrConsensus.java @@ -0,0 +1,219 @@ +package jalview.analysis; + +import java.util.ArrayList; +import java.util.Hashtable; + + +public class SecStrConsensus { + + + /** + * Internal class to represent a simple base-pair. + * @author Yawn + * [JBPNote: ^^ is that Anne Menard or Ya(w)nn Ponty, I wonder ! ] + */ + public static class SimpleBP{ + int bp5; + int bp3; + + public SimpleBP() + { + + } + public SimpleBP(int i5, int i3) + { + bp5=i5; + bp3=i3; + } + public void setBP5(int i5) + { + bp5=i5; + } + + public void setBP3(int i3) + { + bp3=i3; + } + + public int getBP5() + { + return bp5; + } + + public int getBP3() + { + return bp3; + } + + public String toString() + { + return "("+bp5+","+bp3+")"; + } + + } + + public static int[] extractConsensus(ArrayList> bps) + { + // We do not currently know the length of the alignment + // => Estimate it as the biggest index of a base-pair plus one. + int maxlength = 0; + for (ArrayList strs : bps) + { + for (SimpleBP bp : strs) + { + + maxlength = Math.max(1+Math.max(bp.bp5, bp.bp3), maxlength); + + } + } + // Now we have a good estimate for length, allocate and initialize data + // to be fed to the dynamic programming procedure. + ArrayList> seq = new ArrayList>(); + for (int i=0;i()); } + for (ArrayList strs : bps) + { + for (SimpleBP bp : strs) + { + int i = bp.bp5; + int j = bp.bp3; + Hashtable h = seq.get(i); + if (!h.containsKey(j)) + { + h.put(j, 0.0); + } + h.put(j, h.get(j)+1.); + } + } + // At this point, seq contains, at each position i, a hashtable which associates, + // to each possible end j, the number of time a base-pair (i,j) occurs in the alignment + + // We can now run the dynamic programming procedure on this data + double[][] mat = fillMatrix(seq); + ArrayList res = backtrack(mat,seq); + + // Convert it to an array, ie finalres[i] = j >= 0 iff a base-pair (i,j) is present + // in the consensus, or -1 otherwise + int[] finalres = new int[seq.size()]; + for (int i=0;i> seq, int i, int k) + { + return seq.get(i).containsKey(k); + } + + // Returns the score of a potential base-pair, ie the number of structures in which it is found. + private static double basePairScore(ArrayList> seq, int i, int k) + { + return seq.get(i).get(k); + } + + + private static double[][] fillMatrix(ArrayList> seq) + { + int n = seq.size(); + double[][] tab = new double[n][n]; + for(int m=1;m<=n;m++) + { + for(int i=0;ii+1) + { + fact1 = tab[i+1][k-1]; + } + double fact2 = 0; + if (k backtrack(double[][] tab,ArrayList> seq) + { + return backtrack(tab,seq,0,seq.size()-1); + } + + private static ArrayList backtrack(double[][] tab,ArrayList> seq, int i, int j) + { + ArrayList result = new ArrayList(); + if (i indices = new ArrayList(); + indices.add(-1); + for (int k=i+1;k<=j;k++) + { + indices.add(k); + } + for (int k : indices) + { + if (k==-1) + { + if (tab[i][j] == tab[i+1][j]) + { + result = backtrack(tab, seq, i+1,j); + } + } + else + { + if (canBasePair(seq,i,k)) + { + double fact1 = 0; + if (k>i+1) + { + fact1 = tab[i+1][k-1]; + } + double fact2 = 0; + if (k. */ - package jalview.analysis; import java.util.*; +import jalview.util.Format; import jalview.datamodel.*; /** @@ -59,11 +59,15 @@ public class StructureFrequency */ public static int findPair(SequenceFeature[] pairs, int indice) { + for (int i = 0; i < pairs.length; i++) { if (pairs[i].getBegin() == indice) + { + return pairs[i].getEnd(); + } } return -1; @@ -84,16 +88,18 @@ public class StructureFrequency int end, Hashtable[] result, boolean profile, AlignmentAnnotation rnaStruc) { + Hashtable residueHash; String maxResidue; - char[] seq, struc = rnaStruc.getRNAStruc().toCharArray(); + char[] struc = rnaStruc.getRNAStruc().toCharArray(); + SequenceFeature[] rna = rnaStruc._rnasecstr; char c, s, cEnd; - int count, nonGap = 0, i, bpEnd = -1, j, jSize = sequences.length; + int count = 0, nonGap = 0, i, bpEnd = -1, j, jSize = sequences.length; int[] values; int[][] pairs; float percentage; - + boolean wooble = true; for (i = start; i < end; i++) // foreach column { residueHash = new Hashtable(); @@ -101,9 +107,11 @@ public class StructureFrequency values = new int[255]; pairs = new int[255][255]; bpEnd = -1; + // System.out.println("s="+struc[i]); if (i < struc.length) { s = struc[i]; + } else { @@ -114,7 +122,7 @@ public class StructureFrequency s = '-'; } - if (s != '(') + if (s != '(' && s != '[') { if (s == '-') { @@ -123,7 +131,9 @@ public class StructureFrequency } else { + bpEnd = findPair(rna, i); + if (bpEnd > -1) { for (j = 0; j < jSize; j++) // foreach row @@ -135,28 +145,39 @@ public class StructureFrequency continue; } c = sequences[j].getCharAt(i); + // System.out.println("c="+c); + + // standard representation for gaps in sequence and structure + if (c == '.' || c == ' ') { + c = '-'; + } - // standard representation for gaps in sequence and structure - if (c == '.' || c == ' ') - { - c = '-'; - } - - if (c == '-') - { - values['-']++; - continue; - } - cEnd = sequences[j].getCharAt(bpEnd); - if (checkBpType(c, cEnd)) - { - values['(']++; // H means it's a helix (structured) - } - pairs[c][cEnd]++; + if (c == '-') + { + values['-']++; + continue; + } + cEnd = sequences[j].getCharAt(bpEnd); + // System.out.println("pairs ="+c+","+cEnd); + if (checkBpType(c, cEnd) == true) + { + values['(']++; // H means it's a helix (structured) maxResidue = "("; + wooble = true; + // System.out.println("It's a pair wc"); + + } + if (checkBpType(c, cEnd) == false) + { + wooble = false; + values['[']++; // H means it's a helix (structured) + maxResidue = "["; + } + pairs[c][cEnd]++; + } } // nonGap++; @@ -170,9 +191,14 @@ public class StructureFrequency residueHash.put(PAIRPROFILE, pairs); } - - count = values['(']; - + if (wooble == true) + { + count = values['(']; + } + if (wooble == false) + { + count = values['[']; + } residueHash.put(MAXCOUNT, new Integer(count)); residueHash.put(MAXRESIDUE, maxResidue); @@ -188,11 +214,20 @@ public class StructureFrequency if (bpEnd > 0) { values[')'] = values['(']; + values[']'] = values['[']; values['('] = 0; - + values['['] = 0; residueHash = new Hashtable(); - maxResidue = ")"; - + if (wooble == true) + { + // System.out.println(maxResidue+","+wooble); + maxResidue = ")"; + } + if (wooble == false) + { + // System.out.println(maxResidue+","+wooble); + maxResidue = "]"; + } if (profile) { residueHash.put(PROFILE, new int[][] @@ -209,6 +244,7 @@ public class StructureFrequency residueHash.put(PID_GAPS, new Float(percentage)); result[bpEnd] = residueHash; + } } } @@ -299,7 +335,7 @@ public class StructureFrequency public static void completeConsensus(AlignmentAnnotation consensus, Hashtable[] hconsensus, int iStart, int width, boolean ignoreGapsInConsensusCalculation, - boolean includeAllConsSymbols) + boolean includeAllConsSymbols, long nseq) { float tval, value; if (consensus == null || consensus.annotations == null @@ -309,6 +345,18 @@ public class StructureFrequency // initialised properly return; } + String fmtstr="%3.1f"; + int precision=2; + while (nseq>100) { + precision++; + nseq/=10; + } + if (precision>2) + { + fmtstr = "%"+(2+precision)+"."+precision+"f"; + } + Format fmt = new Format(fmtstr); + for (int i = iStart; i < width; i++) { Hashtable hci; @@ -385,7 +433,7 @@ public class StructureFrequency tval = (vl[c] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]); mouseOver += ((p == 0) ? "" : "; ") + (char) ((int[]) ca[c])[0] - + (char) ((int[]) ca[c])[1] + " " + ((int) tval) + "%"; + + (char) ((int[]) ca[c])[1] + " " + fmt.form(tval) + "%"; p++; } @@ -395,7 +443,7 @@ public class StructureFrequency } else { - mouseOver += ((int) value + "%"); + mouseOver += (fmt.form(value) + "%"); } consensus.annotations[i] = new Annotation(maxRes, mouseOver, ' ', value); diff --git a/src/jalview/api/AlignViewControllerI.java b/src/jalview/api/AlignViewControllerI.java new file mode 100644 index 0000000..fc63fd6 --- /dev/null +++ b/src/jalview/api/AlignViewControllerI.java @@ -0,0 +1,24 @@ +package jalview.api; + +/** + * prototype abstract controller for a Jalview alignment view + * @author jimp + * + * All operations should return true if the view has changed as a result of the operation + * @param + * + */ +public interface AlignViewControllerI +{ + + public boolean makeGroupsFromSelection(); + + public boolean createGroup(); + + public boolean unGroup(); + + public boolean deleteGroups(); + + public void setViewportAndAlignmentPanel(AlignViewportI viewport, AlignmentViewPanel alignPanel); + +} diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 15e5f1d..5f759b8 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -159,11 +159,17 @@ public interface AlignViewportI void updateGroupAnnotationSettings(boolean applyGlobalSettings, boolean preserveNewGroupSettings); + void setSequenceColour(SequenceI seq, Color col); + + Color getSequenceColour(SequenceI seq); + + void updateSequenceIdColours(); SequenceGroup getSelectionGroup(); SequenceI[] getSequenceSelection(); + void clearSequenceColours(); CigarArray getViewAsCigars(boolean selectedRegionOnly); diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java old mode 100755 new mode 100644 index c71818e..c51653d --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -26,6 +26,7 @@ import jalview.analysis.*; import jalview.commands.*; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.util.MessageManager; import jalview.util.UrlLink; import jalview.io.AppletFormatAdapter; import jalview.io.SequenceAnnotationReport; @@ -69,6 +70,8 @@ public class APopupMenu extends java.awt.PopupMenu implements MenuItem unGroupMenuItem = new MenuItem(); + MenuItem createGroupMenuItem = new MenuItem(); + MenuItem nucleotideMenuItem = new MenuItem(); Menu colourMenu = new Menu(); @@ -81,17 +84,17 @@ public class APopupMenu extends java.awt.PopupMenu implements CheckboxMenuItem displayNonconserved = new CheckboxMenuItem(); - Menu editMenu = new Menu("Edit"); + Menu editMenu = new Menu(MessageManager.getString("action.edit")); - MenuItem copy = new MenuItem("Copy (Jalview Only)"); + MenuItem copy = new MenuItem(MessageManager.getString("label.jalview_copy")); - MenuItem cut = new MenuItem("Cut (Jalview Only)"); + MenuItem cut = new MenuItem(MessageManager.getString("label.jalview_cut")); - MenuItem toUpper = new MenuItem("To Upper Case"); + MenuItem toUpper = new MenuItem(MessageManager.getString("label.to_upper_case")); - MenuItem toLower = new MenuItem("To Lower Case"); + MenuItem toLower = new MenuItem(MessageManager.getString("label.to_lower_case")); - MenuItem toggleCase = new MenuItem("Toggle Case"); + MenuItem toggleCase = new MenuItem(MessageManager.getString("label.toggle_case")); Menu outputmenu = new Menu(); @@ -103,15 +106,15 @@ public class APopupMenu extends java.awt.PopupMenu implements MenuItem repGroup = new MenuItem(); - MenuItem sequenceName = new MenuItem("Edit Name/Description"); + MenuItem sequenceName = new MenuItem(MessageManager.getString("label.edit_name_description")); - MenuItem sequenceFeature = new MenuItem("Create Sequence Feature"); + MenuItem sequenceFeature = new MenuItem(MessageManager.getString("label.create_sequence_feature")); - MenuItem editSequence = new MenuItem("Edit Sequence"); + MenuItem editSequence = new MenuItem(MessageManager.getString("label.edit_sequence")); - MenuItem sequenceDetails = new MenuItem("Sequence Details ..."); + MenuItem sequenceDetails = new MenuItem(MessageManager.getString("label.sequence_details") + "..."); - MenuItem selSeqDetails = new MenuItem("Sequence Details ..."); + MenuItem selSeqDetails = new MenuItem(MessageManager.getString("label.sequence_details") + "..."); Sequence seq; @@ -159,14 +162,18 @@ public class APopupMenu extends java.awt.PopupMenu implements if (sg != null && sg.getSize() > 0) { - editGroupName.setLabel("Name: " + sg.getName()); + editGroupName.setLabel(MessageManager.formatMessage("label.name_param", new String[]{sg.getName()})); showText.setState(sg.getDisplayText()); showColourText.setState(sg.getColourText()); showBoxes.setState(sg.getDisplayBoxes()); displayNonconserved.setState(sg.getShowNonconserved()); if (!ap.av.getAlignment().getGroups().contains(sg)) { + menu1.setLabel(MessageManager.getString("action.edit_new_group")); groupMenu.remove(unGroupMenuItem); + } else { + menu1.setLabel(MessageManager.getString("action.edit_group")); + groupMenu.remove(createGroupMenuItem); } } @@ -178,7 +185,7 @@ public class APopupMenu extends java.awt.PopupMenu implements if (links != null && links.size() > 0) { - Menu linkMenu = new Menu("Link"); + Menu linkMenu = new Menu(MessageManager.getString("action.link")); String link; for (int i = 0; i < links.size(); i++) { @@ -300,7 +307,7 @@ public class APopupMenu extends java.awt.PopupMenu implements if (seq != null) { seqMenu.setLabel(seq.getName()); - repGroup.setLabel("Represent Group with " + seq.getName()); + repGroup.setLabel(MessageManager.formatMessage("label.represent_group_with", new String[]{seq.getName()})); } else { @@ -457,6 +464,11 @@ public class APopupMenu extends java.awt.PopupMenu implements unGroupMenuItem_actionPerformed(); } + else if (source == createGroupMenuItem) + { + createGroupMenuItem_actionPerformed(); + } + else if (source == sequenceName) { editName(); @@ -635,7 +647,7 @@ public class APopupMenu extends java.awt.PopupMenu implements Frame frame = new Frame(); frame.add(cap); jalview.bin.JalviewLite.addFrame(frame, - "Selection output - " + e.getActionCommand(), 600, 500); + MessageManager.formatMessage("label.selection_output_command", new String[]{e.getActionCommand()}),600, 500); // JBPNote: getSelectionAsNewSequence behaviour has changed - this method // now returns a full copy of sequence data // TODO consider using getSequenceSelection instead here @@ -666,8 +678,7 @@ public class APopupMenu extends java.awt.PopupMenu implements StringBuffer contents = new StringBuffer(); for (SequenceI seq : sequences) { - contents.append("

        Annotation for " + seq.getDisplayId(true) - + "

        "); + contents.append(MessageManager.formatMessage("label.annotation_for_displayid",new String[]{seq.getDisplayId(true)})); new SequenceAnnotationReport(null) .createSequenceAnnotationReport( contents, @@ -684,7 +695,7 @@ public class APopupMenu extends java.awt.PopupMenu implements jalview.bin.JalviewLite.addFrame(frame, "Sequence Details for " + (sequences.length == 1 ? sequences[0].getDisplayId(true) : "Selection"), 600, 500); - cap.setText("" + contents.toString() + ""); + cap.setText(MessageManager.formatMessage("label.html_content", new String[]{contents.toString()})); } void editName() @@ -719,61 +730,64 @@ public class APopupMenu extends java.awt.PopupMenu implements else { CutAndPasteTransfer cap = new CutAndPasteTransfer(true, ap.alignFrame); - cap.setText("Paste your PDB file here."); + cap.setText(MessageManager.getString("label.paste_pdb_file")); cap.setPDBImport(seq); Frame frame = new Frame(); frame.add(cap); jalview.bin.JalviewLite.addFrame(frame, - "Paste PDB file for sequence " + seq.getName(), 400, 300); + MessageManager.formatMessage("label.paste_pdb_file_for_sequence", new String[]{seq.getName()}), 400, 300); } } private void jbInit() throws Exception { - groupMenu.setLabel("Group"); - groupMenu.setLabel("Selection"); + groupMenu.setLabel(MessageManager.getString("label.selection")); sequenceFeature.addActionListener(this); editGroupName.addActionListener(this); - unGroupMenuItem.setLabel("Remove Group"); + unGroupMenuItem.setLabel(MessageManager.getString("action.remove_group")); unGroupMenuItem.addActionListener(this); - nucleotideMenuItem.setLabel("Nucleotide"); + createGroupMenuItem.setLabel(MessageManager.getString("action.create_group")); + createGroupMenuItem.addActionListener(this); + + nucleotideMenuItem.setLabel(MessageManager.getString("label.nucleotide")); nucleotideMenuItem.addActionListener(this); conservationMenuItem.addItemListener(this); abovePIDColour.addItemListener(this); - colourMenu.setLabel("Group Colour"); - showBoxes.setLabel("Boxes"); + colourMenu.setLabel(MessageManager.getString("label.group_colour")); + showBoxes.setLabel(MessageManager.getString("label.boxes")); showBoxes.setState(true); showBoxes.addItemListener(this); sequenceName.addActionListener(this); sequenceDetails.addActionListener(this); selSeqDetails.addActionListener(this); - displayNonconserved.setLabel("Show Nonconserved"); + displayNonconserved.setLabel(MessageManager.getString("label.show_non_conversed")); displayNonconserved.setState(false); displayNonconserved.addItemListener(this); - showText.setLabel("Text"); + showText.setLabel(MessageManager.getString("label.text")); showText.addItemListener(this); - showColourText.setLabel("Colour Text"); + showColourText.setLabel(MessageManager.getString("label.colour_text")); showColourText.addItemListener(this); - outputmenu.setLabel("Output to Textbox..."); - seqMenu.setLabel("Sequence"); - pdb.setLabel("View PDB Structure"); - hideSeqs.setLabel("Hide Sequences"); - repGroup.setLabel("Represent Group with"); - revealAll.setLabel("Reveal All"); - revealSeq.setLabel("Reveal Sequences"); - menu1.setLabel("Group"); + outputmenu.setLabel(MessageManager.getString("label.out_to_textbox")); + seqMenu.setLabel(MessageManager.getString("label.sequence")); + pdb.setLabel(MessageManager.getString("label.view_pdb_structure")); + hideSeqs.setLabel(MessageManager.getString("action.hide_sequences")); + repGroup.setLabel(MessageManager.getString("label.represent_group_with")); + revealAll.setLabel(MessageManager.getString("action.reveal_all")); + revealSeq.setLabel(MessageManager.getString("action.reveal_sequences")); + menu1.setLabel(MessageManager.getString("label.group")); add(groupMenu); this.add(seqMenu); this.add(hideSeqs); this.add(revealSeq); this.add(revealAll); // groupMenu.add(selSeqDetails); - groupMenu.add(editGroupName); groupMenu.add(editMenu); groupMenu.add(outputmenu); groupMenu.add(sequenceFeature); + groupMenu.add(createGroupMenuItem); + groupMenu.add(unGroupMenuItem); groupMenu.add(menu1); colourMenu.add(noColourmenuItem); @@ -843,7 +857,7 @@ public class APopupMenu extends java.awt.PopupMenu implements seqMenu.add(pdb); } seqMenu.add(repGroup); - menu1.add(unGroupMenuItem); + menu1.add(editGroupName); menu1.add(colourMenu); menu1.add(showBoxes); menu1.add(showText); @@ -1027,6 +1041,12 @@ public class APopupMenu extends java.awt.PopupMenu implements ap.paintAlignment(true); } + void createGroupMenuItem_actionPerformed() + { + getGroup(); // implicitly create group + refresh(); + } + public void showColourText_itemStateChanged() { getGroup().setColourText(showColourText.getState()); diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 0f0ba4e..46fa9fa 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -19,6 +19,7 @@ package jalview.appletgui; import jalview.analysis.AlignmentSorter; import jalview.analysis.Conservation; +import jalview.api.AlignViewControllerI; import jalview.api.SequenceStructureBinding; import jalview.bin.JalviewLite; import jalview.commands.CommandI; @@ -50,6 +51,7 @@ import jalview.schemes.NucleotideColourScheme; import jalview.schemes.PIDColourScheme; import jalview.schemes.PurinePyrimidineColourScheme; import jalview.schemes.RNAHelicesColourChooser; +import jalview.schemes.RNAInteractionColourScheme; import jalview.schemes.ResidueProperties; import jalview.schemes.StrandColourScheme; import jalview.schemes.TCoffeeColourScheme; @@ -57,6 +59,7 @@ import jalview.schemes.TaylorColourScheme; import jalview.schemes.TurnColourScheme; import jalview.schemes.ZappoColourScheme; import jalview.structure.StructureSelectionManager; +import jalview.util.MessageManager; import java.awt.BorderLayout; import java.awt.Canvas; @@ -92,6 +95,7 @@ import java.util.Vector; public class AlignFrame extends EmbmenuFrame implements ActionListener, ItemListener, KeyListener { + public AlignViewControllerI avc; public AlignmentPanel alignPanel; public AlignViewport viewport; @@ -120,7 +124,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport = new AlignViewport(al, applet); alignPanel = new AlignmentPanel(this, viewport); - + avc = new jalview.controller.AlignViewController(viewport, alignPanel); viewport.updateConservation(alignPanel); viewport.updateConsensus(alignPanel); @@ -295,7 +299,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.featureSettings.refreshTable(); } alignPanel.paintAlignment(true); - statusBar.setText("Successfully added features to alignment."); + statusBar.setText(MessageManager.getString("label.successfully_added_features_alignment")); } return featuresFile; } @@ -439,8 +443,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, case KeyEvent.VK_F2: viewport.cursorMode = !viewport.cursorMode; - statusBar.setText("Keyboard editing mode is " - + (viewport.cursorMode ? "on" : "off")); + statusBar.setText(MessageManager.formatMessage("label.keyboard_editing_mode", new String[]{(viewport.cursorMode ? "on" : "off")})); if (viewport.cursorMode) { alignPanel.seqPanel.seqCanvas.cursorX = viewport.startRes; @@ -542,6 +545,20 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } break; + case KeyEvent.VK_G: + if (evt.isControlDown()) + { + if (evt.isShiftDown()) + { + this.unGroup_actionPerformed(); + } + else + { + this.createGroup_actionPerformed(); + } + } + break; + case KeyEvent.VK_U: if (evt.isControlDown()) { @@ -970,8 +987,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, cap.setText(contents.toString()); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Alignment Properties: " - + getTitle(), 400, 250); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage("label.alignment_properties", new String[]{getTitle()}), + 400, 250); } else if (source == overviewMenuItem) { @@ -1022,6 +1039,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { changeColour(new PurinePyrimidineColourScheme()); } + else if (source == RNAInteractionColour) + { + changeColour(new RNAInteractionColourScheme()); + } else if (source == RNAHelixColour) { new RNAHelicesColourChooser(viewport, alignPanel); @@ -1114,7 +1135,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Cut & Paste Input", 500, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.input_cut_paste"), 500, 500); } protected void outputText_actionPerformed(ActionEvent e) @@ -1123,7 +1144,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, Frame frame = new Frame(); frame.add(cap); jalview.bin.JalviewLite.addFrame(frame, - "Alignment output - " + e.getActionCommand(), 600, 500); + MessageManager.formatMessage("label.alignment_output_command", new String[]{e.getActionCommand()}),600, 500); cap.setText(new AppletFormatAdapter().formatSequences( e.getActionCommand(), viewport.getAlignment(), viewport.showJVSuffix)); @@ -1132,11 +1153,11 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, public void loadAnnotations() { CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this); - cap.setText("Paste your features / annotations / T-coffee score file here."); + cap.setText(MessageManager.getString("label.paste_features_annotations_Tcoffee_here")); cap.setAnnotationImport(); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Paste Annotations ", 400, 300); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.paste_annotations"), 400, 300); } @@ -1153,7 +1174,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Annotations", 600, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.annotations"), 600, 500); cap.setText(annotation); } @@ -1209,7 +1230,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Features", 600, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.features"), 600, 500); cap.setText(features); } else @@ -1347,12 +1368,12 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { undoMenuItem.setEnabled(true); CommandI command = (CommandI) viewport.historyList.peek(); - undoMenuItem.setLabel("Undo " + command.getDescription()); + undoMenuItem.setLabel(MessageManager.formatMessage("label.undo_command", new String[]{command.getDescription()})); } else { undoMenuItem.setEnabled(false); - undoMenuItem.setLabel("Undo"); + undoMenuItem.setLabel(MessageManager.getString("action.undo")); } if (viewport.redoList.size() > 0) @@ -1360,12 +1381,12 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, redoMenuItem.setEnabled(true); CommandI command = (CommandI) viewport.redoList.peek(); - redoMenuItem.setLabel("Redo " + command.getDescription()); + redoMenuItem.setLabel(MessageManager.formatMessage("label.redo_command", new String[]{command.getDescription()})); } else { redoMenuItem.setEnabled(false); - redoMenuItem.setLabel("Redo"); + redoMenuItem.setLabel(MessageManager.getString("action.redo")); } } @@ -1887,41 +1908,30 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, protected void makeGrpsFromSelection_actionPerformed() { - if (viewport.getSelectionGroup() != null) - { - SequenceGroup[] gps = jalview.analysis.Grouping.makeGroupsFrom( - viewport.getSequenceSelection(), - viewport.getAlignmentView(true).getSequenceStrings( - viewport.getGapCharacter()), viewport.getAlignment() - .getGroups()); - viewport.getAlignment().deleteAllGroups(); - viewport.sequenceColours = null; - viewport.setSelectionGroup(null); - // set view properties for each group - for (int g = 0; g < gps.length; g++) - { - // gps[g].setShowunconserved(viewport.getShowUnconserved()); - gps[g].setshowSequenceLogo(viewport.isShowSequenceLogo()); - viewport.getAlignment().addGroup(gps[g]); - Color col = new Color((int) (Math.random() * 255), - (int) (Math.random() * 255), (int) (Math.random() * 255)); - col = col.brighter(); - for (SequenceI sq : gps[g].getSequences(null)) - viewport.setSequenceColour(sq, col); - } + if (avc.makeGroupsFromSelection()) { PaintRefresher.Refresh(this, viewport.getSequenceSetId()); alignPanel.updateAnnotation(); alignPanel.paintAlignment(true); } } + protected void createGroup_actionPerformed() + { + avc.createGroup(); + } + protected void unGroup_actionPerformed() + { + if (avc.unGroup()) + { + alignPanel.alignmentChanged(); + } + } protected void deleteGroups_actionPerformed() { - viewport.getAlignment().deleteAllGroups(); - viewport.sequenceColours = null; - viewport.setSelectionGroup(null); - - alignPanel.paintAlignment(true); + if (avc.deleteGroups()) + { + alignPanel.alignmentChanged(); + } } public void selectAllSequenceMenuItem_actionPerformed() @@ -2019,8 +2029,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.getSelectionGroup()); } - statusBar.setText("Removed " + trimRegion.getSize() + " columns."); - + statusBar.setText(MessageManager.formatMessage("label.removed_columns", new String[]{Integer.valueOf(trimRegion.getSize()).toString()})); addHistoryItem(trimRegion); for (SequenceGroup sg : viewport.getAlignment().getGroups()) @@ -2060,8 +2069,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, addHistoryItem(removeGapCols); - statusBar.setText("Removed " + removeGapCols.getSize() - + " empty columns."); + statusBar.setText(MessageManager.formatMessage("label.removed_empty_columns", new String[]{Integer.valueOf(removeGapCols.getSize()).toString()})); // This is to maintain viewport position on first residue // of first sequence @@ -2288,7 +2296,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, OverviewPanel overview = new OverviewPanel(alignPanel); frame.add(overview); // +50 must allow for applet frame window - jalview.bin.JalviewLite.addFrame(frame, "Overview " + this.getTitle(), + jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage("label.overview_params", new String[]{this.getTitle()}), overview.getPreferredSize().width, overview.getPreferredSize().height + 50); @@ -2466,7 +2474,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { Frame frame = new Frame(); frame.add(new PairwiseAlignPanel(alignPanel)); - jalview.bin.JalviewLite.addFrame(frame, "Pairwise Alignment", 600, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.pairwise_alignment"), 600, 500); } } @@ -2564,16 +2572,16 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, void loadTree_actionPerformed() { CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this); - cap.setText("Paste your Newick tree file here."); + cap.setText(MessageManager.getString("label.paste_newick_tree_file")); cap.setTreeImport(); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Paste Newick file ", 400, 300); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.paste_newick_file"), 400, 300); } public void loadTree(jalview.io.NewickFile tree, String treeFile) { - TreePanel tp = new TreePanel(alignPanel, treeFile, "From File - ", tree); + TreePanel tp = new TreePanel(alignPanel, treeFile, MessageManager.getString("label.load_tree_from_file"), tree); jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500); addTreeMenuItem(tp, treeFile); } @@ -2593,7 +2601,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, .sortByTree(viewport.getAlignment(), treePanel.getTree()); // addHistoryItem(new HistoryItem("Sort", viewport.alignment, // HistoryItem.SORT)); - addHistoryItem(new OrderCommand("Order by " + title, oldOrder, + addHistoryItem(new OrderCommand(MessageManager.formatMessage("label.order_by_params", new String[]{title}), oldOrder, viewport.getAlignment())); alignPanel.paintAlignment(true); } @@ -2690,28 +2698,28 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, // TODO: update this text for each release or centrally store it for // lite and application g.setFont(new Font("Helvetica", Font.BOLD, 14)); - g.drawString("JalviewLite - Release " + version, x, y += fh); + g.drawString(MessageManager.formatMessage("label.jalviewLite_release", new String[]{version}), x, y += fh); g.setFont(new Font("Helvetica", Font.BOLD, 12)); - g.drawString("Build date: " + builddate, x, y += fh); + g.drawString(MessageManager.formatMessage("label.jaview_build_date", new String[]{builddate}), x, y += fh); g.setFont(new Font("Helvetica", Font.PLAIN, 12)); g.drawString( - "Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui,", + MessageManager.getString("label.jalview_authors_1"), x, y += fh * 1.5); - g.drawString("Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.", x + 50, y += fh+8); + g.drawString(MessageManager.getString("label.jalview_authors_2"), x + 50, y += fh+8); g.drawString( - "Development managed by The Barton Group, University of Dundee, Scotland, UK.", + MessageManager.getString("label.jalview_dev_managers"), x, y += fh); g.drawString( - "For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list", + MessageManager.getString("label.jalview_distribution_lists"), x, y += fh); - g.drawString("If you use Jalview, please cite:", x, y += fh + 8); + g.drawString(MessageManager.getString("label.jalview_please_cite"), x, y += fh + 8); g.drawString( - "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)", + MessageManager.getString("label.jalview_cite_1_authors"), x, y += fh); g.drawString( - "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench", + MessageManager.getString("label.jalview_cite_1_title"), x, y += fh); - g.drawString("Bioinformatics doi: 10.1093/bioinformatics/btp033", + g.drawString(MessageManager.getString("label.jalview_cite_1_ref"), x, y += fh); } } @@ -2719,7 +2727,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, Frame frame = new Frame(); frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite .getBuildDate())); - jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580, 220); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.jalview"), 580, 220); } @@ -2740,33 +2748,33 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuBar alignFrameMenuBar = new MenuBar(); - Menu fileMenu = new Menu("File"); + Menu fileMenu = new Menu(MessageManager.getString("action.file")); - MenuItem loadApplication = new MenuItem("View in Full Application"); + MenuItem loadApplication = new MenuItem(MessageManager.getString("label.view_full_application")); - MenuItem loadTree = new MenuItem("Load Associated Tree ..."); + MenuItem loadTree = new MenuItem(MessageManager.getString("label.load_associated_tree")); - MenuItem loadAnnotations = new MenuItem("Load Features/Annotations ..."); + MenuItem loadAnnotations = new MenuItem(MessageManager.getString("label.load_features_annotations")); - MenuItem outputFeatures = new MenuItem("Export Features ..."); + MenuItem outputFeatures = new MenuItem(MessageManager.getString("label.export_features")); - MenuItem outputAnnotations = new MenuItem("Export Annotations ..."); + MenuItem outputAnnotations = new MenuItem(MessageManager.getString("label.export_annotations")); - MenuItem closeMenuItem = new MenuItem("Close"); + MenuItem closeMenuItem = new MenuItem(MessageManager.getString("action.close")); - Menu editMenu = new Menu("Edit"); + Menu editMenu = new Menu(MessageManager.getString("action.edit")); - Menu viewMenu = new Menu("View"); + Menu viewMenu = new Menu(MessageManager.getString("action.view")); - Menu colourMenu = new Menu("Colour"); + Menu colourMenu = new Menu(MessageManager.getString("action.colour")); - Menu calculateMenu = new Menu("Calculate"); + Menu calculateMenu = new Menu(MessageManager.getString("action.calculate")); - MenuItem selectAllSequenceMenuItem = new MenuItem("Select all"); + MenuItem selectAllSequenceMenuItem = new MenuItem(MessageManager.getString("action.select_all")); - MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All"); + MenuItem deselectAllSequenceMenuItem = new MenuItem(MessageManager.getString("action.deselect_all")); - MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection"); + MenuItem invertSequenceMenuItem = new MenuItem(MessageManager.getString("action.invert_selection")); MenuItem remove2LeftMenuItem = new MenuItem(); @@ -2822,6 +2830,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuItem purinePyrimidineColour = new MenuItem(); + MenuItem RNAInteractionColour = new MenuItem(); + MenuItem RNAHelixColour = new MenuItem(); MenuItem userDefinedColour = new MenuItem(); @@ -2842,7 +2852,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, CheckboxMenuItem displayNonconservedMenuItem = new CheckboxMenuItem(); - MenuItem alProperties = new MenuItem("Alignment Properties..."); + MenuItem alProperties = new MenuItem(MessageManager.getString("label.alignment_props")); MenuItem overviewMenuItem = new MenuItem(); @@ -2868,6 +2878,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuItem grpsFromSelection = new MenuItem(); + MenuItem createGroup = new MenuItem(); + + MenuItem unGroup = new MenuItem(); + MenuItem delete = new MenuItem(); MenuItem copy = new MenuItem(); @@ -2969,191 +2983,195 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, selectAllSequenceMenuItem.addActionListener(this); deselectAllSequenceMenuItem.addActionListener(this); invertSequenceMenuItem.addActionListener(this); - remove2LeftMenuItem.setLabel("Remove Left"); + remove2LeftMenuItem.setLabel(MessageManager.getString("action.remove_left")); remove2LeftMenuItem.addActionListener(this); - remove2RightMenuItem.setLabel("Remove Right"); + remove2RightMenuItem.setLabel(MessageManager.getString("action.remove_right")); remove2RightMenuItem.addActionListener(this); - removeGappedColumnMenuItem.setLabel("Remove Empty Columns"); + removeGappedColumnMenuItem.setLabel(MessageManager.getString("action.remove_empty_columns")); removeGappedColumnMenuItem.addActionListener(this); - removeAllGapsMenuItem.setLabel("Remove All Gaps"); + removeAllGapsMenuItem.setLabel(MessageManager.getString("action.remove_all_gaps")); removeAllGapsMenuItem.addActionListener(this); - viewBoxesMenuItem.setLabel("Boxes"); + viewBoxesMenuItem.setLabel(MessageManager.getString("action.boxes")); viewBoxesMenuItem.setState(true); viewBoxesMenuItem.addItemListener(this); - viewTextMenuItem.setLabel("Text"); + viewTextMenuItem.setLabel(MessageManager.getString("action.text")); viewTextMenuItem.setState(true); viewTextMenuItem.addItemListener(this); - sortPairwiseMenuItem.setLabel("by Pairwise Identity"); + sortPairwiseMenuItem.setLabel(MessageManager.getString("action.by_pairwise_id")); sortPairwiseMenuItem.addActionListener(this); - sortIDMenuItem.setLabel("by ID"); + sortIDMenuItem.setLabel(MessageManager.getString("action.by_id")); sortIDMenuItem.addActionListener(this); - sortLengthMenuItem.setLabel("by Length"); + sortLengthMenuItem.setLabel(MessageManager.getString("action.by_length")); sortLengthMenuItem.addActionListener(this); - sortGroupMenuItem.setLabel("by Group"); + sortGroupMenuItem.setLabel(MessageManager.getString("action.by_group")); sortGroupMenuItem.addActionListener(this); - removeRedundancyMenuItem.setLabel("Remove Redundancy..."); + removeRedundancyMenuItem.setLabel(MessageManager.getString("action.remove_redundancy")); removeRedundancyMenuItem.addActionListener(this); - pairwiseAlignmentMenuItem.setLabel("Pairwise Alignments..."); + pairwiseAlignmentMenuItem.setLabel(MessageManager.getString("action.pairwise_alignment")); pairwiseAlignmentMenuItem.addActionListener(this); - PCAMenuItem.setLabel("Principal Component Analysis"); + PCAMenuItem.setLabel(MessageManager.getString("label.principal_component_analysis")); PCAMenuItem.addActionListener(this); averageDistanceTreeMenuItem - .setLabel("Average Distance Using % Identity"); + .setLabel(MessageManager.getString("label.average_distance_identity")); averageDistanceTreeMenuItem.addActionListener(this); - neighbourTreeMenuItem.setLabel("Neighbour Joining Using % Identity"); + neighbourTreeMenuItem.setLabel(MessageManager.getString("label.neighbour_joining_identity")); neighbourTreeMenuItem.addActionListener(this); statusBar.setBackground(Color.white); statusBar.setFont(new java.awt.Font("Verdana", 0, 11)); - statusBar.setText("Status bar"); - outputTextboxMenu.setLabel("Output to Textbox"); - clustalColour.setLabel("Clustalx"); + statusBar.setText(MessageManager.getString("label.status_bar")); + outputTextboxMenu.setLabel(MessageManager.getString("label.out_to_textbox")); + clustalColour.setLabel(MessageManager.getString("label.clustalx")); clustalColour.addActionListener(this); - zappoColour.setLabel("Zappo"); + zappoColour.setLabel(MessageManager.getString("label.zappo")); zappoColour.addActionListener(this); - taylorColour.setLabel("Taylor"); + taylorColour.setLabel(MessageManager.getString("label.taylor")); taylorColour.addActionListener(this); - hydrophobicityColour.setLabel("Hydrophobicity"); + hydrophobicityColour.setLabel(MessageManager.getString("label.hydrophobicity")); hydrophobicityColour.addActionListener(this); - helixColour.setLabel("Helix Propensity"); + helixColour.setLabel(MessageManager.getString("label.helix_propensity")); helixColour.addActionListener(this); - strandColour.setLabel("Strand Propensity"); + strandColour.setLabel(MessageManager.getString("label.strand_propensity")); strandColour.addActionListener(this); - turnColour.setLabel("Turn Propensity"); + turnColour.setLabel(MessageManager.getString("label.turn_propensity")); turnColour.addActionListener(this); - buriedColour.setLabel("Buried Index"); + buriedColour.setLabel(MessageManager.getString("label.buried_index")); buriedColour.addActionListener(this); - purinePyrimidineColour.setLabel("Purine/Pyrimidine"); + purinePyrimidineColour.setLabel(MessageManager.getString("label.purine_pyrimidine")); purinePyrimidineColour.addActionListener(this); - RNAHelixColour.setLabel("by RNA Helices"); + RNAInteractionColour.setLabel(MessageManager.getString("label.rna_interaction")); + RNAInteractionColour.addActionListener(this); + RNAHelixColour.setLabel(MessageManager.getString("action.by_rna_helixes")); RNAHelixColour.addActionListener(this); - userDefinedColour.setLabel("User Defined..."); + userDefinedColour.setLabel(MessageManager.getString("action.user_defined")); userDefinedColour.addActionListener(this); - PIDColour.setLabel("Percentage Identity"); + PIDColour.setLabel(MessageManager.getString("label.percentage_identity")); PIDColour.addActionListener(this); - BLOSUM62Colour.setLabel("BLOSUM62 Score"); + BLOSUM62Colour.setLabel(MessageManager.getString("label.blosum62_score")); BLOSUM62Colour.addActionListener(this); - tcoffeeColour.setLabel("T-Coffee Scores"); + tcoffeeColour.setLabel(MessageManager.getString("label.tcoffee_scores")); tcoffeeColour.setEnabled(false); // it will enabled only if a score file is // provided tcoffeeColour.addActionListener(this); avDistanceTreeBlosumMenuItem - .setLabel("Average Distance Using BLOSUM62"); + .setLabel(MessageManager.getString("label.average_distance_bloslum62")); avDistanceTreeBlosumMenuItem.addActionListener(this); - njTreeBlosumMenuItem.setLabel("Neighbour Joining Using BLOSUM62"); + njTreeBlosumMenuItem.setLabel(MessageManager.getString("label.neighbour_blosum62")); njTreeBlosumMenuItem.addActionListener(this); - annotationPanelMenuItem.setLabel("Show Annotations"); + annotationPanelMenuItem.setLabel(MessageManager.getString("label.show_annotations")); annotationPanelMenuItem.addItemListener(this); - colourTextMenuItem.setLabel("Colour Text"); + colourTextMenuItem.setLabel(MessageManager.getString("label.colour_text")); colourTextMenuItem.addItemListener(this); - displayNonconservedMenuItem.setLabel("Show nonconserved"); + displayNonconservedMenuItem.setLabel(MessageManager.getString("label.show_non_conversed")); displayNonconservedMenuItem.addItemListener(this); alProperties.addActionListener(this); - overviewMenuItem.setLabel("Overview Window"); + overviewMenuItem.setLabel(MessageManager.getString("label.overview_window")); overviewMenuItem.addActionListener(this); undoMenuItem.setEnabled(false); - undoMenuItem.setLabel("Undo"); + undoMenuItem.setLabel(MessageManager.getString("action.undo")); undoMenuItem.addActionListener(this); redoMenuItem.setEnabled(false); - redoMenuItem.setLabel("Redo"); + redoMenuItem.setLabel(MessageManager.getString("action.redo")); redoMenuItem.addActionListener(this); - conservationMenuItem.setLabel("by Conservation"); + conservationMenuItem.setLabel(MessageManager.getString("action.by_conservation")); conservationMenuItem.addItemListener(this); - noColourmenuItem.setLabel("None"); + noColourmenuItem.setLabel(MessageManager.getString("label.none")); noColourmenuItem.addActionListener(this); - wrapMenuItem.setLabel("Wrap"); + wrapMenuItem.setLabel(MessageManager.getString("action.wrap")); wrapMenuItem.addItemListener(this); - renderGapsMenuItem.setLabel("Show Gaps"); + renderGapsMenuItem.setLabel(MessageManager.getString("action.show_gaps")); renderGapsMenuItem.setState(true); renderGapsMenuItem.addItemListener(this); - findMenuItem.setLabel("Find..."); + findMenuItem.setLabel(MessageManager.getString("action.find")); findMenuItem.addActionListener(this); - abovePIDThreshold.setLabel("Above Identity Threshold"); + abovePIDThreshold.setLabel(MessageManager.getString("label.above_identity_threshold")); abovePIDThreshold.addItemListener(this); - nucleotideColour.setLabel("Nucleotide"); + nucleotideColour.setLabel(MessageManager.getString("label.nucleotide")); nucleotideColour.addActionListener(this); - deleteGroups.setLabel("Undefine Groups"); + deleteGroups.setLabel(MessageManager.getString("action.undefine_groups")); deleteGroups.addActionListener(this); - grpsFromSelection.setLabel("Make Groups for selection"); + grpsFromSelection.setLabel(MessageManager.getString("action.make_groups_selection")); grpsFromSelection.addActionListener(this); - copy.setLabel("Copy"); + createGroup.setLabel(MessageManager.getString("action.create_group")); + unGroup.setLabel(MessageManager.getString("action.remove_group")); + copy.setLabel(MessageManager.getString("action.copy")); copy.addActionListener(this); - cut.setLabel("Cut"); + cut.setLabel(MessageManager.getString("action.cut")); cut.addActionListener(this); - delete.setLabel("Delete"); + delete.setLabel(MessageManager.getString("action.delete")); delete.addActionListener(this); - pasteMenu.setLabel("Paste"); - pasteNew.setLabel("To New Alignment"); + pasteMenu.setLabel(MessageManager.getString("action.paste")); + pasteNew.setLabel(MessageManager.getString("label.to_new_alignment")); pasteNew.addActionListener(this); - pasteThis.setLabel("Add To This Alignment"); + pasteThis.setLabel(MessageManager.getString("label.to_this_alignment")); pasteThis.addActionListener(this); - applyToAllGroups.setLabel("Apply Colour To All Groups"); + applyToAllGroups.setLabel(MessageManager.getString("label.apply_colour_to_all_groups")); applyToAllGroups.setState(true); applyToAllGroups.addItemListener(this); - font.setLabel("Font..."); + font.setLabel(MessageManager.getString("action.font")); font.addActionListener(this); - scaleAbove.setLabel("Scale Above"); + scaleAbove.setLabel(MessageManager.getString("action.scale_above")); scaleAbove.setState(true); scaleAbove.setEnabled(false); scaleAbove.addItemListener(this); scaleLeft.setEnabled(false); scaleLeft.setState(true); - scaleLeft.setLabel("Scale Left"); + scaleLeft.setLabel(MessageManager.getString("action.scale_left")); scaleLeft.addItemListener(this); scaleRight.setEnabled(false); scaleRight.setState(true); - scaleRight.setLabel("Scale Right"); + scaleRight.setLabel(MessageManager.getString("action.scale_right")); scaleRight.addItemListener(this); - modifyPID.setLabel("Modify Identity Threshold..."); + modifyPID.setLabel(MessageManager.getString("label.modify_identity_thereshold")); modifyPID.addActionListener(this); - modifyConservation.setLabel("Modify Conservation Threshold..."); + modifyConservation.setLabel(MessageManager.getString("label.modify_conservation_thereshold")); modifyConservation.addActionListener(this); - sortByTreeMenu.setLabel("By Tree Order"); - sort.setLabel("Sort"); - calculate.setLabel("Calculate Tree"); + sortByTreeMenu.setLabel(MessageManager.getString("action.by_tree_order")); + sort.setLabel(MessageManager.getString("action.sort")); + calculate.setLabel(MessageManager.getString("action.calculate_tree")); autoCalculate.addItemListener(this); sortByTree.addItemListener(this); - inputText.setLabel("Input from textbox"); + inputText.setLabel(MessageManager.getString("label.input_from_textbox")); inputText.addActionListener(this); - centreColumnLabelFlag.setLabel("Centre column labels"); + centreColumnLabelFlag.setLabel(MessageManager.getString("label.centre_column_labels")); centreColumnLabelFlag.addItemListener(this); - followMouseOverFlag.setLabel("Automatic Scrolling"); + followMouseOverFlag.setLabel(MessageManager.getString("label.automatic_scrolling")); followMouseOverFlag.addItemListener(this); - helpMenu.setLabel("Help"); - documentation.setLabel("Documentation"); + helpMenu.setLabel(MessageManager.getString("action.help")); + documentation.setLabel(MessageManager.getString("label.documentation")); documentation.addActionListener(this); - about.setLabel("About..."); + about.setLabel(MessageManager.getString("label.about")); about.addActionListener(this); seqLimits.setState(true); - seqLimits.setLabel("Show Sequence Limits"); + seqLimits.setLabel(MessageManager.getString("label.show_sequence_limits")); seqLimits.addItemListener(this); - featureSettings.setLabel("Feature Settings..."); + featureSettings.setLabel(MessageManager.getString("label.feature_settings")); featureSettings.addActionListener(this); - sequenceFeatures.setLabel("Sequence Features"); + sequenceFeatures.setLabel(MessageManager.getString("label.sequence_features")); sequenceFeatures.addItemListener(this); sequenceFeatures.setState(false); - annotationColour.setLabel("by Annotation..."); + annotationColour.setLabel(MessageManager.getString("action.by_annotation")); annotationColour.addActionListener(this); - invertSequenceMenuItem.setLabel("Invert Sequence Selection"); - invertColSel.setLabel("Invert Column Selection"); - menu1.setLabel("Show"); - showColumns.setLabel("All Columns "); - showSeqs.setLabel("All Sequences"); - menu2.setLabel("Hide"); - hideColumns.setLabel("Selected Columns"); - hideSequences.setLabel("Selected Sequences"); - hideAllButSelection.setLabel("All but Selected Region (Shift+Ctrl+H)"); - hideAllSelection.setLabel("Selected Region"); - showAllHidden.setLabel("All Sequences and Columns"); - showGroupConsensus.setLabel("Group Consensus"); - showGroupConservation.setLabel("Group Conservation"); - showConsensusHistogram.setLabel("Show Consensus Histogram"); - showSequenceLogo.setLabel("Show Consensus Logo"); - normSequenceLogo.setLabel("Normalise Consensus Logo"); - applyAutoAnnotationSettings.setLabel("Apply to all groups"); + invertSequenceMenuItem.setLabel(MessageManager.getString("action.invert_sequence_selection")); + invertColSel.setLabel(MessageManager.getString("action.invert_column_selection")); + menu1.setLabel(MessageManager.getString("action.show")); + showColumns.setLabel(MessageManager.getString("label.all_columns")); + showSeqs.setLabel(MessageManager.getString("label.all_sequences")); + menu2.setLabel(MessageManager.getString("aciton.hide")); + hideColumns.setLabel(MessageManager.getString("label.selected_columns")); + hideSequences.setLabel(MessageManager.getString("label.selected_sequences")); + hideAllButSelection.setLabel(MessageManager.getString("label.all_but_selected_region")); + hideAllSelection.setLabel(MessageManager.getString("label.selected_region")); + showAllHidden.setLabel(MessageManager.getString("label.all_sequences_columns")); + showGroupConsensus.setLabel(MessageManager.getString("label.group_consensus")); + showGroupConservation.setLabel(MessageManager.getString("label.group_conservation")); + showConsensusHistogram.setLabel(MessageManager.getString("label.show_consensus_histogram")); + showSequenceLogo.setLabel(MessageManager.getString("label.show_consensus_logo")); + normSequenceLogo.setLabel(MessageManager.getString("label.norm_consensus_logo")); + applyAutoAnnotationSettings.setLabel(MessageManager.getString("label.apply_all_groups")); applyAutoAnnotationSettings.setState(true); - autoAnnMenu.setLabel("Autocalculated Annotation"); + autoAnnMenu.setLabel(MessageManager.getString("label.autocalculated_annotation")); invertColSel.addActionListener(this); showColumns.addActionListener(this); @@ -3170,9 +3188,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, normSequenceLogo.addItemListener(this); applyAutoAnnotationSettings.addItemListener(this); - formatMenu.setLabel("Format"); - selectMenu.setLabel("Select"); - newView.setLabel("New View"); + formatMenu.setLabel(MessageManager.getString("action.format")); + selectMenu.setLabel(MessageManager.getString("action.select")); + newView.setLabel(MessageManager.getString("action.new_view")); newView.addActionListener(this); alignFrameMenuBar.add(fileMenu); alignFrameMenuBar.add(editMenu); @@ -3249,6 +3267,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, colourMenu.add(buriedColour); colourMenu.add(nucleotideColour); colourMenu.add(purinePyrimidineColour); + // colourMenu.add(RNAInteractionColour); colourMenu.add(tcoffeeColour); colourMenu.add(userDefinedColour); colourMenu.addSeparator(); @@ -3304,6 +3323,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, selectMenu.add(deselectAllSequenceMenuItem); selectMenu.add(invertSequenceMenuItem); selectMenu.add(invertColSel); + selectMenu.add(createGroup); + selectMenu.add(unGroup); selectMenu.add(grpsFromSelection); selectMenu.add(deleteGroups); diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index cc04b58..9e4f071 100644 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -91,8 +91,6 @@ public class AlignViewport extends AlignmentViewport implements public jalview.bin.JalviewLite applet; - Hashtable sequenceColours; - boolean MAC = false; Stack historyList = new Stack(); @@ -592,35 +590,6 @@ public class AlignViewport extends AlignmentViewport implements showHiddenMarkers = show; } - public Color getSequenceColour(SequenceI seq) - { - if (sequenceColours == null || !sequenceColours.containsKey(seq)) - { - return Color.white; - } - else - { - return (Color) sequenceColours.get(seq); - } - } - - public void setSequenceColour(SequenceI seq, Color col) - { - if (sequenceColours == null) - { - sequenceColours = new Hashtable(); - } - - if (col == null) - { - sequenceColours.remove(seq); - } - else - { - sequenceColours.put(seq, col); - } - } - boolean centreColumnLabels; public boolean getCentreColumnLabels() @@ -628,21 +597,6 @@ public class AlignViewport extends AlignmentViewport implements return centreColumnLabels; } - public void updateSequenceIdColours() - { - - for (SequenceGroup sg : alignment.getGroups()) - { - if (sg.idColour != null) - { - for (SequenceI s : sg.getSequences(getHiddenRepSequences())) - { - this.setSequenceColour(s, sg.idColour); - } - } - } - } - public boolean followHighlight = true; public boolean getFollowHighlight() diff --git a/src/jalview/appletgui/AnnotationColourChooser.java b/src/jalview/appletgui/AnnotationColourChooser.java old mode 100755 new mode 100644 index d26680d..3c0f704 --- a/src/jalview/appletgui/AnnotationColourChooser.java +++ b/src/jalview/appletgui/AnnotationColourChooser.java @@ -24,6 +24,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.util.MessageManager; public class AnnotationColourChooser extends Panel implements ActionListener, AdjustmentListener, ItemListener, MouseListener @@ -80,18 +81,19 @@ public class AnnotationColourChooser extends Panel implements setDefaultMinMax(); + adjusting = true; if (oldcs instanceof AnnotationColourGradient) { AnnotationColourGradient acg = (AnnotationColourGradient) oldcs; - currentColours.setState(acg.predefinedColours); - if (!acg.predefinedColours) + currentColours.setState(acg.isPredefinedColours() || acg.getBaseColour()!=null); + if (!acg.isPredefinedColours() && acg.getBaseColour()==null) { minColour.setBackground(acg.getMinColour()); maxColour.setBackground(acg.getMaxColour()); } + // seqAssociated.setState(acg.isSeqAssociated()); } - adjusting = true; Vector list = new Vector(); int index = 1; @@ -142,7 +144,7 @@ public class AnnotationColourChooser extends Panel implements frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "Colour by Annotation", 560, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.colour_by_annotation"), 560, 175); validate(); } @@ -170,21 +172,21 @@ public class AnnotationColourChooser extends Panel implements private void jbInit() throws Exception { minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - minColour.setLabel("Min Colour"); + minColour.setLabel(MessageManager.getString("label.min_colour")); minColour.addActionListener(this); maxColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - maxColour.setLabel("Max Colour"); + maxColour.setLabel(MessageManager.getString("label.max_colour")); maxColour.addActionListener(this); thresholdIsMin.addItemListener(this); - ok.setLabel("OK"); + ok.setLabel(MessageManager.getString("action.ok")); ok.addActionListener(this); - cancel.setLabel("Cancel"); + cancel.setLabel(MessageManager.getString("action.cancel")); cancel.addActionListener(this); - defColours.setLabel("Defaults"); + defColours.setLabel(MessageManager.getString("action.set_defaults")); defColours.addActionListener(this); annotations.addItemListener(this); @@ -197,11 +199,11 @@ public class AnnotationColourChooser extends Panel implements thresholdValue.setEnabled(false); thresholdValue.setColumns(5); currentColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - currentColours.setLabel("Use Original Colours"); + currentColours.setLabel(MessageManager.getString("label.use_original_colours")); currentColours.addItemListener(this); thresholdIsMin.setBackground(Color.white); - thresholdIsMin.setLabel("Threshold is min/max"); + thresholdIsMin.setLabel(MessageManager.getString("label.threshold_minmax")); this.setLayout(borderLayout1); @@ -457,13 +459,14 @@ public class AnnotationColourChooser extends Panel implements if (currentAnnotation.graphMin == 0f && currentAnnotation.graphMax == 0f) { - acg.predefinedColours = true; + acg.setPredefinedColours(true); } acg.thresholdIsMinMax = thresholdIsMin.getState(); av.setGlobalColourScheme(acg); + // TODO: per group colour propagation not always desired if (av.getAlignment().getGroups() != null) { for (SequenceGroup sg : ap.av.getAlignment().getGroups()) @@ -490,6 +493,7 @@ public class AnnotationColourChooser extends Panel implements } // update colours in linked windows + ap.alignmentChanged(); ap.paintAlignment(true); } diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index 3d54ae1..a4b7af2 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -23,6 +23,7 @@ import java.awt.*; import java.awt.event.*; import jalview.datamodel.*; +import jalview.util.MessageManager; import jalview.util.ParseHtmlBodyAndLinks; public class AnnotationLabels extends Panel implements ActionListener, @@ -405,7 +406,7 @@ public class AnnotationLabels extends Panel implements ActionListener, if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) { - PopupMenu popup = new PopupMenu("Annotations"); + PopupMenu popup = new PopupMenu(MessageManager.getString("label.annotations")); MenuItem item = new MenuItem(ADDNEW); item.addActionListener(this); @@ -765,8 +766,8 @@ public class AnnotationLabels extends Panel implements ActionListener, if (!av.wrapAlignment && ((aa == null) || (aa.length < 1))) { g.setColor(Color.black); - g.drawString("Right click", 2, 8); - g.drawString("to add annotation", 2, 18); + g.drawString(MessageManager.getString("label.right_click"), 2, 8); + g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18); } } } diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 154652d..7129eee 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -25,6 +25,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.renderer.AnnotationRenderer; import jalview.renderer.AwtRenderPanelI; +import jalview.util.MessageManager; public class AnnotationPanel extends Panel implements AwtRenderPanelI, AdjustmentListener, ActionListener, MouseListener, @@ -317,7 +318,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, return; } - PopupMenu pop = new PopupMenu("Structure type"); + PopupMenu pop = new PopupMenu(MessageManager.getString("label.structure_type")); MenuItem item; /* * Just display the needed structure options @@ -618,7 +619,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, g.setColor(Color.black); if (av.validCharWidth) { - g.drawString("Alignment has no annotations", 20, 15); + g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15); } return; diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index a3dbe22..e109ae8 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -27,51 +27,52 @@ import jalview.structure.*; import jalview.io.*; import jalview.schemes.*; +import jalview.util.MessageManager; public class AppletJmol extends EmbmenuFrame implements // StructureListener, KeyListener, ActionListener, ItemListener, SequenceStructureBinding { - Menu fileMenu = new Menu("File"); + Menu fileMenu = new Menu(MessageManager.getString("action.file")); - Menu viewMenu = new Menu("View"); + Menu viewMenu = new Menu(MessageManager.getString("action.view")); - Menu coloursMenu = new Menu("Colours"); + Menu coloursMenu = new Menu(MessageManager.getString("action.colour")); - Menu chainMenu = new Menu("Show Chain"); + Menu chainMenu = new Menu(MessageManager.getString("action.show_chain")); - Menu helpMenu = new Menu("Help"); + Menu helpMenu = new Menu(MessageManager.getString("action.help")); - MenuItem mappingMenuItem = new MenuItem("View Mapping"); + MenuItem mappingMenuItem = new MenuItem(MessageManager.getString("label.view_mapping")); - CheckboxMenuItem seqColour = new CheckboxMenuItem("By Sequence", true); + CheckboxMenuItem seqColour = new CheckboxMenuItem(MessageManager.getString("action.by_sequence"), true); - CheckboxMenuItem jmolColour = new CheckboxMenuItem("Using Jmol", false); + CheckboxMenuItem jmolColour = new CheckboxMenuItem(MessageManager.getString("action.using_jmol"), false); - MenuItem chain = new MenuItem("By Chain"); + MenuItem chain = new MenuItem(MessageManager.getString("action.by_chain")); - MenuItem charge = new MenuItem("Charge & Cysteine"); + MenuItem charge = new MenuItem(MessageManager.getString("label.charge_cysteine")); - MenuItem zappo = new MenuItem("Zappo"); + MenuItem zappo = new MenuItem(MessageManager.getString("label.zappo")); - MenuItem taylor = new MenuItem("Taylor"); + MenuItem taylor = new MenuItem(MessageManager.getString("label.taylor")); - MenuItem hydro = new MenuItem("Hydrophobicity"); + MenuItem hydro = new MenuItem(MessageManager.getString("label.hydrophobicity")); - MenuItem helix = new MenuItem("Helix Propensity"); + MenuItem helix = new MenuItem(MessageManager.getString("label.helix_propensity")); - MenuItem strand = new MenuItem("Strand Propensity"); + MenuItem strand = new MenuItem(MessageManager.getString("label.strand_propensity")); - MenuItem turn = new MenuItem("Turn Propensity"); + MenuItem turn = new MenuItem(MessageManager.getString("label.turn_propensity")); - MenuItem buried = new MenuItem("Buried Index"); + MenuItem buried = new MenuItem(MessageManager.getString("label.buried_index")); - MenuItem purinepyrimidine = new MenuItem("Purine/Pyrimidine"); + MenuItem purinepyrimidine = new MenuItem(MessageManager.getString("label.purine_pyrimidine")); - MenuItem user = new MenuItem("User Defined Colours"); + MenuItem user = new MenuItem(MessageManager.getString("label.user_defined_colours")); - MenuItem jmolHelp = new MenuItem("Jmol Help"); + MenuItem jmolHelp = new MenuItem(MessageManager.getString("label.jmol_help")); Panel scriptWindow; @@ -328,7 +329,7 @@ public class AppletJmol extends EmbmenuFrame implements { chainMenu.removeAll(); - MenuItem menuItem = new MenuItem("All"); + MenuItem menuItem = new MenuItem(MessageManager.getString("label.all")); menuItem.addActionListener(this); chainMenu.add(menuItem); @@ -396,7 +397,7 @@ public class AppletJmol extends EmbmenuFrame implements .println("Out of memory when trying to create dialog box with sequence-structure mapping."); return; } - jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping", + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pdb_sequence_mapping"), 550, 600); } else if (evt.getSource() == charge) @@ -615,7 +616,7 @@ public class AppletJmol extends EmbmenuFrame implements g.fillRect(0, 0, currentSize.width, currentSize.height); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Retrieving PDB data....", 20, currentSize.height / 2); + g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2); } else { diff --git a/src/jalview/appletgui/CutAndPasteTransfer.java b/src/jalview/appletgui/CutAndPasteTransfer.java old mode 100755 new mode 100644 index c7a49f3..8e758e6 --- a/src/jalview/appletgui/CutAndPasteTransfer.java +++ b/src/jalview/appletgui/CutAndPasteTransfer.java @@ -23,6 +23,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.io.*; import jalview.schemes.TCoffeeColourScheme; +import jalview.util.MessageManager; public class CutAndPasteTransfer extends Panel implements ActionListener, MouseListener @@ -68,7 +69,7 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, public void setPDBImport(Sequence seq) { this.seq = seq; - accept.setLabel("Accept"); + accept.setLabel(MessageManager.getString("action.accept")); addSequences.setVisible(false); pdbImport = true; } @@ -76,14 +77,14 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, public void setTreeImport() { treeImport = true; - accept.setLabel("Accept"); + accept.setLabel(MessageManager.getString("action.accept")); addSequences.setVisible(false); } public void setAnnotationImport() { annotationImport = true; - accept.setLabel("Accept"); + accept.setLabel(MessageManager.getString("action.accept")); addSequences.setVisible(false); } @@ -153,7 +154,7 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, { // TODO: JAL-1102 - should have a warning message in dialog, not simply // overwrite the broken input data with the exception - textarea.setText("Could not parse Newick file!\n" + ex); + textarea.setText(MessageManager.formatMessage("label.could_not_parse_newick_file", new String[]{ex.getMessage()})); return; } } @@ -174,14 +175,12 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, alignFrame.changeColour(new TCoffeeColourScheme( alignFrame.viewport.getAlignment())); alignFrame.statusBar - .setText("Successfully pasted T-Coffee scores to alignment."); + .setText(MessageManager.getString("label.successfully_pasted_tcoffee_scores_to_alignment")); } else { // file valid but didn't get added to alignment for some reason - alignFrame.statusBar.setText("Failed to add T-Coffee scores: " - + (tcf.getWarningMessage() != null ? tcf - .getWarningMessage() : "")); + alignFrame.statusBar.setText(MessageManager.formatMessage("label.failed_add_tcoffee_scores", new String[]{(tcf.getWarningMessage() != null ? tcf.getWarningMessage() : "")})); } } else @@ -236,13 +235,13 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, { AlignFrame af = new AlignFrame(al, alignFrame.viewport.applet, "Cut & Paste input - " + format, false); - af.statusBar.setText("Successfully pasted alignment file"); + af.statusBar.setText(MessageManager.getString("label.successfully_pasted_annotation_to_alignment")); } else { alignFrame.addSequences(al.getSequencesArray()); alignFrame.statusBar - .setText("Successfully pasted alignment file"); + .setText(MessageManager.getString("label.successfully_pasted_alignment_file")); } } } @@ -286,7 +285,7 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, private void jbInit() throws Exception { textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 10)); - textarea.setText("Paste your alignment file here"); + textarea.setText(MessageManager.getString("label.paste_your_alignment_file")); textarea.addMouseListener(this); this.setLayout(borderLayout1); accept.addActionListener(this); @@ -301,7 +300,7 @@ public class CutAndPasteTransfer extends Panel implements ActionListener, public void mousePressed(MouseEvent evt) { - if (textarea.getText().startsWith("Paste your")) + if (textarea.getText().startsWith(MessageManager.getString("label.paste_your"))) { textarea.setText(""); } diff --git a/src/jalview/appletgui/FeatureColourChooser.java b/src/jalview/appletgui/FeatureColourChooser.java index 235e82c..c36d680 100644 --- a/src/jalview/appletgui/FeatureColourChooser.java +++ b/src/jalview/appletgui/FeatureColourChooser.java @@ -24,6 +24,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.util.MessageManager; public class FeatureColourChooser extends Panel implements ActionListener, AdjustmentListener, ItemListener, MouseListener @@ -143,7 +144,7 @@ public class FeatureColourChooser extends Panel implements ActionListener, private void jbInit() throws Exception { - Label minLabel = new Label("Min:"), maxLabel = new Label("Max:"); + Label minLabel = new Label(MessageManager.getString("label.min")), maxLabel = new Label(MessageManager.getString("label.max")); minLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); maxLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); // minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); @@ -182,11 +183,11 @@ public class FeatureColourChooser extends Panel implements ActionListener, jPanel3.setBackground(Color.white); colourFromLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - colourFromLabel.setLabel("Colour by Label"); + colourFromLabel.setLabel(MessageManager.getString("label.colour_by_label")); colourFromLabel.setSize(new Dimension(139, 22)); // threshold.setBounds(new Rectangle(11, 3, 139, 22)); thresholdIsMin.setBackground(Color.white); - thresholdIsMin.setLabel("Threshold is min/max"); + thresholdIsMin.setLabel(MessageManager.getString("label.threshold_minmax")); thresholdIsMin.setSize(new Dimension(135, 23)); // thresholdIsMin.setBounds(new Rectangle(328, 3, 135, 23)); jPanel1.add(minLabel); diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java old mode 100755 new mode 100644 index dd236bd..a14c321 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -26,6 +26,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.schemes.AnnotationColourGradient; import jalview.schemes.GraduatedColor; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -194,7 +195,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer g.setColor(Color.black); Font f = new Font("Verdana", Font.PLAIN, 10); g.setFont(f); - g.drawString("Label", 0, 0); + g.drawString(MessageManager.getString("label.label"), 0, 0); } else { @@ -364,7 +365,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer } else { - dialog.ok.setLabel("Amend"); + dialog.ok.setLabel(MessageManager.getString("label.amend")); dialog.buttonPanel.add(deleteButton, 1); deleteButton.addActionListener(new ActionListener() { diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index db7d9b3..267a251 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -27,6 +27,7 @@ import jalview.commands.OrderCommand; import jalview.datamodel.*; import jalview.schemes.AnnotationColourGradient; import jalview.schemes.GraduatedColor; +import jalview.util.MessageManager; public class FeatureSettings extends Panel implements ItemListener, MouseListener, MouseMotionListener, ActionListener, @@ -146,16 +147,16 @@ public class FeatureSettings extends Panel implements ItemListener, height = Math.max(200, height); height = Math.min(400, height); int width = 300; - jalview.bin.JalviewLite.addFrame(frame, "Feature Settings", width, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.feature_settings"), width, height); } public void paint(Graphics g) { g.setColor(Color.black); - g.drawString("No Features added to this alignment!!", 10, 20); - g.drawString("(Features can be added from searches or", 10, 40); - g.drawString("from Jalview / GFF features files)", 10, 60); + g.drawString(MessageManager.getString("label.no_features_added_to_this_alignment"), 10, 20); + g.drawString(MessageManager.getString("label.features_can_be_added_from_searches_1"), 10, 40); + g.drawString(MessageManager.getString("label.features_can_be_added_from_searches_2"), 10, 60); } protected void popupSort(final MyCheckbox check, final Hashtable minmax, @@ -163,8 +164,8 @@ public class FeatureSettings extends Panel implements ItemListener, { final String type = check.type; final Object typeCol = fr.getFeatureStyle(type); - java.awt.PopupMenu men = new PopupMenu("Settings for " + type); - java.awt.MenuItem scr = new MenuItem("Sort by Score"); + java.awt.PopupMenu men = new PopupMenu(MessageManager.formatMessage("label.settings_for_type", new String[]{type})); + java.awt.MenuItem scr = new MenuItem(MessageManager.getString("label.sort_by_score")); men.add(scr); final FeatureSettings me = this; scr.addActionListener(new ActionListener() @@ -177,7 +178,7 @@ public class FeatureSettings extends Panel implements ItemListener, } }); - MenuItem dens = new MenuItem("Sort by Density"); + MenuItem dens = new MenuItem(MessageManager.getString("label.sort_by_density")); dens.addActionListener(new ActionListener() { diff --git a/src/jalview/appletgui/Finder.java b/src/jalview/appletgui/Finder.java old mode 100755 new mode 100644 index 7722461..93ab314 --- a/src/jalview/appletgui/Finder.java +++ b/src/jalview/appletgui/Finder.java @@ -23,6 +23,7 @@ import java.awt.*; import java.awt.event.*; import jalview.datamodel.*; +import jalview.util.MessageManager; public class Finder extends Panel implements ActionListener { @@ -53,7 +54,7 @@ public class Finder extends Panel implements ActionListener this.ap = ap; frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "Find", 340, 120); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.find"), 340, 120); frame.repaint(); frame.addWindowListener(new WindowAdapter() { @@ -163,7 +164,7 @@ public class Finder extends Panel implements ActionListener // 'SelectRegion' selection if (!haveResults) { - ap.alignFrame.statusBar.setText("Finished searching."); + ap.alignFrame.statusBar.setText(MessageManager.getString("label.finished_searching")); resIndex = -1; seqIndex = 0; } @@ -182,14 +183,13 @@ public class Finder extends Panel implements ActionListener { message += searchResults.getSize() + " subsequence matches."; } - ap.alignFrame.statusBar.setText("Search results: " + searchString - + " : " + message); + ap.alignFrame.statusBar.setText(MessageManager.formatMessage("label.search_results", new String[] {searchString, message})); } else { // TODO: indicate sequence and matching position in status bar - ap.alignFrame.statusBar.setText("Found match for " + searchString); + ap.alignFrame.statusBar.setText(MessageManager.formatMessage("label.found_match_for", new String[]{searchString})); } } } @@ -213,7 +213,7 @@ public class Finder extends Panel implements ActionListener private void jbInit() throws Exception { jLabel1.setFont(new java.awt.Font("Verdana", 0, 12)); - jLabel1.setText("Find"); + jLabel1.setText(MessageManager.getString("action.find")); jLabel1.setBounds(new Rectangle(3, 30, 34, 15)); this.setLayout(null); textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); @@ -228,11 +228,11 @@ public class Finder extends Panel implements ActionListener }); textfield.addActionListener(this); findAll.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); - findAll.setLabel("Find all"); + findAll.setLabel(MessageManager.getString("action.find_all")); findAll.addActionListener(this); findNext.setEnabled(false); findNext.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); - findNext.setLabel("Find Next"); + findNext.setLabel(MessageManager.getString("action.find_next")); findNext.addActionListener(this); jPanel1.setBounds(new Rectangle(180, 5, 141, 64)); jPanel1.setLayout(gridLayout1); @@ -241,9 +241,9 @@ public class Finder extends Panel implements ActionListener gridLayout1.setVgap(2); createNewGroup.setEnabled(false); createNewGroup.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); - createNewGroup.setLabel("New Feature"); + createNewGroup.setLabel(MessageManager.getString("label.new_feature")); createNewGroup.addActionListener(this); - caseSensitive.setLabel("Match Case"); + caseSensitive.setLabel(MessageManager.getString("label.match_case")); caseSensitive.setBounds(new Rectangle(40, 49, 126, 23)); jPanel1.add(findNext, null); jPanel1.add(findAll, null); diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java old mode 100755 new mode 100644 index 5df659b..7de8789 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -17,6 +17,8 @@ */ package jalview.appletgui; +import jalview.util.MessageManager; + import java.awt.*; import java.awt.event.*; @@ -87,7 +89,7 @@ public class FontChooser extends Panel implements ActionListener, Frame frame = new Frame(); this.frame = frame; frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "Change Font", 440, 115); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.change_font"), 440, 115); init = false; } @@ -272,7 +274,7 @@ public class FontChooser extends Panel implements ActionListener, { label1.setFont(new java.awt.Font("Verdana", 0, 11)); label1.setAlignment(Label.RIGHT); - label1.setText("Font: "); + label1.setText(MessageManager.getString("label.font")); this.setLayout(borderLayout4); fontSize.setFont(new java.awt.Font("Verdana", 0, 11)); fontSize.addItemListener(this); @@ -280,17 +282,17 @@ public class FontChooser extends Panel implements ActionListener, fontStyle.addItemListener(this); label2.setAlignment(Label.RIGHT); label2.setFont(new java.awt.Font("Verdana", 0, 11)); - label2.setText("Size: "); + label2.setText(MessageManager.getString("label.size")); label3.setAlignment(Label.RIGHT); label3.setFont(new java.awt.Font("Verdana", 0, 11)); - label3.setText("Style: "); + label3.setText(MessageManager.getString("label.style")); fontName.setFont(new java.awt.Font("Verdana", 0, 11)); fontName.addItemListener(this); ok.setFont(new java.awt.Font("Verdana", 0, 11)); - ok.setLabel("OK"); + ok.setLabel(MessageManager.getString("action.ok")); ok.addActionListener(this); cancel.setFont(new java.awt.Font("Verdana", 0, 11)); - cancel.setLabel("Cancel"); + cancel.setLabel(MessageManager.getString("action.cancel")); cancel.addActionListener(this); this.setBackground(Color.white); panel1.setLayout(borderLayout1); diff --git a/src/jalview/appletgui/PCAPanel.java b/src/jalview/appletgui/PCAPanel.java old mode 100755 new mode 100644 index 9ddb132..bcd3634 --- a/src/jalview/appletgui/PCAPanel.java +++ b/src/jalview/appletgui/PCAPanel.java @@ -21,6 +21,7 @@ import java.awt.*; import java.awt.event.*; import jalview.datamodel.*; +import jalview.util.MessageManager; import jalview.viewmodel.PCAModel; public class PCAPanel extends EmbmenuFrame implements Runnable, @@ -83,7 +84,7 @@ public class PCAPanel extends EmbmenuFrame implements Runnable, embedMenuIfNeeded(rc); add(rc, BorderLayout.CENTER); - jalview.bin.JalviewLite.addFrame(this, "Principal component analysis", + jalview.bin.JalviewLite.addFrame(this, MessageManager.getString("label.principal_component_analysis"), 475, 400); Thread worker = new Thread(this); @@ -217,7 +218,7 @@ public class PCAPanel extends EmbmenuFrame implements Runnable, CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "PCA details", 500, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pca_details"), 500, 500); cap.setText(pcaModel.getDetails()); } @@ -314,20 +315,20 @@ public class PCAPanel extends EmbmenuFrame implements Runnable, xCombobox.setFont(new java.awt.Font("Verdana", 0, 12)); xCombobox.addItemListener(this); resetButton.setFont(new java.awt.Font("Verdana", 0, 12)); - resetButton.setLabel("Reset"); + resetButton.setLabel(MessageManager.getString("action.reset")); resetButton.addActionListener(this); this.setMenuBar(menuBar1); - menu1.setLabel("File"); - menu2.setLabel("View"); - calcSettings.setLabel("Change Parameters"); - labels.setLabel("Labels"); + menu1.setLabel(MessageManager.getString("action.file")); + menu2.setLabel(MessageManager.getString("action.view")); + calcSettings.setLabel(MessageManager.getString("action.change_params")); + labels.setLabel(MessageManager.getString("label.labels")); labels.addItemListener(this); - values.setLabel("Output Values..."); + values.setLabel(MessageManager.getString("label.output_values")); values.addActionListener(this); - inputData.setLabel("Input Data..."); - nuclSetting.setLabel("Nucleotide matrix"); + inputData.setLabel(MessageManager.getString("label.input_data")); + nuclSetting.setLabel(MessageManager.getString("label.nucleotide_matrix")); nuclSetting.addItemListener(this); - protSetting.setLabel("Protein matrix"); + protSetting.setLabel(MessageManager.getString("label.protein_matrix")); protSetting.addItemListener(this); this.add(jPanel2, BorderLayout.SOUTH); jPanel2.add(jLabel1, null); diff --git a/src/jalview/appletgui/PairwiseAlignPanel.java b/src/jalview/appletgui/PairwiseAlignPanel.java old mode 100755 new mode 100644 index 8841864..a377892 --- a/src/jalview/appletgui/PairwiseAlignPanel.java +++ b/src/jalview/appletgui/PairwiseAlignPanel.java @@ -24,6 +24,7 @@ import java.awt.event.*; import jalview.analysis.*; import jalview.datamodel.*; +import jalview.util.MessageManager; public class PairwiseAlignPanel extends Panel implements ActionListener { @@ -160,7 +161,7 @@ public class PairwiseAlignPanel extends Panel implements ActionListener textarea.setFont(new java.awt.Font("Monospaced", 0, 12)); textarea.setText(""); viewInEditorButton.setFont(new java.awt.Font("Verdana", 0, 12)); - viewInEditorButton.setLabel("View in alignment editor"); + viewInEditorButton.setLabel(MessageManager.getString("label.view_alignment_editor")); viewInEditorButton.addActionListener(this); this.add(scrollPane, BorderLayout.CENTER); scrollPane.add(textarea); diff --git a/src/jalview/appletgui/RedundancyPanel.java b/src/jalview/appletgui/RedundancyPanel.java old mode 100755 new mode 100644 index ef00017..d91e53b --- a/src/jalview/appletgui/RedundancyPanel.java +++ b/src/jalview/appletgui/RedundancyPanel.java @@ -25,6 +25,7 @@ import java.awt.event.*; import jalview.analysis.AlignSeq; import jalview.commands.*; import jalview.datamodel.*; +import jalview.util.MessageManager; public class RedundancyPanel extends SliderPanel implements Runnable, WindowListener @@ -49,7 +50,7 @@ public class RedundancyPanel extends SliderPanel implements Runnable, applyButton.setVisible(true); allGroupsCheck.setVisible(false); - label.setText("Enter the redundancy threshold"); + label.setText(MessageManager.getString("label.enter_redundancy_threshold")); valueField.setText("100"); slider.setVisibleAmount(1); @@ -69,7 +70,7 @@ public class RedundancyPanel extends SliderPanel implements Runnable, frame = new Frame(); frame.add(this); jalview.bin.JalviewLite.addFrame(frame, - "Redundancy threshold selection", 400, 100); + MessageManager.getString("label.redundancy_threshold_selection"), 400, 100); frame.addWindowListener(this); @@ -91,7 +92,7 @@ public class RedundancyPanel extends SliderPanel implements Runnable, */ public void run() { - label.setText("Calculating...."); + label.setText(MessageManager.getString("label.calculating")); slider.setVisible(false); applyButton.setEnabled(false); @@ -123,7 +124,7 @@ public class RedundancyPanel extends SliderPanel implements Runnable, redundancy = AlignSeq.computeRedundancyMatrix(originalSequences, omitHidden, start, end, false); - label.setText("Enter the redundancy threshold"); + label.setText(MessageManager.getString("label.enter_redundancy_threshold")); slider.setVisible(true); applyButton.setEnabled(true); valueField.setVisible(true); diff --git a/src/jalview/appletgui/RotatableCanvas.java b/src/jalview/appletgui/RotatableCanvas.java index e8294ba..86d06d9 100755 --- a/src/jalview/appletgui/RotatableCanvas.java +++ b/src/jalview/appletgui/RotatableCanvas.java @@ -316,7 +316,7 @@ public class RotatableCanvas extends Panel implements MouseListener, if (points == null) { g.setFont(new Font("Verdana", Font.PLAIN, 18)); - g.drawString("Calculating PCA....", 20, getSize().height / 2); + g.drawString(MessageManager.getString("label.calculating_pca") + "....", 20, getSize().height / 2); } else { diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index baa4165..cd78fab 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -21,6 +21,7 @@ import java.awt.*; import java.awt.event.*; import jalview.datamodel.*; +import jalview.util.MessageManager; public class ScalePanel extends Panel implements MouseMotionListener, MouseListener @@ -76,7 +77,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, PopupMenu pop = new PopupMenu(); if (reveal != null) { - MenuItem item = new MenuItem("Reveal"); + MenuItem item = new MenuItem(MessageManager.getString("label.reveal")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -94,7 +95,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, if (av.getColumnSelection().getHiddenColumns().size() > 1) { - item = new MenuItem("Reveal All"); + item = new MenuItem(MessageManager.getString("action.reveal_all")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -115,7 +116,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, } else if (av.getColumnSelection().contains(res)) { - MenuItem item = new MenuItem("Hide Columns"); + MenuItem item = new MenuItem(MessageManager.getString("label.hide_columns")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -447,7 +448,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, if (reveal != null && reveal[0] > startx && reveal[0] < endx) { - gg.drawString("Reveal Columns", reveal[0] * av.charWidth, 0); + gg.drawString(MessageManager.getString("label.reveal_columns"), reveal[0] * av.charWidth, 0); } } diff --git a/src/jalview/appletgui/SliderPanel.java b/src/jalview/appletgui/SliderPanel.java old mode 100755 new mode 100644 index d25caa4..886c194 --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@ -24,6 +24,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.util.MessageManager; public class SliderPanel extends Panel implements ActionListener, AdjustmentListener, MouseListener @@ -167,14 +168,14 @@ public class SliderPanel extends Panel implements ActionListener, applyButton.setVisible(false); if (forConservation) { - label.setText("Modify conservation visibility"); + label.setText(MessageManager.getString("label.modify_conservation_visibility")); slider.setMinimum(0); slider.setMaximum(50 + slider.getVisibleAmount()); slider.setUnitIncrement(1); } else { - label.setText("Colour residues above % occurence"); + label.setText(MessageManager.getString("label.colour_residues_above_occurence")); slider.setMinimum(0); slider.setMaximum(100 + slider.getVisibleAmount()); slider.setBlockIncrement(1); @@ -316,20 +317,20 @@ public class SliderPanel extends Panel implements ActionListener, valueField.setText(" "); valueField.addActionListener(this); label.setFont(new java.awt.Font("Verdana", 0, 11)); - label.setText("set this label text"); + label.setText(MessageManager.getString("label.set_this_label_text")); jPanel1.setLayout(borderLayout1); jPanel2.setLayout(flowLayout1); applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); - applyButton.setLabel("Apply"); + applyButton.setLabel(MessageManager.getString("action.apply")); applyButton.addActionListener(this); undoButton.setEnabled(false); undoButton.setFont(new java.awt.Font("Verdana", 0, 11)); - undoButton.setLabel("Undo"); + undoButton.setLabel(MessageManager.getString("action.undo")); undoButton.addActionListener(this); allGroupsCheck.setEnabled(false); allGroupsCheck.setFont(new java.awt.Font("Verdana", 0, 11)); - allGroupsCheck.setLabel("Apply threshold to all groups"); - allGroupsCheck.setName("Apply to all Groups"); + allGroupsCheck.setLabel(MessageManager.getString("action.apply_threshold_all_groups")); + allGroupsCheck.setName(MessageManager.getString("action.apply_all_groups")); this.setBackground(Color.white); this.setForeground(Color.black); jPanel2.add(label, null); diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index 5c62234..68ffd7a 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -578,7 +578,7 @@ public class TreeCanvas extends Panel implements MouseListener, av.setSelectionGroup(null); av.getAlignment().deleteAllGroups(); - av.sequenceColours = null; + av.clearSequenceColours(); colourGroups(); diff --git a/src/jalview/appletgui/TreePanel.java b/src/jalview/appletgui/TreePanel.java index 65f3d91..5f3f6f6 100644 --- a/src/jalview/appletgui/TreePanel.java +++ b/src/jalview/appletgui/TreePanel.java @@ -23,6 +23,7 @@ import java.awt.event.*; import jalview.analysis.*; import jalview.datamodel.*; import jalview.io.*; +import jalview.util.MessageManager; public class TreePanel extends EmbmenuFrame implements ActionListener, ItemListener @@ -351,22 +352,22 @@ public class TreePanel extends EmbmenuFrame implements ActionListener, setLayout(borderLayout1); this.setBackground(Color.white); this.setFont(new java.awt.Font("Verdana", 0, 12)); - jMenu2.setLabel("View"); - fontSize.setLabel("Font..."); + jMenu2.setLabel(MessageManager.getString("action.view")); + fontSize.setLabel(MessageManager.getString("action.font")); fontSize.addActionListener(this); - bootstrapMenu.setLabel("Show Bootstrap Values"); + bootstrapMenu.setLabel(MessageManager.getString("label.show_bootstrap_values")); bootstrapMenu.addItemListener(this); - distanceMenu.setLabel("Show Distances"); + distanceMenu.setLabel(MessageManager.getString("label.show_distances")); distanceMenu.addItemListener(this); - placeholdersMenu.setLabel("Mark Unassociated Leaves"); + placeholdersMenu.setLabel(MessageManager.getString("label.mark_unassociated_leaves")); placeholdersMenu.addItemListener(this); fitToWindow.setState(true); - fitToWindow.setLabel("Fit To Window"); + fitToWindow.setLabel(MessageManager.getString("label.fit_to_window")); fitToWindow.addItemListener(this); - fileMenu.setLabel("File"); - newickOutput.setLabel("Newick Format"); + fileMenu.setLabel(MessageManager.getString("action.file")); + newickOutput.setLabel(MessageManager.getString("label.newick_format")); newickOutput.addActionListener(this); - inputData.setLabel("Input Data..."); + inputData.setLabel(MessageManager.getString("label.input_data")); add(scrollPane, BorderLayout.CENTER); jMenuBar1.add(fileMenu); diff --git a/src/jalview/appletgui/UserDefinedColours.java b/src/jalview/appletgui/UserDefinedColours.java old mode 100755 new mode 100644 index 4735006..55f7c65 --- a/src/jalview/appletgui/UserDefinedColours.java +++ b/src/jalview/appletgui/UserDefinedColours.java @@ -22,6 +22,7 @@ import jalview.schemes.ColourSchemeI; import jalview.schemes.GraduatedColor; import jalview.schemes.ResidueProperties; import jalview.schemes.UserColourScheme; +import jalview.util.MessageManager; import java.awt.Button; import java.awt.Color; @@ -274,7 +275,7 @@ public class UserDefinedColours extends Panel implements ActionListener, } frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "User defined colours", 420, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.user_defined_colours"), 420, 345); if (seqGroup != null) @@ -630,13 +631,13 @@ public class UserDefinedColours extends Panel implements ActionListener, gridLayout.setColumns(6); gridLayout.setRows(4); okButton.setFont(new java.awt.Font("Verdana", 0, 11)); - okButton.setLabel("OK"); + okButton.setLabel(MessageManager.getString("action.ok")); okButton.addActionListener(this); applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); - applyButton.setLabel("Apply"); + applyButton.setLabel(MessageManager.getString("action.apply")); applyButton.addActionListener(this); cancelButton.setFont(new java.awt.Font("Verdana", 0, 11)); - cancelButton.setLabel("Cancel"); + cancelButton.setLabel(MessageManager.getString("action.cancel")); cancelButton.addActionListener(this); this.setBackground(new Color(212, 208, 223)); okcancelPanel.setBounds(new Rectangle(0, 265, 400, 35)); diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 5d26b85..f3c8745 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -17,13 +17,13 @@ */ package jalview.bin; +import jalview.util.MessageManager; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.dbsources.das.datamodel.DasSourceRegistry; import java.awt.Color; import java.io.*; import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.*; import org.apache.log4j.*; @@ -780,8 +780,7 @@ public class Cache setProperty(property, jalview.util.Format.getHexString(colour)); } - public static final DateFormat date_format = SimpleDateFormat - .getDateTimeInstance(); + public static final DateFormat date_format = DateFormat.getDateInstance(DateFormat.LONG,MessageManager.getLocale()); /** * store a date in a jalview property diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 142b4c3..c3d674b 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -17,6 +17,10 @@ */ package jalview.bin; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; @@ -66,6 +70,11 @@ public class Jalview } }); } + /** + * Put protein=true for get a protein example + */ + private static boolean protein=false; + /** * main class for Jalview application @@ -516,8 +525,15 @@ public class Jalview // We'll only open the default file if the desktop is visible. // And the user // //////////////////// + + + + + + + if (!headless && file == null && vamsasImport == null - && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)) + && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true) && protein == true) { file = jalview.bin.Cache.getDefault( "STARTUP_FILE", @@ -590,7 +606,8 @@ public class Jalview desktop.setInBatchMode(false); } } - + + private static void startUsageStats(final Desktop desktop) { /** @@ -902,6 +919,21 @@ public class Jalview * @author Andrew Waterhouse and JBP documented. * */ + +class rnabuttonlistener implements ActionListener{ + public void actionPerformed(ActionEvent arg0) { + System.out.println("Good idea ! "); + + } +} + +class pbuttonlistener implements ActionListener{ + public void actionPerformed(ActionEvent arg0) { + + + } +} + class ArgsParser { Vector vargs = null; @@ -1040,4 +1072,7 @@ class FeatureFetcher { return queued == 0 && running == 0; } + + + }; diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 8fe90f5..c3e56c6 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -40,6 +40,7 @@ import jalview.javascript.JalviewLiteJsApi; import jalview.javascript.JsCallBack; import jalview.structure.SelectionListener; import jalview.structure.StructureSelectionManager; +import jalview.util.MessageManager; import java.applet.Applet; import java.awt.Button; @@ -1610,15 +1611,15 @@ public class JalviewLite extends Applet implements g.setColor(Color.cyan); g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.red); - g.drawString("Jalview can't open file", 5, 15); + g.drawString(MessageManager.getString("label.jalview_cannot_open_file"), 5, 15); g.drawString("\"" + file + "\"", 5, 30); } else if (embedded) { g.setColor(Color.black); g.setFont(new Font("Arial", Font.BOLD, 24)); - g.drawString("Jalview Applet", 50, getSize().height / 2 - 30); - g.drawString("Loading Data...", 50, getSize().height / 2); + g.drawString(MessageManager.getString("label.jalview_applet"), 50, getSize().height / 2 - 30); + g.drawString(MessageManager.getString("label.loading_data") + "...", 50, getSize().height / 2); } } @@ -1825,11 +1826,10 @@ public class JalviewLite extends Applet implements if (protocol == jalview.io.AppletFormatAdapter.PASTE) { - newAlignFrame.setTitle("Sequences from " - + applet.getDocumentBase()); + newAlignFrame.setTitle(MessageManager.formatMessage("label.sequences_from", new String[]{applet.getDocumentBase().toString()})); } - newAlignFrame.statusBar.setText("Successfully loaded file " + file); + newAlignFrame.statusBar.setText(MessageManager.formatMessage("label.successfully_loaded_file", new String []{file})); String treeFile = applet.getParameter("tree"); if (treeFile == null) diff --git a/src/jalview/controller/AlignViewController.java b/src/jalview/controller/AlignViewController.java new file mode 100644 index 0000000..16e8cdd --- /dev/null +++ b/src/jalview/controller/AlignViewController.java @@ -0,0 +1,100 @@ +package jalview.controller; + +import java.awt.Color; + +import jalview.api.AlignViewControllerI; +import jalview.api.AlignViewportI; +import jalview.api.AlignmentViewPanel; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; + +public class AlignViewController implements AlignViewControllerI +{ + AlignViewportI viewport=null; + AlignmentViewPanel alignPanel=null; + @Override + protected void finalize() throws Throwable { + viewport = null; + alignPanel = null; + }; + + public AlignViewController(AlignViewportI viewport, + AlignmentViewPanel alignPanel) + { + this.viewport=viewport; + this.alignPanel = alignPanel; + } + @Override + public void setViewportAndAlignmentPanel(AlignViewportI viewport,AlignmentViewPanel alignPanel) + { + this.alignPanel = alignPanel; + this.viewport = viewport; + + } + @Override + public boolean makeGroupsFromSelection() + { + + if (viewport.getSelectionGroup() != null) + { + SequenceGroup[] gps = jalview.analysis.Grouping.makeGroupsFrom( + viewport.getSequenceSelection(), + viewport.getAlignmentView(true).getSequenceStrings( + viewport.getGapCharacter()), viewport.getAlignment() + .getGroups()); + viewport.getAlignment().deleteAllGroups(); + viewport.clearSequenceColours(); + viewport.setSelectionGroup(null); + // set view properties for each group + for (int g = 0; g < gps.length; g++) + { + // gps[g].setShowunconserved(viewport.getShowUnconserved()); + gps[g].setshowSequenceLogo(viewport.isShowSequenceLogo()); + viewport.getAlignment().addGroup(gps[g]); + Color col = new Color((int) (Math.random() * 255), + (int) (Math.random() * 255), (int) (Math.random() * 255)); + col = col.brighter(); + for (SequenceI sq : gps[g].getSequences(null)) + viewport.setSequenceColour(sq, col); + } + return true; + } + return false; +} + @Override + public boolean createGroup() + { + + SequenceGroup sg = viewport.getSelectionGroup(); + if (sg!=null) + { + viewport.getAlignment().addGroup(sg); + return true; + } + return false; + } + @Override + public boolean unGroup() + { + SequenceGroup sg = viewport.getSelectionGroup(); + if (sg!=null) + { + viewport.getAlignment().deleteGroup(sg); + return true; + } + return false; + } + @Override + public boolean deleteGroups() + { + if (viewport.getAlignment().getGroups()!=null && viewport.getAlignment().getGroups().size()>0) + { + viewport.getAlignment().deleteAllGroups(); + viewport.clearSequenceColours(); + viewport.setSelectionGroup(null); + return true; + } + return false; + } + + } diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 0a8e087..1433f73 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -18,11 +18,16 @@ package jalview.datamodel; import jalview.analysis.Rna; +import jalview.analysis.SecStrConsensus.SimpleBP; + import jalview.analysis.WUSSParseException; +import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; +import fr.orsay.lri.varna.models.rna.RNA; + /** * DOCUMENT ME! * @@ -49,7 +54,10 @@ public class AlignmentAnnotation /** DOCUMENT ME!! */ public Annotation[] annotations; + + + public ArrayList bps=null; /** * RNA secondary structure contact positions */ @@ -68,13 +76,15 @@ public class AlignmentAnnotation */ private void _updateRnaSecStr(CharSequence RNAannot) { - try - { - _rnasecstr = Rna.GetBasePairs(RNAannot); - invalidrnastruc = -1; - } catch (WUSSParseException px) + try { + _rnasecstr = Rna.GetBasePairs(RNAannot); + bps = Rna.GetModeleBP(RNAannot); + invalidrnastruc=-1; + } + catch (WUSSParseException px) { - invalidrnastruc = px.getProblemPos(); + // DEBUG System.out.println(px); + invalidrnastruc=px.getProblemPos(); } if (invalidrnastruc > -1) { @@ -192,7 +202,11 @@ public class AlignmentAnnotation return NO_GRAPH; } } - + // JBPNote: what does this do ? + public void ConcenStru(CharSequence RNAannot) throws WUSSParseException + { + bps = Rna.GetModeleBP(RNAannot); + } /** * Creates a new AlignmentAnnotation object. * @@ -240,7 +254,37 @@ public class AlignmentAnnotation else // Check for RNA secondary structure { - if (annotations[i].secondaryStructure == 'S') + //System.out.println(annotations[i].secondaryStructure); + if (annotations[i].secondaryStructure == '(' + || annotations[i].secondaryStructure == '[' + || annotations[i].secondaryStructure == '<' + || annotations[i].secondaryStructure == '{' + || annotations[i].secondaryStructure == 'A' + || annotations[i].secondaryStructure == 'B' + || annotations[i].secondaryStructure == 'C' + || annotations[i].secondaryStructure == 'D' + || annotations[i].secondaryStructure == 'E' + || annotations[i].secondaryStructure == 'F' + || annotations[i].secondaryStructure == 'G' + || annotations[i].secondaryStructure == 'H' + || annotations[i].secondaryStructure == 'I' + || annotations[i].secondaryStructure == 'J' + || annotations[i].secondaryStructure == 'K' + || annotations[i].secondaryStructure == 'L' + || annotations[i].secondaryStructure == 'M' + || annotations[i].secondaryStructure == 'N' + || annotations[i].secondaryStructure == 'O' + || annotations[i].secondaryStructure == 'P' + || annotations[i].secondaryStructure == 'Q' + || annotations[i].secondaryStructure == 'R' + || annotations[i].secondaryStructure == 'S' + || annotations[i].secondaryStructure == 'T' + || annotations[i].secondaryStructure == 'U' + || annotations[i].secondaryStructure == 'V' + || annotations[i].secondaryStructure == 'W' + || annotations[i].secondaryStructure == 'X' + || annotations[i].secondaryStructure == 'Y' + || annotations[i].secondaryStructure == 'Z') { hasIcons |= true; isrna |= true; @@ -271,9 +315,38 @@ public class AlignmentAnnotation // && // annotations[i].displayCharacter.charAt(0)==annotations[i].secondaryStructure firstChar != ' ' - && firstChar != 'H' + && firstChar != '$' + && firstChar != 'µ' // JBPNote should explicitly express as unicode number to avoid source code translation problems + && firstChar != '(' + && firstChar != '[' + && firstChar != '>' + && firstChar != '{' + && firstChar != 'A' + && firstChar != 'B' + && firstChar != 'C' + && firstChar != 'D' && firstChar != 'E' + && firstChar != 'F' + && firstChar != 'G' + && firstChar != 'H' + && firstChar != 'I' + && firstChar != 'J' + && firstChar != 'K' + && firstChar != 'L' + && firstChar != 'M' + && firstChar != 'N' + && firstChar != 'O' + && firstChar != 'P' + && firstChar != 'Q' + && firstChar != 'R' && firstChar != 'S' + && firstChar != 'T' + && firstChar != 'U' + && firstChar != 'V' + && firstChar != 'W' + && firstChar != 'X' + && firstChar != 'Y' + && firstChar != 'Z' && firstChar != '-' && firstChar < jalview.schemes.ResidueProperties.aaIndex.length) { @@ -508,7 +581,7 @@ public class AlignmentAnnotation { if (annotations[i] != null) { - annotations[i].displayCharacter = ""; + annotations[i].displayCharacter = "X"; } } } @@ -973,7 +1046,7 @@ public class AlignmentAnnotation { if (annotations[i] == null) annotations[i] = new Annotation(String.valueOf(gapchar), null, - ' ', 0f); + ' ', 0f,null); else if (annotations[i].displayCharacter == null || annotations[i].displayCharacter.equals(" ")) annotations[i].displayCharacter = String.valueOf(gapchar); @@ -1034,5 +1107,4 @@ public class AlignmentAnnotation { this.calcId = calcId; } - } diff --git a/src/jalview/datamodel/Annotation.java b/src/jalview/datamodel/Annotation.java index f692234..e99c321 100755 --- a/src/jalview/datamodel/Annotation.java +++ b/src/jalview/datamodel/Annotation.java @@ -44,7 +44,7 @@ public class Annotation /** Score for the position - used in histograms, line graphs and for shading */ public float value; - + /** Colour for position */ public Color colour; @@ -66,6 +66,7 @@ public class Annotation description = desc; secondaryStructure = ss; value = val; + } /** @@ -109,6 +110,7 @@ public class Annotation secondaryStructure = that.secondaryStructure; value = that.value; colour = that.colour; + } /** @@ -119,7 +121,7 @@ public class Annotation */ public Annotation(float val) { - this(null, null, ' ', val); + this(null, null, ' ', val,null); } /** diff --git a/src/jalview/datamodel/SecondaryStructureAnnotation.java b/src/jalview/datamodel/SecondaryStructureAnnotation.java new file mode 100644 index 0000000..5c3eae9 --- /dev/null +++ b/src/jalview/datamodel/SecondaryStructureAnnotation.java @@ -0,0 +1,31 @@ +package jalview.datamodel; + +import fr.orsay.lri.varna.models.rna.RNA; + +public class SecondaryStructureAnnotation extends AlignmentAnnotation +{ + + + private static RNA _rna = null; + public SecondaryStructureAnnotation (RNA rna) + { + super("Secondary Structure", "Un truc trop cool",getAnnotation(rna)); + + + _rna = rna; + } + + public RNA getRNA() + { + return _rna; + } + public static Annotation[] getAnnotation(RNA rna) + { + Annotation[] ann = new Annotation[rna.getSize()]; + for(int i=0;i. + */ +package jalview.ext.jmol; + +import java.io.IOException; +import java.util.Hashtable; +import java.util.Map; + +import org.jmol.api.JmolStatusListener; +import org.jmol.api.JmolViewer; +import org.jmol.constant.EnumCallback; +import org.jmol.modelset.Group; +import org.jmol.modelset.Model; +import org.jmol.modelset.ModelSet; +import org.jmol.modelset.Polymer; +import org.jmol.modelsetbio.BioPolymer; +import org.jmol.viewer.Viewer; +import org.openscience.jmol.app.JmolApp; + +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.Annotation; +import jalview.datamodel.PDBEntry; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; +import jalview.io.AlignFile; +import jalview.io.FileParse; + +/** + * Import and process PDB files with Jmol + * + * @author jprocter + * + */ +public class PDBFileWithJmol extends AlignFile implements + JmolStatusListener +{ + + JmolApp jmolApp = null; + + Viewer viewer = null; + + public PDBFileWithJmol(String inFile, String type) + throws IOException + { + super(inFile, type); + } + + + public PDBFileWithJmol(FileParse fp) throws IOException + { + super(fp); + } + + public PDBFileWithJmol() + { + // TODO Auto-generated constructor stub + } + + /** + * create a headless jmol instance for dataprocessing + * + * @return + */ + private Viewer getJmolData() + { + if (viewer == null) + { // note that -o -n -x are all implied + jmolApp = new JmolApp(); + jmolApp.isDataOnly = true; + jmolApp.haveConsole = false; + jmolApp.haveDisplay = false; + jmolApp.exitUponCompletion = true; + try + { + viewer = (Viewer) JmolViewer.allocateViewer(null, null, null, null, + null, jmolApp.commandOptions, this); + viewer.setScreenDimension(jmolApp.startupWidth, + jmolApp.startupHeight); + jmolApp.startViewer(viewer, null); + } catch (ClassCastException x) + { + throw new Error( + "Jmol version " + + JmolViewer.getJmolVersion() + + " is not compatible with this version of Jalview. Report this problem at issues.jalview.org", + x); + } + } + return viewer; + } + + private void waitForScript(Viewer jmd) + { + while (jmd.isScriptExecuting()) + { + try + { + Thread.sleep(50); + + } catch (InterruptedException x) + { + } + } + } + + /* + * (non-Javadoc) + * + * @see jalview.io.AlignFile#parse() + */ + @Override + public void parse() throws IOException + { + Viewer jmd = getJmolData(); + jmd.openReader(getDataName(), getDataName(), getReader()); + waitForScript(jmd); + if (jmd.getModelCount() > 0) + { + ModelSet ms = jmd.getModelSet(); + String structs = ms.calculateStructures(null, true, false, true); + // System.out.println("Structs\n"+structs); + for (Model model : ms.getModels()) + { + for (int _bp = 0, _bpc = model.getBioPolymerCount(); _bp < _bpc; _bp++) + { + Polymer bp = model.getBioPolymer(_bp); + if (bp instanceof BioPolymer) + { + BioPolymer biopoly = (BioPolymer) bp; + char _lastChainId = 0; + int[] groups = biopoly.getLeadAtomIndices(); + Group[] bpgrp = biopoly.getGroups(); + char seq[] = new char[groups.length], secstr[] = new char[groups.length], secstrcode[] = new char[groups.length]; + int groupc = 0, len = 0, firstrnum = 1, lastrnum = 0; + do + { + if (groupc >= groups.length + || ms.atoms[groups[groupc]].getChainID() != _lastChainId) + { + if (len > 0) + { + char newseq[] = new char[len]; + System.arraycopy(seq, 0, newseq, 0, len); + Annotation asecstr[] = new Annotation[len]; + for (int p = 0; p < len; p++) + { + if (secstr[p] >= 'A' && secstr[p] <= 'z') + { + asecstr[p] = new Annotation("" + secstr[p], null, + secstrcode[p], Float.NaN); + } + } + SequenceI sq = new Sequence("" + getDataName() + "|" + + model.getModelTitle() + "|" + _lastChainId, + newseq, firstrnum, lastrnum); + PDBEntry pdbe = new PDBEntry(); + pdbe.setFile(getDataName()); + pdbe.setId(getDataName()); + sq.addPDBId(pdbe); + pdbe.setProperty(new Hashtable()); + pdbe.getProperty().put("CHAIN",""+_lastChainId); + seqs.add(sq); + if (!(biopoly.isDna() || biopoly.isRna())) + { + AlignmentAnnotation ann = new AlignmentAnnotation( + "Secondary Structure", + "Secondary Structure from PDB File", asecstr); + ann.setCalcId(getClass().getName()); + sq.addAlignmentAnnotation(ann); + annotations.add(ann); + } + } + len = 0; + firstrnum = 1; + lastrnum = 0; + } + if (groupc < groups.length) + { + if (len == 0) + { + firstrnum = bpgrp[groupc].getResno(); + _lastChainId = bpgrp[groupc].getChainID(); + } + else + { + lastrnum = bpgrp[groupc].getResno(); + } + seq[len] = bpgrp[groupc].getGroup1(); + switch (bpgrp[groupc].getProteinStructureSubType()) + { + case HELIX_310: + if (secstr[len] == 0) + { + secstr[len] = '3'; + } + case HELIX_ALPHA: + if (secstr[len] == 0) + { + secstr[len] = 'H'; + } + case HELIX_PI: + if (secstr[len] == 0) + { + secstr[len] = 'P'; + } + case HELIX: + if (secstr[len] == 0) + { + secstr[len] = 'H'; + } + secstrcode[len] = 'H'; + break; + case SHEET: + secstr[len] = 'E'; + secstrcode[len] = 'E'; + break; + default: + secstr[len] = 0; + secstrcode[len] = 0; + } + len++; + } + } while (groupc++ < groups.length); + + } + } + } + + /* + * lastScriptTermination = -9465; String dsspOut = + * jmd.evalString("calculate STRUCTURE"); if (dsspOut.equals("pending")) { + * while (lastScriptTermination == -9465) { try { Thread.sleep(50); } + * catch (Exception x) { } ; } } System.out.println(lastConsoleEcho); + */ + } + } + + /* + * (non-Javadoc) + * + * @see jalview.io.AlignFile#print() + */ + @Override + public String print() + { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setCallbackFunction(String callbackType, + String callbackFunction) + { + // TODO Auto-generated method stub + + } + + /* + * @Override public void notifyCallback(EnumCallback type, Object[] data) { + * try { switch (type) { case ERROR: case SCRIPT: + * notifyScriptTermination((String) data[2], ((Integer) data[3]).intValue()); + * break; case MESSAGE: sendConsoleMessage((data == null) ? ((String) null) : + * (String) data[1]); break; case LOADSTRUCT: notifyFileLoaded((String) + * data[1], (String) data[2], (String) data[3], (String) data[4], ((Integer) + * data[5]).intValue()); + * + * break; default: // System.err.println("Unhandled callback " + type + " " // + * + data[1].toString()); break; } } catch (Exception e) { + * System.err.println("Squashed Jmol callback handler error:"); + * e.printStackTrace(); } } + */ + public void notifyCallback(EnumCallback type, Object[] data) + { + String strInfo = (data == null || data[1] == null ? null : data[1] + .toString()); + switch (type) + { + case ECHO: + sendConsoleEcho(strInfo); + break; + case SCRIPT: + notifyScriptTermination((String) data[2], + ((Integer) data[3]).intValue()); + break; + case MEASURE: + String mystatus = (String) data[3]; + if (mystatus.indexOf("Picked") >= 0 + || mystatus.indexOf("Sequence") >= 0) // picking mode + sendConsoleMessage(strInfo); + else if (mystatus.indexOf("Completed") >= 0) + sendConsoleEcho(strInfo.substring(strInfo.lastIndexOf(",") + 2, + strInfo.length() - 1)); + break; + case MESSAGE: + sendConsoleMessage(data == null ? null : strInfo); + break; + case PICK: + sendConsoleMessage(strInfo); + break; + default: + break; + } + } + + private void notifyFileLoaded(String string, String string2, + String string3, String string4, int intValue) + { + // TODO Auto-generated method stub + + } + + String lastConsoleEcho = ""; + + private void sendConsoleEcho(String string) + { + lastConsoleEcho += string; + lastConsoleEcho += "\n"; + } + + String lastConsoleMessage = ""; + + private void sendConsoleMessage(String string) + { + lastConsoleMessage += string; + lastConsoleMessage += "\n"; + } + + int lastScriptTermination = -1; + + String lastScriptMessage = ""; + + private void notifyScriptTermination(String string, int intValue) + { + lastScriptMessage += string; + lastScriptMessage += "\n"; + lastScriptTermination = intValue; + } + + @Override + public boolean notifyEnabled(EnumCallback callbackPick) + { + switch (callbackPick) + { + case MESSAGE: + case SCRIPT: + case ECHO: + case LOADSTRUCT: + case ERROR: + return true; + case MEASURE: + case PICK: + case HOVER: + case RESIZE: + case SYNC: + case CLICK: + case ANIMFRAME: + case MINIMIZATION: + } + return false; + } + + @Override + public String eval(String strEval) + { + // TODO Auto-generated method stub + return null; + } + + @Override + public float[][] functionXY(String functionName, int x, int y) + { + // TODO Auto-generated method stub + return null; + } + + @Override + public float[][][] functionXYZ(String functionName, int nx, int ny, int nz) + { + // TODO Auto-generated method stub + return null; + } + + @Override + public String createImage(String fileName, String type, + Object text_or_bytes, int quality) + { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getRegistryInfo() + { + // TODO Auto-generated method stub + return null; + } + + @Override + public void showUrl(String url) + { + // TODO Auto-generated method stub + + } + + @Override + public void resizeInnerPanel(String data) + { + // TODO Auto-generated method stub + + } + +} diff --git a/src/jalview/ext/paradise/Annotate3D.java b/src/jalview/ext/paradise/Annotate3D.java new file mode 100644 index 0000000..64d39d0 --- /dev/null +++ b/src/jalview/ext/paradise/Annotate3D.java @@ -0,0 +1,194 @@ +package jalview.ext.paradise; + +import jalview.ws.HttpClientUtils; + +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringReader; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import org.apache.http.NameValuePair; +import org.apache.http.message.BasicNameValuePair; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONStreamAware; +import org.json.simple.parser.ContentHandler; +import org.json.simple.parser.ParseException; + +/** + * simple methods for calling the various paradise RNA tools + * + * @author jimp + * + * History: v1.0 revised from original due to refactoring of + * paradise-ubmc.u-strasbg.fr/webservices/annotate3d to + * http://arn-ibmc.in2p3.fr/api/compute/2d?tool=rnaview + */ +public class Annotate3D +{ + private static String twoDtoolsURL = "http://arn-ibmc.in2p3.fr/api/compute/2d"; + private static ContentHandler createContentHandler() + { + ContentHandler ch = new ContentHandler() { + + @Override + public void startJSON() throws ParseException, IOException + { + // TODO Auto-generated method stub + + } + + @Override + public void endJSON() throws ParseException, IOException + { + // TODO Auto-generated method stub + + } + + @Override + public boolean startObject() throws ParseException, IOException + { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean endObject() throws ParseException, IOException + { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean startObjectEntry(String key) throws ParseException, + IOException + { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean endObjectEntry() throws ParseException, IOException + { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean startArray() throws ParseException, IOException + { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean endArray() throws ParseException, IOException + { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean primitive(Object value) throws ParseException, + IOException + { + // TODO Auto-generated method stub + return false; + } + + }; + return ch; + } + public static Iterator getRNAMLForPDBFileAsString(String pdbfile) + throws Exception + { + List vals = new ArrayList(); + vals.add(new BasicNameValuePair("tool", "rnaview")); + vals.add(new BasicNameValuePair("data", pdbfile)); + vals.add(new BasicNameValuePair("output", "rnaml")); + // return processJsonResponseFor(HttpClientUtils.doHttpUrlPost(twoDtoolsURL, vals)); + ArrayList readers = new ArrayList(); + readers.add(HttpClientUtils.doHttpUrlPost(twoDtoolsURL, vals)); + return readers.iterator(); + + } + public static Iterator processJsonResponseFor(Reader respons) throws Exception + { + org.json.simple.parser.JSONParser jp = new org.json.simple.parser.JSONParser(); + try { + final JSONArray responses = (JSONArray) jp.parse(respons); + final Iterator rvals = responses.iterator(); + return new Iterator() + { + @Override + public boolean hasNext() + { + return rvals.hasNext(); + } + @Override + public Reader next() + { + JSONObject val=(JSONObject) rvals.next(); + + Object sval = null; + try { + sval = val.get("2D"); + } catch (Exception x) {x.printStackTrace();}; + if (sval==null) + { + System.err.println("DEVELOPER WARNING: Annotate3d didn't return a '2D' tag in its response. Consider checking output of server. Response was :"+val.toString()); + + sval = ""; + } + return new StringReader((sval instanceof JSONObject) ? ((JSONObject)sval).toString():sval.toString()); + + }@Override + public void remove() + { + throw new Error("Remove: Not implemented"); + + }@Override + protected Object clone() throws CloneNotSupportedException + { + throw new CloneNotSupportedException("Clone: Not implemented"); + }@Override + public boolean equals(Object obj) + { + return super.equals(obj); + }@Override + protected void finalize() throws Throwable + { + while (rvals.hasNext()) + { + rvals.next(); + } + super.finalize(); + } + }; + } catch (Exception foo) + { + throw new Exception("Couldn't parse response from Annotate3d server.",foo); + } + + + } + + public static Iterator getRNAMLForPDBId(String pdbid) throws Exception + { + List vals = new ArrayList(); + vals.add(new BasicNameValuePair("tool", "rnaview")); + vals.add(new BasicNameValuePair("pdbid", pdbid)); + vals.add(new BasicNameValuePair("output", "rnaml")); + java.net.URL geturl = new URL(twoDtoolsURL+"?tool=rnaview&pdbid="+pdbid+"&output=rnaml"); + //return processJsonResponseFor(new InputStreamReader(geturl.openStream())); + ArrayList readers = new ArrayList(); + readers.add(new InputStreamReader(geturl.openStream())); + return readers.iterator(); + } + +} diff --git a/src/jalview/ext/varna/VarnaCommands.java b/src/jalview/ext/varna/VarnaCommands.java index 527a847..21f626f 100644 --- a/src/jalview/ext/varna/VarnaCommands.java +++ b/src/jalview/ext/varna/VarnaCommands.java @@ -1,167 +1,157 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle - * - * 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 . - */ -package jalview.ext.varna; - -import jalview.api.FeatureRenderer; -import jalview.api.SequenceRenderer; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.SequenceI; -import jalview.structure.StructureMapping; -import jalview.structure.StructureSelectionManager; - -import java.awt.Color; -import java.util.ArrayList; - -/** - * Routines for generating Jmol commands for Jalview/Jmol binding another - * cruisecontrol test. - * - * @author JimP - * - */ -public class VarnaCommands -{ - - /** - * Jmol utility which constructs the commands to colour chains by the given - * alignment - * - */ - public static String[] getColourBySequenceCommand( - StructureSelectionManager ssm, String[] files, - SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr, - AlignmentI alignment) - { - ArrayList str = new ArrayList(); - StringBuffer command = new StringBuffer(); - - for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++) - { - StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]); - - if (mapping == null || mapping.length < 1) - continue; - - int lastPos = -1; - for (int s = 0; s < sequence[pdbfnum].length; s++) - { - for (int sp, m = 0; m < mapping.length; m++) - { - if (mapping[m].getSequence() == sequence[pdbfnum][s] - && (sp = alignment.findIndex(sequence[pdbfnum][s])) > -1) - { - SequenceI asp = alignment.getSequenceAt(sp); - for (int r = 0; r < asp.getLength(); r++) - { - // no mapping to gaps in sequence - if (jalview.util.Comparison.isGap(asp.getCharAt(r))) - { - continue; - } - int pos = mapping[m].getPDBResNum(asp.findPosition(r)); - - if (pos < 1 || pos == lastPos) - continue; - - lastPos = pos; - - Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r); - - if (fr != null) - col = fr.findFeatureColour(col, sequence[pdbfnum][s], r); - String newSelcom = (mapping[m].getChain() != " " ? ":" - + mapping[m].getChain() : "") - + "/" - + (pdbfnum + 1) - + ".1" - + ";color[" - + col.getRed() - + "," - + col.getGreen() - + "," - + col.getBlue() + "]"; - if (command.length() > newSelcom.length() - && command.substring( - command.length() - newSelcom.length()) - .equals(newSelcom)) - { - command = VarnaCommands.condenseCommand(command, pos); - continue; - } - // TODO: deal with case when buffer is too large for Jmol to parse - // - execute command and flush - - command.append(";"); - if (command.length() > 51200) - { - // add another chunk - str.add(command.toString()); - command.setLength(0); - } - command.append("select " + pos); - command.append(newSelcom); - } - break; - } - } - } - } - { - // add final chunk - str.add(command.toString()); - command.setLength(0); - } - return str.toArray(new String[str.size()]); - } - - public static StringBuffer condenseCommand(StringBuffer command, int pos) - { - - // work back to last 'select' - int p = command.length(), q = p; - do - { - p -= 6; - if (p < 1) - { - p = 0; - } - ; - } while ((q = command.indexOf("select", p)) == -1 && p > 0); - - StringBuffer sb = new StringBuffer(command.substring(0, q + 7)); - - command = command.delete(0, q + 7); - - String start; - - if (command.indexOf("-") > -1) - { - start = command.substring(0, command.indexOf("-")); - } - else - { - start = command.substring(0, command.indexOf(":")); - } - - sb.append(start + "-" + pos + command.substring(command.indexOf(":"))); - - return sb; - } - -} +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.ext.varna; + +import jalview.api.FeatureRenderer; +import jalview.api.SequenceRenderer; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SequenceI; +import jalview.structure.StructureMapping; +import jalview.structure.StructureSelectionManager; +import jalview.util.Comparison; + +import java.awt.Color; +import java.util.ArrayList; + +/** + * Routines for generating Jmol commands for Jalview/Jmol binding + * another cruisecontrol test. + * + * @author JimP + * + */ +public class VarnaCommands +{ + + /** + * Jmol utility which constructs the commands to colour chains by the given alignment + * + */ + public static String[] getColourBySequenceCommand(StructureSelectionManager ssm, String[] files, SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr, AlignmentI alignment) + { + + ArrayList str = new ArrayList(); + StringBuffer command = new StringBuffer(); + + for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++) + { + StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]); + + if (mapping == null || mapping.length < 1) + continue; + + int lastPos = -1; + for (int s = 0; s < sequence[pdbfnum].length; s++) + { + for (int sp, m = 0; m < mapping.length; m++) + { + if (mapping[m].getSequence() == sequence[pdbfnum][s] + && (sp = alignment.findIndex(sequence[pdbfnum][s])) > -1) + { + SequenceI asp = alignment.getSequenceAt(sp); + for (int r = 0; r < asp.getLength(); r++) + { + // no mapping to gaps in sequence + if (jalview.util.Comparison.isGap(asp.getCharAt(r))) + { + continue; + } + int pos = mapping[m].getPDBResNum(asp.findPosition(r)); + + if (pos < 1 || pos == lastPos) + continue; + + lastPos = pos; + + Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r); + + if (fr != null) + col = fr.findFeatureColour(col, sequence[pdbfnum][s], r); + String newSelcom = (mapping[m].getChain() != " " ? ":" + + mapping[m].getChain() : "") + + "/" + + (pdbfnum + 1) + + ".1" + + ";color[" + + col.getRed() + + "," + + col.getGreen() + + "," + + col.getBlue() + "]"; + if (command.length()>newSelcom.length() && command.substring(command.length()-newSelcom.length()).equals(newSelcom)) + { + command = VarnaCommands.condenseCommand(command, pos); + continue; + } + // TODO: deal with case when buffer is too large for Jmol to parse + // - execute command and flush + + command.append(";"); + if (command.length()>51200) + { + // add another chunk + str.add(command.toString()); + command.setLength(0); + } + command.append("select " + pos); + command.append(newSelcom); + } + break; + } + } + } + } + { + // add final chunk + str.add(command.toString()); + command.setLength(0); + } + return str.toArray(new String[str.size()]); + } + + public static StringBuffer condenseCommand(StringBuffer command, int pos) + { + + // work back to last 'select' + int p=command.length(),q=p; + do { + p-=6; + if (p<1) { p=0; }; + } while ((q=command.indexOf("select",p))==-1 && p>0); + + StringBuffer sb = new StringBuffer(command.substring(0,q+7)); + + command = command.delete(0,q+7); + + String start; + + if (command.indexOf("-") > -1) + { + start = command.substring(0, command.indexOf("-")); + } + else + { + start = command.substring(0, command.indexOf(":")); + } + + sb.append(start + "-" + pos + command.substring(command.indexOf(":"))); + + return sb; + } + +} diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java old mode 100755 new mode 100644 index ceb08ee..62fd29d --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -24,6 +24,7 @@ import jalview.analysis.CrossRef; import jalview.analysis.NJTree; import jalview.analysis.ParseProperties; import jalview.analysis.SequenceIdMatcher; +import jalview.api.AlignViewControllerI; import jalview.bin.Cache; import jalview.commands.CommandI; import jalview.commands.EditCommand; @@ -75,8 +76,10 @@ import jalview.schemes.TaylorColourScheme; import jalview.schemes.TurnColourScheme; import jalview.schemes.UserColourScheme; import jalview.schemes.ZappoColourScheme; +import jalview.util.MessageManager; import jalview.ws.jws1.Discoverer; import jalview.ws.jws2.Jws2Discoverer; +import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.seqfetcher.DbSourceProxy; import java.awt.BorderLayout; @@ -144,6 +147,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, public AlignmentPanel alignPanel; AlignViewport viewport; + + public AlignViewControllerI avc; + Vector alignPanels = new Vector(); @@ -287,6 +293,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ void init() { + avc = new jalview.controller.AlignViewController(viewport, alignPanel); if (viewport.getAlignmentConservationAnnotation() == null) { BLOSUM62Colour.setEnabled(false); @@ -329,7 +336,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } addKeyListener(); - + } /** @@ -475,8 +482,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, case KeyEvent.VK_F2: viewport.cursorMode = !viewport.cursorMode; - statusBar.setText("Keyboard editing mode is " - + (viewport.cursorMode ? "on" : "off")); + statusBar.setText(MessageManager.formatMessage("label.keyboard_editing_mode", new String[]{(viewport.cursorMode ? "on" : "off")})); if (viewport.cursorMode) { alignPanel.seqPanel.seqCanvas.cursorX = viewport.startRes; @@ -557,6 +563,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, public void addAlignmentPanel(final AlignmentPanel ap, boolean newPanel) { ap.alignFrame = this; + avc = new jalview.controller.AlignViewController(viewport, alignPanel); alignPanels.addElement(ap); @@ -734,7 +741,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, rnahelicesColour .setSelected(av.getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour); setShowProductsEnabled(); - updateEditMenuBar(); } @@ -808,7 +814,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, final JPanel progressPanel = (JPanel) progressBars.get(new Long(id)); if (handler.canCancel()) { - JButton cancel = new JButton("Cancel"); + JButton cancel = new JButton(MessageManager.getString("action.cancel")); final IProgressIndicator us = this; cancel.addActionListener(new ActionListener() { @@ -988,8 +994,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (currentFileFormat == null) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "You must select a file format before saving!", - "File format not specified", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.select_file_format_before_saving"), + MessageManager.getString("label.file_format_not_specified"), JOptionPane.WARNING_MESSAGE); value = chooser.showSaveDialog(this); return; } @@ -1025,8 +1031,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, success = new Jalview2XML().SaveAlignment(this, file, shortName); - statusBar.setText("Successfully saved to file: " + fileName + " in " - + format + " format."); + statusBar.setText(MessageManager.formatMessage("label.successfully_saved_to_file_in_format",new String[]{fileName, format})); + } else @@ -1047,9 +1053,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, int reply = JOptionPane .showInternalConfirmDialog( Desktop.desktop, - "The Alignment contains hidden columns." - + "\nDo you want to save only the visible alignment?", - "Save / Omit Hidden Columns", + MessageManager.getString("label.alignment_contains_hidden_columns"), + MessageManager.getString("action.save_omit_hidden_columns"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); @@ -1079,8 +1084,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, out.print(output); out.close(); this.setTitle(file); - statusBar.setText("Successfully saved to file: " + fileName - + " in " + format + " format."); + statusBar.setText(MessageManager.formatMessage("label.successfully_saved_to_file_in_format",new String[]{fileName, format})); } catch (Exception ex) { success = false; @@ -1091,8 +1095,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (!success) { - JOptionPane.showInternalMessageDialog(this, "Couldn't save file: " - + fileName, "Error Saving File", JOptionPane.WARNING_MESSAGE); + JOptionPane.showInternalMessageDialog(this, MessageManager.formatMessage("label.couldnt_save_file", new String[]{fileName}), + MessageManager.getString("label.error_saving_file"), JOptionPane.WARNING_MESSAGE); } return success; @@ -1129,9 +1133,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, int reply = JOptionPane .showInternalConfirmDialog( Desktop.desktop, - "The Alignment contains hidden columns." - + "\nDo you want to output only the visible alignment?", - "Save / Omit Hidden Columns", + MessageManager.getString("label.alignment_contains_hidden_columns"), + MessageManager.getString("action.save_omit_hidden_columns"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); @@ -1347,12 +1350,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { undoMenuItem.setEnabled(true); CommandI command = (CommandI) viewport.historyList.peek(); - undoMenuItem.setText("Undo " + command.getDescription()); + undoMenuItem.setText(MessageManager.formatMessage("label.undo_command", new String[]{command.getDescription()})); } else { undoMenuItem.setEnabled(false); - undoMenuItem.setText("Undo"); + undoMenuItem.setText(MessageManager.getString("action.undo")); } if (viewport.redoList.size() > 0) @@ -1360,12 +1363,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, redoMenuItem.setEnabled(true); CommandI command = (CommandI) viewport.redoList.peek(); - redoMenuItem.setText("Redo " + command.getDescription()); + redoMenuItem.setText(MessageManager.formatMessage("label.redo_command", new String[]{command.getDescription()})); } else { redoMenuItem.setEnabled(false); - redoMenuItem.setText("Redo"); + redoMenuItem.setText(MessageManager.getString("action.redo")); } } @@ -1693,7 +1696,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, Desktop.jalviewClipboard = new Object[] { seqs, viewport.getAlignment().getDataset(), hiddenColumns }; - statusBar.setText("Copied " + seqs.length + " sequences to clipboard."); + statusBar.setText(MessageManager.formatMessage("label.copied_sequences_to_clipboard", new String[]{Integer.valueOf(seqs.length).toString()})); } /** @@ -2135,12 +2138,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override protected void deleteGroups_actionPerformed(ActionEvent e) { - viewport.getAlignment().deleteAllGroups(); - viewport.sequenceColours = null; - viewport.setSelectionGroup(null); - PaintRefresher.Refresh(this, viewport.getSequenceSetId()); - alignPanel.updateAnnotation(); - alignPanel.paintAlignment(true); + if (avc.deleteGroups()) { + PaintRefresher.Refresh(this, viewport.getSequenceSetId()); + alignPanel.updateAnnotation(); + alignPanel.paintAlignment(true); + } } /** @@ -2294,7 +2296,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, viewport.getSelectionGroup()); } - statusBar.setText("Removed " + trimRegion.getSize() + " columns."); + statusBar.setText(MessageManager.formatMessage("label.removed_columns", new String[]{Integer.valueOf(trimRegion.getSize()).toString()})); addHistoryItem(trimRegion); @@ -2342,8 +2344,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, addHistoryItem(removeGapCols); - statusBar.setText("Removed " + removeGapCols.getSize() - + " empty columns."); + statusBar.setText(MessageManager.formatMessage("label.removed_empty_columns", new String[]{Integer.valueOf(removeGapCols.getSize()).toString()})); // This is to maintain viewport position on first residue // of first sequence @@ -2537,7 +2538,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, newap.av.viewName = newViewName; addAlignmentPanel(newap, true); - + newap.alignmentChanged(); + if (alignPanels.size() == 2) { viewport.gatherViewsHere = true; @@ -2951,7 +2953,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, editPane.setEditable(false); StringBuffer contents = new AlignmentProperties(viewport.getAlignment()) .formatAsHtml(); - editPane.setText("" + contents.toString() + ""); + editPane.setText(MessageManager.formatMessage("label.html_content", new String[]{contents.toString()})); JInternalFrame frame = new JInternalFrame(); frame.getContentPane().add(new JScrollPane(editPane)); @@ -3411,8 +3413,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, int option = JOptionPane.showInternalConfirmDialog( jalview.gui.Desktop.desktop, - "Remove from default list?", - "Remove user defined colour", + MessageManager.getString("label.remove_from_default_list"), + MessageManager.getString("label.remove_user_defined_colour"), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) { @@ -3564,7 +3566,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, || (viewport.getSelectionGroup().getSize() < 2)) { JOptionPane.showInternalMessageDialog(this, - "You must select at least 2 sequences.", "Invalid Selection", + MessageManager.getString("label.you_must_select_least_two_sequences"), MessageManager.getString("label.invalid_selection"), JOptionPane.WARNING_MESSAGE); } else @@ -3590,9 +3592,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, || (viewport.getAlignment().getHeight() < 4)) { JOptionPane.showInternalMessageDialog(this, - "Principal component analysis must take\n" - + "at least 4 input sequences.", - "Sequence selection insufficient", + MessageManager.getString("label.principal_component_analysis_must_take_least_four_input_sequences"), + MessageManager.getString("label.sequence_selection_insufficient"), JOptionPane.WARNING_MESSAGE); return; @@ -3694,8 +3695,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - "You need to have more than two sequences selected to build a tree!", - "Not enough sequences", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.you_need_more_two_sequences_selected_build_tree"), + MessageManager.getString("label.not_enough_sequences"), JOptionPane.WARNING_MESSAGE); return; } @@ -3709,10 +3710,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - "The selected region to create a tree may\nonly contain residues or gaps.\n" - + "Try using the Pad function in the edit menu,\n" - + "or one of the multiple sequence alignment web services.", - "Sequences in selection are not aligned", + MessageManager.getString("label.selected_region_to_tree_may_only_contain_residues_or_gaps"), + MessageManager.getString("label.sequences_selection_not_aligned"), JOptionPane.WARNING_MESSAGE); return; @@ -3730,10 +3729,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - "The sequences must be aligned before creating a tree.\n" - + "Try using the Pad function in the edit menu,\n" - + "or one of the multiple sequence alignment web services.", - "Sequences not aligned", + MessageManager.getString("label.sequences_must_be_aligned_before_creating_tree"), + MessageManager.getString("label.sequences_not_aligned"), JOptionPane.WARNING_MESSAGE); return; @@ -4047,13 +4044,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } catch (Exception ex) { JOptionPane.showMessageDialog(Desktop.desktop, ex.getMessage(), - "Problem reading tree file", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.problem_reading_tree_file"), JOptionPane.WARNING_MESSAGE); ex.printStackTrace(); } if (fin != null && fin.hasWarningMessage()) { JOptionPane.showMessageDialog(Desktop.desktop, - fin.getWarningMessage(), "Possible problem with tree file", + fin.getWarningMessage(), MessageManager.getString("label.possible_problem_with_tree_file"), JOptionPane.WARNING_MESSAGE); } } @@ -4158,6 +4155,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void run() { + final List legacyItems=new ArrayList(); try { System.err.println("Building ws menu again " @@ -4189,28 +4187,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // TODO: refactor to allow list of AbstractName/Handler bindings to // be // stored or retrieved from elsewhere - Vector msaws = null; // (Vector) Discoverer.services.get("MsaWS"); + // No MSAWS used any more: + // Vector msaws = null; // (Vector) Discoverer.services.get("MsaWS"); Vector secstrpr = (Vector) Discoverer.services .get("SecStrPred"); - Vector seqsrch = null; // (Vector) - // Discoverer.services.get("SeqSearch"); - // TODO: move GUI generation code onto service implementation - so a - // client instance attaches itself to the GUI with method call like - // jalview.ws.MsaWSClient.bind(servicehandle, Desktop.instance, - // alignframe) - if (msaws != null) - { - // Add any Multiple Sequence Alignment Services - for (int i = 0, j = msaws.size(); i < j; i++) - { - final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) msaws - .get(i); - jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer - .getServiceClient(sh); - impl.attachWSMenuEntry(msawsmenu, me); - - } - } if (secstrpr != null) { // Add any secondary structure prediction services @@ -4220,35 +4200,23 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, .get(i); jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer .getServiceClient(sh); + int p=secstrmenu.getItemCount(); impl.attachWSMenuEntry(secstrmenu, me); - } - } - if (seqsrch != null) - { - // Add any sequence search services - for (int i = 0, j = seqsrch.size(); i < j; i++) - { - final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) seqsrch - .elementAt(i); - jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer - .getServiceClient(sh); - impl.attachWSMenuEntry(seqsrchmenu, me); + int q=secstrmenu.getItemCount(); + for (int litm=p;litm submens=new ArrayList(); - // submens.add(msawsmenu); - // submens.add(secstrmenu); - // submens.add(dismenu); - // submens.add(analymenu); - // No search services yet // wsmenu.add(seqsrchmenu); @@ -4273,6 +4241,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, 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.getDiscoverer(); @@ -4281,6 +4250,16 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, 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()) { @@ -4291,7 +4270,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } } - build_urlServiceMenu(me.webService); build_fetchdbmenu(webService); for (JMenu item : wsmenu) @@ -4573,8 +4551,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - "Please select at least three bases in at least one sequence in order to perform a cDNA translation.", - "Translation Failed", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"), + MessageManager.getString("label.translation_failed"), JOptionPane.WARNING_MESSAGE); } else { @@ -4607,8 +4585,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - "Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace.", - "Implementation error: Translation Failed", JOptionPane.ERROR_MESSAGE); + MessageManager.getString("label.error_when_translating_sequences_submit_bug_report"), + MessageManager.getString("label.implementation_error") + MessageManager.getString("translation_failed"), JOptionPane.ERROR_MESSAGE); return; } if (al == null) @@ -4616,8 +4594,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - "Please select at least three bases in at least one sequence in order to perform a cDNA translation.", - "Translation Failed", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"), + MessageManager.getString("label.translation_failed"), JOptionPane.WARNING_MESSAGE); } else { @@ -4816,10 +4794,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, || JOptionPane .showConfirmDialog( this, - "Do you want to automatically associate the " - + filesmatched.size() - + " PDB files with sequences in the alignment that have the same name ?", - "Automatically Associate PDB files by name", + MessageManager.formatMessage("label.automatically_associate_pdb_files_with_sequences_same_name", + new String[]{Integer.valueOf(filesmatched.size()).toString()}), + MessageManager.getString("label.automatically_associate_pdb_files_by_name"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { @@ -4852,10 +4829,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, "AUTOASSOCIATE_PDBANDSEQS_IGNOREOTHERS", false) || JOptionPane .showConfirmDialog( this, - "Do you want to ignore the " - + filesnotmatched.size() - + " files whose names did not match any sequence IDs ?", - "Ignore unmatched dropped files ?", + MessageManager.formatMessage("label.ignore_unmatched_dropped_files_info", new String[]{Integer.valueOf(filesnotmatched.size()).toString()}), + MessageManager.getString("label.ignore_unmatched_dropped_files"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)) { return; @@ -4914,8 +4889,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, tcoffeeColour.setSelected(true); changeColour(new TCoffeeColourScheme(viewport.getAlignment())); isAnnotation = true; - statusBar - .setText("Successfully pasted T-Coffee scores to alignment."); + statusBar.setText(MessageManager.getString("label.successfully_pasted_tcoffee_scores_to_alignment")); } else { @@ -4924,9 +4898,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, JOptionPane .showMessageDialog( Desktop.desktop, - tcf.getWarningMessage() == null ? "Check that the file matches sequence IDs in the alignment." + tcf.getWarningMessage() == null ? MessageManager.getString("label.check_file_matches_sequence_ids_alignment") : tcf.getWarningMessage(), - "Problem reading T-COFFEE score file", + MessageManager.getString("label.problem_reading_tcoffee_score_file"), JOptionPane.WARNING_MESSAGE); } } @@ -5033,6 +5007,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { alignPanel = (AlignmentPanel) alignPanels.elementAt(index); viewport = alignPanel.av; + avc.setViewportAndAlignmentPanel(viewport, alignPanel); setMenusFromViewport(viewport); } } @@ -5043,7 +5018,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (SwingUtilities.isRightMouseButton(e)) { String reply = JOptionPane.showInternalInputDialog(this, - "Enter View Name", "Edit View Name", + MessageManager.getString("label.enter_view_name"), MessageManager.getString("label.enter_view_name"), JOptionPane.QUESTION_MESSAGE); if (reply != null) @@ -5323,7 +5298,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, ++i; if (++icomp >= mcomp || i == (otherdb.size())) { - ifetch.setText(imname + " to '" + sname + "'"); + ifetch.setText(MessageManager.formatMessage("label.source_to_target",new String[]{imname,sname})); dfetch.add(ifetch); ifetch = new JMenu(); imname = null; @@ -5335,7 +5310,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, ++dbi; if (comp >= mcomp || dbi >= (dbclasses.length)) { - dfetch.setText(mname + " to '" + dbclass + "'"); + dfetch.setText(MessageManager.formatMessage("label.source_to_target",new String[]{mname,dbclass})); rfetch.add(dfetch); dfetch = new JMenu(); mname = null; @@ -5473,34 +5448,31 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override protected void makeGrpsFromSelection_actionPerformed(ActionEvent e) { - if (viewport.getSelectionGroup() != null) - { - SequenceGroup[] gps = jalview.analysis.Grouping.makeGroupsFrom( - viewport.getSequenceSelection(), - viewport.getAlignmentView(true).getSequenceStrings( - viewport.getGapCharacter()), viewport.getAlignment() - .getGroups()); - viewport.getAlignment().deleteAllGroups(); - viewport.sequenceColours = null; - viewport.setSelectionGroup(null); - // set view properties for each group - for (int g = 0; g < gps.length; g++) - { - gps[g].setShowNonconserved(viewport.getShowUnconserved()); - gps[g].setshowSequenceLogo(viewport.isShowSequenceLogo()); - viewport.getAlignment().addGroup(gps[g]); - Color col = new Color((int) (Math.random() * 255), - (int) (Math.random() * 255), (int) (Math.random() * 255)); - col = col.brighter(); - for (SequenceI s : gps[g].getSequences()) - viewport.setSequenceColour(s, col); - } + if (avc.makeGroupsFromSelection()) { PaintRefresher.Refresh(this, viewport.getSequenceSetId()); alignPanel.updateAnnotation(); alignPanel.paintAlignment(true); } } + @Override + protected void createGroup_actionPerformed(ActionEvent e) + { + if (avc.createGroup()) + { + alignPanel.alignmentChanged(); + } + } + + @Override + protected void unGroup_actionPerformed(ActionEvent e) + { + if (avc.unGroup()) + { + alignPanel.alignmentChanged(); + } + } + /** * make the given alignmentPanel the currently selected tab * diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 7a01b27..407fa94 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -138,8 +138,6 @@ public class AlignViewport extends AlignmentViewport implements Stack redoList = new Stack(); - Hashtable sequenceColours; - int thresholdTextColour = 0; Color textColour = Color.black; @@ -934,35 +932,6 @@ public class AlignViewport extends AlignmentViewport implements showHiddenMarkers = show; } - public Color getSequenceColour(SequenceI seq) - { - if (sequenceColours == null || !sequenceColours.containsKey(seq)) - { - return Color.white; - } - else - { - return (Color) sequenceColours.get(seq); - } - } - - public void setSequenceColour(SequenceI seq, Color col) - { - if (sequenceColours == null) - { - sequenceColours = new Hashtable(); - } - - if (col == null) - { - sequenceColours.remove(seq); - } - else - { - sequenceColours.put(seq, col); - } - } - /** * returns the visible column regions of the alignment * @@ -1044,23 +1013,6 @@ public class AlignViewport extends AlignmentViewport implements centreColumnLabels = centrecolumnlabels; } - public void updateSequenceIdColours() - { - if (sequenceColours == null) - { - sequenceColours = new Hashtable(); - } - for (SequenceGroup sg : alignment.getGroups()) - { - if (sg.idColour != null) - { - for (SequenceI s : sg.getSequences(getHiddenRepSequences())) - { - sequenceColours.put(s, sg.idColour); - } - } - } - } /** * enable or disable the display of Database Cross References in the sequence diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java old mode 100755 new mode 100644 index f2036de..5ee69f2 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -30,6 +30,8 @@ import net.miginfocom.swing.MigLayout; import jalview.bin.Cache; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.util.MessageManager; + import java.awt.Dimension; public class AnnotationColourChooser extends JPanel @@ -118,18 +120,19 @@ public class AnnotationColourChooser extends JPanel // Always get default shading from preferences. setDefaultMinMax(); + adjusting = true; if (oldcs instanceof AnnotationColourGradient) { AnnotationColourGradient acg = (AnnotationColourGradient) oldcs; - currentColours.setSelected(acg.predefinedColours); - if (!acg.predefinedColours) + currentColours.setSelected(acg.isPredefinedColours() || acg.getBaseColour()!=null); + if (!acg.isPredefinedColours() && acg.getBaseColour()==null) { minColour.setBackground(acg.getMinColour()); maxColour.setBackground(acg.getMaxColour()); } seqAssociated.setSelected(acg.isSeqAssociated()); + } - adjusting = true; annotations = new JComboBox( getAnnotationItems(seqAssociated.isSelected())); @@ -265,7 +268,7 @@ public class AnnotationColourChooser extends JPanel } }); ok.setOpaque(false); - ok.setText("OK"); + ok.setText(MessageManager.getString("action.ok")); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -274,7 +277,7 @@ public class AnnotationColourChooser extends JPanel } }); cancel.setOpaque(false); - cancel.setText("Cancel"); + cancel.setText(MessageManager.getString("action.cancel")); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -283,7 +286,7 @@ public class AnnotationColourChooser extends JPanel } }); defColours.setOpaque(false); - defColours.setText("Defaults"); + defColours.setText(MessageManager.getString("action.set_defaults")); defColours .setToolTipText("Reset min and max colours to defaults from user preferences."); defColours.addActionListener(new ActionListener() @@ -327,7 +330,7 @@ public class AnnotationColourChooser extends JPanel thresholdValue.setColumns(7); currentColours.setFont(JvSwingUtils.getLabelFont()); currentColours.setOpaque(false); - currentColours.setText("Use Original Colours"); + currentColours.setText(MessageManager.getString("label.use_original_colours")); currentColours.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -337,7 +340,7 @@ public class AnnotationColourChooser extends JPanel }); thresholdIsMin.setBackground(Color.white); thresholdIsMin.setFont(JvSwingUtils.getLabelFont()); - thresholdIsMin.setText("Threshold is Min/Max"); + thresholdIsMin.setText(MessageManager.getString("label.threshold_minmax")); thresholdIsMin.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) @@ -347,7 +350,7 @@ public class AnnotationColourChooser extends JPanel }); seqAssociated.setBackground(Color.white); seqAssociated.setFont(JvSwingUtils.getLabelFont()); - seqAssociated.setText("Per-sequence only"); + seqAssociated.setText(MessageManager.getString("label.per_sequence_only")); seqAssociated.addActionListener(new ActionListener() { @@ -548,7 +551,7 @@ public class AnnotationColourChooser extends JPanel if (currentAnnotation.graphMin == 0f && currentAnnotation.graphMax == 0f) { - acg.predefinedColours = true; + acg.setPredefinedColours(true); } acg.thresholdIsMinMax = thresholdIsMin.isSelected(); diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java old mode 100755 new mode 100644 index e255cd6..02758fa --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -26,6 +26,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.io.*; +import jalview.util.MessageManager; /** * @@ -229,7 +230,7 @@ public class AnnotationExporter extends JPanel { this.setLayout(new BorderLayout()); - toFile.setText("to File"); + toFile.setText(MessageManager.getString("label.to_file")); toFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -237,7 +238,7 @@ public class AnnotationExporter extends JPanel toFile_actionPerformed(e); } }); - toTextbox.setText("to Textbox"); + toTextbox.setText(MessageManager.getString("label.to_textbox")); toTextbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -245,7 +246,7 @@ public class AnnotationExporter extends JPanel toTextbox_actionPerformed(e); } }); - close.setText("Close"); + close.setText(MessageManager.getString("action.close")); close.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -259,9 +260,9 @@ public class AnnotationExporter extends JPanel GFFFormat.setOpaque(false); GFFFormat.setText("GFF"); CSVFormat.setOpaque(false); - CSVFormat.setText("CSV(Spreadsheet)"); + CSVFormat.setText(MessageManager.getString("label.csv_spreadsheet")); jLabel1.setHorizontalAlignment(SwingConstants.TRAILING); - jLabel1.setText("Format: "); + jLabel1.setText(MessageManager.getString("action.format") + " "); this.setBackground(Color.white); jPanel3.setBorder(BorderFactory.createEtchedBorder()); jPanel3.setOpaque(false); diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 8566e57..c7fd4fe 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -29,6 +29,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.io.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -1009,8 +1010,8 @@ public class AnnotationLabels extends JPanel implements MouseListener, if (!av.wrapAlignment && ((aa == null) || (aa.length < 1))) { - g.drawString("Right click", 2, 8); - g.drawString("to add annotation", 2, 18); + g.drawString(MessageManager.getString("label.right_click"), 2, 8); + g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18); } } } diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index ed899b1..ce731ad 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -20,11 +20,13 @@ package jalview.gui; import java.awt.*; import java.awt.event.*; import java.awt.image.*; + import javax.swing.*; import jalview.datamodel.*; import jalview.renderer.AnnotationRenderer; import jalview.renderer.AwtRenderPanelI; +import jalview.util.MessageManager; /** * AnnotationPanel displays visible portion of annotation rows below unwrapped @@ -266,7 +268,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, else if (evt.getActionCommand().equals(LABEL)) { String exMesg = collectAnnotVals(anot, av.getColumnSelection(), LABEL); - String label = JOptionPane.showInputDialog(this, "Enter label", + String label = JOptionPane.showInputDialog(this, MessageManager.getString("label.enter_label"), exMesg); if (label == null) @@ -348,7 +350,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, } String label = JOptionPane.showInputDialog( - "Enter a label for the structure?", symbol); + MessageManager.getString("label.enter_label_for_the_structure"), symbol); if (label == null) { @@ -663,7 +665,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, && aa[row].annotations[res].description != null && aa[row].annotations[res].description.length() > 0) { - this.setToolTipText(aa[row].annotations[res].description); + this.setToolTipText(""+JvSwingUtils.wrapTooltip(aa[row].annotations[res].description)+""); } else { @@ -922,7 +924,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, g.setColor(Color.black); if (av.validCharWidth) { - g.drawString("Alignment has no annotations", 20, 15); + g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15); } return; diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index b1f7e4c..3b4b738 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -33,6 +33,7 @@ import jalview.gui.ViewSelectionMenu.ViewSetProvider; import jalview.datamodel.PDBEntry; import jalview.io.*; import jalview.schemes.*; +import jalview.util.MessageManager; import jalview.util.Platform; public class AppJmol extends GStructureViewer implements Runnable, @@ -251,9 +252,8 @@ public class AppJmol extends GStructureViewer implements Runnable, if (alreadyMapped != null) { int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - pdbentry.getId() + " is already displayed." - + "\nDo you want to re-use this viewer ?", - "Map Sequences to Visible Window: " + pdbentry.getId(), + MessageManager.formatMessage("label.pdb_entry_is_already_displayed", new String[]{pdbentry.getId()}), + MessageManager.formatMessage("label.map_sequences_to_visible_window", new String[]{pdbentry.getId()}), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) @@ -310,9 +310,8 @@ public class AppJmol extends GStructureViewer implements Runnable, AppJmol topJmol = (AppJmol) jm.nextElement(); // TODO: highlight topJmol in view somehow int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - "Do you want to add " + pdbentry.getId() - + " to the view called\n'" + topJmol.getTitle() - + "'\n", "Align to existing structure view", + MessageManager.formatMessage("label.add_pdbentry_to_view", new String[]{pdbentry.getId(),topJmol.getTitle()}), + MessageManager.getString("label.align_to_existing_structure_view"), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) { @@ -781,10 +780,8 @@ public class AppJmol extends GStructureViewer implements Runnable, { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "The following pdb entries could not be retrieved from the PDB:\n" - + errormsgs.toString() - + "\nPlease try downloading them manually.", - "Couldn't load file", JOptionPane.ERROR_MESSAGE); + MessageManager.formatMessage("label.pdb_entries_couldnt_be_retrieved", new String[]{errormsgs.toString()}), + MessageManager.getString("label.couldnt_load_file"), JOptionPane.ERROR_MESSAGE); } long lastnotify = jmb.getLoadNotifiesHandled(); @@ -1145,7 +1142,7 @@ public class AppJmol extends GStructureViewer implements Runnable, g.fillRect(0, 0, currentSize.width, currentSize.height); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Error loading file...", 20, currentSize.height / 2); + g.drawString(MessageManager.getString("label.error_loading_file") + "...", 20, currentSize.height / 2); StringBuffer sb = new StringBuffer(); int lines = 0; for (int e = 0; e < jmb.pdbentry.length; e++) @@ -1170,7 +1167,7 @@ public class AppJmol extends GStructureViewer implements Runnable, g.fillRect(0, 0, currentSize.width, currentSize.height); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Retrieving PDB data....", 20, currentSize.height / 2); + g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2); } else { diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 1a4c7ac..4bff08c 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -17,17 +17,28 @@ */ package jalview.gui; -import java.util.*; +import jalview.bin.Cache; +import jalview.datamodel.ColumnSelection; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; +import jalview.structure.SecondaryStructureListener; +import jalview.structure.SelectionListener; +import jalview.structure.SelectionSource; +import jalview.structure.StructureSelectionManager; +import jalview.structure.VamsasSource; +import jalview.util.ShiftList; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.awt.*; -import javax.swing.*; +import javax.swing.JInternalFrame; +import javax.swing.JSplitPane; -import jalview.bin.Cache; -import jalview.datamodel.*; -import jalview.structure.*; -import jalview.util.ShiftList; import fr.orsay.lri.varna.VARNAPanel; import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax; import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses; @@ -64,12 +75,23 @@ public class AppVarna extends JInternalFrame implements public AppVarna(String sname, SequenceI seq, String strucseq, String struc, String name, AlignmentPanel ap) { + +// System.out.println("1:"+sname); +// System.out.println("2:"+seq); +// System.out.println("3:"+strucseq); +// System.out.println("4:"+struc); +// System.out.println("5:"+name); +// System.out.println("6:"+ap); this.ap = ap; ArrayList rnaList = new ArrayList(); RNA rna1 = new RNA(name); try { + rna1.setRNA(strucseq, replaceOddGaps(struc)); +// System.out.println("The sequence is :"+rna1.getSeq()); +// System.out.println("The sequence is:"+struc); +// System.out.println("The sequence is:"+replaceOddGaps(struc).toString()); } catch (ExceptionUnmatchedClosingParentheses e2) { e2.printStackTrace(); @@ -80,6 +102,7 @@ public class AppVarna extends JInternalFrame implements RNA trim = trimRNA(rna1, "trimmed " + sname); rnaList.add(trim); rnaList.add(rna1); + rnas.put(seq, rna1); rnas.put(seq, trim); rna1.setName(sname + " (with gaps)"); @@ -87,7 +110,7 @@ public class AppVarna extends JInternalFrame implements { seqs.put(trim, seq); seqs.put(rna1, seq); - + /** * if (false || seq.getStart()!=1) { for (RNA rshift:rnaList) { ShiftList * shift=offsets.get(rshift); if (shift==null) { offsets.put(rshift, @@ -97,16 +120,18 @@ public class AppVarna extends JInternalFrame implements } vab = new AppVarnaBinding(rnaList); // vab = new AppVarnaBinding(seq,struc); - // System.out.println("Hallo: "+name); this.name = sname + " trimmed to " + name; initVarna(); + ssm = ap.getStructureSelectionManager(); + //System.out.println(ssm.toString()); ssm.addStructureViewerListener(this); ssm.addSelectionListener(this); } public void initVarna() { + // vab.setFinishedInit(false); varnaPanel = vab.get_varnaPanel(); setBackground(Color.white); @@ -121,6 +146,7 @@ public class AppVarna extends JInternalFrame implements getBounds().width, getBounds().height); this.pack(); showPanel(true); + } public String replaceOddGaps(String oldStr) @@ -136,6 +162,7 @@ public class AppVarna extends JInternalFrame implements public RNA trimRNA(RNA rna, String name) { ShiftList offset = new ShiftList(); + RNA rnaTrim = new RNA(name); try { @@ -398,4 +425,18 @@ public class AppVarna extends JInternalFrame implements } + @Override + public void onTranslationChanged() + { + // TODO Auto-generated method stub + + } + + @Override + public void onZoomLevelChanged() + { + // TODO Auto-generated method stub + + } + } diff --git a/src/jalview/gui/AppVarnaBinding.java b/src/jalview/gui/AppVarnaBinding.java index 81452af..10a40b4 100644 --- a/src/jalview/gui/AppVarnaBinding.java +++ b/src/jalview/gui/AppVarnaBinding.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -43,20 +45,14 @@ import java.util.List; import javax.swing.DefaultListModel; import javax.swing.DefaultListSelectionModel; -import javax.swing.Icon; import javax.swing.JButton; -import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; -import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JSplitPane; import javax.swing.JTextField; import javax.swing.ListModel; import javax.swing.ListSelectionModel; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -104,17 +100,17 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding private JTextField _seq = new JTextField(); - private JLabel _strLabel = new JLabel(" Str:"); + private JLabel _strLabel = new JLabel(MessageManager.getString("label.str")); - private JLabel _seqLabel = new JLabel(" Seq:"); + private JLabel _seqLabel = new JLabel(MessageManager.getString("label.seq")); - private JButton _createButton = new JButton("Create"); + private JButton _createButton = new JButton(MessageManager.getString("action.create")); - private JButton _updateButton = new JButton("Update"); + private JButton _updateButton = new JButton(MessageManager.getString("action.update")); - private JButton _deleteButton = new JButton("Delete"); + private JButton _deleteButton = new JButton(MessageManager.getString("action.delete")); - private JButton _duplicateButton = new JButton("Snapshot"); + private JButton _duplicateButton = new JButton(MessageManager.getString("action.snapshot")); protected JPanel _listPanel = new JPanel(); @@ -146,16 +142,19 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding { // super("VARNA in Jalview"); initVarna(seq, struc); + } public AppVarnaBinding(ArrayList rnaList) { + // super("VARNA in Jalview"); initVarnaEdit(rnaList); } private void initVarna(String seq, String str) { + DefaultListModel dlm = new DefaultListModel(); DefaultListSelectionModel m = new DefaultListSelectionModel(); @@ -188,6 +187,7 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding try { + vp = new VARNAPanel("0", "."); _RNA1.setRNA(seq, str); _RNA1.drawRNARadiate(vp.getConfig()); @@ -216,6 +216,7 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding private void initVarnaEdit(ArrayList rnaInList) { + DefaultListModel dlm = new DefaultListModel(); int marginTools = 40; @@ -239,7 +240,8 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding FullBackup sel = (FullBackup) _sideList.getSelectedValue(); Mapping map = Mapping.DefaultOutermostMapping(vp.getRNA() .getSize(), sel.rna.getSize()); - vp.showRNAInterpolated(sel.rna, sel.config, map); + //vp.showRNAInterpolated(sel.rna, sel.config, map); + vp.showRNA(sel.rna, sel.config); // _seq.setText(sel.rna.getSeq()); _str.setText(sel.rna.getStructDBN()); } @@ -249,10 +251,12 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding try { + vp = new VARNAPanel("0", "."); for (int i = 0; i < rnaInList.size(); i++) { rnaInList.get(i).drawRNARadiate(vp.getConfig()); + } } catch (ExceptionNonEqualLength e) { @@ -339,7 +343,7 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding ops.add(_deleteButton); ops.add(_duplicateButton); - JLabel j = new JLabel("Structures Manager", JLabel.CENTER); + JLabel j = new JLabel(MessageManager.getString("label.structures_manager"), JLabel.CENTER); _listPanel.setLayout(new BorderLayout()); // _listPanel.add(ops, BorderLayout.SOUTH); @@ -801,7 +805,12 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding public void onUINewStructure(VARNAConfig v, RNA r) { - _rnaList.add(v, r, "", true); + // patch to fix infinite loop + // The problem is that onUINewStructure is called when user clicks + // check with Yann about whether Jalview should do anything with this event. + // e.g. if user has used VARNA's menu to import a structure .. Jalview may need to be told which structure is displayed. + + // _rnaList.add(v, r, "", true); } public void onWarningEmitted(String s) @@ -931,6 +940,20 @@ public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding // TODO Auto-generated method stub } + + @Override + public void onZoomLevelChanged() + { + // TODO Auto-generated method stub + + } + + @Override + public void onTranslationChanged() + { + // TODO Auto-generated method stub + + } } /* diff --git a/src/jalview/gui/AssociatePdbFileWithSeq.java b/src/jalview/gui/AssociatePdbFileWithSeq.java index 6896863..efb4863 100644 --- a/src/jalview/gui/AssociatePdbFileWithSeq.java +++ b/src/jalview/gui/AssociatePdbFileWithSeq.java @@ -18,9 +18,9 @@ package jalview.gui; import javax.swing.JOptionPane; - import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; +import jalview.util.MessageManager; /** * GUI related routines for associating PDB files with sequences @@ -54,9 +54,8 @@ public class AssociatePdbFileWithSeq reply = JOptionPane .showInternalInputDialog( Desktop.desktop, - "Couldn't find a PDB id in the file supplied." - + "Please enter an Id to identify this structure.", - "No PDB Id in File", JOptionPane.QUESTION_MESSAGE); + MessageManager.getString("label.couldnt_find_pdb_id_in_file"), + MessageManager.getString("label.no_pdb_id_in_file"), JOptionPane.QUESTION_MESSAGE); } if (reply == null) { @@ -69,6 +68,7 @@ public class AssociatePdbFileWithSeq { entry.setId(pdbfile.id); } + } catch (java.io.IOException ex) { ex.printStackTrace(); @@ -78,5 +78,4 @@ public class AssociatePdbFileWithSeq sequence.getDatasetSequence().addPDBId(entry); return entry; } - } diff --git a/src/jalview/gui/BlogReader.java b/src/jalview/gui/BlogReader.java index 7b6567d..c0cfb78 100644 --- a/src/jalview/gui/BlogReader.java +++ b/src/jalview/gui/BlogReader.java @@ -18,6 +18,8 @@ package jalview.gui; import jalview.bin.Cache; +import jalview.util.MessageManager; + import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -349,7 +351,7 @@ public class BlogReader extends JPanel java.util.Date earliest = null; try { - earliest = new SimpleDateFormat("YYYY-MM-DD").parse(chan + earliest = new SimpleDateFormat("YYYY-MM-DD",MessageManager.getLocale()).parse(chan .getHTTPLastModified()); } catch (Exception x) { @@ -435,7 +437,7 @@ public class BlogReader extends JPanel topBottomSplitPane.setBottomComponent(bottomPanel); JScrollPane spTextDescription = new JScrollPane(textDescription); textDescription.setText(""); - statusBar.setText(" [Status] "); + statusBar.setText(MessageManager.getString("label.status")); buttonRefresh.addActionListener(new ActionListener() { @@ -477,7 +479,7 @@ public class BlogReader extends JPanel _popupChannels); listItems.addMouseListener(popupAdapter); listItems.setCellRenderer(new ItemsRenderer()); - lblChannels.setText("Channels"); + lblChannels.setText(MessageManager.getString("label.channels")); } private void postInit() @@ -811,8 +813,7 @@ class ChannelsRenderer extends DefaultListCellRenderer if (value instanceof Channel) { Channel channel = (Channel) value; - component.setText(channel.getTitle() + " (" - + channel.getUnreadItemCount() + ")"); + component.setText(MessageManager.formatMessage("label.channel_title_item_count", new String[]{channel.getTitle(),Integer.valueOf(channel.getUnreadItemCount()).toString()})); component.setToolTipText(channel.getURL()); } return component; @@ -835,9 +836,7 @@ class ItemsRenderer extends DefaultListCellRenderer Item item = (Item) value; if (item.getPublishDate() != null) { - component.setText(DateFormat.getDateInstance().format( - item.getPublishDate()) - + " " + item.getTitle()); + component.setText(MessageManager.formatMessage("label.blog_item_published_on_date", new String[]{DateFormat.getDateInstance(DateFormat.LONG, MessageManager.getLocale()).format(item.getPublishDate()).toString(),item.getTitle()})); } component.setToolTipText(item.getLink()); if (!item.isRead()) diff --git a/src/jalview/gui/Console.java b/src/jalview/gui/Console.java index 19526aa..965d010 100644 --- a/src/jalview/gui/Console.java +++ b/src/jalview/gui/Console.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.io.*; import java.awt.*; import java.awt.event.*; @@ -91,7 +93,7 @@ public class Console extends WindowAdapter implements WindowListener, // textArea = cpt.getTextArea(); textArea = new JTextArea(); textArea.setEditable(false); - JButton button = new JButton("clear"); + JButton button = new JButton(MessageManager.getString("action.clear")); // frame = cpt; frame.getContentPane().setLayout(new BorderLayout()); diff --git a/src/jalview/gui/CutAndPasteHtmlTransfer.java b/src/jalview/gui/CutAndPasteHtmlTransfer.java index ccb6c59..02b375f 100644 --- a/src/jalview/gui/CutAndPasteHtmlTransfer.java +++ b/src/jalview/gui/CutAndPasteHtmlTransfer.java @@ -29,6 +29,7 @@ import javax.swing.event.HyperlinkEvent.EventType; import jalview.io.*; import jalview.jbgui.*; +import jalview.util.MessageManager; /** * Cut'n'paste files into the desktop See JAL-1105 @@ -103,7 +104,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer this.viewport = viewport; if (viewport != null) { - ok.setText("Add"); + ok.setText(MessageManager.getString("action.add")); } getContentPane().add(inputButtonPanel, java.awt.BorderLayout.SOUTH); diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java old mode 100755 new mode 100644 index cb71128..2a555d0 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -25,6 +25,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.io.*; import jalview.jbgui.*; +import jalview.util.MessageManager; /** * Cut'n'paste files into the desktop See JAL-1105 @@ -57,7 +58,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer this.viewport = viewport; if (viewport != null) { - ok.setText("Add"); + ok.setText(MessageManager.getString("action.add")); } getContentPane().add(inputButtonPanel, java.awt.BorderLayout.SOUTH); @@ -176,8 +177,8 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer } catch (java.io.IOException ex) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't read the pasted text.\n" + ex.toString(), - "Error parsing text", JOptionPane.WARNING_MESSAGE); + MessageManager.formatMessage("label.couldnt_read_pasted_text", new String[]{ex.toString()}), + MessageManager.getString("label.error_parsing_text"), JOptionPane.WARNING_MESSAGE); } } @@ -200,7 +201,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer af.currentFileFormat = format; Desktop.addInternalFrame(af, "Cut & Paste input - " + format, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); - af.statusBar.setText("Successfully pasted alignment file"); + af.statusBar.setText(MessageManager.getString("label.successfully_pasted_alignment_file")); try { diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java old mode 100755 new mode 100644 index 3efde6a..293f9db --- a/src/jalview/gui/DasSourceBrowser.java +++ b/src/jalview/gui/DasSourceBrowser.java @@ -18,6 +18,7 @@ package jalview.gui; import jalview.jbgui.GDasSourceBrowser; +import jalview.util.MessageManager; import jalview.util.TableSorter; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.dbsources.das.api.jalviewSourceI; @@ -170,8 +171,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements if (nickName == null) { - fullDetails.setText(text + "Select a DAS service from the table" - + " to read a full description here."); + fullDetails.setText(text + MessageManager.getString("label.select_das_service_from_table")); return; } @@ -430,21 +430,21 @@ public class DasSourceBrowser extends GDasSourceBrowser implements JTextField nametf = new JTextField(nickname, 40); JTextField urltf = new JTextField(url, 40); - JCheckBox seqs = new JCheckBox("Sequence Source"); + JCheckBox seqs = new JCheckBox(MessageManager.getString("label.sequence_source")); seqs.setSelected(seqsrc); JPanel panel = new JPanel(new BorderLayout()); JPanel pane12 = new JPanel(new BorderLayout()); - pane12.add(new JLabel("Nickname: "), BorderLayout.CENTER); + pane12.add(new JLabel(MessageManager.getString("label.structure_manager")), BorderLayout.CENTER); pane12.add(nametf, BorderLayout.EAST); panel.add(pane12, BorderLayout.NORTH); pane12 = new JPanel(new BorderLayout()); - pane12.add(new JLabel("URL: "), BorderLayout.NORTH); + pane12.add(new JLabel(MessageManager.getString("label.url")), BorderLayout.NORTH); pane12.add(seqs, BorderLayout.SOUTH); pane12.add(urltf, BorderLayout.EAST); panel.add(pane12, BorderLayout.SOUTH); int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - panel, "Enter Nickname & URL of Local DAS Source", + panel, MessageManager.getString("label.enter_local_das_source"), JOptionPane.OK_CANCEL_OPTION); if (reply != JOptionPane.OK_OPTION) @@ -517,8 +517,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements if (!sourceRegistry.getSource(nickname).isLocal()) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "You can only edit or remove local DAS Sources!", - "Public DAS source - not editable", + MessageManager.getString("label.you_can_only_edit_or_remove_local_das_sources"), + MessageManager.getString("label.public_das_source"), JOptionPane.WARNING_MESSAGE); return; } diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 877aebb..345c529 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -23,6 +23,7 @@ import jalview.io.FormatAdapter; import jalview.io.IdentifyFile; import jalview.io.JalviewFileChooser; import jalview.io.JalviewFileView; +import jalview.util.MessageManager; import jalview.ws.params.ParamManager; import java.awt.BorderLayout; @@ -647,8 +648,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements // A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN // IF JALVIEW IS RUNNING HEADLESS // /////////////////////////////////////////////// - if (System.getProperty("java.awt.headless") != null - && System.getProperty("java.awt.headless").equals("true")) + if (instance == null || (System.getProperty("java.awt.headless") != null + && System.getProperty("java.awt.headless").equals("true"))) { return; } @@ -912,7 +913,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements .getSelectedFile().getParent()); String format = null; - if (chooser.getSelectedFormat().equals("Jalview")) + if (chooser.getSelectedFormat()!=null && chooser.getSelectedFormat().equals("Jalview")) { format = "Jalview"; } @@ -943,7 +944,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements { // This construct allows us to have a wider textfield // for viewing - JLabel label = new JLabel("Enter URL of Input File"); + JLabel label = new JLabel(MessageManager.getString("label.input_file_url")); final JComboBox history = new JComboBox(); JPanel panel = new JPanel(new GridLayout(2, 1)); @@ -968,7 +969,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements } int reply = JOptionPane.showInternalConfirmDialog(desktop, panel, - "Input Alignment From URL", JOptionPane.OK_CANCEL_OPTION); + MessageManager.getString("label.input_alignment_from_url"), JOptionPane.OK_CANCEL_OPTION); if (reply != JOptionPane.OK_OPTION) { @@ -1509,6 +1510,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements { if (progressPanel != null) { + synchronized(progressPanel) { progressPanel.remove(progbar); GridLayout gl = (GridLayout) progressPanel.getLayout(); gl.setRows(gl.getRows() - 1); @@ -1517,6 +1519,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements this.getContentPane().remove(progressPanel); progressPanel = null; } + } } validate(); } @@ -1526,9 +1529,9 @@ public class Desktop extends jalview.jbgui.GDesktop implements fileLoadingCount--; if (fileLoadingCount < 1) { - for (JPanel flp : fileLoadingPanels) + while (fileLoadingPanels.size()>0) { - removeProgressPanel(flp); + removeProgressPanel(fileLoadingPanels.remove(0)); } fileLoadingPanels.clear(); fileLoadingCount = 0; @@ -1721,8 +1724,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements if (!vamsasImport(chooser.getSelectedFile())) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't import '" + fle + "' as a new vamsas session.", - "Vamsas Document Import Failed", + MessageManager.formatMessage("label.couldnt_import_as_vamsas_session", new String[]{fle}), + MessageManager.getString("label.vamsas_document_import_failed"), JOptionPane.ERROR_MESSAGE); } } @@ -1865,7 +1868,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements protected void setupVamsasConnectedGui() { - vamsasStart.setText("Session Update"); + vamsasStart.setText(MessageManager.getString("label.session_update")); vamsasSave.setVisible(true); vamsasStop.setVisible(true); vamsasImport.setVisible(false); // Document import to existing session is @@ -1877,7 +1880,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements vamsasSave.setVisible(false); vamsasStop.setVisible(false); vamsasImport.setVisible(true); - vamsasStart.setText("New Vamsas Session"); + vamsasStart.setText(MessageManager.getString("label.new_vamsas_session")); } public void vamsasStop_actionPerformed(ActionEvent e) @@ -2136,9 +2139,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements if (fm != null) { g.drawString( - "Total Free Memory: " + df.format(totalFreeMemory) - + "MB; Max Memory: " + df.format(maxMemory) - + "MB; " + df.format(percentUsage) + "%", 10, + MessageManager.formatMessage("label.memory_stats", new String[]{df.format(totalFreeMemory),df.format(maxMemory),df.format(percentUsage)}), 10, getHeight() - fm.getHeight()); } } @@ -2161,7 +2162,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements if (jalview.bin.Cache.groovyJarsPresent()) { groovyShell = new JMenuItem(); - groovyShell.setText("Groovy Console..."); + groovyShell.setText(MessageManager.getString("label.groovy_console")); groovyShell.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -2341,7 +2342,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements final JPanel progressPanel = (JPanel) progressBars.get(new Long(id)); if (handler.canCancel()) { - JButton cancel = new JButton("Cancel"); + JButton cancel = new JButton(MessageManager.getString("action.cancel")); final IProgressIndicator us = this; cancel.addActionListener(new ActionListener() { @@ -2436,7 +2437,9 @@ public class Desktop extends jalview.jbgui.GDesktop implements { boolean alive = true; Thread t0 = null, t1 = null, t2 = null; - + // JAL-940 - JALVIEW 1 services are now being EOLed as of JABA 2.1 release + if (true) + { // todo: changesupport handlers need to be transferred if (discoverer == null) { @@ -2446,28 +2449,31 @@ public class Desktop extends jalview.jbgui.GDesktop implements } // JAL-940 - disabled JWS1 service configuration - always start discoverer // until we phase out completely - if (true) - { (t0 = new Thread(discoverer)).start(); } - try + // ENFIN services are EOLed as of Jalview 2.8.1 release + if (false) { - if (Cache.getDefault("SHOW_ENFIN_SERVICES", true)) + try { - // EnfinEnvision web service menu entries are rebuild every time the - // menu is shown, so no changeSupport events are needed. - jalview.ws.EnfinEnvision2OneWay.getInstance(); - (t1 = new Thread(jalview.ws.EnfinEnvision2OneWay.getInstance())) - .start(); + if (Cache.getDefault("SHOW_ENFIN_SERVICES", true)) + { + // EnfinEnvision web service menu entries are rebuild every time the + // menu is shown, so no changeSupport events are needed. + jalview.ws.EnfinEnvision2OneWay.getInstance(); + (t1 = new Thread(jalview.ws.EnfinEnvision2OneWay.getInstance())) + .start(); + } + } catch (Exception e) + { + Cache.log + .info("Exception when trying to launch Envision2 workflow discovery.", + e); + Cache.log.info(e.getStackTrace()); } - } catch (Exception e) - { - Cache.log - .info("Exception when trying to launch Envision2 workflow discovery.", - e); - Cache.log.info(e.getStackTrace()); } + if (Cache.getDefault("SHOW_JWS2_SERVICES", true)) { if (jalview.ws.jws2.Jws2Discoverer.getDiscoverer().isRunning()) diff --git a/src/jalview/gui/EPSOptions.java b/src/jalview/gui/EPSOptions.java old mode 100755 new mode 100644 index 127e5cf..89e34f7 --- a/src/jalview/gui/EPSOptions.java +++ b/src/jalview/gui/EPSOptions.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.awt.*; import java.awt.event.*; import javax.swing.*; @@ -55,13 +57,13 @@ public class EPSOptions extends JPanel private void jbInit() throws Exception { lineart.setFont(JvSwingUtils.getLabelFont()); - lineart.setText("Lineart"); + lineart.setText(MessageManager.getString("label.lineart")); text.setFont(JvSwingUtils.getLabelFont()); - text.setText("Text"); + text.setText(MessageManager.getString("action.text")); text.setSelected(true); askAgain.setFont(JvSwingUtils.getLabelFont()); - askAgain.setText("Don\'t ask me again"); - ok.setText("OK"); + askAgain.setText(MessageManager.getString("label.dont_ask_me_again")); + ok.setText(MessageManager.getString("action.ok")); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -69,7 +71,7 @@ public class EPSOptions extends JPanel ok_actionPerformed(e); } }); - cancel.setText("Cancel"); + cancel.setText(MessageManager.getString("action.cancel")); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -78,7 +80,7 @@ public class EPSOptions extends JPanel } }); jLabel1.setFont(JvSwingUtils.getLabelFont()); - jLabel1.setText("Select EPS character rendering style"); + jLabel1.setText(MessageManager.getString("label.select_eps_character_rendering_style")); this.setLayout(borderLayout1); jPanel3.setBorder(BorderFactory.createEtchedBorder()); jPanel2.add(text); diff --git a/src/jalview/gui/EditNameDialog.java b/src/jalview/gui/EditNameDialog.java index 18076e6..f3aefe4 100644 --- a/src/jalview/gui/EditNameDialog.java +++ b/src/jalview/gui/EditNameDialog.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.awt.*; import javax.swing.*; @@ -24,9 +26,9 @@ public class EditNameDialog { JTextField id, description; - JButton ok = new JButton("Accept"); + JButton ok = new JButton(MessageManager.getString("action.accept")); - JButton cancel = new JButton("Cancel"); + JButton cancel = new JButton(MessageManager.getString("action.cancel")); boolean accept = false; diff --git a/src/jalview/gui/FeatureColourChooser.java b/src/jalview/gui/FeatureColourChooser.java index 1fb53e4..0fc55e1 100644 --- a/src/jalview/gui/FeatureColourChooser.java +++ b/src/jalview/gui/FeatureColourChooser.java @@ -27,6 +27,8 @@ import javax.swing.event.*; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.util.MessageManager; + import java.awt.Dimension; public class FeatureColourChooser extends JalviewDialog @@ -207,9 +209,9 @@ public class FeatureColourChooser extends JalviewDialog } }); maxColour.setBorder(new LineBorder(Color.black)); - minText.setText("Min:"); + minText.setText(MessageManager.getString("label.min")); minText.setFont(JvSwingUtils.getLabelFont()); - maxText.setText("Max:"); + maxText.setText(MessageManager.getString("label.max")); maxText.setFont(JvSwingUtils.getLabelFont()); this.setLayout(borderLayout1); jPanel2.setLayout(flowLayout1); @@ -245,7 +247,7 @@ public class FeatureColourChooser extends JalviewDialog thresholdValue.setColumns(7); jPanel3.setBackground(Color.white); thresholdIsMin.setBackground(Color.white); - thresholdIsMin.setText("Threshold is Min/Max"); + thresholdIsMin.setText(MessageManager.getString("label.threshold_minmax")); thresholdIsMin .setToolTipText("Toggle between absolute and relative display threshold."); thresholdIsMin.addActionListener(new ActionListener() @@ -256,7 +258,7 @@ public class FeatureColourChooser extends JalviewDialog } }); colourByLabel.setBackground(Color.white); - colourByLabel.setText("Colour by Label"); + colourByLabel.setText(MessageManager.getString("label.colour_by_label")); colourByLabel .setToolTipText("Display features of the same type with a different label using a different colour. (e.g. domain features)"); colourByLabel.addActionListener(new ActionListener() diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java old mode 100755 new mode 100644 index cc2c048..587c12f --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -30,6 +30,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.schemes.GraduatedColor; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -1061,7 +1062,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer { panel = new JPanel(new GridLayout(4, 1)); tmp = new JPanel(); - tmp.add(new JLabel("Select Feature: ")); + tmp.add(new JLabel(MessageManager.getString("label.select_feature"))); overlaps = new JComboBox(); for (int i = 0; i < features.length; i++) { @@ -1111,17 +1112,17 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer tmp = new JPanel(); panel.add(tmp); - tmp.add(new JLabel("Name: ", JLabel.RIGHT)); + tmp.add(new JLabel(MessageManager.getString("label.name"), JLabel.RIGHT)); tmp.add(name); tmp = new JPanel(); panel.add(tmp); - tmp.add(new JLabel("Group: ", JLabel.RIGHT)); + tmp.add(new JLabel(MessageManager.getString("label.group"), JLabel.RIGHT)); tmp.add(source); tmp = new JPanel(); panel.add(tmp); - tmp.add(new JLabel("Colour: ", JLabel.RIGHT)); + tmp.add(new JLabel(MessageManager.getString("label.colour"), JLabel.RIGHT)); tmp.add(colour); colour.setPreferredSize(new Dimension(150, 15)); colour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 9)); @@ -1133,7 +1134,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer bigPanel.add(panel, BorderLayout.NORTH); panel = new JPanel(); - panel.add(new JLabel("Description: ", JLabel.RIGHT)); + panel.add(new JLabel(MessageManager.getString("label.description"), JLabel.RIGHT)); description.setFont(JvSwingUtils.getTextAreaFont()); description.setLineWrap(true); panel.add(new JScrollPane(description)); @@ -1143,9 +1144,9 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer bigPanel.add(panel, BorderLayout.SOUTH); panel = new JPanel(); - panel.add(new JLabel(" Start:", JLabel.RIGHT)); + panel.add(new JLabel(MessageManager.getString("label.start"), JLabel.RIGHT)); panel.add(start); - panel.add(new JLabel(" End:", JLabel.RIGHT)); + panel.add(new JLabel(MessageManager.getString("label.end"), JLabel.RIGHT)); panel.add(end); bigPanel.add(panel, BorderLayout.CENTER); } diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java old mode 100755 new mode 100644 index 3ce17e2..106ced9 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -37,6 +37,7 @@ import jalview.datamodel.*; import jalview.io.*; import jalview.schemes.AnnotationColourGradient; import jalview.schemes.GraduatedColor; +import jalview.util.MessageManager; import jalview.ws.dbsources.das.api.jalviewSourceI; public class FeatureSettings extends JPanel @@ -905,7 +906,7 @@ public class FeatureSettings extends JPanel dasSettingsPane.setLayout(borderLayout3); bigPanel.setLayout(borderLayout4); invert.setFont(JvSwingUtils.getLabelFont()); - invert.setText("Invert Selection"); + invert.setText(MessageManager.getString("label.invert_selection")); invert.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -914,7 +915,7 @@ public class FeatureSettings extends JPanel } }); optimizeOrder.setFont(JvSwingUtils.getLabelFont()); - optimizeOrder.setText("Optimise Order"); + optimizeOrder.setText(MessageManager.getString("label.optimise_order")); optimizeOrder.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -923,7 +924,7 @@ public class FeatureSettings extends JPanel } }); sortByScore.setFont(JvSwingUtils.getLabelFont()); - sortByScore.setText("Seq sort by Score"); + sortByScore.setText(MessageManager.getString("label.seq_sort_by_score")); sortByScore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -941,7 +942,7 @@ public class FeatureSettings extends JPanel } }); cancel.setFont(JvSwingUtils.getLabelFont()); - cancel.setText("Cancel"); + cancel.setText(MessageManager.getString("action.cancel")); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -951,7 +952,7 @@ public class FeatureSettings extends JPanel } }); ok.setFont(JvSwingUtils.getLabelFont()); - ok.setText("OK"); + ok.setText(MessageManager.getString("action.ok")); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -960,7 +961,7 @@ public class FeatureSettings extends JPanel } }); loadColours.setFont(JvSwingUtils.getLabelFont()); - loadColours.setText("Load Colours"); + loadColours.setText(MessageManager.getString("label.load_colours")); loadColours.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -969,7 +970,7 @@ public class FeatureSettings extends JPanel } }); saveColours.setFont(JvSwingUtils.getLabelFont()); - saveColours.setText("Save Colours"); + saveColours.setText(MessageManager.getString("label.save_colours")); saveColours.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -987,7 +988,7 @@ public class FeatureSettings extends JPanel }); transparency.setMaximum(70); - fetchDAS.setText("Fetch DAS Features"); + fetchDAS.setText(MessageManager.getString("label.fetch_das_features")); fetchDAS.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -995,7 +996,7 @@ public class FeatureSettings extends JPanel fetchDAS_actionPerformed(e); } }); - saveDAS.setText("Save as default"); + saveDAS.setText(MessageManager.getString("action.save_as_default")); saveDAS.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1006,7 +1007,7 @@ public class FeatureSettings extends JPanel dasButtonPanel.setBorder(BorderFactory.createEtchedBorder()); dasSettingsPane.setBorder(null); cancelDAS.setEnabled(false); - cancelDAS.setText("Cancel Fetch"); + cancelDAS.setText(MessageManager.getString("action.cancel_fetch")); cancelDAS.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1311,9 +1312,8 @@ public class FeatureSettings extends JPanel { complete(); JOptionPane.showInternalConfirmDialog(Desktop.desktop, - "No das sources were selected.\n" - + "Please select some sources and\n" + " try again.", - "No Sources Selected", JOptionPane.DEFAULT_OPTION, + MessageManager.getString("label.no_das_sources_selected_warn"), + MessageManager.getString("label.no_das_sources_selected_title"), JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); } @@ -1593,7 +1593,7 @@ class FeatureIcon implements Icon // width/g.getFontMetrics().stringWidth("Label"), // height/g.getFontMetrics().getHeight()))); - g.drawString("Label", 0, 0); + g.drawString(MessageManager.getString("label.label"), 0, 0); } else diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 069c1f9..f63f74f 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -18,12 +18,13 @@ package jalview.gui; import java.util.*; - import java.awt.event.*; + import javax.swing.*; import jalview.datamodel.*; import jalview.jbgui.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -235,7 +236,7 @@ public class Finder extends GFinder // 'SelectRegion' selection if (!haveResults) { - JOptionPane.showInternalMessageDialog(this, "Finished searching", + JOptionPane.showInternalMessageDialog(this, MessageManager.getString("label.finished_searching"), null, JOptionPane.INFORMATION_MESSAGE); resIndex = -1; seqIndex = 0; diff --git a/src/jalview/gui/JDatabaseTree.java b/src/jalview/gui/JDatabaseTree.java index d954b76..e747055 100644 --- a/src/jalview/gui/JDatabaseTree.java +++ b/src/jalview/gui/JDatabaseTree.java @@ -18,6 +18,7 @@ package jalview.gui; import jalview.bin.Cache; +import jalview.util.MessageManager; import jalview.ws.seqfetcher.DbSourceProxy; import java.awt.BorderLayout; @@ -58,7 +59,7 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener JButton getDatabaseSelectorButton() { - final JButton viewdbs = new JButton("--- Select Database ---"); + final JButton viewdbs = new JButton(MessageManager.getString("action.select_ddbb")); viewdbs.addActionListener(new ActionListener() { @@ -405,23 +406,17 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener if (allowMultiSelections) { - dbstatus.setText("Selected " - + srcs.size() - + " database" - + (srcs.size() == 1 ? "" : "s") - + " to fetch from" - + (srcs.size() > 0 ? " with " + x + " test quer" - + (x == 1 ? "y" : "ies") : ".")); + dbstatus.setText(MessageManager.formatMessage("label.selected_database_to_fetch_from", new String[]{Integer.valueOf(srcs.size()).toString(),(srcs.size() == 1 ? "" : "s"),(srcs.size() > 0 ? " with " + x + " test quer" + (x == 1 ? "y" : "ies") : ".")})); dbstatex.setText(" "); } else { if (nm.length() > 0) { - dbstatus.setText("Database: " + nm); + dbstatus.setText(MessageManager.formatMessage("label.database_param",new String[]{nm})); if (qr.length() > 0) { - dbstatex.setText("Example: " + qr); + dbstatex.setText(MessageManager.formatMessage("label.example_param", new String[]{qr})); } else { diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index e88b190..45e8102 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -429,7 +429,7 @@ public class Jalview2XML object.setVamsasModel(new jalview.schemabinding.version2.VamsasModel()); object.setCreationDate(new java.util.Date(System.currentTimeMillis())); - object.setVersion(jalview.bin.Cache.getProperty("VERSION")); + object.setVersion(jalview.bin.Cache.getDefault("VERSION","Development Build")); jalview.datamodel.AlignmentI jal = av.getAlignment(); @@ -1069,6 +1069,8 @@ public class Jalview2XML ac.setMaxColour(acg.getMaxColour().getRGB()); ac.setMinColour(acg.getMinColour().getRGB()); + ac.setPerSequence(acg.isSeqAssociated()); + ac.setPredefinedColours(acg.isPredefinedColours()); view.setAnnotationColours(ac); view.setBgColour("AnnotationColourGradient"); } @@ -3238,7 +3240,14 @@ public class Jalview2XML .getAnnotationColours().getColourScheme()), view.getAnnotationColours().getAboveThreshold()); } - + if (view.getAnnotationColours().hasPerSequence()) + { + ((AnnotationColourGradient)cs).setSeqAssociated(view.getAnnotationColours().isPerSequence()); + } + if (view.getAnnotationColours().hasPredefinedColours()) + { + ((AnnotationColourGradient)cs).setPredefinedColours(view.getAnnotationColours().isPredefinedColours()); + } // Also use these settings for all the groups if (al.getGroups() != null) { @@ -3268,6 +3277,17 @@ public class Jalview2XML .getAlignment().getAlignmentAnnotation()[i], sg.cs, view.getAnnotationColours() .getAboveThreshold()); + if (cs instanceof AnnotationColourGradient) + { + if (view.getAnnotationColours().hasPerSequence()) + { + ((AnnotationColourGradient)cs).setSeqAssociated(view.getAnnotationColours().isPerSequence()); + } + if (view.getAnnotationColours().hasPredefinedColours()) + { + ((AnnotationColourGradient)cs).setPredefinedColours(view.getAnnotationColours().isPredefinedColours()); + } + } } } @@ -3467,6 +3487,7 @@ public class Jalview2XML view.getHeight()); af.alignPanel.updateAnnotation(false, true); // recompute any autoannotation reorderAutoannotation(af, al, autoAlan); + af.alignPanel.alignmentChanged(); return af; } diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index 639b9b2..3b6678d 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -26,6 +26,7 @@ import javax.swing.*; import org.exolab.castor.xml.*; import jalview.binding.*; import jalview.schemes.*; +import jalview.util.MessageManager; import jalview.util.jarInputStreamProvider; /** @@ -135,7 +136,8 @@ public class Jalview2XML_V1 System.err.println("Couldn't locate Jalview XML file : " + ex + "\n"); JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't locate " + file, "URL not found", + MessageManager.formatMessage("label.couldnt_locate", new String[]{file}), + MessageManager.getString("label.url_not_found"), JOptionPane.WARNING_MESSAGE); } }); diff --git a/src/jalview/gui/JalviewDialog.java b/src/jalview/gui/JalviewDialog.java index a74c435..7356f3a 100644 --- a/src/jalview/gui/JalviewDialog.java +++ b/src/jalview/gui/JalviewDialog.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.awt.Container; import java.awt.Rectangle; import java.awt.event.ActionEvent; @@ -87,7 +89,7 @@ public abstract class JalviewDialog extends JPanel this.block = block; ok.setOpaque(false); - ok.setText("OK"); + ok.setText(MessageManager.getString("action.ok")); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -97,7 +99,7 @@ public abstract class JalviewDialog extends JPanel } }); cancel.setOpaque(false); - cancel.setText("Cancel"); + cancel.setText(MessageManager.getString("action.cancel")); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) diff --git a/src/jalview/gui/MenuChooser.java b/src/jalview/gui/MenuChooser.java new file mode 100644 index 0000000..2ea7bca --- /dev/null +++ b/src/jalview/gui/MenuChooser.java @@ -0,0 +1,79 @@ +package jalview.gui; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; + +public class MenuChooser implements ActionListener +{ + public static boolean protein; + + private JFrame choosemenu = new JFrame("Animation"); + + private JButton bouton = new JButton("bouton 1"); + + private JButton bouton2 = new JButton("bouton 2"); + + private JPanel container = new JPanel(); + + private JLabel label = new JLabel("Le JLabel"); + + public MenuChooser() + { + + choosemenu.setSize(300, 300); + choosemenu.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + choosemenu.setLocationRelativeTo(null); + + container.setBackground(Color.white); + container.setLayout(new BorderLayout()); + + // On ajoute notre Fenetre à la liste des auditeurs de notre Bouton + bouton.addActionListener(this); + bouton2.addActionListener(this); + + JPanel south = new JPanel(); + south.add(bouton); + south.add(bouton2); + container.add(south, BorderLayout.SOUTH); + + // On change la couleur de police + label.setForeground(Color.blue); + // Et on change l'alignement du texte grâce aux attributs static de la + // classe JLabel + label.setHorizontalAlignment(JLabel.CENTER); + + container.add(label, BorderLayout.NORTH); + + choosemenu.setContentPane(container); + choosemenu.setVisible(true); + + } + + // ... + + // ******************************************************************************* + // LA VOILAAAAAAAAAAAAAA + // ******************************************************************************* + /** + * C'est la méthode qui sera appelée lors d'un clic sur notre bouton + */ + public void actionPerformed(ActionEvent arg0) + { + + if (arg0.getSource() == bouton) + protein = false; + label.setText("RNA menu"); + + if (arg0.getSource() == bouton2) + label.setText("Protein menu"); + protein = true; + } + +} diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java old mode 100755 new mode 100644 index d2a6426..663c262 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -26,6 +26,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.jbgui.*; +import jalview.util.MessageManager; import jalview.viewmodel.PCAModel; /** @@ -624,7 +625,7 @@ public class PCAPanel extends GPCAPanel implements Runnable, final JPanel progressPanel = (JPanel) progressBars.get(new Long(id)); if (handler.canCancel()) { - JButton cancel = new JButton("Cancel"); + JButton cancel = new JButton(MessageManager.getString("action.cancel")); final IProgressIndicator us = this; cancel.addActionListener(new ActionListener() { diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 1a367c5..037f007 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -70,6 +70,7 @@ public class PopupMenu extends JPopupMenu protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem(); // protected JRadioButtonMenuItem covariationColour = new // JRadioButtonMenuItem(); @@ -89,7 +90,7 @@ public class PopupMenu extends JPopupMenu JMenuItem sequenceSelDetails = new JMenuItem(); SequenceI sequence; - + JMenuItem createGroupMenuItem = new JMenuItem(); JMenuItem unGroupMenuItem = new JMenuItem(); JMenuItem outline = new JMenuItem(); @@ -121,7 +122,11 @@ public class PopupMenu extends JPopupMenu JMenu pdbMenu = new JMenu(); JMenuItem pdbFromFile = new JMenuItem(); - + // JBPNote: Commented these out - Should add these services via the web services menu system. + // JMenuItem ContraFold = new JMenuItem(); + + // JMenuItem RNAFold = new JMenuItem(); + JMenuItem enterPDB = new JMenuItem(); JMenuItem discoverPDB = new JMenuItem(); @@ -192,6 +197,7 @@ public class PopupMenu extends JPopupMenu colours.add(PIDColour); colours.add(BLOSUM62Colour); colours.add(purinePyrimidineColour); + colours.add(RNAInteractionColour); // colours.add(covariationColour); for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++) @@ -280,11 +286,23 @@ public class PopupMenu extends JPopupMenu menuItem = new JMenuItem(); menuItem.setText("2D RNA " + structureLine); menuItem.addActionListener(new java.awt.event.ActionListener() + { public void actionPerformed(ActionEvent e) { - new AppVarna(structureLine, seq, seq.getSequenceAsString(), - rnastruc, seq.getName(), ap); + //System.out.println("1:"+structureLine); + System.out.println("1:sname"+seq.getName()); + System.out.println("2:seq"+seq); + + //System.out.println("3:"+seq.getSequenceAsString()); + System.out.println("3:strucseq"+rnastruc); + //System.out.println("4:struc"+seq.getRNA()); + System.out.println("5:name"+seq.getName()); + System.out.println("6:ap"+ap); + new AppVarna(structureLine, seq, seq.getSequenceAsString(), rnastruc, seq + .getName(), ap); + //new AppVarna(seq.getName(),seq,rnastruc,seq.getRNA(), seq.getName(), ap); + System.out.println("end"); } }); viewStructureMenu.add(menuItem); @@ -310,6 +328,7 @@ public class PopupMenu extends JPopupMenu public void actionPerformed(ActionEvent e) { // TODO: VARNA does'nt print gaps in the sequence + new AppVarna(seq.getName() + " structure", seq, seq .getSequenceAsString(), rnastruc, seq.getName(), ap); @@ -392,9 +411,10 @@ public class PopupMenu extends JPopupMenu } SequenceGroup sg = ap.av.getSelectionGroup(); + boolean isDefinedGroup = (sg!=null) ? ap.av.getAlignment().getGroups().contains(sg) : false; if (sg != null && sg.getSize() > 0) - { + { groupName.setText("Name: " + sg.getName()); groupName.setText("Edit name and description of current group."); @@ -446,6 +466,8 @@ public class PopupMenu extends JPopupMenu { purinePyrimidineColour.setSelected(true); } + + /* * else if (sg.cs instanceof CovariationColourScheme) { * covariationColour.setSelected(true); } @@ -520,9 +542,15 @@ public class PopupMenu extends JPopupMenu editMenu.setVisible(false); } - if (!ap.av.getAlignment().getGroups().contains(sg)) + if (!isDefinedGroup) { + createGroupMenuItem.setVisible(true); unGroupMenuItem.setVisible(false); + jMenu1.setText("Edit New Group"); + } else { + createGroupMenuItem.setVisible(false); + unGroupMenuItem.setVisible(true); + jMenu1.setText("Edit Group"); } if (seq == null) @@ -935,6 +963,14 @@ public class PopupMenu extends JPopupMenu unGroupMenuItem_actionPerformed(); } }); + createGroupMenuItem.setText("Create Group"); + createGroupMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + createGroupMenuItem_actionPerformed(); + } + }); outline.setText("Border colour"); outline.addActionListener(new java.awt.event.ActionListener() @@ -1038,6 +1074,32 @@ public class PopupMenu extends JPopupMenu pdbFromFile_actionPerformed(); } }); +// RNAFold.setText("From RNA Fold with predict2D"); +// RNAFold.addActionListener(new ActionListener() +// { +// public void actionPerformed(ActionEvent e) +// { +// try { +// RNAFold_actionPerformed(); +// } catch (Exception e1) { +// // TODO Auto-generated catch block +// e1.printStackTrace(); +// } +// } +// }); +// ContraFold.setText("From Contra Fold with predict2D"); +// ContraFold.addActionListener(new ActionListener() +// { +// public void actionPerformed(ActionEvent e) +// { +// try { +// ContraFold_actionPerformed(); +// } catch (Exception e1) { +// // TODO Auto-generated catch block +// e1.printStackTrace(); +// } +// } +// }); enterPDB.setText("Enter PDB Id"); enterPDB.addActionListener(new ActionListener() { @@ -1097,6 +1159,8 @@ public class PopupMenu extends JPopupMenu groupMenu.add(editMenu); groupMenu.add(outputMenu); groupMenu.add(sequenceFeature); + groupMenu.add(createGroupMenuItem); + groupMenu.add(unGroupMenuItem); groupMenu.add(jMenu1); sequenceMenu.add(sequenceName); sequenceMenu.add(sequenceDetails); @@ -1113,9 +1177,10 @@ public class PopupMenu extends JPopupMenu colourMenu.add(turnColour); colourMenu.add(buriedColour); colourMenu.add(nucleotideMenuItem); - if (ap.getAlignment().isNucleotide()) - { - colourMenu.add(purinePyrimidineColour); + if (ap.getAlignment().isNucleotide()) { + // JBPNote - commented since the colourscheme isn't functional + // colourMenu.add(RNAInteractionColour); + colourMenu.add(purinePyrimidineColour); } // colourMenu.add(covariationColour); colourMenu.add(userDefinedColour); @@ -1150,10 +1215,12 @@ public class PopupMenu extends JPopupMenu editMenu.add(lowerCase); editMenu.add(toggle); pdbMenu.add(pdbFromFile); + // JBPNote: These shouldn't be added here - should appear in a generic 'apply web service to this sequence menu' + // pdbMenu.add(RNAFold); + // pdbMenu.add(ContraFold); pdbMenu.add(enterPDB); pdbMenu.add(discoverPDB); jMenu1.add(groupName); - jMenu1.add(unGroupMenuItem); jMenu1.add(colourMenu); jMenu1.add(showBoxes); jMenu1.add(showText); @@ -1278,6 +1345,8 @@ public class PopupMenu extends JPopupMenu purinePyrimidineColour_actionPerformed(); } }); + + /* * covariationColour.addActionListener(new java.awt.event.ActionListener() { * public void actionPerformed(ActionEvent e) { @@ -1465,6 +1534,7 @@ public class PopupMenu extends JPopupMenu refresh(); } + /* * protected void covariationColour_actionPerformed() { getGroup().cs = new * CovariationColourScheme(sequence.getAnnotation()[0]); refresh(); } @@ -1626,7 +1696,7 @@ public class PopupMenu extends JPopupMenu sequence.getAnnotation()[0], null, AnnotationColourGradient.NO_THRESHOLD); - acg.predefinedColours = true; + acg.setPredefinedColours(true); sg.cs = acg; refresh(); @@ -1726,6 +1796,11 @@ public class PopupMenu extends JPopupMenu ap.av.setSelectionGroup(null); refresh(); } + void createGroupMenuItem_actionPerformed() + { + getGroup(); // implicitly creates group - note - should apply defaults / use standard alignment window logic for this + refresh(); + } /** * DOCUMENT ME! @@ -1939,7 +2014,18 @@ public class PopupMenu extends JPopupMenu } } - + // JBNote: commented out - these won't be instantiated here...! +// public void RNAFold_actionPerformed() throws Exception +// { +// Predict2D P2D = new Predict2D(); +// P2D.getStructure2DFromRNAFold("toto"); +// } +// +// public void ContraFold_actionPerformed() throws Exception +// { +// Predict2D P2D = new Predict2D(); +// P2D.getStructure2DFromContraFold("toto"); +// } public void enterPDB_actionPerformed() { String id = JOptionPane.showInternalInputDialog(Desktop.desktop, diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index a0fa216..f8932d1 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -28,6 +28,7 @@ import jalview.bin.*; import jalview.io.*; import jalview.jbgui.*; import jalview.schemes.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -553,7 +554,7 @@ public class Preferences extends GPreferences while (!valid) { if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link, - "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1, + MessageManager.getString("label.new_sequence_url_link"), JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION) { if (link.checkValid()) @@ -579,7 +580,7 @@ public class Preferences extends GPreferences if (index == -1) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "No link selected!", "No link selected", + MessageManager.getString("label.no_link_selected"), MessageManager.getString("label.no_link_selected"), JOptionPane.WARNING_MESSAGE); return; } @@ -592,7 +593,7 @@ public class Preferences extends GPreferences { if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link, - "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1, + MessageManager.getString("label.new_sequence_url_link"), JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION) { if (link.checkValid()) @@ -617,7 +618,7 @@ public class Preferences extends GPreferences if (index == -1) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "No link selected!", "No link selected", + MessageManager.getString("label.no_link_selected"), MessageManager.getString("label.no_link_selected"), JOptionPane.WARNING_MESSAGE); return; } diff --git a/src/jalview/gui/RotatableCanvas.java b/src/jalview/gui/RotatableCanvas.java index 9f9f39c..91eb991 100755 --- a/src/jalview/gui/RotatableCanvas.java +++ b/src/jalview/gui/RotatableCanvas.java @@ -18,14 +18,15 @@ package jalview.gui; import java.util.*; - import java.awt.*; import java.awt.event.*; + import javax.swing.*; import jalview.api.RotatableCanvasI; import jalview.datamodel.*; import jalview.math.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -369,7 +370,7 @@ public class RotatableCanvas extends JPanel implements MouseListener, if (points == null) { g.setFont(new Font("Verdana", Font.PLAIN, 18)); - g.drawString("Calculating PCA....", 20, getHeight() / 2); + g.drawString(MessageManager.getString("label.calculating_pca")+ "....", 20, getHeight() / 2); } else { diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index 89d315c..abd41c0 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -19,9 +19,11 @@ package jalview.gui; import java.awt.*; import java.awt.event.*; + import javax.swing.*; import jalview.datamodel.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -503,7 +505,7 @@ public class ScalePanel extends JPanel implements MouseMotionListener, if (reveal != null && reveal[0] > startx && reveal[0] < endx) { - gg.drawString("Reveal Columns", reveal[0] * av.charWidth, 0); + gg.drawString(MessageManager.getString("label.reveal_columns"), reveal[0] * av.charWidth, 0); } } diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 86c52b3..c71b154 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -31,6 +31,7 @@ import jalview.datamodel.*; import jalview.io.SequenceAnnotationReport; import jalview.schemes.*; import jalview.structure.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -129,8 +130,7 @@ public class SeqPanel extends JPanel implements MouseListener, addMouseMotionListener(this); addMouseListener(this); addMouseWheelListener(this); - ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + ssm = av.getStructureSelectionManager(); ssm.addStructureViewerListener(this); ssm.addSelectionListener(this); } @@ -1431,8 +1431,8 @@ public class SeqPanel extends JPanel implements MouseListener, if (av.wrapAlignment && seq > av.getAlignment().getHeight()) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Cannot edit annotations in wrapped view.", - "Wrapped view - no edit", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.cannot_edit_annotations_in_wrapped_view"), + MessageManager.getString("label.wrapped_view_no_edit"), JOptionPane.WARNING_MESSAGE); return; } diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index faebb1a..c069adb 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -31,6 +31,7 @@ import com.stevesoft.pat.Regex; import jalview.datamodel.*; import jalview.io.*; import jalview.util.DBRefUtils; +import jalview.util.MessageManager; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.seqfetcher.DbSourceProxy; import java.awt.BorderLayout; @@ -843,7 +844,7 @@ public class SequenceFetcher extends JPanel implements Runnable public void run() { JOptionPane.showInternalMessageDialog(Desktop.desktop, error, - "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.error_retrieving_data"), JOptionPane.WARNING_MESSAGE); } }); } diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index d1003e5..09708da 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -608,7 +608,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (tree == null) { - g.drawString("Calculating tree....", 20, getHeight() / 2); + g.drawString(MessageManager.getString("label.calculating_tree") + "....", 20, getHeight() / 2); } else { @@ -852,7 +852,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, { aps[a].av.setSelectionGroup(null); aps[a].av.getAlignment().deleteAllGroups(); - aps[a].av.sequenceColours = null; + aps[a].av.clearSequenceColours(); } colourGroups(); } diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 60c45c5..a104ad9 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -23,6 +23,7 @@ import jalview.jbgui.GUserDefinedColours; import jalview.schemes.ColourSchemeI; import jalview.schemes.ResidueProperties; import jalview.schemes.UserColourScheme; +import jalview.util.MessageManager; import java.awt.Color; import java.awt.Font; @@ -710,8 +711,8 @@ public class UserDefinedColours extends GUserDefinedColours implements if (schemeName.getText().trim().length() < 1) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "User colour scheme must have a name!", - "No name for colour scheme", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.user_colour_scheme_must_have_name"), + MessageManager.getString("label.no_name_colour_scheme"), JOptionPane.WARNING_MESSAGE); return; } @@ -720,10 +721,8 @@ public class UserDefinedColours extends GUserDefinedColours implements { int reply = JOptionPane.showInternalConfirmDialog( Desktop.desktop, - "Colour scheme " + schemeName.getText() + " exists." - + "\nContinue saving colour scheme as " - + schemeName.getText() + "?", - "Duplicate scheme name", JOptionPane.YES_NO_OPTION); + MessageManager.formatMessage("label.colour_scheme_exists_overwrite", new String[]{schemeName.getText(),schemeName.getText()}), + MessageManager.getString("label.duplicate_scheme_name"), JOptionPane.YES_NO_OPTION); if (reply != JOptionPane.YES_OPTION) { return; diff --git a/src/jalview/gui/UserQuestionnaireCheck.java b/src/jalview/gui/UserQuestionnaireCheck.java index a232987..92dd354 100644 --- a/src/jalview/gui/UserQuestionnaireCheck.java +++ b/src/jalview/gui/UserQuestionnaireCheck.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.io.*; import java.net.*; @@ -137,9 +139,8 @@ public class UserQuestionnaireCheck implements Runnable jalview.bin.Cache.log.info("Prompting user for questionnaire at " + qurl); int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - "There is a new Questionnaire available." - + "Would you like to complete it now ?\n", - "Jalview User Survey", JOptionPane.YES_NO_OPTION, + MessageManager.getString("label.jalview_new_questionnaire"), + MessageManager.getString("label.jalview_user_survey"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (reply == JOptionPane.YES_OPTION) diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java old mode 100755 new mode 100644 index c44e041..ea2bacb --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -29,6 +29,7 @@ import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.StyleSheet; import jalview.jbgui.*; +import jalview.util.MessageManager; import jalview.ws.WSClientI; /** @@ -766,32 +767,32 @@ public class WebserviceInfo extends GWebserviceInfo implements switch (currentStatus) { case STATE_QUEUING: - g.drawString(title.concat(" - queuing"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_queueing")), 60, 30); break; case STATE_RUNNING: - g.drawString(title.concat(" - running"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_running")), 60, 30); break; case STATE_STOPPED_OK: - g.drawString(title.concat(" - complete"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_completed")), 60, 30); break; case STATE_CANCELLED_OK: - g.drawString(title.concat(" - job cancelled!"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_job_cancelled")), 60, 30); break; case STATE_STOPPED_ERROR: - g.drawString(title.concat(" - job error!"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_job_error")), 60, 30); break; case STATE_STOPPED_SERVERERROR: - g.drawString(title.concat(" - Server Error! (try later)"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.server_error_try_later")), 60, 30); break; } @@ -895,7 +896,7 @@ public class WebserviceInfo extends GWebserviceInfo implements final JPanel progressPanel = (JPanel) progressBars.get(new Long(id)); if (handler.canCancel()) { - JButton cancel = new JButton("Cancel"); + JButton cancel = new JButton(MessageManager.getString("action.cancel")); final IProgressIndicator us = this; cancel.addActionListener(new ActionListener() { diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index 77f3155..4f222bf 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -19,6 +19,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; @@ -337,7 +338,7 @@ public class WsJobParameters extends JPanel implements ItemListener, GridBagLayout gbl = new GridBagLayout(); SetNamePanel.setLayout(gbl); - JLabel setNameLabel = new JLabel("Current parameter set name :"); + JLabel setNameLabel = new JLabel(MessageManager.getString("label.current_parameter_set_name")); setNameLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); setNameInfo.add(setNameLabel); diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index 6be5d44..744cd8f 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -19,6 +19,7 @@ package jalview.gui; import jalview.bin.Cache; import jalview.jbgui.GWsPreferences; +import jalview.util.MessageManager; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.rest.RestServiceDescription; @@ -445,7 +446,7 @@ public class WsPreferences extends GWsPreferences JTextField urltf = new JTextField(url, 40); JPanel panel = new JPanel(new BorderLayout()); JPanel pane12 = new JPanel(new BorderLayout()); - pane12.add(new JLabel("URL: "), BorderLayout.CENTER); + pane12.add(new JLabel(MessageManager.getString("label.url")), BorderLayout.CENTER); pane12.add(urltf, BorderLayout.EAST); panel.add(pane12, BorderLayout.NORTH); boolean valid = false; @@ -471,7 +472,7 @@ public class WsPreferences extends GWsPreferences { valid = false; JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Invalid URL !"); + MessageManager.getString("label.invalid_url")); } } if (valid && resp == JOptionPane.OK_OPTION) diff --git a/src/jalview/io/AlignFile.java b/src/jalview/io/AlignFile.java index 6c1a343..81d0ae4 100755 --- a/src/jalview/io/AlignFile.java +++ b/src/jalview/io/AlignFile.java @@ -65,6 +65,8 @@ public abstract class AlignFile extends FileParse */ public AlignFile() { + // Shouldn't we init data structures (JBPNote: not sure - initData is for initialising the structures used for reading from a datasource, and the bare constructor hasn't got any datasource) + initData(); } /** diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 67d50ee..eac7cf2 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -38,22 +38,21 @@ public class AppletFormatAdapter */ public static final String[] READABLE_FORMATS = new String[] { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH", - "PDB", "JnetFile" }; // , "SimpleBLAST" }; + "PDB", "JnetFile" , "RNAML"}; // , "SimpleBLAST" }; /** * List of valid format strings for use by callers of the formatSequences * method */ public static final String[] WRITEABLE_FORMATS = new String[] - { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH", - "AMSA" }; + { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "AMSA" }; /** * List of extensions corresponding to file format types in WRITABLE_FNAMES * that are writable by the application. */ public static final String[] WRITABLE_EXTENSIONS = new String[] - { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", + { "fa,faa,fasta,fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", "sto,stk" }; /** @@ -69,8 +68,8 @@ public class AppletFormatAdapter * corresponding to READABLE_FNAMES */ public static final String[] READABLE_EXTENSIONS = new String[] - { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", - "sto,stk" }; // , + { "fa,faa,fasta,fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", + "sto,stk","xml,rnaml" }; // , // ".blast" // }; @@ -81,7 +80,7 @@ public class AppletFormatAdapter */ public static final String[] READABLE_FNAMES = new String[] { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview", - "Stockholm" };// , + "Stockholm","RNAML" };// , // "SimpleBLAST" // }; @@ -230,7 +229,9 @@ public class AppletFormatAdapter } else if (format.equals("PDB")) { - afile = new MCview.PDBfile(inFile, type); + afile = new MCview.PDBfile(inFile, type); + // Uncomment to test Jmol data based PDB processing: JAL-1213 + // afile = new jalview.ext.jmol.PDBFileWithJmol(inFile, type); } else if (format.equals("STH")) { @@ -240,7 +241,11 @@ public class AppletFormatAdapter { afile = new SimpleBlastFile(inFile, type); } - + else if (format.equals("RNAML")) + { + afile = new RnamlFile(inFile, type); + } + Alignment al = new Alignment(afile.getSeqsAsArray()); afile.addAnnotations(al); @@ -295,7 +300,7 @@ public class AppletFormatAdapter * * @return DOCUMENT ME! */ - public Alignment readFromFile(FileParse source, String format) + public AlignmentI readFromFile(FileParse source, String format) throws java.io.IOException { // TODO: generalise mapping between format string and io. class instances @@ -347,6 +352,10 @@ public class AppletFormatAdapter { afile = new StockholmFile(source); } + else if (format.equals("RNAML")) + { + afile = new RnamlFile(source); + } else if (format.equals("SimpleBLAST")) { afile = new SimpleBlastFile(source); @@ -454,6 +463,11 @@ public class AppletFormatAdapter { afile = new AMSAFile(alignment); } + else if (format.equalsIgnoreCase("RNAML")) + { + afile = new RnamlFile(); + } + else { throw new Exception( @@ -505,47 +519,43 @@ public class AppletFormatAdapter { System.out.println("Reading file: " + f); AppletFormatAdapter afa = new AppletFormatAdapter(); - String fName = f.getName(); + Runtime r = Runtime.getRuntime(); + System.gc(); + long memf = -r.totalMemory() + r.freeMemory(); + long t1 = -System.currentTimeMillis(); + Alignment al = afa.readFile(args[i], FILE, + new IdentifyFile().Identify(args[i], FILE)); + t1 += System.currentTimeMillis(); + System.gc(); + memf += r.totalMemory() - r.freeMemory(); + if (al != null) { - Runtime r = Runtime.getRuntime(); - System.gc(); - long memf = -r.totalMemory() + r.freeMemory(); - long t1 = -System.currentTimeMillis(); - Alignment al = afa.readFile(args[i], FILE, - new IdentifyFile().Identify(args[i], FILE)); - t1 += System.currentTimeMillis(); - System.gc(); - memf += r.totalMemory() - r.freeMemory(); - if (al != null) + System.out.println("Alignment contains " + al.getHeight() + + " sequences and " + al.getWidth() + " columns."); + try { - System.out.println("Alignment contains " + al.getHeight() - + " sequences and " + al.getWidth() + " columns."); - try - { - System.out.println(new AppletFormatAdapter() - .formatSequences("FASTA", al, true)); - } catch (Exception e) - { - System.err - .println("Couln't format the alignment for output as a FASTA file."); - e.printStackTrace(System.err); - } - } - else + System.out.println(new AppletFormatAdapter().formatSequences( + "FASTA", al, true)); + } catch (Exception e) { - System.out.println("Couldn't read alignment"); + System.err + .println("Couln't format the alignment for output as a FASTA file."); + e.printStackTrace(System.err); } - System.out.println("Read took " + (t1 / 1000.0) + " seconds."); - System.out - .println("Difference between free memory now and before is " - + (memf / (1024.0 * 1024.0) * 1.0) + " MB"); } + else + { + System.out.println("Couldn't read alignment"); + } + System.out.println("Read took " + (t1 / 1000.0) + " seconds."); + System.out + .println("Difference between free memory now and before is " + + (memf / (1024.0 * 1024.0) * 1.0) + " MB"); } catch (Exception e) { System.err.println("Exception when dealing with " + i + "'th argument: " + args[i] + "\n" + e); } - } else { @@ -726,5 +736,4 @@ public class AppletFormatAdapter } return null; } - } diff --git a/src/jalview/io/FastaFile.java b/src/jalview/io/FastaFile.java index 0c0d186..0e964b3 100755 --- a/src/jalview/io/FastaFile.java +++ b/src/jalview/io/FastaFile.java @@ -19,6 +19,7 @@ package jalview.io; import java.io.*; + import jalview.datamodel.*; /** diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index ea7ac70..5faf334 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -129,7 +129,7 @@ public class FeaturesFile extends AlignFile } /** - * /** Parse GFF or sequence features file + * Parse GFF or sequence features file * * @param align * - alignment/dataset containing sequences that are to be annotated @@ -606,7 +606,6 @@ public class FeaturesFile extends AlignFile resetMatcher(); } catch (Exception ex) { - System.out.println(line); System.out.println("Error parsing feature file: " + ex + "\n" + line); ex.printStackTrace(System.err); resetMatcher(); diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 6f07b69..2d59f29 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -17,12 +17,18 @@ */ package jalview.io; -import java.util.*; +import jalview.datamodel.AlignmentI; +import jalview.gui.AlignFrame; +import jalview.gui.AlignViewport; +import jalview.gui.Desktop; +import jalview.gui.Jalview2XML; -import javax.swing.*; +import java.util.StringTokenizer; +import java.util.Vector; -import jalview.datamodel.*; -import jalview.gui.*; +import jalview.util.MessageManager; +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; public class FileLoader implements Runnable { @@ -252,7 +258,7 @@ public class FileLoader implements Runnable // load } loadtime = -System.currentTimeMillis(); - Alignment al = null; + AlignmentI al = null; if (format.equalsIgnoreCase("Jalview")) { @@ -298,7 +304,7 @@ public class FileLoader implements Runnable error = format + "\n" + error; } } - + if ((al != null) && (al.getHeight() > 0)) { if (viewport != null) @@ -356,7 +362,7 @@ public class FileLoader implements Runnable public void run() { JOptionPane.showInternalMessageDialog(Desktop.desktop, - errorMessage, "Error loading file", + errorMessage, MessageManager.getString("label.error_loading_file"), JOptionPane.WARNING_MESSAGE); } }); @@ -381,8 +387,8 @@ public class FileLoader implements Runnable public void run() { javax.swing.JOptionPane.showInternalMessageDialog( - Desktop.desktop, "Encountered problems opening " + file - + "!!", "File open error", + Desktop.desktop, MessageManager.formatMessage("label.problems_opening_file", new String[]{file}), + MessageManager.getString("label.file_open_error"), javax.swing.JOptionPane.WARNING_MESSAGE); } }); diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index b06edc5..1cdd95d 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -131,6 +131,13 @@ public class IdentifyFile break; } + + if ((data.indexOf("<") > -1)) + { + reply = "RNAML"; + + break; + } if ((data.length() < 1) || (data.indexOf("#") == 0)) { @@ -159,6 +166,8 @@ public class IdentifyFile break; } + + else if (data.indexOf(">") > -1) { // FASTA, PIR file or BLC file diff --git a/src/jalview/io/InputStreamParser.java b/src/jalview/io/InputStreamParser.java new file mode 100644 index 0000000..19cbad9 --- /dev/null +++ b/src/jalview/io/InputStreamParser.java @@ -0,0 +1,54 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.io; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; + +public class InputStreamParser extends FileParse +{ + + public InputStreamParser(InputStream is, String dataName) + throws IOException + { + super(); + setDataName(dataName); + dataIn = new BufferedReader(new InputStreamReader(is)); + error=false; + } + public InputStreamParser(Reader isreader, String dataName) + throws IOException + { + super(); + setDataName(dataName); + dataIn = new BufferedReader(isreader); + error=false; + } + + + @Override + protected void finalize() throws Throwable + { + dataIn = null; + super.finalize(); + } + +} diff --git a/src/jalview/io/JPredFile.java b/src/jalview/io/JPredFile.java index 0fae4ee..abdfed0 100755 --- a/src/jalview/io/JPredFile.java +++ b/src/jalview/io/JPredFile.java @@ -348,7 +348,7 @@ public class JPredFile extends AlignFile * @param args * DOCUMENT ME! */ - public static void main(String[] args) + public static void main(String[] args) { try { diff --git a/src/jalview/io/PfamFile.java b/src/jalview/io/PfamFile.java index 527312b..c5ef4f7 100755 --- a/src/jalview/io/PfamFile.java +++ b/src/jalview/io/PfamFile.java @@ -20,6 +20,7 @@ package jalview.io; import java.io.*; import java.util.*; + import jalview.datamodel.*; import jalview.util.*; diff --git a/src/jalview/io/PileUpfile.java b/src/jalview/io/PileUpfile.java index de0d8a3..39f367b 100755 --- a/src/jalview/io/PileUpfile.java +++ b/src/jalview/io/PileUpfile.java @@ -57,6 +57,7 @@ public class PileUpfile extends MSFfile * * @throws IOException * DOCUMENT ME! + */ public PileUpfile(String inFile, String type) throws IOException { diff --git a/src/jalview/io/RnamlFile.java b/src/jalview/io/RnamlFile.java new file mode 100644 index 0000000..7b89909 --- /dev/null +++ b/src/jalview/io/RnamlFile.java @@ -0,0 +1,215 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.io; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; + +import jalview.analysis.SecStrConsensus.SimpleBP; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.Annotation; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; + +import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax; +import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed; +import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied; +import fr.orsay.lri.varna.factories.RNAFactory; +import fr.orsay.lri.varna.models.rna.RNA; + +public class RnamlFile extends AlignFile +{ + public String id; + + protected ArrayList result; + + public RnamlFile() + { + super(); + + } + + public RnamlFile(String inFile, String type) throws IOException + { + super(inFile, type); + + } + + public RnamlFile(FileParse source) throws IOException + { + super(source); + + } + + public BufferedReader CreateReader() throws FileNotFoundException + { + FileReader fr = null; + fr = new FileReader(inFile); + + BufferedReader r = new BufferedReader(fr); + return r; + } + + /* + * (non-Javadoc) + * + * @see jalview.io.AlignFile#parse() + */ + public void parse() throws IOException + { + if (System.getProperty("java.version").indexOf("1.6") > -1 + || System.getProperty("java.version").indexOf("1.5") > -1) + { + // patch for 'This parser does not support specification "null" version + // "null"' error + // this hack ensures we get a properly updated SAXParserFactory on older + // JVMs + // thanks to Stefan Birkner over at https://coderwall.com/p/kqsrrw + System.setProperty("javax.xml.parsers.SAXParserFactory", + "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"); + } + // rather than lose exception semantics whilst parsing RNAML with VARNA we + // wrap the routine and catch all exceptions before passing them up the + // chain as an IOException + try + { + _parse(); + } catch (ExceptionPermissionDenied pdx) + { + errormessage = "Couldn't access datasource (" + pdx.getMessage() + + ")"; + throw new IOException(pdx); + } catch (ExceptionLoadingFailed lf) + { + errormessage = "Couldn't process data as RNAML file (" + + lf.getMessage() + ")"; + throw new IOException(lf); + } catch (ExceptionFileFormatOrSyntax iff) + { + errormessage = "Invalid RNAML file (" + iff.getMessage() + ")"; + throw new IOException(iff); + } catch (Exception x) + { + error = true; + errormessage = "Problem parsing data as RNAML (" + x.getMessage() + + ")"; + throw new IOException("Couldn't parse the datasource as RNAML", x); + } + } + + @SuppressWarnings("unchecked") + public void _parse() throws FileNotFoundException, + ExceptionPermissionDenied, ExceptionLoadingFailed, + ExceptionFileFormatOrSyntax + { + + result = RNAFactory.loadSecStrRNAML(getReader()); + + ArrayList allarray = new ArrayList(); + ArrayList> BP = new ArrayList(); + ArrayList strucinarray = new ArrayList(); + SequenceI[] seqs = new SequenceI[result.size()]; + + for (int i = 0; i < result.size(); i++) + { + + RNA current = result.get(i); + String rna = current.getStructDBN(true); + String seq = current.getSeq(); + int begin = 1; + int end = seq.length(); + + id = current.getName(); + seqs[i] = new Sequence(id, seq, begin, end); + + seqs[i].setEnd(seqs[i].findPosition(seqs[i].getLength())); + String[] annot = new String[rna.length()]; + Annotation[] ann = new Annotation[rna.length()]; + + for (int j = 0; j < rna.length(); j++) + { + annot[j] = "" + rna.charAt(j); + + } + for (int k = 0; k < rna.length(); k++) + { + ann[k] = new Annotation(annot[k], "", + jalview.schemes.ResidueProperties.getRNASecStrucState( + annot[k]).charAt(0), 0f); + } + + AlignmentAnnotation align = new AlignmentAnnotation("Sec. str.", + current.getID(), ann); + + seqs[i].addAlignmentAnnotation(align); + seqs[i].setRNA(result.get(i)); + + allarray.add(strucinarray); + + annotations.addElement(align); + BP.add(align.bps); + + } + + setSeqs(seqs); + } + + public static String print(SequenceI[] s) + { + return "not yet implemented"; + } + + public String print() + { + System.out.print("print :"); + return print(getSeqsAsArray()); + } + + public ArrayList getRNA() + { + return result; + } + + // public static void main(String[] args) { + // Pattern p= Pattern.compile("(.+)[.][^.]+"); + // Matcher m = p.matcher("toto.xml.zip"); + // System.out.println(m.matches()); + // System.out.println(m.group(1)); + // } + /** + * make a friendly ID string. + * + * @param dataName + * @return truncated dataName to after last '/' + */ + private String safeName(String dataName) + { + int b = 0; + while ((b = dataName.indexOf("/")) > -1 && b < dataName.length()) + { + dataName = dataName.substring(b + 1).trim(); + + } + int e = (dataName.length() - dataName.indexOf(".")) + 1; + dataName = dataName.substring(1, e).trim(); + return dataName; + } +} diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 02ab5c1..4d8f136 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -1,57 +1,81 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle - * - * 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 . - */ -/* - * This extension was written by Benjamin Schuster-Boeckler at sanger.ac.uk - */ -package jalview.io; - -import java.io.*; -import java.util.*; - -import com.stevesoft.pat.*; -import jalview.datamodel.*; -import jalview.util.Format; - -// import org.apache.log4j.*; - -/** - * This class is supposed to parse a Stockholm format file into Jalview There - * are TODOs in this class: we do not know what the database source and version - * is for the file when parsing the #GS= AC tag which associates accessions with - * sequences. Database references are also not parsed correctly: a separate - * reference string parser must be added to parse the database reference form - * into Jalview's local representation. - * - * @author bsb at sanger.ac.uk - * @version 0.3 + jalview mods - * - */ -public class StockholmFile extends AlignFile -{ - // static Logger logger = Logger.getLogger("jalview.io.StockholmFile"); +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +/* + * This extension was written by Benjamin Schuster-Boeckler at sanger.ac.uk + */ +package jalview.io; + +import jalview.datamodel.AlignmentI; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Annotation; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.Mapping; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceFeature; +import jalview.datamodel.SequenceI; +import jalview.util.Format; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; +import java.util.StringTokenizer; +import java.util.Vector; + +import com.stevesoft.pat.Regex; + +import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses; +import fr.orsay.lri.varna.factories.RNAFactory; +import fr.orsay.lri.varna.models.rna.RNA; + +// import org.apache.log4j.*; + +/** + * This class is supposed to parse a Stockholm format file into Jalview There + * are TODOs in this class: we do not know what the database source and version + * is for the file when parsing the #GS= AC tag which associates accessions with + * sequences. Database references are also not parsed correctly: a separate + * reference string parser must be added to parse the database reference form + * into Jalview's local representation. + * + * @author bsb at sanger.ac.uk + * @author Natasha Shersnev (Dundee, UK) (Stockholm file writer) + * @author Lauren Lui (UCSC, USA) (RNA secondary structure annotation import as stockholm) + * @author Anne Menard (Paris, FR) (VARNA parsing of Stockholm file data) + * @version 0.3 + jalview mods + * + */ +public class StockholmFile extends AlignFile +{ + // static Logger logger = Logger.getLogger("jalview.io.StockholmFile"); + protected ArrayList result; StringBuffer out; // output buffer AlignmentI al; - - public StockholmFile() - { - } - + + public StockholmFile() + { + } + /** * Creates a new StockholmFile object for output. */ @@ -60,690 +84,760 @@ public class StockholmFile extends AlignFile this.al = al; } - public StockholmFile(String inFile, String type) throws IOException - { - super(inFile, type); - } - - public StockholmFile(FileParse source) throws IOException - { - super(source); - } - - public void initData() - { - super.initData(); - } - - /** - * Parse a file in Stockholm format into Jalview's data model. The file has to - * be passed at construction time - * - * @throws IOException - * If there is an error with the input file - */ - public void parse() throws IOException - { - StringBuffer treeString = new StringBuffer(); - String treeName = null; - // --------------- Variable Definitions ------------------- - String line; - String version; - // String id; - Hashtable seqAnn = new Hashtable(); // Sequence related annotations - Hashtable seqs = new Hashtable(); - Regex p, r, rend, s, x; - - // Temporary line for processing RNA annotation - // String RNAannot = ""; - - // ------------------ Parsing File ---------------------- - // First, we have to check that this file has STOCKHOLM format, i.e. the - // first line must match - r = new Regex("# STOCKHOLM ([\\d\\.]+)"); - if (!r.search(nextLine())) - { - throw new IOException( - "This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'"); - } - else - { - version = r.stringMatched(1); - // logger.debug("Stockholm version: " + version); - } - - // We define some Regexes here that will be used regularily later - rend = new Regex("^\\s*\\/\\/"); // Find the end of an alignment - p = new Regex("(\\S+)\\/(\\d+)\\-(\\d+)"); // split sequence id in - // id/from/to - s = new Regex("(\\S+)\\s+(\\S*)\\s+(.*)"); // Parses annotation subtype - r = new Regex("#=(G[FSRC]?)\\s+(.*)"); // Finds any annotation line - x = new Regex("(\\S+)\\s+(\\S+)"); // split id from sequence - - // Convert all bracket types to parentheses (necessary for passing to VARNA) - Regex openparen = new Regex("(<|\\[)", "("); - Regex closeparen = new Regex("(>|\\])", ")"); - - // Detect if file is RNA by looking for bracket types - Regex detectbrackets = new Regex("(<|>|\\[|\\]|\\(|\\))"); - - rend.optimize(); - p.optimize(); - s.optimize(); - r.optimize(); - x.optimize(); - openparen.optimize(); - closeparen.optimize(); - - while ((line = nextLine()) != null) - { - if (line.length() == 0) - { - continue; - } - if (rend.search(line)) - { - // End of the alignment, pass stuff back - this.noSeqs = seqs.size(); - - String seqdb,dbsource = null; - Regex pf = new Regex("PF[0-9]{5}(.*)"); // Finds AC for Pfam - Regex rf = new Regex("RF[0-9]{5}(.*)"); // Finds AC for Rfam - if (getAlignmentProperty("AC") != null) - { - String dbType = getAlignmentProperty("AC").toString(); - if (pf.search(dbType)) - { - // PFAM Alignment - so references are typically from Uniprot - dbsource = "PFAM"; - } - else if (rf.search(dbType)) - { - dbsource = "RFAM"; - } - } - // logger.debug("Number of sequences: " + this.noSeqs); - Enumeration accs = seqs.keys(); - while (accs.hasMoreElements()) - { - String acc = (String) accs.nextElement(); - // logger.debug("Processing sequence " + acc); - String seq = (String) seqs.remove(acc); - if (maxLength < seq.length()) - { - maxLength = seq.length(); - } - int start = 1; - int end = -1; - String sid = acc; - /* - * Retrieve hash of annotations for this accession Associate - * Annotation with accession - */ - Hashtable accAnnotations = null; - - if (seqAnn != null && seqAnn.containsKey(acc)) - { - accAnnotations = (Hashtable) seqAnn.remove(acc); - // TODO: add structures to sequence - } - - // Split accession in id and from/to - if (p.search(acc)) - { - sid = p.stringMatched(1); - start = Integer.parseInt(p.stringMatched(2)); - end = Integer.parseInt(p.stringMatched(3)); - } - // logger.debug(sid + ", " + start + ", " + end); - - Sequence seqO = new Sequence(sid, seq, start, end); - // Add Description (if any) - if (accAnnotations != null && accAnnotations.containsKey("DE")) - { - String desc = (String) accAnnotations.get("DE"); - seqO.setDescription((desc == null) ? "" : desc); - } - - // Add DB References (if any) - if (accAnnotations != null && accAnnotations.containsKey("DR")) - { - String dbr = (String) accAnnotations.get("DR"); - if (dbr != null && dbr.indexOf(";") > -1) - { - String src = dbr.substring(0, dbr.indexOf(";")); - String acn = dbr.substring(dbr.indexOf(";") + 1); - jalview.util.DBRefUtils.parseToDbRef(seqO, src, "0", acn); - } - } - - if (accAnnotations != null && accAnnotations.containsKey("AC")) - { - if (dbsource != null) - { - String dbr = (String) accAnnotations.get("AC"); - if (dbr != null) - { - // we could get very clever here - but for now - just try to guess accession type from source of alignment plus structure of accession - guessDatabaseFor(seqO, dbr, dbsource); - - } - } - // else - do what ? add the data anyway and prompt the user to specify what references these are ? - } - - Hashtable features = null; - // We need to adjust the positions of all features to account for gaps - try - { - features = (Hashtable) accAnnotations.remove("features"); - } catch (java.lang.NullPointerException e) - { - // loggerwarn("Getting Features for " + acc + ": " + - // e.getMessage()); - // continue; - } - // if we have features - if (features != null) - { - int posmap[] = seqO.findPositionMap(); - Enumeration i = features.keys(); - while (i.hasMoreElements()) - { - // TODO: parse out secondary structure annotation as annotation - // row - // TODO: parse out scores as annotation row - // TODO: map coding region to core jalview feature types - String type = i.nextElement().toString(); - Hashtable content = (Hashtable) features.remove(type); - - // add alignment annotation for this feature - String key = type2id(type); - if (key != null) - { - if (accAnnotations != null - && accAnnotations.containsKey(key)) - { - Vector vv = (Vector) accAnnotations.get(key); - for (int ii = 0; ii < vv.size(); ii++) - { - AlignmentAnnotation an = (AlignmentAnnotation) vv - .elementAt(ii); - seqO.addAlignmentAnnotation(an); - } - } - } - - Enumeration j = content.keys(); - while (j.hasMoreElements()) - { - String desc = j.nextElement().toString(); - String ns = content.get(desc).toString(); - char[] byChar = ns.toCharArray(); - for (int k = 0; k < byChar.length; k++) - { - char c = byChar[k]; - if (!(c == ' ' || c == '_' || c == '-' || c == '.')) // PFAM - // uses - // '.' - // for - // feature - // background - { - int new_pos = posmap[k]; // look up nearest seqeunce - // position to this column - SequenceFeature feat = new SequenceFeature(type, desc, - new_pos, new_pos, 0f, null); - - seqO.addSequenceFeature(feat); - } - } - } - - } - - } - // garbage collect - - // logger.debug("Adding seq " + acc + " from " + start + " to " + end - // + ": " + seq); - this.seqs.addElement(seqO); - } - return; // finished parsing this segment of source - } - else if (!r.search(line)) - { - // System.err.println("Found sequence line: " + line); - - // Split sequence in sequence and accession parts - if (!x.search(line)) - { - // logger.error("Could not parse sequence line: " + line); - throw new IOException("Could not parse sequence line: " + line); - } - String ns = (String) seqs.get(x.stringMatched(1)); - if (ns == null) - { - ns = ""; - } - ns += x.stringMatched(2); - - seqs.put(x.stringMatched(1), ns); - } - else - { - String annType = r.stringMatched(1); - String annContent = r.stringMatched(2); - - // System.err.println("type:" + annType + " content: " + annContent); - - if (annType.equals("GF")) - { - /* - * Generic per-File annotation, free text Magic features: #=GF NH - * #=GF TN Pfam descriptions: 7. DESCRIPTION OF FIELDS - * - * Compulsory fields: ------------------ - * - * AC Accession number: Accession number in form PFxxxxx.version or - * PBxxxxxx. ID Identification: One word name for family. DE - * Definition: Short description of family. AU Author: Authors of the - * entry. SE Source of seed: The source suggesting the seed members - * belong to one family. GA Gathering method: Search threshold to - * build the full alignment. TC Trusted Cutoff: Lowest sequence score - * and domain score of match in the full alignment. NC Noise Cutoff: - * Highest sequence score and domain score of match not in full - * alignment. TP Type: Type of family -- presently Family, Domain, - * Motif or Repeat. SQ Sequence: Number of sequences in alignment. AM - * Alignment Method The order ls and fs hits are aligned to the model - * to build the full align. // End of alignment. - * - * Optional fields: ---------------- - * - * DC Database Comment: Comment about database reference. DR Database - * Reference: Reference to external database. RC Reference Comment: - * Comment about literature reference. RN Reference Number: Reference - * Number. RM Reference Medline: Eight digit medline UI number. RT - * Reference Title: Reference Title. RA Reference Author: Reference - * Author RL Reference Location: Journal location. PI Previous - * identifier: Record of all previous ID lines. KW Keywords: Keywords. - * CC Comment: Comments. NE Pfam accession: Indicates a nested domain. - * NL Location: Location of nested domains - sequence ID, start and - * end of insert. - * - * Obsolete fields: ----------- AL Alignment method of seed: The - * method used to align the seed members. - */ - // Let's save the annotations, maybe we'll be able to do something - // with them later... - Regex an = new Regex("(\\w+)\\s*(.*)"); - if (an.search(annContent)) - { - if (an.stringMatched(1).equals("NH")) - { - treeString.append(an.stringMatched(2)); - } - else if (an.stringMatched(1).equals("TN")) - { - if (treeString.length() > 0) - { - if (treeName == null) - { - treeName = "Tree " + (getTreeCount() + 1); - } - addNewickTree(treeName, treeString.toString()); - } - treeName = an.stringMatched(2); - treeString = new StringBuffer(); - } - setAlignmentProperty(an.stringMatched(1), an.stringMatched(2)); - } - } - else if (annType.equals("GS")) - { - // Generic per-Sequence annotation, free text - /* - * Pfam uses these features: Feature Description --------------------- - * ----------- AC ACcession number DE - * DEscription DR ; ; Database Reference OS - * OrganiSm (species) OC Organism Classification (clade, etc.) - * LO Look (Color, etc.) - */ - if (s.search(annContent)) - { - String acc = s.stringMatched(1); - String type = s.stringMatched(2); - String content = s.stringMatched(3); - // TODO: store DR in a vector. - // TODO: store AC according to generic file db annotation. - Hashtable ann; - if (seqAnn.containsKey(acc)) - { - ann = (Hashtable) seqAnn.get(acc); - } - else - { - ann = new Hashtable(); - } - ann.put(type, content); - seqAnn.put(acc, ann); - } - else - { - throw new IOException("Error parsing " + line); - } - } - else if (annType.equals("GC")) - { - // Generic per-Column annotation, exactly 1 char per column - // always need a label. - if (x.search(annContent)) - { - // parse out and create alignment annotation directly. - parseAnnotationRow(annotations, x.stringMatched(1), - x.stringMatched(2)); - } - } - else if (annType.equals("GR")) - { - // Generic per-Sequence AND per-Column markup, exactly 1 char per - // column - /* - * Feature Description Markup letters ------- ----------- - * -------------- SS Secondary Structure [HGIEBTSCX] SA Surface - * Accessibility [0-9X] (0=0%-10%; ...; 9=90%-100%) TM TransMembrane - * [Mio] PP Posterior Probability [0-9*] (0=0.00-0.05; 1=0.05-0.15; - * *=0.95-1.00) LI LIgand binding [*] AS Active Site [*] IN INtron (in - * or after) [0-2] - */ - if (s.search(annContent)) - { - String acc = s.stringMatched(1); - String type = s.stringMatched(2); - String seq = new String(s.stringMatched(3)); - String description = null; - // Check for additional information about the current annotation - // We use a simple string tokenizer here for speed - StringTokenizer sep = new StringTokenizer(seq, " \t"); - description = sep.nextToken(); - if (sep.hasMoreTokens()) - { - seq = sep.nextToken(); - } - else - { - seq = description; - description = new String(); - } - // sequence id with from-to fields - - Hashtable ann; - // Get an object with all the annotations for this sequence - if (seqAnn.containsKey(acc)) - { - // logger.debug("Found annotations for " + acc); - ann = (Hashtable) seqAnn.get(acc); - } - else - { - // logger.debug("Creating new annotations holder for " + acc); - ann = new Hashtable(); - seqAnn.put(acc, ann); - } - // TODO test structure, call parseAnnotationRow with vector from - // hashtable for specific sequence - Hashtable features; - // Get an object with all the content for an annotation - if (ann.containsKey("features")) - { - // logger.debug("Found features for " + acc); - features = (Hashtable) ann.get("features"); - } - else - { - // logger.debug("Creating new features holder for " + acc); - features = new Hashtable(); - ann.put("features", features); - } - - Hashtable content; - if (features.containsKey(this.id2type(type))) - { - // logger.debug("Found content for " + this.id2type(type)); - content = (Hashtable) features.get(this.id2type(type)); - } - else - { - // logger.debug("Creating new content holder for " + - // this.id2type(type)); - content = new Hashtable(); - features.put(this.id2type(type), content); - } - String ns = (String) content.get(description); - if (ns == null) - { - ns = ""; - } - ns += seq; - content.put(description, ns); - Hashtable strucAnn; - if (seqAnn.containsKey(acc)) - { - strucAnn = (Hashtable) seqAnn.get(acc); - } - else - { - strucAnn = new Hashtable(); - } - - Vector newStruc = new Vector(); - parseAnnotationRow(newStruc, type, ns); - strucAnn.put(type, newStruc); - seqAnn.put(acc, strucAnn); - } - else - { - System.err - .println("Warning - couldn't parse sequence annotation row line:\n" - + line); - // throw new IOException("Error parsing " + line); - } - } - else - { - throw new IOException("Unknown annotation detected: " + annType - + " " + annContent); - } - } - } - if (treeString.length() > 0) - { - if (treeName == null) - { - treeName = "Tree " + (1 + getTreeCount()); - } - addNewickTree(treeName, treeString.toString()); - } - } - - /** - * Demangle an accession string and guess the originating sequence database for a given sequence - * @param seqO sequence to be annotated - * @param dbr Accession string for sequence - * @param dbsource source database for alignment (PFAM or RFAM) - */ - private void guessDatabaseFor(Sequence seqO, String dbr, String dbsource) - { - DBRefEntry dbrf=null; - List dbrs=new ArrayList(); - String seqdb="Unknown",sdbac=""+dbr; - int st=-1,en=-1,p; - if ((st=sdbac.indexOf("/"))>-1) - { - String num,range=sdbac.substring(st+1); - sdbac = sdbac.substring(0,st); - if ((p=range.indexOf("-"))>-1) - { - p++; - if (p-1) - { - // strip of last subdomain - sdbac = sdbac.substring(0,sdbac.indexOf(".")); - dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, seqdb, dbsource, sdbac); - if (dbrf!=null) - { - dbrs.add(dbrf); - } - } - dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, dbsource, dbsource, dbr); - if (dbr!=null) - { - dbrs.add(dbrf); - } - } else { - seqdb = "EMBL"; // total guess - could be ENA, or something else these days - if (sdbac.indexOf(".")>-1) - { - // strip off last subdomain - sdbac = sdbac.substring(0,sdbac.indexOf(".")); - dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, seqdb, dbsource, sdbac); - if (dbrf!=null) - { - dbrs.add(dbrf); - } - } - - dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, dbsource, dbsource, dbr); - if (dbrf!=null) - { - dbrs.add(dbrf); - } - } - if (st!=-1 && en!=-1) - { - for (DBRefEntry d:dbrs) - { - jalview.util.MapList mp = new jalview.util.MapList(new int[] { seqO.getStart(),seqO.getEnd()},new int[] { st,en},1,1); - jalview.datamodel.Mapping mping = new Mapping(mp); - d.setMap(mping); - } - } - } - - protected static AlignmentAnnotation parseAnnotationRow( - Vector annotation, String label, String annots) - { - String convert1, convert2 = null; - - // Convert all bracket types to parentheses - Regex openparen = new Regex("(<|\\[)", "("); - Regex closeparen = new Regex("(>|\\])", ")"); - - // Detect if file is RNA by looking for bracket types - Regex detectbrackets = new Regex("(<|>|\\[|\\]|\\(|\\))"); - - convert1 = openparen.replaceAll(annots); - convert2 = closeparen.replaceAll(convert1); - annots = convert2; - - String type = label; - if (label.contains("_cons")) - { - type = (label.indexOf("_cons") == label.length() - 5) ? label - .substring(0, label.length() - 5) : label; - } - boolean ss = false; - type = id2type(type); - if (type.equals("secondary structure")) - { - ss = true; - } - // decide on secondary structure or not. - Annotation[] els = new Annotation[annots.length()]; - for (int i = 0; i < annots.length(); i++) - { - String pos = annots.substring(i, i + 1); - Annotation ann; - ann = new Annotation(pos, "", ' ', 0f); // 0f is 'valid' null - will not - // be written out - if (ss) - { - if (detectbrackets.search(pos)) - { - ann.secondaryStructure = jalview.schemes.ResidueProperties - .getRNASecStrucState(pos).charAt(0); - } - else - { - ann.secondaryStructure = jalview.schemes.ResidueProperties - .getDssp3state(pos).charAt(0); - } - - if (ann.secondaryStructure == pos.charAt(0) || pos.charAt(0) == 'C') - { - ann.displayCharacter = ""; // null; // " "; - } - else - { - ann.displayCharacter = " " + ann.displayCharacter; - } - } - - els[i] = ann; - } - AlignmentAnnotation annot = null; - Enumeration e = annotation.elements(); - while (e.hasMoreElements()) - { - annot = (AlignmentAnnotation) e.nextElement(); - if (annot.label.equals(type)) - break; - annot = null; - } - if (annot == null) - { - annot = new AlignmentAnnotation(type, type, els); - annotation.addElement(annot); - } - else - { - Annotation[] anns = new Annotation[annot.annotations.length - + els.length]; - System.arraycopy(annot.annotations, 0, anns, 0, - annot.annotations.length); - System.arraycopy(els, 0, anns, annot.annotations.length, els.length); - annot.annotations = anns; - // System.out.println("else: "); - } - return annot; - } - + public StockholmFile(String inFile, String type) throws IOException + { + super(inFile, type); + } + + public StockholmFile(FileParse source) throws IOException + { + super(source); + } + + public void initData() + { + super.initData(); + } + /** + * Parse a file in Stockholm format into Jalview's data model using VARNA + * + * @throws IOException + * If there is an error with the input file + */ + public void parse_with_VARNA(java.io.File inFile) throws IOException + { + FileReader fr = null; + fr = new FileReader(inFile); + + BufferedReader r = new BufferedReader(fr); + result = null; + try + { + result = RNAFactory.loadSecStrStockholm(r); + } catch (ExceptionUnmatchedClosingParentheses umcp) + { + errormessage = "Unmatched parentheses in annotation. Aborting (" + + umcp.getMessage() + ")"; + throw new IOException(umcp); + } + // DEBUG System.out.println("this is the secondary scructure:" + // +result.size()); + SequenceI[] seqs = new SequenceI[result.size()]; + String id=null; + for (int i = 0; i < result.size(); i++) + { + // DEBUG System.err.println("Processing i'th sequence in Stockholm file") + RNA current = result.get(i); + + String seq = current.getSeq(); + String rna = current.getStructDBN(true); + // DEBUG System.out.println(seq); + // DEBUG System.err.println(rna); + int begin = 0; + int end = seq.length() - 1; + id = safeName(getDataName()); + seqs[i] = new Sequence(id, seq, begin, end); + String[] annot = new String[rna.length()]; + Annotation[] ann = new Annotation[rna.length()]; + for (int j = 0; j < rna.length(); j++) + { + annot[j] = rna.substring(j, j + 1); + + } + + for (int k = 0; k < rna.length(); k++) + { + ann[k] = new Annotation(annot[k], "", + jalview.schemes.ResidueProperties.getRNASecStrucState( + annot[k]).charAt(0), 0f); + + } + AlignmentAnnotation align = new AlignmentAnnotation("Sec. str.", + current.getID(), ann); + + seqs[i].addAlignmentAnnotation(align); + seqs[i].setRNA(result.get(i)); + this.annotations.addElement(align); + } + this.setSeqs(seqs); + + } + + + /** + * Parse a file in Stockholm format into Jalview's data model. The file has to + * be passed at construction time + * + * @throws IOException + * If there is an error with the input file + */ + public void parse() throws IOException + { + StringBuffer treeString = new StringBuffer(); + String treeName = null; + // --------------- Variable Definitions ------------------- + String line; + String version; + // String id; + Hashtable seqAnn = new Hashtable(); // Sequence related annotations + Hashtable seqs = new Hashtable(); + Regex p, r, rend, s, x; + // Temporary line for processing RNA annotation + // String RNAannot = ""; + + // ------------------ Parsing File ---------------------- + // First, we have to check that this file has STOCKHOLM format, i.e. the + // first line must match + + + r = new Regex("# STOCKHOLM ([\\d\\.]+)"); + if (!r.search(nextLine())) + { + throw new IOException( + "This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'"); + } + else + { + version = r.stringMatched(1); + + // logger.debug("Stockholm version: " + version); + } + + // We define some Regexes here that will be used regularily later + rend = new Regex("^\\s*\\/\\/"); // Find the end of an alignment + p = new Regex("(\\S+)\\/(\\d+)\\-(\\d+)"); // split sequence id in + // id/from/to + s = new Regex("(\\S+)\\s+(\\S*)\\s+(.*)"); // Parses annotation subtype + r = new Regex("#=(G[FSRC]?)\\s+(.*)"); // Finds any annotation line + x = new Regex("(\\S+)\\s+(\\S+)"); // split id from sequence + + // Convert all bracket types to parentheses (necessary for passing to VARNA) + Regex openparen = new Regex("(<|\\[)", "("); + Regex closeparen = new Regex("(>|\\])", ")"); + + // Detect if file is RNA by looking for bracket types + Regex detectbrackets = new Regex("(<|>|\\[|\\]|\\(|\\))"); + + rend.optimize(); + p.optimize(); + s.optimize(); + r.optimize(); + x.optimize(); + openparen.optimize(); + closeparen.optimize(); + + while ((line = nextLine()) != null) + { + if (line.length() == 0) + { + continue; + } + if (rend.search(line)) + { + // End of the alignment, pass stuff back + this.noSeqs = seqs.size(); + + String seqdb,dbsource = null; + Regex pf = new Regex("PF[0-9]{5}(.*)"); // Finds AC for Pfam + Regex rf = new Regex("RF[0-9]{5}(.*)"); // Finds AC for Rfam + if (getAlignmentProperty("AC") != null) + { + String dbType = getAlignmentProperty("AC").toString(); + if (pf.search(dbType)) + { + // PFAM Alignment - so references are typically from Uniprot + dbsource = "PFAM"; + } + else if (rf.search(dbType)) + { + dbsource = "RFAM"; + } + } + // logger.debug("Number of sequences: " + this.noSeqs); + Enumeration accs = seqs.keys(); + while (accs.hasMoreElements()) + { + String acc = (String) accs.nextElement(); + // logger.debug("Processing sequence " + acc); + String seq = (String) seqs.remove(acc); + if (maxLength < seq.length()) + { + maxLength = seq.length(); + } + int start = 1; + int end = -1; + String sid = acc; + /* + * Retrieve hash of annotations for this accession Associate + * Annotation with accession + */ + Hashtable accAnnotations = null; + + if (seqAnn != null && seqAnn.containsKey(acc)) + { + accAnnotations = (Hashtable) seqAnn.remove(acc); + //TODO: add structures to sequence + } + + // Split accession in id and from/to + if (p.search(acc)) + { + sid = p.stringMatched(1); + start = Integer.parseInt(p.stringMatched(2)); + end = Integer.parseInt(p.stringMatched(3)); + } + // logger.debug(sid + ", " + start + ", " + end); + + Sequence seqO = new Sequence(sid, seq, start, end); + // Add Description (if any) + if (accAnnotations != null && accAnnotations.containsKey("DE")) + { + String desc = (String) accAnnotations.get("DE"); + seqO.setDescription((desc == null) ? "" : desc); + } + // Add DB References (if any) + if (accAnnotations != null && accAnnotations.containsKey("DR")) + { + String dbr = (String) accAnnotations.get("DR"); + if (dbr != null && dbr.indexOf(";") > -1) + { + String src = dbr.substring(0, dbr.indexOf(";")); + String acn = dbr.substring(dbr.indexOf(";") + 1); + jalview.util.DBRefUtils.parseToDbRef(seqO, src, "0", acn); + } + } + + if (accAnnotations != null && accAnnotations.containsKey("AC")) + { + if (dbsource != null) + { + String dbr = (String) accAnnotations.get("AC"); + if (dbr != null) + { + // we could get very clever here - but for now - just try to guess accession type from source of alignment plus structure of accession + guessDatabaseFor(seqO, dbr, dbsource); + + } + } + // else - do what ? add the data anyway and prompt the user to specify what references these are ? + } + + Hashtable features = null; + // We need to adjust the positions of all features to account for gaps + try + { + features = (Hashtable) accAnnotations.remove("features"); + } catch (java.lang.NullPointerException e) + { + // loggerwarn("Getting Features for " + acc + ": " + + // e.getMessage()); + // continue; + } + // if we have features + if (features != null) + { + int posmap[] = seqO.findPositionMap(); + Enumeration i = features.keys(); + while (i.hasMoreElements()) + { + // TODO: parse out secondary structure annotation as annotation + // row + // TODO: parse out scores as annotation row + // TODO: map coding region to core jalview feature types + String type = i.nextElement().toString(); + Hashtable content = (Hashtable) features.remove(type); + + // add alignment annotation for this feature + String key = type2id(type); + if (key != null) + { + if (accAnnotations != null + && accAnnotations.containsKey(key)) + { + Vector vv = (Vector) accAnnotations.get(key); + for (int ii = 0; ii < vv.size(); ii++) + { + AlignmentAnnotation an = (AlignmentAnnotation) vv + .elementAt(ii); + seqO.addAlignmentAnnotation(an); + } + } + } + + Enumeration j = content.keys(); + while (j.hasMoreElements()) + { + String desc = j.nextElement().toString(); + String ns = content.get(desc).toString(); + char[] byChar = ns.toCharArray(); + for (int k = 0; k < byChar.length; k++) + { + char c = byChar[k]; + if (!(c == ' ' || c == '_' || c == '-' || c == '.')) // PFAM + // uses + // '.' + // for + // feature + // background + { + int new_pos = posmap[k]; // look up nearest seqeunce + // position to this column + SequenceFeature feat = new SequenceFeature(type, desc, + new_pos, new_pos, 0f, null); + + seqO.addSequenceFeature(feat); + } + } + } + + } + + } + // garbage collect + + // logger.debug("Adding seq " + acc + " from " + start + " to " + end + // + ": " + seq); + this.seqs.addElement(seqO); + } + return; // finished parsing this segment of source + } + else if (!r.search(line)) + { + // System.err.println("Found sequence line: " + line); + + // Split sequence in sequence and accession parts + if (!x.search(line)) + { + // logger.error("Could not parse sequence line: " + line); + throw new IOException("Could not parse sequence line: " + line); + } + String ns = (String) seqs.get(x.stringMatched(1)); + if (ns == null) + { + ns = ""; + } + ns += x.stringMatched(2); + + seqs.put(x.stringMatched(1), ns); + } + else + { + String annType = r.stringMatched(1); + String annContent = r.stringMatched(2); + + // System.err.println("type:" + annType + " content: " + annContent); + + if (annType.equals("GF")) + { + /* + * Generic per-File annotation, free text Magic features: #=GF NH + * #=GF TN Pfam descriptions: 7. DESCRIPTION OF FIELDS + * + * Compulsory fields: ------------------ + * + * AC Accession number: Accession number in form PFxxxxx.version or + * PBxxxxxx. ID Identification: One word name for family. DE + * Definition: Short description of family. AU Author: Authors of the + * entry. SE Source of seed: The source suggesting the seed members + * belong to one family. GA Gathering method: Search threshold to + * build the full alignment. TC Trusted Cutoff: Lowest sequence score + * and domain score of match in the full alignment. NC Noise Cutoff: + * Highest sequence score and domain score of match not in full + * alignment. TP Type: Type of family -- presently Family, Domain, + * Motif or Repeat. SQ Sequence: Number of sequences in alignment. AM + * Alignment Method The order ls and fs hits are aligned to the model + * to build the full align. // End of alignment. + * + * Optional fields: ---------------- + * + * DC Database Comment: Comment about database reference. DR Database + * Reference: Reference to external database. RC Reference Comment: + * Comment about literature reference. RN Reference Number: Reference + * Number. RM Reference Medline: Eight digit medline UI number. RT + * Reference Title: Reference Title. RA Reference Author: Reference + * Author RL Reference Location: Journal location. PI Previous + * identifier: Record of all previous ID lines. KW Keywords: Keywords. + * CC Comment: Comments. NE Pfam accession: Indicates a nested domain. + * NL Location: Location of nested domains - sequence ID, start and + * end of insert. + * + * Obsolete fields: ----------- AL Alignment method of seed: The + * method used to align the seed members. + */ + // Let's save the annotations, maybe we'll be able to do something + // with them later... + Regex an = new Regex("(\\w+)\\s*(.*)"); + if (an.search(annContent)) + { + if (an.stringMatched(1).equals("NH")) + { + treeString.append(an.stringMatched(2)); + } + else if (an.stringMatched(1).equals("TN")) + { + if (treeString.length() > 0) + { + if (treeName == null) + { + treeName = "Tree " + (getTreeCount() + 1); + } + addNewickTree(treeName, treeString.toString()); + } + treeName = an.stringMatched(2); + treeString = new StringBuffer(); + } + setAlignmentProperty(an.stringMatched(1), an.stringMatched(2)); + } + } + else if (annType.equals("GS")) + { + // Generic per-Sequence annotation, free text + /* + * Pfam uses these features: Feature Description --------------------- + * ----------- AC ACcession number DE + * DEscription DR ; ; Database Reference OS + * OrganiSm (species) OC Organism Classification (clade, etc.) + * LO Look (Color, etc.) + */ + if (s.search(annContent)) + { + String acc = s.stringMatched(1); + String type = s.stringMatched(2); + String content = s.stringMatched(3); + // TODO: store DR in a vector. + // TODO: store AC according to generic file db annotation. + Hashtable ann; + if (seqAnn.containsKey(acc)) + { + ann = (Hashtable) seqAnn.get(acc); + } + else + { + ann = new Hashtable(); + } + ann.put(type, content); + seqAnn.put(acc, ann); + } + else + { + throw new IOException("Error parsing " + line); + } + } + else if (annType.equals("GC")) + { + // Generic per-Column annotation, exactly 1 char per column + // always need a label. + if (x.search(annContent)) + { + // parse out and create alignment annotation directly. + parseAnnotationRow(annotations, x.stringMatched(1), + x.stringMatched(2)); + } + } + else if (annType.equals("GR")) + { + // Generic per-Sequence AND per-Column markup, exactly 1 char per + // column + /* + * Feature Description Markup letters ------- ----------- + * -------------- SS Secondary Structure [HGIEBTSCX] SA Surface + * Accessibility [0-9X] (0=0%-10%; ...; 9=90%-100%) TM TransMembrane + * [Mio] PP Posterior Probability [0-9*] (0=0.00-0.05; 1=0.05-0.15; + * *=0.95-1.00) LI LIgand binding [*] AS Active Site [*] IN INtron (in + * or after) [0-2] + */ + if (s.search(annContent)) + { + String acc = s.stringMatched(1); + String type = s.stringMatched(2); + String seq = new String(s.stringMatched(3)); + String description = null; + // Check for additional information about the current annotation + // We use a simple string tokenizer here for speed + StringTokenizer sep = new StringTokenizer(seq, " \t"); + description = sep.nextToken(); + if (sep.hasMoreTokens()) + { + seq = sep.nextToken(); + } + else + { + seq = description; + description = new String(); + } + // sequence id with from-to fields + + Hashtable ann; + // Get an object with all the annotations for this sequence + if (seqAnn.containsKey(acc)) + { + // logger.debug("Found annotations for " + acc); + ann = (Hashtable) seqAnn.get(acc); + } + else + { + // logger.debug("Creating new annotations holder for " + acc); + ann = new Hashtable(); + seqAnn.put(acc, ann); + } + // TODO test structure, call parseAnnotationRow with vector from + // hashtable for specific sequence + Hashtable features; + // Get an object with all the content for an annotation + if (ann.containsKey("features")) + { + // logger.debug("Found features for " + acc); + features = (Hashtable) ann.get("features"); + } + else + { + // logger.debug("Creating new features holder for " + acc); + features = new Hashtable(); + ann.put("features", features); + } + + Hashtable content; + if (features.containsKey(this.id2type(type))) + { + // logger.debug("Found content for " + this.id2type(type)); + content = (Hashtable) features.get(this.id2type(type)); + } + else + { + // logger.debug("Creating new content holder for " + + // this.id2type(type)); + content = new Hashtable(); + features.put(this.id2type(type), content); + } + String ns = (String) content.get(description); + if (ns == null) + { + ns = ""; + } + ns += seq; + content.put(description, ns); + +// if(type.equals("SS")){ + Hashtable strucAnn; + if (seqAnn.containsKey(acc)) + { + strucAnn = (Hashtable) seqAnn.get(acc); + } + else + { + strucAnn = new Hashtable(); + } + + Vector newStruc=new Vector(); + parseAnnotationRow(newStruc, type,ns); + + strucAnn.put(type, newStruc); + seqAnn.put(acc, strucAnn); + } +// } + else + { + System.err + .println("Warning - couldn't parse sequence annotation row line:\n" + + line); + // throw new IOException("Error parsing " + line); + } + } + else + { + throw new IOException("Unknown annotation detected: " + annType + + " " + annContent); + } + } + } + if (treeString.length() > 0) + { + if (treeName == null) + { + treeName = "Tree " + (1 + getTreeCount()); + } + addNewickTree(treeName, treeString.toString()); + } + } + +/** + * Demangle an accession string and guess the originating sequence database for a given sequence + * @param seqO sequence to be annotated + * @param dbr Accession string for sequence + * @param dbsource source database for alignment (PFAM or RFAM) + */ + private void guessDatabaseFor(Sequence seqO, String dbr, String dbsource) + { + DBRefEntry dbrf=null; + List dbrs=new ArrayList(); + String seqdb="Unknown",sdbac=""+dbr; + int st=-1,en=-1,p; + if ((st=sdbac.indexOf("/"))>-1) + { + String num,range=sdbac.substring(st+1); + sdbac = sdbac.substring(0,st); + if ((p=range.indexOf("-"))>-1) + { + p++; + if (p-1) + { + // strip of last subdomain + sdbac = sdbac.substring(0,sdbac.indexOf(".")); + dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, seqdb, dbsource, sdbac); + if (dbrf!=null) + { + dbrs.add(dbrf); + } + } + dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, dbsource, dbsource, dbr); + if (dbr!=null) + { + dbrs.add(dbrf); + } + } else { + seqdb = "EMBL"; // total guess - could be ENA, or something else these days + if (sdbac.indexOf(".")>-1) + { + // strip off last subdomain + sdbac = sdbac.substring(0,sdbac.indexOf(".")); + dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, seqdb, dbsource, sdbac); + if (dbrf!=null) + { + dbrs.add(dbrf); + } + } + + dbrf = jalview.util.DBRefUtils.parseToDbRef(seqO, dbsource, dbsource, dbr); + if (dbrf!=null) + { + dbrs.add(dbrf); + } + } + if (st!=-1 && en!=-1) + { + for (DBRefEntry d:dbrs) + { + jalview.util.MapList mp = new jalview.util.MapList(new int[] { seqO.getStart(),seqO.getEnd()},new int[] { st,en},1,1); + jalview.datamodel.Mapping mping = new Mapping(mp); + d.setMap(mping); + } + } + } + + protected static AlignmentAnnotation parseAnnotationRow( + Vector annotation, String label, String annots) + { + String convert1, convert2 = null; + + // Convert all bracket types to parentheses + Regex openparen = new Regex("(<|\\[)", "("); + Regex closeparen = new Regex("(>|\\])", ")"); + + // Detect if file is RNA by looking for bracket types + Regex detectbrackets = new Regex("(<|>|\\[|\\]|\\(|\\))"); + + convert1 = openparen.replaceAll(annots); + convert2 = closeparen.replaceAll(convert1); + annots = convert2; + + String type = label; + if (label.contains("_cons")) + { + type = (label.indexOf("_cons") == label.length() - 5) ? label + .substring(0, label.length() - 5) : label; + } + boolean ss = false; + type = id2type(type); + if (type.equals("secondary structure")) + { + ss = true; + } + // decide on secondary structure or not. + Annotation[] els = new Annotation[annots.length()]; + for (int i = 0; i < annots.length(); i++) + { + String pos = annots.substring(i, i + 1); + Annotation ann; + ann = new Annotation(pos, "", ' ', 0f); // 0f is 'valid' null - will not + // be written out + if (ss) + { + if (detectbrackets.search(pos)) + { + ann.secondaryStructure = jalview.schemes.ResidueProperties + .getRNASecStrucState(pos).charAt(0); + } + else + { + ann.secondaryStructure = jalview.schemes.ResidueProperties + .getDssp3state(pos).charAt(0); + } + + if (ann.secondaryStructure == pos.charAt(0) || pos.charAt(0) == 'C') + { + ann.displayCharacter = ""; // null; // " "; + } + else + { + ann.displayCharacter = " " + ann.displayCharacter; + } + } + + els[i] = ann; + } + AlignmentAnnotation annot = null; + Enumeration e = annotation.elements(); + while (e.hasMoreElements()) + { + annot = (AlignmentAnnotation) e.nextElement(); + if (annot.label.equals(type)) + break; + annot = null; + } + if (annot == null) + { + annot = new AlignmentAnnotation(type, type, els); + annotation.addElement(annot); + } + else + { + Annotation[] anns = new Annotation[annot.annotations.length + + els.length]; + System.arraycopy(annot.annotations, 0, anns, 0, + annot.annotations.length); + System.arraycopy(els, 0, anns, annot.annotations.length, els.length); + annot.annotations = anns; + // System.out.println("else: "); + } + return annot; + } + public String print(SequenceI[] s) { // find max length of id @@ -928,7 +1022,7 @@ public class StockholmFile extends AlignFile seq += ch; } else if (ch.length() > 1) - { + { seq += ch.charAt(1); } } @@ -937,10 +1031,10 @@ public class StockholmFile extends AlignFile } } return out.toString(); - } - - public String print() - { + } + + public String print() + { out = new StringBuffer(); out.append("# STOCKHOLM 1.0"); out.append(newline); @@ -949,97 +1043,81 @@ public class StockholmFile extends AlignFile out.append("//"); out.append(newline); return out.toString(); + } + + private static Hashtable typeIds = null; + static + { + if (typeIds == null) + { + typeIds = new Hashtable(); + typeIds.put("SS", "secondary structure"); + typeIds.put("SA", "surface accessibility"); + typeIds.put("TM", "transmembrane"); + typeIds.put("PP", "posterior probability"); + typeIds.put("LI", "ligand binding"); + typeIds.put("AS", "active site"); + typeIds.put("IN", "intron"); + typeIds.put("IR", "interacting residue"); + typeIds.put("AC", "accession"); + typeIds.put("OS", "organism"); + typeIds.put("CL", "class"); + typeIds.put("DE", "description"); + typeIds.put("DR", "reference"); + typeIds.put("LO", "look"); + typeIds.put("RF", "reference positions"); + + } + } + + protected static String id2type(String id) + { + if (typeIds.containsKey(id)) + { + return (String) typeIds.get(id); + } + System.err.println("Warning : Unknown Stockholm annotation type code " + + id); + return id; + } + + protected static String type2id(String type) + { + String key = null; + Enumeration e = typeIds.keys(); + while (e.hasMoreElements()) + { + Object ll = e.nextElement(); + if (typeIds.get(ll).toString().equals(type)) + { + key = (String) ll; + break; + } + } + if (key != null) + { + return (String) key; + } + System.err.println("Warning : Unknown Stockholm annotation type: " + + type); + return key; } - - private static Hashtable typeIds = null; - static - { - if (typeIds == null) - { - typeIds = new Hashtable(); - typeIds.put("SS", "secondary structure"); - typeIds.put("SA", "surface accessibility"); - typeIds.put("TM", "transmembrane"); - typeIds.put("PP", "posterior probability"); - typeIds.put("LI", "ligand binding"); - typeIds.put("AS", "active site"); - typeIds.put("IN", "intron"); - typeIds.put("IR", "interacting residue"); - typeIds.put("AC", "accession"); - typeIds.put("OS", "organism"); - typeIds.put("CL", "class"); - typeIds.put("DE", "description"); - typeIds.put("DR", "reference"); - typeIds.put("LO", "look"); - typeIds.put("RF", "reference positions"); - - } - } - - protected static String id2type(String id) - { - if (typeIds.containsKey(id)) - { - return (String) typeIds.get(id); - } - System.err.println("Warning : Unknown Stockholm annotation type code " - + id); - return id; - } - - protected static String type2id(String type) - { - String key = null; - Enumeration e = typeIds.keys(); - while (e.hasMoreElements()) - { - Object ll = e.nextElement(); - if (typeIds.get(ll).toString().equals(type)) - { - key = (String) ll; - break; - } - } - if (key != null) - { - return (String) key; - } - System.err.println("Warning : Unknown Stockholm annotation type: " - + type); - return key; - } - /** - * //ssline is complete secondary structure line private AlignmentAnnotation - * addHelices(Vector annotation, String label, String ssline) { - * - * // decide on secondary structure or not. Annotation[] els = new - * Annotation[ssline.length()]; for (int i = 0; i < ssline.length(); i++) { - * String pos = ssline.substring(i, i + 1); Annotation ann; ann = new - * Annotation(pos, "", ' ', 0f); // 0f is 'valid' null - will not - * - * ann.secondaryStructure = - * jalview.schemes.ResidueProperties.getRNAssState(pos).charAt(0); - * - * ann.displayCharacter = "x" + ann.displayCharacter; - * - * System.out.println(ann.displayCharacter); - * - * els[i] = ann; } AlignmentAnnotation helicesAnnot = null; Enumeration e = - * annotation.elements(); while (e.hasMoreElements()) { helicesAnnot = - * (AlignmentAnnotation) e.nextElement(); if (helicesAnnot.label.equals(type)) - * break; helicesAnnot = null; } if (helicesAnnot == null) { helicesAnnot = - * new AlignmentAnnotation(type, type, els); - * annotation.addElement(helicesAnnot); } else { Annotation[] anns = new - * Annotation[helicesAnnot.annotations.length + els.length]; - * System.arraycopy(helicesAnnot.annotations, 0, anns, 0, - * helicesAnnot.annotations.length); System.arraycopy(els, 0, anns, - * helicesAnnot.annotations.length, els.length); helicesAnnot.annotations = - * anns; } - * - * helicesAnnot.features = Rna.GetBasePairs(ssline); - * Rna.HelixMap(helicesAnnot.features); - * - * - * return helicesAnnot; } - */ -} + /** + * make a friendly ID string. + * + * @param dataName + * @return truncated dataName to after last '/' + */ + private String safeName(String dataName) + { + int b = 0; + while ((b = dataName.indexOf("/")) > -1 && b < dataName.length()) + { + dataName = dataName.substring(b + 1).trim(); + + } + int e = (dataName.length() - dataName.indexOf(".")) + 1; + dataName = dataName.substring(1, e).trim(); + return dataName; + } +} diff --git a/src/jalview/io/TCoffeeScoreFile.java b/src/jalview/io/TCoffeeScoreFile.java index ad5f52a..c020d99 100644 --- a/src/jalview/io/TCoffeeScoreFile.java +++ b/src/jalview/io/TCoffeeScoreFile.java @@ -86,9 +86,7 @@ import java.util.regex.Pattern; * @author Paolo Di Tommaso * */ -public class TCoffeeScoreFile extends AlignFile -{ - +public class TCoffeeScoreFile extends AlignFile { public TCoffeeScoreFile(String inFile, String type) throws IOException { super(inFile, type); diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index b523763..a37746c 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -18,6 +18,7 @@ package jalview.jbgui; import jalview.schemes.ColourSchemeProperty; +import jalview.util.MessageManager; import java.awt.BorderLayout; import java.awt.Color; @@ -138,6 +139,8 @@ public class GAlignFrame extends JInternalFrame protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem(); + + protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem(); // protected JRadioButtonMenuItem covariationColour = new // JRadioButtonMenuItem(); @@ -181,6 +184,9 @@ public class GAlignFrame extends JInternalFrame public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem(); JMenuItem deleteGroups = new JMenuItem(); + + JMenuItem createGroup = new JMenuItem(); + JMenuItem unGroup = new JMenuItem(); JMenuItem delete = new JMenuItem(); @@ -404,8 +410,8 @@ public class GAlignFrame extends JInternalFrame int option = JOptionPane.showInternalConfirmDialog( jalview.gui.Desktop.desktop, - "Remove from default list?", - "Remove user defined colour", + MessageManager.getString("label.remove_from_default_list"), + MessageManager.getString("label.remove_user_defined_colour"), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) { @@ -453,7 +459,7 @@ public class GAlignFrame extends JInternalFrame colours.add(purinePyrimidineColour); // colours.add(covariationColour); colours.add(tcoffeeColour); - + colours.add(RNAInteractionColour); setColourSelected(jalview.bin.Cache .getDefault("DEFAULT_COLOUR", "None")); @@ -531,6 +537,11 @@ public class GAlignFrame extends JInternalFrame purinePyrimidineColour.setSelected(true); break; + + case ColourSchemeProperty.RNAINTERACTION: + RNAInteractionColour.setSelected(true); + + break; /* * case ColourSchemeProperty.COVARIATION: * covariationColour.setSelected(true); @@ -617,7 +628,7 @@ public class GAlignFrame extends JInternalFrame invertSequenceMenuItem_actionPerformed(e); } }); - grpsFromSelection.setText("Make Groups for selection"); + grpsFromSelection.setText("Make Groups For Selection"); grpsFromSelection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -910,14 +921,22 @@ public class GAlignFrame extends JInternalFrame }); purinePyrimidineColour.setText("Purine/Pyrimidine"); - purinePyrimidineColour - .addActionListener(new java.awt.event.ActionListener() + purinePyrimidineColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { purinePyrimidineColour_actionPerformed(e); } }); + + RNAInteractionColour.setText("RNA Interaction type"); + RNAInteractionColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + RNAInteractionColour_actionPerformed(e); + } + }); /* * covariationColour.setText("Covariation"); * covariationColour.addActionListener(new java.awt.event.ActionListener() { @@ -1199,6 +1218,28 @@ public class GAlignFrame extends JInternalFrame deleteGroups_actionPerformed(e); } }); + createGroup.setText("Create group"); + createGroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke( + java.awt.event.KeyEvent.VK_G, Toolkit.getDefaultToolkit() + .getMenuShortcutKeyMask(), false)); + createGroup.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + createGroup_actionPerformed(e); + } + }); + unGroup.setText("Remove Group"); + unGroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke( + java.awt.event.KeyEvent.VK_G,Toolkit.getDefaultToolkit() + .getMenuShortcutKeyMask() | java.awt.event.KeyEvent.SHIFT_MASK, false)); + unGroup.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + unGroup_actionPerformed(e); + } + }); copy.setText("Copy"); copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit() @@ -1873,6 +1914,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(buriedColour); colourMenu.add(nucleotideColour); colourMenu.add(purinePyrimidineColour); + colourMenu.add(RNAInteractionColour); // colourMenu.add(covariationColour); colourMenu.add(tcoffeeColour); colourMenu.add(userDefinedColour); @@ -1882,7 +1924,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(abovePIDThreshold); colourMenu.add(modifyPID); colourMenu.add(annotationColour); - colourMenu.add(rnahelicesColour); + colourMenu.add(rnahelicesColour); calculateMenu.add(sort); calculateMenu.add(calculateTree); calculateMenu.addSeparator(); @@ -1946,8 +1988,10 @@ public class GAlignFrame extends JInternalFrame selectMenu.add(deselectAllSequenceMenuItem); selectMenu.add(invertSequenceMenuItem); selectMenu.add(invertColSel); - selectMenu.add(deleteGroups); + selectMenu.add(createGroup); + selectMenu.add(unGroup); selectMenu.add(grpsFromSelection); + selectMenu.add(deleteGroups); // TODO - determine if the listenToViewSelections button is needed : see bug // JAL-574 // selectMenu.addSeparator(); @@ -2267,6 +2311,11 @@ public class GAlignFrame extends JInternalFrame protected void purinePyrimidineColour_actionPerformed(ActionEvent e) { } + + protected void RNAInteractionColour_actionPerformed(ActionEvent e) + { + } + /* * protected void covariationColour_actionPerformed(ActionEvent e) { } @@ -2307,6 +2356,14 @@ public class GAlignFrame extends JInternalFrame protected void deleteGroups_actionPerformed(ActionEvent e) { } + + protected void createGroup_actionPerformed(ActionEvent e) + { + } + + protected void unGroup_actionPerformed(ActionEvent e) + { + } protected void copy_actionPerformed(ActionEvent e) { diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index a3af237..5742337 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -126,6 +126,7 @@ public class GDesktop extends JFrame */ private void jbInit() throws Exception { + FileMenu.setText("File"); HelpMenu.setText("Help"); VamsasMenu.setText("Vamsas"); diff --git a/src/jalview/jbgui/GRestServiceEditorPane.java b/src/jalview/jbgui/GRestServiceEditorPane.java index a403088..92747b5 100644 --- a/src/jalview/jbgui/GRestServiceEditorPane.java +++ b/src/jalview/jbgui/GRestServiceEditorPane.java @@ -18,6 +18,7 @@ package jalview.jbgui; import jalview.gui.JvSwingUtils; +import jalview.util.MessageManager; import java.awt.BorderLayout; import java.awt.event.ActionEvent; @@ -106,14 +107,14 @@ public class GRestServiceEditorPane extends JPanel name = new JTextArea(1, 12); JvSwingUtils.mgAddtoLayout(cpanel, - "Short descriptive name for service", new JLabel("Name:"), + "Short descriptive name for service", new JLabel(MessageManager.getString("label.name")), name, "wrap"); action = new JComboBox(); JvSwingUtils .mgAddtoLayout( cpanel, "What kind of function the service performs (e.g. alignment, analysis, search, etc).", - new JLabel("Service Action:"), action, "wrap"); + new JLabel(MessageManager.getString("label.service_action")), action, "wrap"); descr = new JTextArea(4, 60); descrVp = new JScrollPane(); descrVp.setViewportView(descr); @@ -127,7 +128,7 @@ public class GRestServiceEditorPane extends JPanel .mgAddtoLayout( cpanel, "URL to post data to service. Include any special parameters needed here", - new JLabel("POST URL:"), urlVp, "wrap"); + new JLabel(MessageManager.getString("label.post_url")), urlVp, "wrap"); urlsuff = new JTextArea(); urlsuff.setColumns(60); @@ -136,12 +137,12 @@ public class GRestServiceEditorPane extends JPanel .mgAddtoLayout( cpanel, "Optional suffix added to URL when retrieving results from service", - new JLabel("URL Suffix:"), urlsuff, "wrap"); + new JLabel(MessageManager.getString("label.url_suffix")), urlsuff, "wrap"); // input options // details.add(cpanel = new JPanel(), BorderLayout.CENTER); // cpanel.setLayout(new FlowLayout()); - hSeparable = new JCheckBox("per Sequence"); + hSeparable = new JCheckBox(MessageManager.getString("label.per_seq")); hSeparable .setToolTipText("" + JvSwingUtils @@ -157,7 +158,7 @@ public class GRestServiceEditorPane extends JPanel } }); - vSeparable = new JCheckBox("Results are vertically separable"); + vSeparable = new JCheckBox(MessageManager.getString("label.result_vertically_separable")); vSeparable .setToolTipText("" + JvSwingUtils diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 09152d6..794c292 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -82,6 +82,7 @@ public class AnnotationRenderer // If a closing base pair half of the stem, display a backward arrow if (column > 0 && closeparen.search(dc)) { + if (diffupstream) // if (validRes && column>1 && row_annotations[column-2]!=null && // dc.equals(row_annotations[column-2].displayCharacter)) @@ -98,6 +99,7 @@ public class AnnotationRenderer } else { + // display a forward arrow if (diffdownstream) { @@ -170,7 +172,66 @@ public class AnnotationRenderer * master flag indicating if renderer should ever try to clip. not enabled for jalview 2.8.1 */ private boolean canClip=false; + + public void drawNotCanonicalAnnot(Graphics g, Color nonCanColor, Annotation[] row_annotations, + int lastSSX, int x, int y, int iconOffset, int startRes, + int column, boolean validRes, boolean validEnd) + { + //System.out.println(nonCanColor); + + g.setColor(nonCanColor); + int sCol = (lastSSX / charWidth) + startRes; + int x1 = lastSSX; + int x2 = (x * charWidth); + Regex closeparen = new Regex("}|]|<|[a-z]"); + + String dc = (column == 0 || row_annotations[column - 1] == null) ? "" + : row_annotations[column - 1].displayCharacter; + + boolean diffupstream = sCol == 0 || row_annotations[sCol - 1] == null + || !dc.equals(row_annotations[sCol - 1].displayCharacter); + boolean diffdownstream = !validRes || !validEnd + || row_annotations[column] == null + || !dc.equals(row_annotations[column].displayCharacter); + // System.out.println("Column "+column+" diff up: "+diffupstream+" down:"+diffdownstream); + // If a closing base pair half of the stem, display a backward arrow + if (column > 0 && closeparen.search(dc))// closeletter_b.search(dc)||closeletter_c.search(dc)||closeletter_d.search(dc)||closecrochet.search(dc)) ) + { + + if (diffupstream) + // if (validRes && column>1 && row_annotations[column-2]!=null && + // dc.equals(row_annotations[column-2].displayCharacter)) + { + g.fillPolygon(new int[] + { lastSSX + 5, lastSSX + 5, lastSSX }, new int[] + { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3); + x1 += 5; + } + if (diffdownstream) + { + x2 -= 1; + } + } + else + { + + // display a forward arrow + if (diffdownstream) + { + g.fillPolygon(new int[] + { x2 - 5, x2 - 5, x2 }, new int[] + { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3); + x2 -= 5; + } + if (diffupstream) + { + x1 += 1; + } + } + // draw arrow body + g.fillRect(x1, y + 4 + iconOffset, x2 - x1, 7); + } // public void updateFromAnnotationPanel(FontMetrics annotFM, AlignViewportI // av) public void updateFromAwtRenderPanel(AwtRenderPanelI annotPanel, @@ -303,6 +364,7 @@ public class AnnotationRenderer updateFromAwtRenderPanel(annotPanel, av); fm = g.getFontMetrics(); AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); + int temp = 0; if (aa==null) { return false; @@ -536,7 +598,8 @@ public class AnnotationRenderer .equals(row_annotations[column - 1].displayCharacter) || (row_annotations[column].displayCharacter .length() < 2 && row_annotations[column].secondaryStructure == ' '))) { - g.drawString(row_annotations[column].displayCharacter, x + g.drawString(row_annotations[column].displayCharacter + , x * charWidth + charOffset, y + iconOffset); } g.setFont(ofont); @@ -545,42 +608,158 @@ public class AnnotationRenderer if (row.hasIcons) { char ss = validRes ? row_annotations[column].secondaryStructure - : ' '; - if (ss == 'S') + : '-'; + + if (ss == '(') { // distinguish between forward/backward base-pairing if (row_annotations[column].displayCharacter.indexOf(')') > -1) { - ss = 's'; + + ss = ')'; + } } - if (!validRes || (ss != lastSS)) + if (ss == '[') { - if (x > -1) + if ((row_annotations[column].displayCharacter.indexOf(']') > -1)) { + ss = ']'; + + + } + } + if (ss == '{') + { + // distinguish between forward/backward base-pairing + if (row_annotations[column].displayCharacter.indexOf('}') > -1) + { + ss = '}'; + + + } + } + if (ss == '<') + { + // distinguish between forward/backward base-pairing + if (row_annotations[column].displayCharacter.indexOf('<') > -1) + { + ss = '>'; + + + } + } + if (ss >=65) + { + // distinguish between forward/backward base-pairing + if (row_annotations[column].displayCharacter.indexOf(ss+32) > -1) + { + + ss = (char) (ss+32); + + + } + } + + + if (!validRes || (ss != lastSS)) + { + + + if (x > -1) + { + + + int nb_annot=x-temp; + //System.out.println("\t type :"+lastSS+"\t x :"+x+"\t nbre annot :"+nb_annot); switch (lastSS) - { - case 'H': - drawHelixAnnot(g, row_annotations, lastSSX, x, y, - iconOffset, startRes, column, validRes, validEnd); + { + + case '$': + drawHelixAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); break; - case 'E': - drawSheetAnnot(g, row_annotations, lastSSX, x, y, - iconOffset, startRes, column, validRes, validEnd); + case 'µ': + drawSheetAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); break; - case 'S': // Stem case for RNA secondary structure - case 's': // and opposite direction - drawStemAnnot(g, row_annotations, lastSSX, x, y, - iconOffset, startRes, column, validRes, validEnd); + case '(': // Stem case for RNA secondary structure + case ')': // and opposite direction + drawStemAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); + temp=x; break; - + case '{': + case '}': + case '[': + case ']': + case '>': + case '<': + case 'A': + case 'a': + case 'B': + case 'b': + case 'C': + case 'c': + case 'D': + case 'd': + case 'E': + case 'e': + case 'F': + case 'f': + case 'G': + case 'g': + case 'H': + case 'h': + case 'I': + case 'i': + case 'J': + case 'j': + case 'K': + case 'k': + case 'L': + case 'l': + case 'M': + case 'm': + case 'N': + case 'n': + case 'O': + case 'o': + case 'P': + case 'p': + case 'Q': + case 'q': + case 'R': + case 'r': + case 'S': + case 's': + case 'T': + case 't': + case 'U': + case 'u': + case 'V': + case 'v': + case 'W': + case 'w': + case 'X': + case 'x': + case 'Y': + case 'y': + case 'Z': + case 'z': + + Color nonCanColor= getNotCanonicalColor(lastSS); + drawNotCanonicalAnnot(g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); + temp=x; + break; default: g.setColor(Color.gray); g.fillRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX, 2); - + temp=x; break; } } @@ -626,23 +805,86 @@ public class AnnotationRenderer { switch (lastSS) { - case 'H': - drawHelixAnnot(g, row_annotations, lastSSX, x, y, iconOffset, - startRes, column, validRes, validEnd); + case '$': + drawHelixAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); break; - case 'E': - drawSheetAnnot(g, row_annotations, lastSSX, x, y, iconOffset, - startRes, column, validRes, validEnd); + case 'µ': + drawSheetAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); break; case 's': case 'S': // Stem case for RNA secondary structure - drawStemAnnot(g, row_annotations, lastSSX, x, y, iconOffset, - startRes, column, validRes, validEnd); + + drawStemAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); + break; + case '{': + case '}': + case '[': + case ']': + case '>': + case '<': + case 'A': + case 'a': + case 'B': + case 'b': + case 'C': + case 'c': + case 'D': + case 'd': + case 'E': + case 'e': + case 'F': + case 'f': + case 'G': + case 'g': + case 'H': + case 'h': + case 'I': + case 'i': + case 'J': + case 'j': + case 'K': + case 'k': + case 'L': + case 'l': + case 'M': + case 'm': + case 'N': + case 'n': + case 'O': + case 'o': + case 'P': + case 'p': + case 'Q': + case 'q': + case 'R': + case 'r': + case 'T': + case 't': + case 'U': + case 'u': + case 'V': + case 'v': + case 'W': + case 'w': + case 'X': + case 'x': + case 'Y': + case 'y': + case 'Z': + case 'z': + //System.out.println(lastSS); + Color nonCanColor = getNotCanonicalColor(lastSS); + drawNotCanonicalAnnot(g,nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); + break; default: - drawGlyphLine(g, row_annotations, lastSSX, x, y, iconOffset, - startRes, column, validRes, validEnd); + drawGlyphLine(g, row_annotations, lastSSX, x, y, iconOffset, startRes, + column, validRes, validEnd); break; } } @@ -680,8 +922,8 @@ public class AnnotationRenderer { if (aa[gg].graphGroup == row.graphGroup) { - drawLineGraph(g, aa[gg], aa[gg].annotations, startRes, - endRes, y, groupmin, groupmax, row.graphHeight); + drawLineGraph(g, aa[gg], aa[gg].annotations, startRes, endRes, y, groupmin, + groupmax, row.graphHeight); } } @@ -689,8 +931,8 @@ public class AnnotationRenderer } else { - drawLineGraph(g, row, row_annotations, startRes, endRes, y, - row.graphMin, row.graphMax, row.graphHeight); + drawLineGraph(g, row, row_annotations, startRes, endRes, y, row.graphMin, + row.graphMax, row.graphHeight); } } else if (row.graph == AlignmentAnnotation.BAR_GRAPH) @@ -746,18 +988,21 @@ public class AnnotationRenderer private final Color HELIX_COLOUR = Color.red; private final Color STEM_COLOUR = Color.blue; + + private Color sdNOTCANONICAL_COLOUR; - public void drawGlyphLine(Graphics g, Annotation[] row, int lastSSX, - int x, int y, int iconOffset, int startRes, int column, - boolean validRes, boolean validEnd) + public void drawGlyphLine(Graphics g, Annotation[] row, + int lastSSX, int x, int y, int iconOffset, int startRes, + int column, boolean validRes, boolean validEnd) { g.setColor(GLYPHLINE_COLOR); g.fillRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX, 2); } - public void drawSheetAnnot(Graphics g, Annotation[] row, int lastSSX, - int x, int y, int iconOffset, int startRes, int column, - boolean validRes, boolean validEnd) + public void drawSheetAnnot(Graphics g, Annotation[] row, + + int lastSSX, int x, int y, int iconOffset, int startRes, + int column, boolean validRes, boolean validEnd) { g.setColor(SHEET_COLOUR); @@ -1110,4 +1355,135 @@ public class AnnotationRenderer x += charWidth; } } + + + Color getNotCanonicalColor(char lastss) + { + switch (lastss) + { + case '{': + case '}': + return new Color(255,125,5); + + case '[': + case ']': + return new Color(245,115,10); + + case '>': + case '<': + return new Color(235,135,15); + + case 'A': + case 'a': + return new Color(225,105,20); + + case 'B': + case 'b': + return new Color(215,145,30); + + case 'C': + case 'c': + return new Color(205,95,35); + + case 'D': + case 'd': + return new Color(195,155,45); + + case 'E': + case 'e': + return new Color(185,85,55); + + case 'F': + case 'f': + return new Color(175,165,65); + + case 'G': + case 'g': + return new Color(170,75,75); + + case 'H': + case 'h': + return new Color(160,175,85); + + case 'I': + case 'i': + return new Color(150,65,95); + + case 'J': + case 'j': + return new Color(140,185,105); + + case 'K': + case 'k': + return new Color(130,55,110); + + case 'L': + case 'l': + return new Color(120,195,120); + + case 'M': + case 'm': + return new Color(110,45,130); + + case 'N': + case 'n': + return new Color(100,205,140); + + case 'O': + case 'o': + return new Color(90,35,150); + + case 'P': + case 'p': + return new Color(85,215,160); + + case 'Q': + case 'q': + return new Color(75,25,170); + + case 'R': + case 'r': + return new Color(65,225,180); + + case 'S': + case 's': + return new Color(55,15,185); + + case 'T': + case 't': + return new Color(45,235,195); + + case 'U': + case 'u': + return new Color(35,5,205); + + case 'V': + case 'v': + return new Color(25,245,215); + + case 'W': + case 'w': + return new Color(15,0,225); + + case 'X': + case 'x': + return new Color(10,255,235); + + case 'Y': + case 'y': + return new Color(5,150,245); + + case 'Z': + case 'z': + return new Color(0,80,255); + + default : + System.out.println("This is not a interaction : "+lastss); + return null; + + } + } } + + + diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr index abf5fc6..af45e9d 100644 --- a/src/jalview/schemabinding/version2/.castor.cdr +++ b/src/jalview/schemabinding/version2/.castor.cdr @@ -1,4 +1,4 @@ -#Thu Sep 06 17:55:29 BST 2012 +#Thu Oct 17 10:35:33 BST 2013 jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor diff --git a/src/jalview/schemabinding/version2/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java index 805e70c..9eef6f0 100644 --- a/src/jalview/schemabinding/version2/AnnotationColours.java +++ b/src/jalview/schemabinding/version2/AnnotationColours.java @@ -1,24 +1,14 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle - * - * 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 . + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ */ + package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -29,360 +19,461 @@ import org.exolab.castor.xml.Unmarshaller; * * @version $Revision$ $Date$ */ -public class AnnotationColours implements java.io.Serializable -{ - - // --------------------------/ - // - Class/Member Variables -/ - // --------------------------/ - - /** - * Field _aboveThreshold. - */ - private int _aboveThreshold; - - /** - * keeps track of state for field: _aboveThreshold - */ - private boolean _has_aboveThreshold; - - /** - * Field _annotation. - */ - private java.lang.String _annotation; - - /** - * Field _minColour. - */ - private int _minColour; - - /** - * keeps track of state for field: _minColour - */ - private boolean _has_minColour; - - /** - * Field _maxColour. - */ - private int _maxColour; - - /** - * keeps track of state for field: _maxColour - */ - private boolean _has_maxColour; - - /** - * Field _colourScheme. - */ - private java.lang.String _colourScheme; - - /** - * Field _threshold. - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - // ----------------/ - // - Constructors -/ - // ----------------/ - - public AnnotationColours() - { - super(); - } - - // -----------/ - // - Methods -/ - // -----------/ - - /** - */ - public void deleteAboveThreshold() - { - this._has_aboveThreshold = false; - } - - /** - */ - public void deleteMaxColour() - { - this._has_maxColour = false; - } - - /** - */ - public void deleteMinColour() - { - this._has_minColour = false; - } - - /** - */ - public void deleteThreshold() - { - this._has_threshold = false; - } - - /** - * Returns the value of field 'aboveThreshold'. - * - * @return the value of field 'AboveThreshold'. - */ - public int getAboveThreshold() - { - return this._aboveThreshold; - } - - /** - * Returns the value of field 'annotation'. - * - * @return the value of field 'Annotation'. - */ - public java.lang.String getAnnotation() - { - return this._annotation; - } - - /** - * Returns the value of field 'colourScheme'. - * - * @return the value of field 'ColourScheme'. - */ - public java.lang.String getColourScheme() - { - return this._colourScheme; - } - - /** - * Returns the value of field 'maxColour'. - * - * @return the value of field 'MaxColour'. - */ - public int getMaxColour() - { - return this._maxColour; - } - - /** - * Returns the value of field 'minColour'. - * - * @return the value of field 'MinColour'. - */ - public int getMinColour() - { - return this._minColour; - } - - /** - * Returns the value of field 'threshold'. - * - * @return the value of field 'Threshold'. - */ - public float getThreshold() - { - return this._threshold; - } - - /** - * Method hasAboveThreshold. - * - * @return true if at least one AboveThreshold has been added - */ - public boolean hasAboveThreshold() - { - return this._has_aboveThreshold; - } - - /** - * Method hasMaxColour. - * - * @return true if at least one MaxColour has been added - */ - public boolean hasMaxColour() - { - return this._has_maxColour; - } - - /** - * Method hasMinColour. - * - * @return true if at least one MinColour has been added - */ - public boolean hasMinColour() - { - return this._has_minColour; - } - - /** - * Method hasThreshold. - * - * @return true if at least one Threshold has been added - */ - public boolean hasThreshold() - { - return this._has_threshold; - } - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid() - { - try - { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) - { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException - * if object is null or if any SAXException is thrown during - * marshaling - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - */ - public void marshal(final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException - * if an IOException occurs during marshaling - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException - * if object is null or if any SAXException is thrown during - * marshaling - */ - public void marshal(final org.xml.sax.ContentHandler handler) - throws java.io.IOException, - org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { - Marshaller.marshal(this, handler); - } - - /** - * Sets the value of field 'aboveThreshold'. - * - * @param aboveThreshold - * the value of field 'aboveThreshold'. - */ - public void setAboveThreshold(final int aboveThreshold) - { - this._aboveThreshold = aboveThreshold; - this._has_aboveThreshold = true; - } - - /** - * Sets the value of field 'annotation'. - * - * @param annotation - * the value of field 'annotation'. - */ - public void setAnnotation(final java.lang.String annotation) - { - this._annotation = annotation; - } - - /** - * Sets the value of field 'colourScheme'. - * - * @param colourScheme - * the value of field 'colourScheme'. - */ - public void setColourScheme(final java.lang.String colourScheme) - { - this._colourScheme = colourScheme; - } - - /** - * Sets the value of field 'maxColour'. - * - * @param maxColour - * the value of field 'maxColour'. - */ - public void setMaxColour(final int maxColour) - { - this._maxColour = maxColour; - this._has_maxColour = true; - } - - /** - * Sets the value of field 'minColour'. - * - * @param minColour - * the value of field 'minColour'. - */ - public void setMinColour(final int minColour) - { - this._minColour = minColour; - this._has_minColour = true; - } - - /** - * Sets the value of field 'threshold'. - * - * @param threshold - * the value of field 'threshold'. - */ - public void setThreshold(final float threshold) - { - this._threshold = threshold; - this._has_threshold = true; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException - * if object is null or if any SAXException is thrown during - * marshaling - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - * @return the unmarshaled jalview.schemabinding.version2.AnnotationColours - */ - public static jalview.schemabinding.version2.AnnotationColours unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller - .unmarshal( - jalview.schemabinding.version2.AnnotationColours.class, - reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - */ - public void validate() throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } +public class AnnotationColours implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _aboveThreshold. + */ + private int _aboveThreshold; + + /** + * keeps track of state for field: _aboveThreshold + */ + private boolean _has_aboveThreshold; + + /** + * Field _annotation. + */ + private java.lang.String _annotation; + + /** + * Field _minColour. + */ + private int _minColour; + + /** + * keeps track of state for field: _minColour + */ + private boolean _has_minColour; + + /** + * Field _maxColour. + */ + private int _maxColour; + + /** + * keeps track of state for field: _maxColour + */ + private boolean _has_maxColour; + + /** + * Field _colourScheme. + */ + private java.lang.String _colourScheme; + + /** + * Field _threshold. + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + /** + * Field _perSequence. + */ + private boolean _perSequence; + + /** + * keeps track of state for field: _perSequence + */ + private boolean _has_perSequence; + + /** + * Field _predefinedColours. + */ + private boolean _predefinedColours; + + /** + * keeps track of state for field: _predefinedColours + */ + private boolean _has_predefinedColours; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationColours() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteAboveThreshold( + ) { + this._has_aboveThreshold= false; + } + + /** + */ + public void deleteMaxColour( + ) { + this._has_maxColour= false; + } + + /** + */ + public void deleteMinColour( + ) { + this._has_minColour= false; + } + + /** + */ + public void deletePerSequence( + ) { + this._has_perSequence= false; + } + + /** + */ + public void deletePredefinedColours( + ) { + this._has_predefinedColours= false; + } + + /** + */ + public void deleteThreshold( + ) { + this._has_threshold= false; + } + + /** + * Returns the value of field 'aboveThreshold'. + * + * @return the value of field 'AboveThreshold'. + */ + public int getAboveThreshold( + ) { + return this._aboveThreshold; + } + + /** + * Returns the value of field 'annotation'. + * + * @return the value of field 'Annotation'. + */ + public java.lang.String getAnnotation( + ) { + return this._annotation; + } + + /** + * Returns the value of field 'colourScheme'. + * + * @return the value of field 'ColourScheme'. + */ + public java.lang.String getColourScheme( + ) { + return this._colourScheme; + } + + /** + * Returns the value of field 'maxColour'. + * + * @return the value of field 'MaxColour'. + */ + public int getMaxColour( + ) { + return this._maxColour; + } + + /** + * Returns the value of field 'minColour'. + * + * @return the value of field 'MinColour'. + */ + public int getMinColour( + ) { + return this._minColour; + } + + /** + * Returns the value of field 'perSequence'. + * + * @return the value of field 'PerSequence'. + */ + public boolean getPerSequence( + ) { + return this._perSequence; + } + + /** + * Returns the value of field 'predefinedColours'. + * + * @return the value of field 'PredefinedColours'. + */ + public boolean getPredefinedColours( + ) { + return this._predefinedColours; + } + + /** + * Returns the value of field 'threshold'. + * + * @return the value of field 'Threshold'. + */ + public float getThreshold( + ) { + return this._threshold; + } + + /** + * Method hasAboveThreshold. + * + * @return true if at least one AboveThreshold has been added + */ + public boolean hasAboveThreshold( + ) { + return this._has_aboveThreshold; + } + + /** + * Method hasMaxColour. + * + * @return true if at least one MaxColour has been added + */ + public boolean hasMaxColour( + ) { + return this._has_maxColour; + } + + /** + * Method hasMinColour. + * + * @return true if at least one MinColour has been added + */ + public boolean hasMinColour( + ) { + return this._has_minColour; + } + + /** + * Method hasPerSequence. + * + * @return true if at least one PerSequence has been added + */ + public boolean hasPerSequence( + ) { + return this._has_perSequence; + } + + /** + * Method hasPredefinedColours. + * + * @return true if at least one PredefinedColours has been added + */ + public boolean hasPredefinedColours( + ) { + return this._has_predefinedColours; + } + + /** + * Method hasThreshold. + * + * @return true if at least one Threshold has been added + */ + public boolean hasThreshold( + ) { + return this._has_threshold; + } + + /** + * Returns the value of field 'perSequence'. + * + * @return the value of field 'PerSequence'. + */ + public boolean isPerSequence( + ) { + return this._perSequence; + } + + /** + * Returns the value of field 'predefinedColours'. + * + * @return the value of field 'PredefinedColours'. + */ + public boolean isPredefinedColours( + ) { + return this._predefinedColours; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'aboveThreshold'. + * + * @param aboveThreshold the value of field 'aboveThreshold'. + */ + public void setAboveThreshold( + final int aboveThreshold) { + this._aboveThreshold = aboveThreshold; + this._has_aboveThreshold = true; + } + + /** + * Sets the value of field 'annotation'. + * + * @param annotation the value of field 'annotation'. + */ + public void setAnnotation( + final java.lang.String annotation) { + this._annotation = annotation; + } + + /** + * Sets the value of field 'colourScheme'. + * + * @param colourScheme the value of field 'colourScheme'. + */ + public void setColourScheme( + final java.lang.String colourScheme) { + this._colourScheme = colourScheme; + } + + /** + * Sets the value of field 'maxColour'. + * + * @param maxColour the value of field 'maxColour'. + */ + public void setMaxColour( + final int maxColour) { + this._maxColour = maxColour; + this._has_maxColour = true; + } + + /** + * Sets the value of field 'minColour'. + * + * @param minColour the value of field 'minColour'. + */ + public void setMinColour( + final int minColour) { + this._minColour = minColour; + this._has_minColour = true; + } + + /** + * Sets the value of field 'perSequence'. + * + * @param perSequence the value of field 'perSequence'. + */ + public void setPerSequence( + final boolean perSequence) { + this._perSequence = perSequence; + this._has_perSequence = true; + } + + /** + * Sets the value of field 'predefinedColours'. + * + * @param predefinedColours the value of field + * 'predefinedColours'. + */ + public void setPredefinedColours( + final boolean predefinedColours) { + this._predefinedColours = predefinedColours; + this._has_predefinedColours = true; + } + + /** + * Sets the value of field 'threshold'. + * + * @param threshold the value of field 'threshold'. + */ + public void setThreshold( + final float threshold) { + this._threshold = threshold; + this._has_threshold = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.AnnotationColours + */ + public static jalview.schemabinding.version2.AnnotationColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } } diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java index 876e928..196ad60 100644 --- a/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java @@ -1,24 +1,14 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle - * - * 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 . + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ */ + package jalview.schemabinding.version2.descriptors; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.AnnotationColours; @@ -28,447 +18,468 @@ import jalview.schemabinding.version2.AnnotationColours; * * @version $Revision$ $Date$ */ -public class AnnotationColoursDescriptor extends - org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - // --------------------------/ - // - Class/Member Variables -/ - // --------------------------/ - - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; - - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; - - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; - - /** - * Field _xmlName. - */ - private java.lang.String _xmlName; - - // ----------------/ - // - Constructors -/ - // ----------------/ - - public AnnotationColoursDescriptor() - { - super(); - _nsURI = "www.jalview.org"; - _xmlName = "AnnotationColours"; - _elementDefinition = true; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - // -- initialize attribute descriptors - - // -- _aboveThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasAboveThreshold()) - { - return null; +public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationColoursDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "AnnotationColours"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _aboveThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasAboveThreshold()) { return null; } + return new java.lang.Integer(target.getAboveThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteAboveThreshold(); + return; + } + target.setAboveThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _aboveThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } - return new java.lang.Integer(target.getAboveThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteAboveThreshold(); - return; - } - target.setAboveThreshold(((java.lang.Integer) value).intValue()); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _annotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getAnnotation(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + target.setAnnotation( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _annotation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _aboveThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { // -- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); - } - desc.setValidator(fieldValidator); - // -- _annotation - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.String.class, "_annotation", "annotation", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - return target.getAnnotation(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - target.setAnnotation((java.lang.String) value); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _minColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMinColour()) { return null; } + return new java.lang.Integer(target.getMinColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMinColour(); + return; + } + target.setMinColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _minColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _annotation - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { // -- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); - } - desc.setValidator(fieldValidator); - // -- _minColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Integer.TYPE, "_minColour", "minColour", - org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasMinColour()) - { - return null; + desc.setValidator(fieldValidator); + //-- _maxColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMaxColour()) { return null; } + return new java.lang.Integer(target.getMaxColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMaxColour(); + return; + } + target.setMaxColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _maxColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); } - return new java.lang.Integer(target.getMinColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteMinColour(); - return; - } - target.setMinColour(((java.lang.Integer) value).intValue()); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _colourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getColourScheme(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + target.setColourScheme( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _minColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { // -- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); - } - desc.setValidator(fieldValidator); - // -- _maxColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Integer.TYPE, "_maxColour", "maxColour", - org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasMaxColour()) - { - return null; + desc.setValidator(fieldValidator); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasThreshold()) { return null; } + return new java.lang.Float(target.getThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteThreshold(); + return; + } + target.setThreshold( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _threshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); } - return new java.lang.Integer(target.getMaxColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteMaxColour(); - return; - } - target.setMaxColour(((java.lang.Integer) value).intValue()); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _perSequence + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_perSequence", "perSequence", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasPerSequence()) { return null; } + return (target.getPerSequence() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePerSequence(); + return; + } + target.setPerSequence( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _perSequence + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _maxColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { // -- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); - } - desc.setValidator(fieldValidator); - // -- _colourScheme - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.String.class, "_colourScheme", "colourScheme", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - return target.getColourScheme(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - target.setColourScheme((java.lang.String) value); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _predefinedColours + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_predefinedColours", "predefinedColours", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasPredefinedColours()) { return null; } + return (target.getPredefinedColours() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePredefinedColours(); + return; + } + target.setPredefinedColours( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _predefinedColours + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _colourScheme - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { // -- local scope - org.exolab.castor.xml.validators.StringValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.StringValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setWhiteSpace("preserve"); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + } - desc.setValidator(fieldValidator); - // -- _threshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Float.TYPE, "_threshold", "threshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasThreshold()) - { - return null; - } - return new java.lang.Float(target.getThreshold()); - } - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteThreshold(); - return; - } - target.setThreshold(((java.lang.Float) value).floatValue()); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); + //-----------/ + //- Methods -/ + //-----------/ - // -- validation code for: _threshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { // -- local scope - org.exolab.castor.xml.validators.FloatValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); - fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive((float) -3.4028235E38); - typeValidator.setMaxInclusive((float) 3.4028235E38); + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; } - desc.setValidator(fieldValidator); - // -- initialize element descriptors - - } - // -----------/ - // - Methods -/ - // -----------/ - - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } - - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return super.getIdentity(); - } + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.AnnotationColours.class; - } + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.AnnotationColours.class; + } - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix() - { - return _nsPrefix; - } + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI() - { - return _nsURI; - } + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName() - { - return _xmlName; - } + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition() - { - return _elementDefinition; - } + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } } diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 729065c..9c5512c 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -17,6 +17,7 @@ */ package jalview.schemes; +import jalview.analysis.Conservation; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.GraphLine; @@ -24,6 +25,7 @@ import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; import java.awt.Color; +import java.util.Hashtable; import java.util.IdentityHashMap; import java.util.Map; @@ -47,9 +49,9 @@ public class AnnotationColourGradient extends ResidueColourScheme ColourSchemeI colourScheme; - public boolean predefinedColours = false; + private boolean predefinedColours = false; - public boolean seqAssociated = false; + private boolean seqAssociated = false; IdentityHashMap seqannot = null; @@ -270,6 +272,16 @@ public class AnnotationColourGradient extends ResidueColourScheme return currentColour; } + public boolean isPredefinedColours() + { + return predefinedColours; + } + + public void setPredefinedColours(boolean predefinedColours) + { + this.predefinedColours = predefinedColours; + } + public boolean isSeqAssociated() { return seqAssociated; @@ -279,4 +291,28 @@ public class AnnotationColourGradient extends ResidueColourScheme { seqAssociated = sassoc; } + @Override + public void setConsensus(Hashtable[] consensus) + { + if (colourScheme!=null) + { + colourScheme.setConsensus(consensus); + } + } + @Override + public void setConservation(Conservation cons) + { + if (colourScheme!=null) + { + colourScheme.setConservation(cons); + } + } + @Override + public void setConservationInc(int i) + { + if (colourScheme!=null) + { + colourScheme.setConservationInc(i); + } + } } diff --git a/src/jalview/schemes/ColourSchemeProperty.java b/src/jalview/schemes/ColourSchemeProperty.java index 47dbde2..f748c96 100755 --- a/src/jalview/schemes/ColourSchemeProperty.java +++ b/src/jalview/schemes/ColourSchemeProperty.java @@ -86,6 +86,8 @@ public class ColourSchemeProperty public static final int TCOFFEE = 15; + public static final int RNAINTERACTION = 16; + /** * index of first colourscheme (includes 'None') */ @@ -166,6 +168,11 @@ public class ColourSchemeProperty { ret = PURINEPYRIMIDINE; } + + else if (name.equalsIgnoreCase("RNA Interaction type")) + { + ret = RNAINTERACTION; + } // else if (name.equalsIgnoreCase("Covariation")) // { // ret = COVARIATION; @@ -239,6 +246,9 @@ public class ColourSchemeProperty { index = TCOFFEE; } + + + /* * else if (cs instanceof CovariationColourScheme) { index = COVARIATION; } */ @@ -333,6 +343,11 @@ public class ColourSchemeProperty ret = "T-Coffee Scores"; break; + + case RNAINTERACTION: + ret = "RNA Interaction type"; + + break; /* * case COVARIATION: ret = "Covariation"; * @@ -484,10 +499,14 @@ public class ColourSchemeProperty case TCOFFEE: cs = new TCoffeeColourScheme(coll); - // case COVARIATION: - // cs = new CovariationColourScheme(annotation); + break; + + + + // case COVARIATION: + // cs = new CovariationColourScheme(annotation); - // break; + // break; case USER_DEFINED: Color[] col = new Color[24]; diff --git a/src/jalview/schemes/RNAHelicesColour.java b/src/jalview/schemes/RNAHelicesColour.java index 168aa31..a2ffff5 100644 --- a/src/jalview/schemes/RNAHelicesColour.java +++ b/src/jalview/schemes/RNAHelicesColour.java @@ -66,7 +66,8 @@ public class RNAHelicesColour extends ResidueColourScheme public void refresh() { - if (lastrefresh != annotation._rnasecstr.hashCode() + if ((annotation._rnasecstr == null + || lastrefresh != annotation._rnasecstr.hashCode()) && annotation.isValidStruc()) { annotation.getRNAStruc(); diff --git a/src/jalview/schemes/RNAHelicesColourChooser.java b/src/jalview/schemes/RNAHelicesColourChooser.java index 25b65b3..cef7eb6 100644 --- a/src/jalview/schemes/RNAHelicesColourChooser.java +++ b/src/jalview/schemes/RNAHelicesColourChooser.java @@ -97,8 +97,24 @@ public class RNAHelicesColourChooser return; } - currentAnnotation = av.getAlignment().getAlignmentAnnotation()[0];// annotations.getSelectedIndex()]; - + // This loop will find the first rna structure annotation by which to colour + // the sequences. + AlignmentAnnotation[] annotations = av.getAlignment().getAlignmentAnnotation(); + for (int i = 0; i < annotations.length; i++) { + + // is this a sensible way of determining type of annotation? + if (annotations[i].getRNAStruc() != null) { + currentAnnotation = annotations[i]; + break; + } + } + if (currentAnnotation == null) + { + System.err.println("Jalview is about to try and colour by RNAHelices even" + + " though there are no RNA secondary structure annotations present!"); + currentAnnotation = av.getAlignment().getAlignmentAnnotation()[0];// annotations.getSelectedIndex()]; + } + RNAHelicesColour rhc = null; rhc = new RNAHelicesColour(currentAnnotation); diff --git a/src/jalview/schemes/RNAInteractionColourScheme.java b/src/jalview/schemes/RNAInteractionColourScheme.java new file mode 100644 index 0000000..42f4feb --- /dev/null +++ b/src/jalview/schemes/RNAInteractionColourScheme.java @@ -0,0 +1,82 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ + package jalview.schemes; + +import jalview.datamodel.SequenceI; + +import java.awt.Color; + + +public class RNAInteractionColourScheme extends ResidueColourScheme{ + public RNAInteractionColourScheme() + { + super(); + } + + /** + * DOCUMENT ME! + * + * @param n + * DOCUMENT ME! + * + * @return DOCUMENT ME! + */ + @Override + public Color findColour(char c) + { + // System.out.println("called"); log.debug + return colors[ResidueProperties.nucleotideIndex[c]]; + } + + /** + * DOCUMENT ME! + * + * @param n + * DOCUMENT ME! + * @param j + * DOCUMENT ME! + * + * @return DOCUMENT ME! + */ + @Override + public Color findColour(char c, int j, SequenceI seq) + { + Color currentColour; + if ((threshold == 0) || aboveThreshold(c, j)) + { + try + { + currentColour = colors[ResidueProperties.nucleotideIndex[c]]; + } catch (Exception ex) + { + return Color.white; + } + } + else + { + return Color.white; + } + + if (conservationColouring) + { + currentColour = applyConservation(currentColour, j); + } + + return currentColour; + } + } diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index bfff972..c131e76 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -1606,9 +1606,68 @@ public class ResidueProperties public static Hashtable toRNAssState; static { - toRNAssState = new Hashtable(); - toRNAssState.put(")", "S"); - toRNAssState.put("(", "S"); + toRNAssState = new Hashtable(); + toRNAssState.put(")", "("); + toRNAssState.put("(", "("); + toRNAssState.put("]", "["); + toRNAssState.put("[", "["); + toRNAssState.put("{", "{"); + toRNAssState.put("}", "{"); + toRNAssState.put(">", ">"); + toRNAssState.put("<", ">"); + toRNAssState.put("A", "A"); + toRNAssState.put("a", "A"); + toRNAssState.put("B", "B"); + toRNAssState.put("b", "B"); + toRNAssState.put("C", "C"); + toRNAssState.put("c", "C"); + toRNAssState.put("D", "D"); + toRNAssState.put("d", "D"); + toRNAssState.put("E", "E"); + toRNAssState.put("e", "E"); + toRNAssState.put("F", "F"); + toRNAssState.put("f", "F"); + toRNAssState.put("G", "G"); + toRNAssState.put("g", "G"); + toRNAssState.put("H", "H"); + toRNAssState.put("h", "H"); + toRNAssState.put("I", "I"); + toRNAssState.put("i", "I"); + toRNAssState.put("J", "J"); + toRNAssState.put("j", "J"); + toRNAssState.put("K", "K"); + toRNAssState.put("k", "K"); + toRNAssState.put("L", "L"); + toRNAssState.put("l", "L"); + toRNAssState.put("M", "M"); + toRNAssState.put("m", "M"); + toRNAssState.put("N", "N"); + toRNAssState.put("n", "N"); + toRNAssState.put("O", "O"); + toRNAssState.put("o", "O"); + toRNAssState.put("P", "P"); + toRNAssState.put("p", "P"); + toRNAssState.put("Q", "Q"); + toRNAssState.put("q", "Q"); + toRNAssState.put("R", "R"); + toRNAssState.put("r", "R"); + toRNAssState.put("S", "S"); + toRNAssState.put("s", "S"); + toRNAssState.put("T", "T"); + toRNAssState.put("t", "T"); + toRNAssState.put("U", "U"); + toRNAssState.put("u", "U"); + toRNAssState.put("V", "V"); + toRNAssState.put("v", "V"); + toRNAssState.put("W", "W"); + toRNAssState.put("w", "W"); + toRNAssState.put("X", "X"); + toRNAssState.put("x", "X"); + toRNAssState.put("Y", "Y"); + toRNAssState.put("y", "Y"); + toRNAssState.put("Z", "Z"); + toRNAssState.put("z", "Z"); + } /** diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 7415712..8d684c1 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -53,13 +53,25 @@ public class StructureSelectionManager } Hashtable mappingData = new Hashtable(); - + private static StructureSelectionManager nullProvider = null; public static StructureSelectionManager getStructureSelectionManager( StructureSelectionManagerProvider context) { - if (context==null) - { - throw new Error("Implementation error. Structure selection manager's context is 'null'", new NullPointerException("SSM context is null")); + if (context==null) { + if (nullProvider == null) + { + if (instances != null) + { + throw new Error( + "Implementation error. Structure selection manager's context is 'null'", + new NullPointerException("SSM context is null")); + } + else + { + nullProvider = new StructureSelectionManager(); + } + return nullProvider; + } } if (instances == null) { @@ -68,7 +80,13 @@ public class StructureSelectionManager StructureSelectionManager instance = instances.get(context); if (instance == null) { - instances.put(context, instance = new StructureSelectionManager()); + if (nullProvider!=null) + { + instance = nullProvider; + } else { + instance = new StructureSelectionManager(); + } + instances.put(context, instance); } return instance; } diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 804595b..14ace19 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -430,6 +430,7 @@ public class DBRefUtils ref = new DBRefEntry(locsrc, version, pdbid + chaincode); PDBEntry pdbr = new PDBEntry(); pdbr.setId(pdbid); + pdbr.getProperty().put("CHAIN",chaincode); seq.addPDBId(pdbr); } } diff --git a/src/jalview/util/MessageManager.java b/src/jalview/util/MessageManager.java new file mode 100644 index 0000000..fcf2bfa --- /dev/null +++ b/src/jalview/util/MessageManager.java @@ -0,0 +1,67 @@ +package jalview.util; + +import java.text.MessageFormat; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author David Roldan Martinez + * @author Thomas Abeel + * + * + */ +public class MessageManager { + + private static ResourceBundle rb; + + private static Logger log=Logger.getLogger(MessageManager.class.getCanonicalName()); + + private static Locale loc; + + + + static{ + try { + /* Localize Java dialogs */ + loc = Locale.getDefault(); + // Locale.setDefault(loc); + /* Getting messages for GV */ + log.info("Getting messages for lang: "+loc); + rb = ResourceBundle.getBundle("lang.Messages", loc); + if (log.isLoggable(Level.FINEST)) { + // this might take a while, so we only do it if it will be shown + log.finest("Language keys: "+rb.keySet()); + } + } catch (Exception q) { + log.warning("Exception when initting Locale for i18n messages\n"+q.getMessage()); + q.printStackTrace(); + } + catch (Error v) + { + log.warning("Error when initting Locale for i18n messages\n"+v.getMessage()); + v.printStackTrace(); + } + + + } + + public static String getString(String key){ + String value = "[missing key] " + key; + try{ + value = rb.getString(key); + }catch(Exception e){ + log.warning("I18N missing: "+loc+"\t"+key); + } + return value; + } + + public static Locale getLocale() { + return loc; + } + public static String formatMessage(String key, Object[] params){ + return MessageFormat.format(rb.getString(key), params); + } +} diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index dca968e..6f3a2af 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -40,6 +40,7 @@ import jalview.workers.AlignCalcManager; import jalview.workers.ConsensusThread; import jalview.workers.StrucConsensusThread; +import java.awt.Color; import java.util.ArrayList; import java.util.BitSet; import java.util.Hashtable; @@ -784,6 +785,8 @@ public abstract class AlignmentViewport implements AlignViewportI protected boolean showConsensus = true; + Hashtable sequenceColours; + /** * Property change listener for changes in alignment * @@ -1539,4 +1542,60 @@ public abstract class AlignmentViewport implements AlignViewportI oldrfs.clear(); } + @Override + public Color getSequenceColour(SequenceI seq) + { + Color sqc=Color.white; + if (sequenceColours != null) + { + sqc = (Color) sequenceColours.get(seq); + if (sqc == null) { + sqc = Color.white; + } + } + return sqc; + } + + @Override + public void setSequenceColour(SequenceI seq, Color col) + { + if (sequenceColours == null) + { + sequenceColours = new Hashtable(); + } + + if (col == null) + { + sequenceColours.remove(seq); + } + else + { + sequenceColours.put(seq, col); + } + } + + @Override + public void updateSequenceIdColours() + { + if (sequenceColours == null) + { + sequenceColours = new Hashtable(); + } + for (SequenceGroup sg : alignment.getGroups()) + { + if (sg.idColour != null) + { + for (SequenceI s : sg.getSequences(getHiddenRepSequences())) + { + sequenceColours.put(s, sg.idColour); + } + } + } + } + + @Override + public void clearSequenceColours() + { + sequenceColours = null; + }; } diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index 343e64d..c2b4d66 100644 --- a/src/jalview/workers/ConsensusThread.java +++ b/src/jalview/workers/ConsensusThread.java @@ -24,6 +24,7 @@ import jalview.api.AlignmentViewPanel; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; +import jalview.datamodel.SequenceI; import jalview.schemes.ColourSchemeI; import java.util.Hashtable; @@ -31,6 +32,8 @@ import java.util.Hashtable; public class ConsensusThread extends AlignCalcWorker implements AlignCalcWorkerI { + private long nseq=-1; + public ConsensusThread(AlignViewportI alignViewport, AlignmentViewPanel alignPanel) { @@ -94,7 +97,9 @@ public class ConsensusThread extends AlignCalcWorker implements hconsensus = new Hashtable[aWidth]; try { - AAFrequency.calculate(alignment.getSequencesArray(), 0, + SequenceI aseqs[] = alignment.getSequencesArray(); + nseq = aseqs.length; + AAFrequency.calculate(aseqs, 0, alignment.getWidth(), hconsensus, true); } catch (ArrayIndexOutOfBoundsException x) { @@ -150,7 +155,7 @@ public class ConsensusThread extends AlignCalcWorker implements { AAFrequency.completeConsensus(consensus, hconsensus, 0, hconsensus.length, alignViewport.getIgnoreGapsConsensus(), - alignViewport.isShowSequenceLogo()); + alignViewport.isShowSequenceLogo(), nseq); } } } diff --git a/src/jalview/workers/StrucConsensusThread.java b/src/jalview/workers/StrucConsensusThread.java index 86c3336..25e5cde 100644 --- a/src/jalview/workers/StrucConsensusThread.java +++ b/src/jalview/workers/StrucConsensusThread.java @@ -26,6 +26,7 @@ import jalview.api.AlignmentViewPanel; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; +import jalview.datamodel.SequenceI; public class StrucConsensusThread extends AlignCalcWorker implements AlignCalcWorkerI @@ -40,6 +41,8 @@ public class StrucConsensusThread extends AlignCalcWorker implements Hashtable[] hStrucConsensus; + private long nseq=-1; + @Override public void run() { @@ -107,8 +110,10 @@ public class StrucConsensusThread extends AlignCalcWorker implements try { - jalview.analysis.StructureFrequency.calculate( - alignment.getSequencesArray(), 0, alignment.getWidth(), + final SequenceI[] arr= + alignment.getSequencesArray(); + nseq = arr.length; + jalview.analysis.StructureFrequency.calculate(arr, 0, alignment.getWidth(), hStrucConsensus, true, rnaStruc); } catch (ArrayIndexOutOfBoundsException x) { @@ -159,7 +164,7 @@ public class StrucConsensusThread extends AlignCalcWorker implements StructureFrequency.completeConsensus(strucConsensus, hStrucConsensus, 0, hStrucConsensus.length, alignViewport.getIgnoreGapsConsensus(), - alignViewport.isShowSequenceLogo()); + alignViewport.isShowSequenceLogo(), nseq); } } diff --git a/src/jalview/ws/HttpClientUtils.java b/src/jalview/ws/HttpClientUtils.java new file mode 100644 index 0000000..740b669 --- /dev/null +++ b/src/jalview/ws/HttpClientUtils.java @@ -0,0 +1,142 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.ws; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.List; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.MultipartEntity; +import org.apache.http.entity.mime.content.FileBody; +import org.apache.http.entity.mime.content.InputStreamBody; +import org.apache.http.entity.mime.content.StringBody; +import org.apache.http.impl.client.DefaultHttpClient; + +/** + * Helpful procedures for working with services via HTTPClient + * @author jimp + * + */ +public class HttpClientUtils +{ + /** + * do a minimal HTTP post with URL-Encoded parameters passed in the Query + * string + * + * @param postUrl + * @param vals + * @return Reader containing content, if any, or null if no entity returned. + * @throws IOException + * @throws ClientProtocolException + * @throws Exception + */ + public static BufferedReader doHttpUrlPost(String postUrl, + List vals) throws ClientProtocolException, + IOException + { + HttpClient httpclient = new DefaultHttpClient(); + HttpPost httppost = new HttpPost(postUrl); + UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8"); + httppost.setEntity(ue); + HttpResponse response = httpclient.execute(httppost); + HttpEntity resEntity = response.getEntity(); + + if (resEntity != null) + { + BufferedReader r = new BufferedReader(new InputStreamReader( + resEntity.getContent())); + return r; + } + else + { + return null; + } + } + + public static BufferedReader doHttpMpartFilePost(String postUrl, + List vals, String fparm,File file, String mtype) throws ClientProtocolException, + IOException + { + HttpClient httpclient = new DefaultHttpClient(); + HttpPost httppost = new HttpPost(postUrl); + MultipartEntity mpe = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); + for (NameValuePair nvp:vals) + { + mpe.addPart(nvp.getName(), new StringBody(nvp.getValue())); + } + + FileBody fb = new FileBody(file, mtype!=null ? mtype : "application/octet-stream"); + mpe.addPart(fparm, fb); + UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8"); + httppost.setEntity(ue); + HttpResponse response = httpclient.execute(httppost); + HttpEntity resEntity = response.getEntity(); + + if (resEntity != null) + { + BufferedReader r = new BufferedReader(new InputStreamReader( + resEntity.getContent())); + return r; + } + else + { + return null; + } + } + public static BufferedReader doHttpMpartInputstreamPost(String postUrl, + List vals, String fparm,String fname, InputStream is, String mtype) throws ClientProtocolException, + IOException + { + HttpClient httpclient = new DefaultHttpClient(); + HttpPost httppost = new HttpPost(postUrl); + MultipartEntity mpe = new MultipartEntity(HttpMultipartMode.STRICT); + for (NameValuePair nvp:vals) + { + mpe.addPart(nvp.getName(), new StringBody(nvp.getValue())); + } + + InputStreamBody fb = (mtype!=null) ? new InputStreamBody(is, fname, mtype) : new InputStreamBody(is, fname); + mpe.addPart(fparm, fb); + UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8"); + httppost.setEntity(ue); + HttpResponse response = httpclient.execute(httppost); + HttpEntity resEntity = response.getEntity(); + + if (resEntity != null) + { + BufferedReader r = new BufferedReader(new InputStreamReader( + resEntity.getContent())); + return r; + } + else + { + return null; + } + } +} diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index b96a65c..b8ab8ed 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -20,8 +20,11 @@ package jalview.ws.dbsources; import jalview.datamodel.Alignment; import jalview.datamodel.DBRefEntry; import jalview.datamodel.DBRefSource; +import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; +import java.util.ArrayList; +import java.util.List; import java.util.Vector; import MCview.PDBChain; @@ -30,6 +33,7 @@ import MCview.PDBfile; import com.stevesoft.pat.Regex; import jalview.datamodel.AlignmentI; +import jalview.io.FormatAdapter; import jalview.ws.ebi.EBIFetchClient; import jalview.ws.seqfetcher.DbSourceProxy; @@ -93,7 +97,7 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy */ public AlignmentI getSequenceRecords(String queries) throws Exception { - + AlignmentI pdbfile = null; Vector result = new Vector(); String chain = null; String id = null; @@ -127,62 +131,78 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy try { - PDBfile pdbfile = new PDBfile(file, - jalview.io.AppletFormatAdapter.FILE); - for (int i = 0; i < pdbfile.chains.size(); i++) + pdbfile = new FormatAdapter().readFile(file, + jalview.io.AppletFormatAdapter.FILE, "PDB"); + if (pdbfile != null) { - if (chain == null - || ((PDBChain) pdbfile.chains.elementAt(i)).id - .toUpperCase().equals(chain)) + List toremove=new ArrayList(); + for (SequenceI pdbcs : pdbfile.getSequences()) { - PDBChain pdbchain = (PDBChain) pdbfile.chains.elementAt(i); - // Get the Chain's Sequence - who's dataset includes any special - // features added from the PDB file - SequenceI sq = pdbchain.sequence; - // Specially formatted name for the PDB chain sequences retrieved from - // the PDB - sq.setName(jalview.datamodel.DBRefSource.PDB + "|" + id + "|" - + sq.getName()); - // Might need to add more metadata to the PDBEntry object - // like below - /* - * PDBEntry entry = new PDBEntry(); // Construct the PDBEntry - * entry.setId(id); if (entry.getProperty() == null) - * entry.setProperty(new Hashtable()); - * entry.getProperty().put("chains", pdbchain.id + "=" + sq.getStart() - * + "-" + sq.getEnd()); sq.getDatasetSequence().addPDBId(entry); - */ - // Add PDB DB Refs - // We make a DBRefEtntry because we have obtained the PDB file from a - // verifiable source - // JBPNote - PDB DBRefEntry should also carry the chain and mapping - // information - DBRefEntry dbentry = new DBRefEntry(getDbSource(), - getDbVersion(), id + pdbchain.id); - sq.addDBRef(dbentry); - // and add seuqence to the retrieved set - result.addElement(sq.deriveSequence()); + String chid = null; + // Mapping map=null; + for (PDBEntry pid : (Vector) pdbcs.getPDBId()) + { + if (pid.getFile() == file) + { + chid = (String) pid.getProperty().get("CHAIN"); + + } + ; + + } + if (chain == null + || (chid != null && (chid.equals(chain) + || chid.trim().equals(chain.trim()) || (chain + .trim().length() == 0 && chid.equals("_"))))) + { + pdbcs.setName(jalview.datamodel.DBRefSource.PDB + "|" + id + + "|" + pdbcs.getName()); + // Might need to add more metadata to the PDBEntry object + // like below + /* + * PDBEntry entry = new PDBEntry(); // Construct the PDBEntry + * entry.setId(id); if (entry.getProperty() == null) + * entry.setProperty(new Hashtable()); + * entry.getProperty().put("chains", pdbchain.id + "=" + + * sq.getStart() + "-" + sq.getEnd()); + * sq.getDatasetSequence().addPDBId(entry); + */ + // Add PDB DB Refs + // We make a DBRefEtntry because we have obtained the PDB file from + // a + // verifiable source + // JBPNote - PDB DBRefEntry should also carry the chain and mapping + // information + DBRefEntry dbentry = new DBRefEntry(getDbSource(), + getDbVersion(), (chid == null ? id : id + chid)); + // dbentry.setMap() + pdbcs.addDBRef(dbentry); + } + else + { + // mark this sequence to be removed from the alignment + // - since it's not from the right chain + toremove.add(pdbcs); + } + } + // now remove marked sequences + for (SequenceI pdbcs:toremove) { + pdbfile.deleteSequence(pdbcs); } } - - if (result.size() < 1) + + if (pdbfile == null || pdbfile.getHeight() < 1) { throw new Exception("No PDB Records for " + id + " chain " + ((chain == null) ? "' '" : chain)); } + } catch (Exception ex) // Problem parsing PDB file { stopQuery(); throw (ex); } - - SequenceI[] results = new SequenceI[result.size()]; - for (int i = 0, j = result.size(); i < j; i++) - { - results[i] = (SequenceI) result.elementAt(i); - result.setElementAt(null, i); - } - return new Alignment(results); + return pdbfile; } /* diff --git a/src/jalview/ws/jws1/Annotate3D.java b/src/jalview/ws/jws1/Annotate3D.java new file mode 100644 index 0000000..e90b2d2 --- /dev/null +++ b/src/jalview/ws/jws1/Annotate3D.java @@ -0,0 +1,276 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.ws.jws1; + +import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentI; +import jalview.io.FileParse; +import jalview.io.FormatAdapter; +import jalview.io.InputStreamParser; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLEncoder; +import java.util.Iterator; + +public class Annotate3D +{ + // protected BufferedReader in; + // protected BufferedWriter out; + + public Annotate3D() + { + System.out.println("Annotate3D"); + // try { + // Create a URL for the desired page + // String id = "1HR2"; + // URL url = new + // URL("http://paradise-ibmc.u-strasbg.fr/webservices/annotate3d?pdbid="+id); + // in = new BufferedReader(new InputStreamReader(url.openStream())); + // String str; + // OutputStream out1 = null; + // out = new BufferedWriter(new OutputStreamWriter(out1, "temp.rnaml")); + // while ((str = in.readLine()) != null) { + // System.out.println(str); + // out.write(str); + // } + // in.close(); + // out.close(); + // } catch (MalformedURLException e) { + // } catch (IOException e) { + // } + } + + public AlignmentI getRNAMLFor(final FileParse source) throws IOException + { + try + { + StringBuffer sb = new StringBuffer(); + + Reader fpr = source.getReader(); + int p = 0; + char[] cbuff = new char[2048]; + while ((p = fpr.read(cbuff)) > 0) + { + for (int i = 0; i < p; i++) + { + sb.append(cbuff[i]); + } + } + Iterator r = jalview.ext.paradise.Annotate3D + .getRNAMLForPDBFileAsString(sb.toString()); + AlignmentI al=null; + while (r.hasNext()) + { + FileParse fp = new InputStreamParser(r.next(), source.getDataName()); + AlignmentI nal = new FormatAdapter().readFromFile(fp, "RNAML"); + if (al==null) + { + al = nal; + } else { + al.append(nal); + } + } + return al; + } catch (Throwable x) + { + if (x instanceof IOException) + { + throw ((IOException) x); + } + else + { + throw new IOException( + "Unexpected exception when handling RNAML translation of PDB data", + x); + } + } + } + + public Annotate3D(String path) throws InterruptedException + { + System.out.println("Annotate3D"); + try + { + // //URL url = new + // URL("http://paradise-ibmc.u-strasbg.fr/webservices/annotate3d?data="+inFile); + // System.out.println("Step1"); + // FileReader r = new FileReader(inFile); + // BufferedReader in = new BufferedReader(r); + // StringBuffer content = new StringBuffer(); + // System.out.println("Step2"); + // while(in.readLine()!=null){ + // content.append(in.readLine()); + // //System.out.println("Step3"+in.readLine()); + // } + // + // String data = URLEncoder.encode("data", "UTF-8") + "=" + + // URLEncoder.encode(content.toString(), "UTF-8"); + // for (int i=0;i newarguments) - { - super.updateParameters(newpreset, newarguments); - initViewportParams(); - }; - public String getServiceActionText() { return "calculating Amino acid consensus using AACon service"; @@ -114,17 +98,21 @@ public class AAConClient extends JabawsAlignCalcWorker } } + @Override public String getCalcId() { - return SequenceAnnotationWSClient.AAConCalcId; + return CALC_ID; } + private static String CALC_ID="jabaws2.AACon"; - public static void removeAAConsAnnotation(AlignmentPanel alignPanel) + public static AlignAnalysisUIText getAlignAnalysisUITest() { - for (AlignmentAnnotation aa : alignPanel.getAlignment().findAnnotation( - SequenceAnnotationWSClient.AAConCalcId)) - { - alignPanel.getAlignment().deleteAnnotation(aa); - } + return new AlignAnalysisUIText( + compbio.ws.client.Services.AAConWS.toString(), + jalview.ws.jws2.AAConClient.class, CALC_ID, false, true, true, + "AACon Calculations", + "When checked, AACon calculations are updated automatically.", + "Change AACon Settings...", + "Modify settings for AACon calculations."); } } diff --git a/src/jalview/ws/jws2/AADisorderClient.java b/src/jalview/ws/jws2/AADisorderClient.java index 96635c9..41f0fd5 100644 --- a/src/jalview/ws/jws2/AADisorderClient.java +++ b/src/jalview/ws/jws2/AADisorderClient.java @@ -41,7 +41,7 @@ import compbio.data.sequence.Score; import compbio.data.sequence.ScoreManager.ScoreHolder; import compbio.metadata.Argument; -public class AADisorderClient extends JabawsAlignCalcWorker implements +public class AADisorderClient extends JabawsCalcWorker implements AlignCalcWorkerI { diff --git a/src/jalview/ws/jws2/JabaWsServerQuery.java b/src/jalview/ws/jws2/JabaWsServerQuery.java index 73d5654..fe61ff3 100644 --- a/src/jalview/ws/jws2/JabaWsServerQuery.java +++ b/src/jalview/ws/jws2/JabaWsServerQuery.java @@ -22,6 +22,7 @@ package jalview.ws.jws2; import jalview.bin.Cache; import jalview.ws.jws2.jabaws2.Jws2Instance; +import jalview.ws.jws2.jabaws2.Jws2InstanceFactory; import java.util.HashSet; import java.util.Set; @@ -75,7 +76,7 @@ public class JabaWsServerQuery implements Runnable { Services.ClustalWS, Services.MuscleWS, Services.MafftWS, Services.ProbconsWS, Services.TcoffeeWS, Services.AAConWS, Services.DisemblWS, Services.GlobPlotWS, Services.IUPredWS, - Services.JronnWS }; + Services.JronnWS, Services.RNAalifoldWS }; /* * (non-Javadoc) @@ -115,7 +116,14 @@ public class JabaWsServerQuery implements Runnable jabasws2 = true; srv_set = registry.getSupportedServices(); + + // dan test + System.out.println("registry.getSupportedServices: " + srv_set.toString()); + svccategories = registry.getServiceCategories(); + + // dan test +// System.out.println("registry.getServiceCategories: " + svccategories.toString()); } } catch (Exception ex) @@ -170,12 +178,12 @@ public class JabaWsServerQuery implements Runnable String description = registry.getServiceDescription(srv); - svc = new Jws2Instance(jwsservers, srv.toString(), + svc = Jws2InstanceFactory.newJws2Instance(jwsservers, srv.toString(), cat.name, description, service); } if (svc == null) { - svc = new Jws2Instance(jwsservers, srv.toString(), + svc = Jws2InstanceFactory.newJws2Instance(jwsservers, srv.toString(), cat.name, "JABAWS 1 Alignment Service", service); } jws2Discoverer.addService(jwsservers, svc); diff --git a/src/jalview/ws/jws2/JabawsAlignCalcWorker.java b/src/jalview/ws/jws2/JabawsAlignCalcWorker.java index 926256d..d500406 100644 --- a/src/jalview/ws/jws2/JabawsAlignCalcWorker.java +++ b/src/jalview/ws/jws2/JabawsAlignCalcWorker.java @@ -17,625 +17,60 @@ */ package jalview.ws.jws2; -import jalview.analysis.AlignSeq; -import jalview.analysis.SeqsetUtils; import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.AnnotatedCollectionI; -import jalview.datamodel.Annotation; -import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; -import jalview.gui.IProgressIndicator; -import jalview.workers.AlignCalcWorker; -import jalview.ws.jws2.dm.JabaWsParamSet; +import jalview.ws.jws2.dm.AAConSettings; import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.params.WsParamSetI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; import java.util.List; -import java.util.Map; -import compbio.data.msa.SequenceAnnotation; -import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.Score; -import compbio.data.sequence.ScoreManager; import compbio.metadata.Argument; -import compbio.metadata.ChunkHolder; -import compbio.metadata.JobStatus; -import compbio.metadata.JobSubmissionException; -import compbio.metadata.Option; -import compbio.metadata.ResultNotAvailableException; -import compbio.metadata.WrongParameterException; -public abstract class JabawsAlignCalcWorker extends AlignCalcWorker +public abstract class JabawsAlignCalcWorker extends JabawsCalcWorker { - Jws2Instance service; - - @SuppressWarnings("unchecked") - protected SequenceAnnotation aaservice; - - protected ScoreManager scoremanager; - - protected WsParamSetI preset; - - protected List arguments; public JabawsAlignCalcWorker(AlignViewportI alignViewport, AlignmentViewPanel alignPanel) { super(alignViewport, alignPanel); } - - IProgressIndicator guiProgress; - + + + + public JabawsAlignCalcWorker(Jws2Instance service, AlignFrame alignFrame, WsParamSetI preset, List paramset) { - this(alignFrame.getCurrentView(), alignFrame.alignPanel); - this.guiProgress = alignFrame; - this.preset = preset; - this.arguments = paramset; - this.service = service; - aaservice = (SequenceAnnotation) service.service; - - } - - public WsParamSetI getPreset() - { - return preset; - } - - public List getArguments() - { - return arguments; + super(service, alignFrame, preset, paramset); } /** - * reconfigure and restart the AAConClient. This method will spawn a new - * thread that will wait until any current jobs are finished, modify the - * parameters and restart the conservation calculation with the new values. - * - * @param newpreset - * @param newarguments + * Recover any existing parameters for this service */ - public void updateParameters(final WsParamSetI newpreset, - final List newarguments) - { - preset = newpreset; - arguments = newarguments; - calcMan.startWorker(this); - } - - public List

        " + + JvSwingUtils.wrapTooltip(aaui.getAAconToggleTooltip() + "

        ") + + ""); + aaConEnabled.addActionListener(new ActionListener() + { @Override - public void menuSelected(MenuEvent arg0) + public void actionPerformed(ActionEvent arg0) { - wsmenu.setEnabled(!alignFrame.getViewport().getAlignment() - .isNucleotide()); List aaconClient = alignFrame.getViewport() .getCalcManager() - .getRegisteredWorkersOfClass(AAConClient.class); + .getRegisteredWorkersOfClass(aaui.getClient()); if (aaconClient != null && aaconClient.size() > 0) { - aaConEnabled.setSelected(true); + removeCurrentAAConWorkerFor(aaui, alignFrame); } else { - aaConEnabled.setSelected(false); + buildCurrentAAConWorkerFor(aaui, alignFrame); + } } - @Override - public void menuDeselected(MenuEvent arg0) - { - // TODO Auto-generated method stub - - } + }); + wsmenu.add(aaConEnabled); + final JMenuItem modifyParams = new JMenuItem(aaui.getAAeditSettings()); + modifyParams.setToolTipText("

        " + + JvSwingUtils.wrapTooltip(aaui.getAAeditSettingsTooltip() + "

        ") + + ""); + modifyParams.addActionListener(new ActionListener() + { @Override - public void menuCanceled(MenuEvent arg0) + public void actionPerformed(ActionEvent arg0) { - // TODO Auto-generated method stub - + showAAConAnnotationSettingsFor(aaui, alignFrame); } }); - aaConEnabled.setToolTipText("

        " - + JvSwingUtils.wrapTooltip(AAconToggleTooltip + "

        ") - + ""); - aaConEnabled.addActionListener(new ActionListener() + wsmenu.add(modifyParams); + wsmenu.addMenuListener(new MenuListener() { + @Override - public void actionPerformed(ActionEvent arg0) + public void menuSelected(MenuEvent arg0) { + // TODO: refactor to the implementing class. + if (alignFrame.getViewport().getAlignment() + .isNucleotide() ? aaui.isNa() : aaui.isPr()) { + aaConEnabled.setEnabled(true); + modifyParams.setEnabled(true); + } + else { + aaConEnabled.setEnabled(false); + modifyParams.setEnabled(false); + } List aaconClient = alignFrame.getViewport() .getCalcManager() - .getRegisteredWorkersOfClass(AAConClient.class); + .getRegisteredWorkersOfClass(aaui.getClient()); if (aaconClient != null && aaconClient.size() > 0) { - removeCurrentAAConWorkerFor(alignFrame); + aaConEnabled.setSelected(true); } else { - buildCurrentAAConWorkerFor(alignFrame); - + aaConEnabled.setSelected(false); } } - }); - wsmenu.add(aaConEnabled); - JMenuItem modifyParams = new JMenuItem(AAeditSettings); - modifyParams.setToolTipText("

        " - + JvSwingUtils.wrapTooltip(AAeditSettingsTooltip + "

        ") - + ""); - modifyParams.addActionListener(new ActionListener() - { + @Override + public void menuDeselected(MenuEvent arg0) + { + // TODO Auto-generated method stub + + } @Override - public void actionPerformed(ActionEvent arg0) + public void menuCanceled(MenuEvent arg0) { - showAAConAnnotationSettingsFor(alignFrame); + // TODO Auto-generated method stub + } }); - wsmenu.add(modifyParams); } + return true; } - private static void showAAConAnnotationSettingsFor(AlignFrame alignFrame) + private static void showAAConAnnotationSettingsFor(final AlignAnalysisUIText aaui, AlignFrame alignFrame) { /* * preferred settings Whether AACon is automatically recalculated Which @@ -374,21 +396,21 @@ public class SequenceAnnotationWSClient extends Jws2Client */ // could actually do a class search for this too AAConSettings fave = (AAConSettings) alignFrame.getViewport() - .getCalcIdSettingsFor(AAConCalcId); + .getCalcIdSettingsFor(aaui.getCalcId()); if (fave == null) { - fave = createDefaultAAConSettings(); + fave = createDefaultAAConSettings(aaui); } new SequenceAnnotationWSClient(fave, alignFrame, true); } - private static void buildCurrentAAConWorkerFor(AlignFrame alignFrame) + private static void buildCurrentAAConWorkerFor(final AlignAnalysisUIText aaui, AlignFrame alignFrame) { - buildCurrentAAConWorkerFor(alignFrame, null); + buildCurrentAAConWorkerFor(aaui, alignFrame, null); } - private static void buildCurrentAAConWorkerFor(AlignFrame alignFrame, + private static void buildCurrentAAConWorkerFor(final AlignAnalysisUIText aaui, AlignFrame alignFrame, Jws2Instance service) { /* @@ -396,10 +418,10 @@ public class SequenceAnnotationWSClient extends Jws2Client * AACon server to use What parameters to use */ AAConSettings fave = (AAConSettings) alignFrame.getViewport() - .getCalcIdSettingsFor(AAConCalcId); + .getCalcIdSettingsFor(aaui.getCalcId()); if (fave == null) { - fave = createDefaultAAConSettings(service); + fave = createDefaultAAConSettings(aaui, service); } else { @@ -414,12 +436,12 @@ public class SequenceAnnotationWSClient extends Jws2Client new SequenceAnnotationWSClient(fave, alignFrame, false); } - private static AAConSettings createDefaultAAConSettings() + private static AAConSettings createDefaultAAConSettings(AlignAnalysisUIText aaui) { - return createDefaultAAConSettings(null); + return createDefaultAAConSettings(aaui, null); } - private static AAConSettings createDefaultAAConSettings( + private static AAConSettings createDefaultAAConSettings(AlignAnalysisUIText aaui, Jws2Instance service) { if (service != null) @@ -447,7 +469,7 @@ public class SequenceAnnotationWSClient extends Jws2Client { // get the default service for AACon service = Jws2Discoverer.getDiscoverer().getPreferredServiceFor(null, - compbio.ws.client.Services.AAConWS.toString()); + aaui.getServiceType()); } if (service == null) { @@ -458,9 +480,9 @@ public class SequenceAnnotationWSClient extends Jws2Client return new AAConSettings(true, service, null, null); } - private static void removeCurrentAAConWorkerFor(AlignFrame alignFrame) + private static void removeCurrentAAConWorkerFor(AlignAnalysisUIText aaui, AlignFrame alignFrame) { alignFrame.getViewport().getCalcManager() - .removeRegisteredWorkersOfClass(AAConClient.class); + .removeRegisteredWorkersOfClass(aaui.getClient()); } } diff --git a/src/jalview/ws/jws2/dm/JabaOption.java b/src/jalview/ws/jws2/dm/JabaOption.java index 69f8f7b..7316d2f 100644 --- a/src/jalview/ws/jws2/dm/JabaOption.java +++ b/src/jalview/ws/jws2/dm/JabaOption.java @@ -20,6 +20,7 @@ package jalview.ws.jws2.dm; import jalview.ws.jws2.ParameterUtils; import jalview.ws.params.OptionI; +import java.net.MalformedURLException; import java.net.URL; import java.util.List; @@ -49,7 +50,15 @@ public class JabaOption implements jalview.ws.params.OptionI @Override public URL getFurtherDetails() { - return opt.getFurtherDetails(); + try { + return new URL(opt.getBasicURL().toExternalForm()+"/"+opt.getFurtherDetails()); + } + catch (NullPointerException q) {} + catch (MalformedURLException q) + { + + } + return null; } @Override diff --git a/src/jalview/ws/jws2/jabaws2/Jws2Instance.java b/src/jalview/ws/jws2/jabaws2/Jws2Instance.java index aa42ff7..509b96f 100644 --- a/src/jalview/ws/jws2/jabaws2/Jws2Instance.java +++ b/src/jalview/ws/jws2/jabaws2/Jws2Instance.java @@ -48,6 +48,14 @@ public class Jws2Instance public String docUrl; + /** + * + * @param hosturl Service endpoint + * @param serviceType Category for this service's analysis + * @param action text describing their action that service performs (eg 'aligning', 'analysing') + * @param description Description from JABAWS registry + * @param service JABAWS registry ID for service + */ public Jws2Instance(String hosturl, String serviceType, String action, String description, JABAService service) { @@ -224,4 +232,9 @@ public class Jws2Instance { return "java:" + serviceType; } + jalview.ws.uimodel.AlignAnalysisUIText aaui; + public jalview.ws.uimodel.AlignAnalysisUIText getAlignAnalysisUI() + { + return aaui; + } } diff --git a/src/jalview/ws/jws2/jabaws2/Jws2InstanceFactory.java b/src/jalview/ws/jws2/jabaws2/Jws2InstanceFactory.java new file mode 100644 index 0000000..5907713 --- /dev/null +++ b/src/jalview/ws/jws2/jabaws2/Jws2InstanceFactory.java @@ -0,0 +1,53 @@ +package jalview.ws.jws2.jabaws2; + +import java.util.HashMap; + +import compbio.data.msa.JABAService; + +import jalview.ws.jws2.AAConClient; +import jalview.ws.jws2.RNAalifoldClient; +import jalview.ws.uimodel.AlignAnalysisUIText; + +public class Jws2InstanceFactory +{ + private static HashMap aaConGUI; + private static String category_rewrite(String cat_name) + { + return (cat_name != null && cat_name.equals("Prediction")) ? "Secondary Structure Prediction" : cat_name; + } + private static void init() + { + if (aaConGUI == null) + { + aaConGUI = new HashMap(); + aaConGUI.put(compbio.ws.client.Services.AAConWS.toString(), + AAConClient.getAlignAnalysisUITest()); + aaConGUI.put(compbio.ws.client.Services.RNAalifoldWS.toString(), + RNAalifoldClient.getAlignAnalysisUITest()); + } + } + + /** + * construct a service instance and configure it with any additional + * properties needed so Jalview can access it correctly + * + * @param jwsservers + * @param serviceType + * @param name + * @param description + * @param service + * @return + */ + public static Jws2Instance newJws2Instance(String jwsservers, + String serviceType, String name, String description, + JABAService service) + { + init(); + Jws2Instance svc = new Jws2Instance(jwsservers, serviceType, category_rewrite(name), + description, service); + + svc.aaui = aaConGUI.get(serviceType.toString()); + return svc; + } + +} diff --git a/src/jalview/ws/uimodel/AlignAnalysisUIText.java b/src/jalview/ws/uimodel/AlignAnalysisUIText.java new file mode 100644 index 0000000..0d018a3 --- /dev/null +++ b/src/jalview/ws/uimodel/AlignAnalysisUIText.java @@ -0,0 +1,115 @@ +package jalview.ws.uimodel; + +import java.util.HashMap; + +public class AlignAnalysisUIText +{ + + private String serviceType; + + public String getServiceType() + { + return serviceType; + } + + private Class client; + + private String calcId; + + public String getCalcId() + { + return calcId; + } + + private String AAconToggle, AAconToggleTooltip, AAeditSettings, + AAeditSettingsTooltip; + + private boolean isNa; + + public boolean isNa() + { + return isNa; + } + + public boolean isPr() + { + return isPr; + } + + public boolean isAA() + { + return isAA; + } + + private boolean isPr; + + private boolean isAA; + + public AlignAnalysisUIText(String serviceType, Class client, + String calcId, boolean acceptNucl, boolean acceptProt, + boolean acceptGaps, String toggle, String toggleTooltip, + String settings, String settingsTooltip) + { + this.serviceType = serviceType; + this.calcId = calcId; + isNa = acceptNucl; + isPr = acceptProt; + isAA = acceptGaps; + this.client = client; + this.AAconToggle = toggle; + this.AAconToggleTooltip = toggleTooltip; + this.AAeditSettings = settings; + this.AAeditSettingsTooltip = settingsTooltip; + } + + public Class getClient() + { + return client; + } + + public void setClient(Class client) + { + this.client = client; + } + + public String getAAconToggle() + { + return AAconToggle; + } + + public void setAAconToggle(String aAconToggle) + { + AAconToggle = aAconToggle; + } + + public String getAAconToggleTooltip() + { + return AAconToggleTooltip; + } + + public void setAAconToggleTooltip(String aAconToggleTooltip) + { + AAconToggleTooltip = aAconToggleTooltip; + } + + public String getAAeditSettings() + { + return AAeditSettings; + } + + public void setAAeditSettings(String aAeditSettings) + { + AAeditSettings = aAeditSettings; + } + + public String getAAeditSettingsTooltip() + { + return AAeditSettingsTooltip; + } + + public void setAAeditSettingsTooltip(String aAeditSettingsTooltip) + { + AAeditSettingsTooltip = aAeditSettingsTooltip; + } + +} \ No newline at end of file diff --git a/test/jalview/analysis/TestAlignSeq.java b/test/jalview/analysis/TestAlignSeq.java new file mode 100644 index 0000000..59740df --- /dev/null +++ b/test/jalview/analysis/TestAlignSeq.java @@ -0,0 +1,70 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * + * 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 . + */ +package jalview.analysis; + +import static org.junit.Assert.*; +import jalview.datamodel.Mapping; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; + +import org.junit.Before; +import org.junit.Test; + +/** + * Test the alignment -> Mapping routines + * @author jimp + * + */ +public class TestAlignSeq +{ + + SequenceI s1,s2,s3; + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception + { + s1 = new Sequence("Seq1","ASDFAQQQRRRSSS"); + s1.setStart(3); + s2 = new Sequence("Seq2","ASDFA"); + s2.setStart(5); + s3 = new Sequence("Seq1","SDFAQQQSSS"); + + } + + @Test + /** + * simple test that mapping from alignment corresponds identical positions. + */ + public void TestGetMappingForS1() + { + jalview.analysis.AlignSeq as = jalview.analysis.AlignSeq.doGlobalNWAlignment(s1, s2, AlignSeq.PEP); + System.out.println("s1: "+as.getAStr1()); + System.out.println("s2: "+as.getAStr2()); + + Mapping s1tos2=as.getMappingFromS1(false); + System.out.println(s1tos2.getMap().toString()); + for (int i=s2.getStart();i seqs=jtest.getSeqs(); + + assertTrue("No sequences extracted from testfile\n"+(jtest.hasWarningMessage() ? jtest.getWarningMessage(): "(No warnings raised)"), seqs!=null && seqs.size()>0); + for (SequenceI sq:seqs) + { + AlignmentI al = new Alignment(new SequenceI[] { sq}); + if (!al.isNucleotide()) + { + assertTrue("No secondary structure assigned for protein sequence.",sq.getAnnotation()!=null && sq.getAnnotation().length>=1 && sq.getAnnotation()[0].hasIcons); + } + } + } + +} diff --git a/test/jalview/ext/paradise/TestAnnotate3D.java b/test/jalview/ext/paradise/TestAnnotate3D.java new file mode 100644 index 0000000..896b60c --- /dev/null +++ b/test/jalview/ext/paradise/TestAnnotate3D.java @@ -0,0 +1,139 @@ +package jalview.ext.paradise; + +import static org.junit.Assert.assertTrue; + +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SequenceI; +import jalview.ext.paradise.Annotate3D; +import jalview.io.FastaFile; +import jalview.io.FormatAdapter; + +import java.io.BufferedReader; +import java.io.File; +import java.io.Reader; +import java.util.Iterator; + +import org.junit.Assert; +import org.junit.Test; + +import MCview.PDBfile; + +import compbio.util.FileUtil; + +public class TestAnnotate3D +{ + + @Test + public void test1GIDbyId() throws Exception + { + // use same ID as standard tests given at https://bitbucket.org/fjossinet/pyrna-rest-clients + Iterator ids = Annotate3D.getRNAMLForPDBId("1GID"); + assertTrue("Didn't retrieve 1GID by id.", ids != null); + testRNAMLcontent(ids,null); + } + + @Test + public void testIdVsContent2GIS() throws Exception + { + Iterator ids = Annotate3D.getRNAMLForPDBId("2GIS"); + assertTrue("Didn't retrieve 2GIS by id.", ids != null); + Iterator files = Annotate3D.getRNAMLForPDBFileAsString(FileUtil + .readFileToString(new File("examples/2GIS.pdb"))); + assertTrue("Didn't retrieve using examples/2GIS.pdb.", files != null); + int i = 0; + while (ids.hasNext() && files.hasNext()) + { + BufferedReader file = new BufferedReader(files.next()), id = new BufferedReader( + ids.next()); + String iline, fline; + do + { + iline = id.readLine(); + fline = file.readLine(); + if (iline != null) + System.out.println(iline); + if (fline != null) + System.out.println(fline); + // next assert fails for latest RNAview - because the XMLID entries + // change between file and ID based RNAML generation. + assertTrue( + "Results differ for ID and file upload based retrieval (chain entry " + + (++i) + ")", + ((iline == fline && iline == null) || (iline != null + && fline != null && iline.equals(fline)))); + + } while (iline != null); + } + } + + /** + * test to demonstrate JAL-1142 - compare sequences in RNAML returned from + * Annotate3d vs those extracted by Jalview from the originl PDB file + * + * @throws Exception + */ + @Test + public void testPDBfileVsRNAML() throws Exception + { + PDBfile pdbf = new PDBfile("examples/2GIS.pdb", FormatAdapter.FILE); + Assert.assertTrue(pdbf.isValid()); + // Comment - should add new FileParse constructor like new FileParse(Reader + // ..). for direct reading + Iterator readers = Annotate3D + .getRNAMLForPDBFileAsString(FileUtil.readFileToString(new File( + "examples/2GIS.pdb"))); + testRNAMLcontent(readers, pdbf); + } + + private void testRNAMLcontent(Iterator readers, PDBfile pdbf) + throws Exception + { + StringBuffer sb = new StringBuffer(); + int r = 0; + while (readers.hasNext()) + { + System.out.println("Testing RNAML input number " + (++r)); + BufferedReader br = new BufferedReader(readers.next()); + String line; + while ((line = br.readLine()) != null) + { + sb.append(line + "\n"); + } + assertTrue("No data returned by Annotate3D", sb.length() > 0); + AlignmentI al = new FormatAdapter().readFile(sb.toString(), + FormatAdapter.PASTE, "RNAML"); + if (al==null || al.getHeight()==0) { + System.out.println(sb.toString()); + } + assertTrue("No alignment returned.", al != null); + assertTrue("No sequences in returned alignment.", al.getHeight() > 0); + if (pdbf != null) + { + for (SequenceI sq : al.getSequences()) + { + { + SequenceI struseq = null; + String sq_ = new String(sq.getSequence()).toLowerCase(); + for (SequenceI _struseq : pdbf.getSeqsAsArray()) + { + if (new String(_struseq.getSequence()).toLowerCase().equals( + sq_)) + { + struseq = _struseq; + break; + } + } + if (struseq == null) + { + Assert.fail("Couldn't find this sequence in original input:\n" + + new FastaFile().print(new SequenceI[] + { sq }) + + "\n\nOriginal input:\n" + + new FastaFile().print(pdbf.getSeqsAsArray()) + "\n"); + } + } + } + } + } + } +} diff --git a/test/jalview/gui/JAL1353bugdemo.java b/test/jalview/gui/JAL1353bugdemo.java new file mode 100644 index 0000000..486c098 --- /dev/null +++ b/test/jalview/gui/JAL1353bugdemo.java @@ -0,0 +1,127 @@ +package jalview.gui; + +import static org.junit.Assert.*; +import jalview.bin.Cache; + +import java.awt.Component; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; + +import javax.swing.JDesktopPane; +import javax.swing.JFrame; +import javax.swing.JInternalFrame; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JTextArea; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class JAL1353bugdemo +{ + + @BeforeClass + public static void setUpBeforeClass() throws Exception + { + } + + @AfterClass + public static void tearDownAfterClass() throws Exception + { + } + volatile boolean finish=false; + + @Test + public void test() + { + Cache.initLogger(); + // final Desktop foo = new Desktop(); + final JFrame cfoo = new JFrame("Crash Java"); + final JDesktopPane foo=new JDesktopPane(); + foo.setPreferredSize(new Dimension(600,800)); + cfoo.setSize(600, 800); + final JInternalFrame cont = new JInternalFrame("My Frame"); + JTextArea evt; + cont.setPreferredSize(new Dimension(400, 300)); + cont.add(evt=new JTextArea("Click here and drag text over this window to freeze java.\n\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\n")); + cont.pack(); + foo.add("A frame",cont); + foo.setVisible(true); + foo.setEnabled(true); + foo.doLayout(); + cfoo.add(foo); + final JMenu jm = new JMenu("Do"); + JMenuItem jmi=new JMenuItem("this"); + jm.add(jmi); + evt.addMouseListener(new MouseListener() + { + + @Override + public void mouseReleased(MouseEvent e) + { + } + + @Override + public void mousePressed(MouseEvent e) + { + // TODO Auto-generated method stub + + } + + @Override + public void mouseExited(MouseEvent e) + { + // TODO Auto-generated method stub + + } + + @Override + public void mouseEntered(MouseEvent e) + { + // TODO Auto-generated method stub + + } + + @Override + public void mouseClicked(MouseEvent e) + { +// JFrame parent = new JFrame(); +// parent.setBounds(foo.getBounds()); +// JPanel oo = new JPanel(); +// parent.add(oo); +// oo.setVisible(true); +// parent.setVisible(true); + EditNameDialog end =new EditNameDialog("Sequence Name", "Sequence Description","label 1", "Label 2", "Try and drag between the two text fields", foo);//);cont.getRootPane()); + assert(end!=null); + finish=true; + } + }); + cont.setVisible(true); + + jmi.addActionListener(new ActionListener() + { + + @Override + public void actionPerformed(ActionEvent arg0) + { + EditNameDialog end =new EditNameDialog("Sequence Name", "Sequence Description","label 1", "Label 2", "Try and drag between the two text fields", cont); + assert(end!=null); + finish=true; + } + }); + foo.setVisible(true); + cfoo.setVisible(true); + while (!finish) + { + try { + Thread.sleep(100); + } catch (InterruptedException x) {} + } + } + +} diff --git a/test/jalview/io/RNAMLfileTest.java b/test/jalview/io/RNAMLfileTest.java new file mode 100644 index 0000000..282914b --- /dev/null +++ b/test/jalview/io/RNAMLfileTest.java @@ -0,0 +1,31 @@ +package jalview.io; + +import static org.junit.Assert.*; + +import java.io.File; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class RNAMLfileTest +{ + + @BeforeClass + public static void setUpBeforeClass() throws Exception + { + } + + @AfterClass + public static void tearDownAfterClass() throws Exception + { + } + + @Test + public void testRnamlToStockholmIO() + { + StockholmFileTest.testFileIOwithFormat(new File("examples/rna-alignment.xml"),"STH"); + + } + +} diff --git a/test/jalview/io/TCoffeeScoreFileTest.java b/test/jalview/io/TCoffeeScoreFileTest.java index 3147054..6d11ebe 100644 --- a/test/jalview/io/TCoffeeScoreFileTest.java +++ b/test/jalview/io/TCoffeeScoreFileTest.java @@ -26,7 +26,15 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; +import javax.xml.parsers.ParserConfigurationException; + import org.junit.Test; +import org.xml.sax.SAXException; + +import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax; +import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed; +import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied; +import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses; public class TCoffeeScoreFileTest { @@ -34,7 +42,7 @@ public class TCoffeeScoreFileTest { final static File ALIGN_FILE = new File("test/jalview/io/tcoffee.fasta_aln"); @Test - public void testReadHeader() throws IOException, FileNotFoundException { + public void testReadHeader() throws IOException { TCoffeeScoreFile scoreFile = new TCoffeeScoreFile(SCORE_FILE.getPath(),AppletFormatAdapter.FILE); assertTrue(scoreFile.getWarningMessage(),scoreFile.isValid()); @@ -56,7 +64,7 @@ public class TCoffeeScoreFileTest { @Test - public void testWrongFile() { + public void testWrongFile() { try { TCoffeeScoreFile result = new TCoffeeScoreFile(ALIGN_FILE.getPath(), FormatAdapter.FILE); assertFalse(result.isValid()); @@ -173,7 +181,7 @@ public class TCoffeeScoreFileTest { } @Test - public void testHeightAndWidthWithResidueNumbers() throws IOException { + public void testHeightAndWidthWithResidueNumbers() throws Exception { String file = "test/jalview/io/tcoffee.score_ascii_with_residue_numbers"; TCoffeeScoreFile result = new TCoffeeScoreFile(file, FormatAdapter.FILE); assertTrue(result.isValid()); diff --git a/test/jalview/ws/PDBSequenceFetcherTest.java b/test/jalview/ws/PDBSequenceFetcherTest.java new file mode 100644 index 0000000..35de214 --- /dev/null +++ b/test/jalview/ws/PDBSequenceFetcherTest.java @@ -0,0 +1,48 @@ +package jalview.ws; + +import static org.junit.Assert.*; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SequenceI; +import jalview.ws.seqfetcher.DbSourceProxy; + +import java.util.List; + +import org.junit.Before; +import org.junit.Test; + +public class PDBSequenceFetcherTest +{ + + SequenceFetcher sf; + @Before + public void setUp() throws Exception + { + sf = new SequenceFetcher(false); + } + + @Test + public void testPdbPerChainRetrieve() throws Exception + { + List sps = sf + .getSourceProxy("PDB"); + AlignmentI response = sps.get(0).getSequenceRecords("1QIPA"); + assertTrue(response!=null); + assertTrue(response.getHeight()==1); + } + @Test + public void testRnaSeqRetrieve() throws Exception + { + List sps = sf + .getSourceProxy("PDB"); + AlignmentI response = sps.get(0).getSequenceRecords("2GIS"); + assertTrue(response!=null); + assertTrue(response.getHeight()==1); + for (SequenceI sq:response.getSequences()) + { + assertTrue("No annotation transfered to sequence.",sq.getAnnotation().length>0); + assertTrue("No PDBEntry on sequence.",sq.getPDBId().size()>0); + assertTrue("No RNA annotation on sequence.", sq.getRNA()!=null); + } + } + +} diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java new file mode 100644 index 0000000..2753e64 --- /dev/null +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -0,0 +1,232 @@ +package jalview.ws.jabaws; + +import static org.junit.Assert.*; + +import java.awt.Component; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Vector; + +import javax.swing.JMenu; +import javax.swing.JMenuItem; + +import jalview.api.AlignCalcManagerI; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Annotation; +import jalview.gui.Jalview2XML; +import jalview.io.AnnotationFile; +import jalview.io.FormatAdapter; +import jalview.io.StockholmFileTest; +import jalview.ws.jws2.AADisorderClient; +import jalview.ws.jws2.Jws2Discoverer; +import jalview.ws.jws2.RNAalifoldClient; +import jalview.ws.jws2.SequenceAnnotationWSClient; +import jalview.ws.jws2.dm.JabaOption; +import jalview.ws.jws2.jabaws2.Jws2Instance; +import jalview.ws.params.AutoCalcSetting; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import compbio.metadata.WrongParameterException; + +public class RNAStructExportImport +{ + public static String testseqs = "examples/unfolded_RF00031.aln"; + + public static Jws2Discoverer disc; + + public static Jws2Instance rnaalifoldws; + + jalview.ws.jws2.RNAalifoldClient alifoldClient; + + public static jalview.gui.AlignFrame af = null; + + @BeforeClass + public static void setUpBeforeClass() throws Exception + { + + jalview.bin.Cache.initLogger(); + disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); + + for (Jws2Instance svc : disc.getServices()) + { + + if (svc.getServiceTypeURI().toLowerCase().contains("rnaalifoldws")) + { + rnaalifoldws = svc; + } + } + + System.out.println("State of rnaalifoldws: " + rnaalifoldws); + + if (rnaalifoldws == null) + System.exit(0); + + jalview.io.FileLoader fl = new jalview.io.FileLoader(false); + + af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE); + + assertNotNull("Couldn't load test data ('" + testseqs + "')", af); + + } + + @AfterClass + public static void tearDownAfterClass() throws Exception + { + if (af != null) + { + af.setVisible(false); + af.dispose(); + } + } + + @Test + public void testRNAStructExport() + { + + alifoldClient = new RNAalifoldClient(rnaalifoldws, af, null, null); + + af.getViewport().getCalcManager().startWorker(alifoldClient); + + do + { + try + { + Thread.sleep(50); + } catch (InterruptedException x) + { + } + ; + } while (af.getViewport().getCalcManager().isWorking()); + + AlignmentI orig_alig = af.getViewport().getAlignment(); + + testAnnotationFileIO("Testing RNAalifold Annotation IO", orig_alig); + + } + + public static void testAnnotationFileIO(String testname, AlignmentI al) + { + try + { + // what format would be appropriate for RNAalifold annotations? + String aligfileout = new FormatAdapter().formatSequences("PFAM", + al.getSequencesArray()); + + String anfileout = new AnnotationFile().printAnnotations( + al.getAlignmentAnnotation(), al.getGroups(), + al.getProperties()); + assertTrue( + "Test " + + testname + + "\nAlignment annotation file was not regenerated. Null string", + anfileout != null); + assertTrue( + "Test " + + testname + + "\nAlignment annotation file was not regenerated. Empty string", + anfileout.length() > "JALVIEW_ANNOTATION".length()); + + System.out.println("Output annotation file:\n" + anfileout + + "\n< opts = new ArrayList(); + for (compbio.metadata.Argument rg : (List) rnaalifoldws + .getRunnerConfig().getArguments()) + { + if (rg.getDescription().contains("emperature")) + { + try + { + rg.setValue("292"); + } catch (WrongParameterException q) + { + fail("Couldn't set the temperature parameter " + + q.getStackTrace()); + } + opts.add(rg); + } + if (rg.getDescription().contains("max")) + { + opts.add(rg); + } + } + alifoldClient = new RNAalifoldClient(rnaalifoldws, af, null, opts); + + af.getViewport().getCalcManager().startWorker(alifoldClient); + + do + { + try + { + Thread.sleep(50); + } catch (InterruptedException x) + { + } + ; + } while (af.getViewport().getCalcManager().isWorking()); + AutoCalcSetting oldacs = af.getViewport().getCalcIdSettingsFor(alifoldClient.getCalcId()); + String oldsettings = oldacs.getWsParamFile(); + // write out parameters + jalview.gui.AlignFrame nalf=null; + assertTrue("Couldn't write out the Jar file",new Jalview2XML(false).SaveAlignment(af, "testRnalifold_param.jar","trial parameter writeout")); + assertTrue("Couldn't read back the Jar file",(nalf = new Jalview2XML(false).LoadJalviewAlign("testRnalifold_param.jar"))!=null); + if (nalf!=null) + { + AutoCalcSetting acs = af.getViewport().getCalcIdSettingsFor(alifoldClient.getCalcId()); + assertTrue("Calc ID settings not recovered from viewport stash", acs.equals(oldacs)); + assertTrue("Serialised Calc ID settings not identical to those recovered from viewport stash", acs.getWsParamFile().equals(oldsettings)); + JMenu nmenu=new JMenu(); + new SequenceAnnotationWSClient().attachWSMenuEntry(nmenu, rnaalifoldws, af); + assertTrue("Couldn't get menu entry for service",nmenu.getItemCount()>0); + for (Component itm: nmenu.getMenuComponents()) + { + if (itm instanceof JMenuItem) + { + JMenuItem i = (JMenuItem) itm; + if (i.getText().equals(rnaalifoldws.getAlignAnalysisUI().getAAconToggle())) + { + i.doClick(); + break; + } + } + } + while (af.getViewport().isCalcInProgress()) + { + try { Thread.sleep(200); + } catch (Exception x) {}; + } + AutoCalcSetting acs2 = af.getViewport().getCalcIdSettingsFor(alifoldClient.getCalcId()); + assertTrue("Calc ID settings after recalculation has not been recovered.", acs2.getWsParamFile().equals(oldsettings)); + } + } +} diff --git a/utils/InstallAnywhere/Jalview.iap_xml b/utils/InstallAnywhere/Jalview.iap_xml index ba16df3..dc0c991 100755 --- a/utils/InstallAnywhere/Jalview.iap_xml +++ b/utils/InstallAnywhere/Jalview.iap_xml @@ -1268,7 +1268,7 @@ and any path to a file to save to the file]]> - + false @@ -1286,7 +1286,7 @@ and any path to a file to save to the file]]> true - + 133065 @@ -1684,7 +1684,7 @@ and any path to a file to save to the file]]> - + false @@ -1702,7 +1702,7 @@ and any path to a file to save to the file]]> true - + 663408