From: gmungoc Date: Fri, 31 Mar 2017 09:59:57 +0000 (+0100) Subject: Merge branch 'develop' into bug/JAL-2431splitFrameNewView X-Git-Tag: Release_2_10_3b1~336^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3d2b5edf9ea33c6ebbde4717ccc14f03554fb6f0;hp=734d0e761fda32cebaae59c370c5d64e1e8c99e8;p=jalview.git Merge branch 'develop' into bug/JAL-2431splitFrameNewView --- diff --git a/help/html/colourSchemes/user.html b/help/html/colourSchemes/user.html index fb6c356..c2fde1c 100755 --- a/help/html/colourSchemes/user.html +++ b/help/html/colourSchemes/user.html @@ -27,7 +27,7 @@ User Defined Colours

- +

You may define any number of new colour schemes, each with a unique @@ -41,7 +41,7 @@ The Case Sensitive option allows you to choose distinct colours for upper and lower case residue codes.

- The Lower Case Colour option allows you to apply a selected colour + The Colour All Lower Case option allows you to apply a selected colour to all lower case residues.

Click Apply or OK to set your new @@ -56,11 +56,5 @@
Any saved colour schemes will be automatically loaded the next time you use Jalview.
-
- Note: the screenshot shows the appearance when running Java - version 6. For Java 7 (from Jalview 2.8.2) only the Swatches colour - chooser is currently supported (for reasons of available screen - space). -

diff --git a/help/html/colourSchemes/userDefined_java6.gif b/help/html/colourSchemes/userDefined_java6.gif deleted file mode 100644 index d737e80..0000000 Binary files a/help/html/colourSchemes/userDefined_java6.gif and /dev/null differ diff --git a/help/html/colourSchemes/userDefined_java7.gif b/help/html/colourSchemes/userDefined_java7.gif index f0ced11..de80b84 100644 Binary files a/help/html/colourSchemes/userDefined_java7.gif and b/help/html/colourSchemes/userDefined_java7.gif differ diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index f720f39..f284ff9 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -68,7 +68,6 @@ action.show_gaps = Show Gaps action.show_hidden_markers = Show Hidden Markers action.find = Find action.undefine_groups = Undefine Groups -action.create_groups = Create Groups action.make_groups_selection = Make Groups For Selection action.copy = Copy action.cut = Cut @@ -515,7 +514,7 @@ label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = label.standard_databases = Standard Databases label.fetch_embl_uniprot = Fetch from EMBL/EMBLCDS or Uniprot/PDB and any selected DAS sources label.reset_min_max_colours_to_defaults = Reset min and max colours to defaults from user preferences. -label.align_structures_using_linked_alignment_views = Align structures using {0} linked alignment views +label.align_structures_using_linked_alignment_views = Superpose structures using {0} selected alignment view(s) label.connect_to_session = Connect to session {0} label.threshold_feature_display_by_score = Threshold the feature display by score. label.threshold_feature_no_threshold = No Threshold @@ -620,6 +619,8 @@ label.web_services = Web Services label.right_click_to_edit_currently_selected_parameter = Right click to edit currently selected parameter. label.let_jmol_manage_structure_colours = Let Jmol manage structure colours label.let_chimera_manage_structure_colours = Let Chimera manage structure colours +label.fetch_chimera_attributes = Fetch Chimera attributes +label.fetch_chimera_attributes_tip = Copy Chimera attribute to Jalview feature label.marks_leaves_tree_not_associated_with_sequence = Marks leaves of tree not associated with a sequence label.index_web_services_menu_by_host_site = Index web services in menu by the host site label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Check this option if you want to be informed
when a web service URL cannot be accessed by Jalview
when it starts up @@ -667,8 +668,7 @@ label.2d_rna_sequence_name = 2D RNA - {0} label.edit_name_and_description_current_group = Edit name and description of current group label.from_file = From File label.enter_pdb_id = Enter PDB Id (or pdbid:chaincode) -label.text_colour = Text Colour -action.set_text_colour = Text Colour... +label.text_colour = Text Colour... label.structure = Structure label.show_pdbstruct_dialog = 3D Structure Data... label.view_rna_structure = VARNA 2D Structure @@ -713,9 +713,14 @@ label.link_name = Link Name label.pdb_file = PDB file label.colour_with_jmol = Colour with Jmol label.colour_with_chimera = Colour with Chimera -label.align_structures = Align Structures +label.superpose_structures = Superpose Structures +error.superposition_failed = Superposition failed: {0} +label.insufficient_residues = Not enough aligned residues ({0}) to perform superposition label.jmol = Jmol label.chimera = Chimera +label.create_chimera_attributes = Write Jalview features +label.create_chimera_attributes_tip = Set Chimera residue attributes for visible features +label.attributes_set = {0} attribute values set on Chimera label.sort_alignment_by_tree = Sort Alignment By Tree label.mark_unlinked_leaves = Mark Unlinked Leaves label.associate_leaves_with = Associate Leaves With @@ -1288,4 +1293,4 @@ label.edit_sequence_url_link = Edit sequence URL link warn.name_cannot_be_duplicate = User-defined URL names must be unique and cannot be MIRIAM ids label.invalid_name = Invalid Name ! label.output_seq_details = Output Sequence Details to list all database references -label.urllinks = Links \ No newline at end of file +label.urllinks = Links diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index d408fee..a878ab7 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -66,7 +66,6 @@ action.show_gaps = Mostrar huecos action.show_hidden_markers = Mostrar marcadores ocultos action.find = Buscar action.undefine_groups = Grupos sin definir -action.create_groups = Crear grupos action.make_groups_selection = Hacer grupos para seleccionar action.copy = Copiar action.cut = Cortar @@ -476,7 +475,7 @@ label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = label.standard_databases = Bases de datos estándar label.fetch_embl_uniprot = Recuperar de EMBL/EMBLCDS o Uniprot/PDB y de cualquier fuente DAS seleccionada label.reset_min_max_colours_to_defaults = Reiniciar los colores min y max colours a los valores por defecto establecidos en las preferencias de usuario -label.align_structures_using_linked_alignment_views = Alinear las estructuras utlizando las {0} vistas de alineamiento enlazadas +label.align_structures_using_linked_alignment_views = Alinear las estructuras utilizando las {0} vista(s) de alineamiento enlazada(s) label.connect_to_session = Conectar a la sesión {0} label.threshold_feature_display_by_score = Filtrar la característica mostrada por puntuación. label.threshold_feature_no_threshold = Sin umbral @@ -621,7 +620,7 @@ label.2d_rna_sequence_name = 2D RNA - {0} label.edit_name_and_description_current_group = Editar el nombre y la descripción del grupo actual label.from_file = desde fichero label.enter_pdb_id = Introducir PDB Id -label.text_colour = Color del texto +label.text_colour = Color de texto... label.structure = Estructura label.create_sequence_details_report_annotation_for = Anotación para {0} label.sequence_details_for = Detalles de la secuencia para {0} @@ -1158,7 +1157,6 @@ label.invalid_search=Texto de b action.export_annotations=Exportar Anotaciones action.set_as_reference=Marcar como Referencia action.unmark_as_reference=Desmarcar como Referencia -action.set_text_colour=Color de Texto... label.chimera_failed=Error al abrir Chimera - está instalado?\nCompruebe ruta en Preferencias, Estructura label.find=Buscar label.select_pdb_file=Seleccionar Fichero PDB @@ -1288,4 +1286,4 @@ label.edit_sequence_url_link = Editar link de secuencia URL warn.name_cannot_be_duplicate = Los nombres URL definidos por el usuario deben ser únicos y no pueden ser ids de MIRIAM label.invalid_name = Nombre inválido ! label.output_seq_details = Seleccionar Detalles de la secuencia para ver todas -label.urllinks = Enlaces \ No newline at end of file +label.urllinks = Enlaces diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index aac796c..3ae0650 100644 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -28,6 +28,7 @@ import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.io.DataSourceType; import jalview.io.StructureFile; +import jalview.renderer.seqfeatures.FeatureColourFinder; import jalview.structure.AtomSpec; import jalview.structure.StructureListener; import jalview.structure.StructureMapping; @@ -577,6 +578,8 @@ public class AppletPDBCanvas extends Panel implements MouseListener, showFeatures = true; } + FeatureColourFinder finder = new FeatureColourFinder(fr); + PDBChain chain; if (bysequence && pdb != null) { @@ -604,25 +607,16 @@ public class AppletPDBCanvas extends Panel implements MouseListener, if (pos > 0) { pos = sequence[s].findIndex(pos); - tmp.startCol = sr.getResidueBoxColour(sequence[s], pos); - if (showFeatures) - { - tmp.startCol = fr.findFeatureColour(tmp.startCol, - sequence[s], pos); - } + tmp.startCol = sr.getResidueColour(sequence[s], pos, + finder); } pos = mapping[m].getSeqPos(tmp.at2.resNumber) - 1; if (pos > 0) { pos = sequence[s].findIndex(pos); - tmp.endCol = sr.getResidueBoxColour(sequence[s], pos); - if (showFeatures) - { - tmp.endCol = fr.findFeatureColour(tmp.endCol, - sequence[s], pos); - } + tmp.endCol = sr + .getResidueColour(sequence[s], pos, finder); } - } } } diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index 292de91..08bca8c 100644 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -28,6 +28,7 @@ import jalview.gui.FeatureRenderer; import jalview.gui.SequenceRenderer; import jalview.io.DataSourceType; import jalview.io.StructureFile; +import jalview.renderer.seqfeatures.FeatureColourFinder; import jalview.structure.AtomSpec; import jalview.structure.StructureListener; import jalview.structure.StructureMapping; @@ -546,6 +547,7 @@ public class PDBCanvas extends JPanel implements MouseListener, showFeatures = true; } + FeatureColourFinder finder = new FeatureColourFinder(fr); PDBChain chain; if (bysequence && pdb != null) { @@ -573,23 +575,15 @@ public class PDBCanvas extends JPanel implements MouseListener, if (pos > 0) { pos = sequence[s].findIndex(pos); - tmp.startCol = sr.getResidueBoxColour(sequence[s], pos); - if (showFeatures) - { - tmp.startCol = fr.findFeatureColour(tmp.startCol, - sequence[s], pos); - } + tmp.startCol = sr.getResidueColour(sequence[s], pos, + finder); } pos = mapping[m].getSeqPos(tmp.at2.resNumber) - 1; if (pos > 0) { pos = sequence[s].findIndex(pos); - tmp.endCol = sr.getResidueBoxColour(sequence[s], pos); - if (showFeatures) - { - tmp.endCol = fr.findFeatureColour(tmp.endCol, - sequence[s], pos); - } + tmp.endCol = sr + .getResidueColour(sequence[s], pos, finder); } } diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index c40cdda..ba93046 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -39,6 +39,8 @@ import java.util.Vector; public class PDBChain { + public static final String RESNUM_FEATURE = "RESNUM"; + /** * SequenceFeature group for PDB File features added to sequences */ @@ -367,7 +369,7 @@ public class PDBChain Residue tmpres = residues.lastElement(); Atom tmpat = tmpres.atoms.get(0); // Make A new SequenceFeature for the current residue numbering - SequenceFeature sf = new SequenceFeature("RESNUM", tmpat.resName + SequenceFeature sf = new SequenceFeature(RESNUM_FEATURE, tmpat.resName + ":" + tmpat.resNumIns + " " + pdbid + id, "", offset + count, offset + count, pdbid); resFeatures.addElement(sf); diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java index 439d479..85ae718 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java @@ -423,6 +423,11 @@ public class ChimeraManager "list selection level residue", true); if (chimeraReply != null) { + /* + * expect 0, 1 or more lines of the format + * residue id #0:43.A type GLY + * where we are only interested in the atomspec #0.43.A + */ for (String inputLine : chimeraReply) { String[] inputLineParts = inputLine.split("\\s+"); diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 17874e6..ee16f94 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -20,6 +20,10 @@ */ package jalview.analysis; +import java.util.Arrays; +import java.util.Hashtable; +import java.util.List; + import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; @@ -37,10 +41,6 @@ import jalview.util.Format; import jalview.util.MappingUtils; import jalview.util.QuickSort; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.List; - /** * Takes in a vector or array of sequences and column start and column end and * returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied. @@ -67,8 +67,8 @@ public class AAFrequency } } - public static final ProfilesI calculate(List list, - int start, int end) + public static final ProfilesI calculate(List list, int start, + int end) { return calculate(list, start, end, false); } @@ -289,6 +289,56 @@ public class AAFrequency } /** + * Derive the gap count annotation row. + * + * @param gaprow + * the annotation row to add annotations to + * @param profiles + * the source consensus data + * @param startCol + * start column (inclusive) + * @param endCol + * end column (exclusive) + */ + public static void completeGapAnnot(AlignmentAnnotation gaprow, + ProfilesI profiles, int startCol, int endCol, long nseq) + { + if (gaprow == null || gaprow.annotations == null + || gaprow.annotations.length < endCol) + { + /* + * called with a bad alignment annotation row + * wait for it to be initialised properly + */ + return; + } + // always set ranges again + gaprow.graphMax = nseq; + gaprow.graphMin = 0; + for (int i = startCol; i < endCol; i++) + { + ProfileI profile = profiles.get(i); + if (profile == null) + { + /* + * happens if sequences calculated over were + * shorter than alignment width + */ + gaprow.annotations[i] = null; + return; + } + + final int gapped = profile.getNonGapped(); + + String description = String.valueOf(gapped); + + gaprow.annotations[i] = new Annotation(description, description, + '\0', + gapped); + } + } + + /** * Returns a tooltip showing either *