action.create = Create
action.update = Update
action.delete = Delete
-action.snapshot = Snapshot
action.clear = Clear
action.accept = Accept
action.select_ddbb = --- Select Database ---
action.save_as = Save as...
action.save = Save
action.cancel_fetch = Cancel Fetch
-action.save_omit_hidden_columns = Save / Omit Hidden Regions
action.change_font = Change Font
action.change_font_tree_panel = Change Font (Tree Panel)
action.colour = Colour
action.fetch_db_references = Fetch DB References
action.view_flanking_regions = Show flanking regions
label.view_flanking_regions = Show sequence data either side of the subsequences involved in this alignment
-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.select_feature = Select feature
label.name = Name
+label.name\: = Name:
label.name_param = Name: {0}
label.group = Group
+label.group\: = Group:
label.group_name = Group Name
label.group_description = Group Description
label.edit_group_name_description = Edit Group Name/Description
label.colour = Colour:
-label.description = Description:
+label.description = Description
+label.description\: = Description:
label.start = Start:
label.end = End:
label.current_parameter_set_name = Current parameter set name:
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.modify_identity_threshold = Modify Identity Threshold...
+label.modify_conservation_threshold = Modify Conservation Threshold...
label.input_from_textbox = Input from textbox
label.centre_column_labels = Centre column labels
label.automatic_scrolling = Automatic Scrolling
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.hide_insertions = Hide columns gapped for selection
label.hide_selected_annotations = Hide selected annotations
label.show_selected_annotations = Show selected annotations
label.group_consensus = Group Consensus
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.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 regions (hidden sequences/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.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.calculating_tree = Calculating tree
label.state_queueing = queuing
label.state_running = running
-label.state_complete = complete
label.state_completed = finished
label.state_job_cancelled = job cancelled!!
label.state_job_error = job error!
label.chimera_help = Chimera Help
label.close_viewer = Close Viewer
label.confirm_close_chimera = This will close Jalview''s connection to {0}.<br>Do you want to close the Chimera window as well?
-label.chimera_help = Chimera Help
label.all = All
label.sort_by = Sort alignment by
label.sort_by_score = Sort by Score
label.align_structures_using_linked_alignment_views = Align structures using {0} linked alignment views
label.connect_to_session = Connect to session {0}
label.threshold_feature_display_by_score = Threshold the feature display by score.
-label.threshold_feature_no_thereshold = No Threshold
-label.threshold_feature_above_thereshold = Above Threshold
-label.threshold_feature_below_thereshold = Below Threshold
-label.adjust_thereshold = Adjust threshold
+label.threshold_feature_no_threshold = No Threshold
+label.threshold_feature_above_threshold = Above Threshold
+label.threshold_feature_below_threshold = Below Threshold
+label.adjust_threshold = Adjust threshold
label.toggle_absolute_relative_display_threshold = Toggle between absolute and relative display threshold.
label.display_features_same_type_different_label_using_different_colour = Display features of the same type with a different label using a different colour. (e.g. domain features)
label.select_colour_minimum_value = Select Colour for Minimum Value
label.select_colour_maximum_value = Select Colour for Maximum Value
-label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Open a new structure viewer with all structures associated with the current selection and superimpose them using the alignment.
label.open_url_param = Open URL {0}
label.open_url_seqs_param = Open URL ({0}..) ({1} seqs)
label.load_pdb_file_associate_with_sequence = Load a PDB file and associate it with sequence {0}
label.logo = Logo
label.non_positional_features = List Non-positional Features
label.database_references = List Database References
-label.share_selection_across_views = Share selection across views
-label.scroll_highlighted_regions = Scroll to highlighted regions
+#label.share_selection_across_views = Share selection across views
+#label.scroll_highlighted_regions = Scroll to highlighted regions
label.gap_symbol = Gap Symbol
label.prot_alignment_colour = Protein Alignment Colour
label.nuc_alignment_colour = Nucleotide Alignment Colour
label.adjusting_parameters_for_calculation = Adjusting parameters for existing Calculation
label.2d_rna_structure_line = 2D RNA {0} (alignment)
label.2d_rna_sequence_name = 2D RNA - {0}
-label.edit_name_and_description_current_group = Edit name and description of current group.
-label.view_structure_for = View structure for {0}
-label.view_all_structures = View all {0} structures.
-label.view_all_representative_structures = View all {0} representative structures.
-label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Opens a new structure viewer with all representative structures\nassociated with the current selection\nsuperimposed with the current alignment.
-label.associate_structure_with_sequence = Associate Structure with Sequence
+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.discover_pdb_ids = Discover PDB IDs
label.text_colour = Text Colour
action.set_text_colour = Text Colour...
label.structure = Structure
-label.view_structure = View Structure
-label.view_protein_structure = View Protein Structure
label.show_pdbstruct_dialog = 3D Structure Data...
label.view_rna_structure = VARNA 2D Structure
label.clustalx_colours = Clustalx colours
label.reverse = Reverse
label.reverse_complement = Reverse Complement
label.linked_view_title = Linked CDS and protein view
-label.align = Align
label.extract_scores = Extract Scores
label.get_cross_refs = Get Cross-References
label.sort_alignment_new_tree = Sort Alignment With New Tree
label.add_local_source = Add Local Source
label.set_as_default = Set as Default
label.show_labels = Show labels
-label.background_colour = Background Colour
action.background_colour = Background Colour...
label.associate_nodes_with = Associate Nodes With
label.jalview_pca_calculation = Jalview PCA Calculation
label.rest_client_submit = {0} using {1}
label.fetch_retrieve_from =Retrieve from {0}</html>
label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}<br>First is :{2}<html>
-#label.feature_settings_click_drag = <html>Click/drag feature types up or down to change render order.<br/>Double click to select columns containing feature in alignment/current selection<br/>Pressing Alt will select columns outside features rather than inside<br/>Pressing Shift to modify current selection (rather than clear current selection)<br/>Press CTRL or Command/Meta to toggle columns in/outside features<br/></html>
label.feature_settings_click_drag = Drag up or down to change render order.<br/>Double click to select columns containing feature.
label.transparency_tip = Adjust transparency to 'see through' feature colours.
label.opt_and_params_further_details = see further details by right-clicking
label.service_preset = Service Preset
label.run_with_preset = Run {0} with preset
label.view_service_doc_url = <html>View <a href="{0}">{1}</a></html>
-label.submit_sequence = <html>Submit {0} {1} {2} {3} to<br/>{4}</html>
action.by_title_param = By {0}
-label.alignment = Alignment
-label.secondary_structure_prediction = Secondary Structure Prediction
-label.sequence_database_search = Sequence Database Search
-label.analysis = Analysis
-label.protein_disorder = Protein Disorder
label.source_from_db_source = Sources from {0}
label.from_msname = from {0}
label.superpose_with = Superpose with
-action.do = Do
label.scale_label_to_column = Scale Label to Column
label.add_new_row = Add New Row
label.edit_label_description = Edit Label/Description
label.copied_sequences = Copied sequences
label.cut_sequences = Cut Sequences
label.conservation_colour_increment = Conservation Colour Increment ({0})
-label.percentage_identity_thereshold = Percentage Identity Threshold ({0})
+label.percentage_identity_threshold = Percentage Identity Threshold ({0})
label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog
label.save_alignment_to_file = Save Alignment to file
label.save_features_to_file = Save Features to File
label.saving_vamsas_doc = Saving VAMSAS Document to {0}
label.load_feature_colours = Load Feature Colours
label.save_feature_colours = Save Feature Colour Scheme
-label.dataset_for = {0} Dataset for {1}
label.select_startup_file = Select startup file
label.select_default_browser = Select default web browser
label.save_tree_as_newick = Save tree as newick file
error.implementation_error_sortbyfeature = Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY.
error.not_yet_implemented = Not yet implemented
error.unknown_type_dna_or_pep = Unknown Type {0} - dna or pep are the only allowed values.
-error.implementation_error_dont_know_thereshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient.
-error.implementation_error_embeddedpopup_not_null = Implementation error - embeddedPopup must be non-null
-error.invalid_colour_for_mycheckbox = Invalid color for MyCheckBox
-error.implementation_error_unrecognised_render_object_for_features_type = Implementation Error: Unrecognised render object {0} for features of type {1}
-error.implementation_error_unsupported_feature_colour_object = Implementation error: Unsupported feature colour object.
+error.implementation_error_dont_know_threshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient.
error.invalid_separator_parameter = Invalid separator parameter - must be non-zero length
error.alignment_cigararray_not_implemented = Alignment(CigarArray) not yet implemented
-error.weak_sequencei_equivalence_not_yet_implemented = Weak sequenceI equivalence not yet implemented.
-error.implementation_error_can_only_make_alignmnet_from_cigararray = Implementation Error - can only make an alignment view from a CigarArray of sequences.
error.empty_view_cannot_be_updated = empty view cannot be updated.
error.mismatch_between_number_of_sequences_in_block = Mismatch between number of sequences in block {0} ({1}) and the original view ({2})
error.padding_not_yet_implemented = Padding not yet implemented
error.implementation_bug_cigar_operation = Implementation Bug. Cigar Operation {0} {1} not one of {2}, {3}, or {4}.
error.implementation_error_for_new_cigar = Implementation error for new Cigar(SequenceI)
error.implementation_error_cigar_seq_no_operations = Implementation error: {0}th sequence Cigar has no operations.
-error.implementation_error_jmol_getting_data = Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016
error.implementation_error_no_pdbentry_from_index = Implementation error - no corresponding pdbentry (for index {0}) to add sequences mappings to
error.jmol_version_not_compatible_with_jalview_version = Jmol version {0} is not compatible with this version of Jalview. Report this problem at issues.jalview.org
error.not_implemented_remove = Remove: Not implemented
error.not_implemented_clone = Clone: Not implemented
-error.implementation_error_chimera_getting_data = Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016
error.call_setprogressbar_before_registering_handler = call setProgressBar before registering the progress bar's handler.
label.cancelled_params = Cancelled {0}
error.implementation_error_cannot_show_view_alignment_frame = Implementation error: cannot show a view from another alignment in an AlignFrame.
-error.implementation_error_dont_know_about_thereshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient.
+error.implementation_error_dont_know_about_threshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient.
error.eps_generation_not_implemented = EPS Generation not yet implemented
error.png_generation_not_implemented = PNG Generation not yet implemented
error.try_join_vamsas_session_another = Trying to join a vamsas session when another is already connected
error.implementation_error_cannot_find_marshaller_for_param_set =Implementation error: Can't find a marshaller for the parameter set
error.implementation_error_old_jalview_object_not_bound =IMPLEMENTATION ERROR: old jalview object is not bound ! ({0})
error.implementation_error_vamsas_doc_class_should_bind_to_type = Implementation Error: Vamsas Document Class {0} should bind to a {1} (found a {2})
-error.implementation_error_jalview_class_should_bind_to_type = Implementation Error: Jalview Class {0} should bind to a {1} (found a {2})
error.invalid_vamsas_rangetype_cannot_resolve_lists = Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!
error.implementation_error_maplist_is_null = Implementation error. MapList is null for initMapType.
error.implementation_error_cannot_have_null_alignment = Implementation error: Cannot have null alignment property key
label.marked = Marked
label.containing = containing
label.not_containing = not containing
-label.not = not
label.no_feature_of_type_found = No features of type {0} found.
label.submission_params = Submission {0}
label.empty_alignment_job = Empty Alignment Job
label.pca_calculating = Calculating PCA
label.select_foreground_colour = Choose foreground colour
label.select_colour_for_text = Select Colour for Text
-label.adjunst_foreground_text_colour_thereshold = Adjust Foreground Text Colour Threshold
+label.adjunst_foreground_text_colour_threshold = Adjust Foreground Text Colour Threshold
label.select_subtree_colour = Select Sub-Tree Colour
label.create_new_sequence_features = Create New Sequence Feature(s)
label.amend_delete_features = Amend/Delete Features for {0}
exception.mismatched_closing_char = Mismatched closing character {0}
exception.mismatched_opening_char = Mismatched opening character {0} at {1}
exception.invalid_datasource_couldnt_obtain_reader = Invalid datasource. Could not obtain Reader
-exception.index_value_not_in_range = {0}: Index value {1} not in range [0..{2}]
exception.unterminated_cigar_string = Unterminated cigar string
exception.unexpected_operation_cigar_string_pos = Unexpected operation {0} in cigar string (position {1} in {2}
exception.couldnt_parse_responde_from_annotated3d_server = Couldn't parse response from Annotate3d server
exception.pfam_no_sequences_found = No sequences found (PFAM input)
exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'
exception.couldnt_parse_sequence_line = Could not parse sequence line: {0}
-exception.error_parsing_line = Error parsing {0}
exception.unknown_annotation_detected = Unknown annotation detected: {0} {1}
exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0}
exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1})
exception.browser_unable_to_locate = Unable to locate browser: {0}
exception.invocation_target_exception_creating_aedesc = InvocationTargetException while creating AEDesc: {0}
exception.illegal_access_building_apple_evt= IllegalAccessException while building AppleEvent: {0}
-exception.instantiation_creating_aedesc = InstantiationException while creating AEDesc: {0}
exception.unable_to_launch_url = Unable to launch URL: {0}
exception.unable_to_create_internet_config = Unable to create an Internet Config instance: {0}
exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0}
exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command.
exception.invalid_das_source = Invalid das source: {0}
exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1}
-label.no_embl_record_found = # No EMBL record retrieved for {0}:{1}
-label.embl_successfully_parsed = # Successfully parsed the {0} queries into an Alignment
exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1}
exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data
exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment
label.add_jabaws_url = Add new JABAWS URL
label.news_from_jalview = News from http://www.jalview.org
label.cut_paste_alignmen_file = Cut & Paste Alignment File
-label.enter_redundancy_thereshold = Enter the redundancy threshold
-label.select_dark_light_set_thereshold = <html><i>Select a dark and light text colour, then set the threshold to<br>switch between colours, based on background colour</i></html>
+label.enter_redundancy_threshold = Enter the redundancy threshold
+label.select_dark_light_set_threshold = <html><i>Select a dark and light text colour, then set the threshold to<br>switch between colours, based on background colour</i></html>
label.select_feature_colour = Select Feature Colour
label.delete_all = Delete all sequences
warn.delete_all = <html>Deleting all sequences will close the alignment window.<br>Confirm deletion or Cancel.
label.no_colour_selection_warn = Error saving colour scheme
label.open_split_window? = Would you like to open as a split window, with cDNA and protein linked?
label.open_split_window = Open split window
-label.no_mappings = No mappings found
action.no = No
action.yes = Yes
label.for = for
label.select_by_annotation = Select/Hide Columns by Annotation
action.select_by_annotation = Select/Hide Columns by Annotation...
label.threshold_filter = Threshold Filter
-action.hide = Hide
-action.select = Select
label.alpha_helix = Alpha Helix
label.beta_strand = Beta Strand
label.turn = Turn
label.select_all = Select All
label.structures_filter = Structures Filter
label.search_filter = Search Filter
-label.description = Description
label.include_description= Include Description
action.back = Back
label.hide_insertions = Hide Insertions
label.mark_as_representative = Mark as representative
label.open_jabaws_web_page = Open JABAWS web page
-label.opens_the_jabaws_server_homepage = Opens the JABAWS server's homepage in web browser
label.pdb_sequence_fetcher = PDB Sequence Fetcher
label.result = result
label.results = results
status.obtaining_mapping_with_nw_alignment = Obtaining mapping with NW alignment
status.exporting_alignment_as_x_file = Exporting alignment as {0} file
label.column = Column
-label.sequence = Sequence
label.cant_map_cds = Unable to map CDS to protein\nCDS missing or incomplete
label.operation_failed = Operation failed
action.create = Crear
action.update = Actualizar
action.delete = Borrar
-action.snapshot = Imagen
action.clear = Limpiar
action.accept = Aceptar
action.select_ddbb = --- Seleccionar base de datos ---
action.save_as = Guardar como
action.save = Guardar
action.cancel_fetch = Cancelar búsqueda
-action.save_omit_hidden_columns = Guardar / Omitir las columnas ocultas
action.change_font = Cambiar Fuente
action.change_font_tree_panel = Cambiar fuente (panel del árbol)
action.colour = Color
action.fetch_db_references = Recuperar referencias a base de datos
action.view_flanking_regions = Mostrar flancos
label.view_flanking_regions = Mostrar los datos de la secuencia a ambos lados de las subsecuencias implicadas en este alineamiento
-label.str = Str:
-label.seq = Seq:
label.structures_manager = Administrar estructuras
label.nickname = Sobrenombre:
label.url = URL:
label.input_file_url = Introducir URL en el fichero de entrada
-label.select_feature = Seleccionar función:
-label.name = Nombre:
+label.select_feature = Seleccionar caracterÃstica
+label.name = Nombre
+label.name\: = Nombre:
label.name_param = Nombre: {0}
-label.group = Grupo:
+label.group = Grupo
+label.group\: = Grupo:
label.group_name = Nombre del grupo
label.group_description = Descripción del grupo
label.edit_group_name_description = Editar nombre/descripción del grupo
label.colour = Color:
-label.description = Descripción:
+label.description = Descripción
+label.description\: = Descripción:
label.start = Comenzar:
label.end = Terminar:
label.current_parameter_set_name = Nombre actual del conjunto de parámetros:
label.to_new_alignment = A nuevo alineamiento
label.to_this_alignment = Añadir a este alineamiento
label.apply_colour_to_all_groups = Aplicar color a todos los grupos
-label.modify_identity_thereshold = Modificar el umbral de identidad...
-label.modify_conservation_thereshold = Modificar el umbral de conservación...
+label.modify_identity_threshold = Modificar el umbral de identidad...
+label.modify_conservation_threshold = Modificar el umbral de conservación...
label.input_from_textbox = Introducir desde el cuadro de texto
label.centre_column_labels = Centrar las etiquetas de las columnas
label.automatic_scrolling = Desplazamiento automático
label.about = Acerca de...
label.show_sequence_limits = Mostrar los lÃmites de la secuencia
label.feature_settings = Ajustar funciones...
-label.sequence_features = Funciones de la secuencia
label.all_columns = Todas las columnas
label.all_sequences = Todas las secuencias
label.selected_columns = Columnas seleccionadas
label.font = Fuente:
label.size = Talla:
label.style = Estilo:
-label.enter_redundancy_threshold = Introducir el umbral de redundancia
label.calculating = Calculando....
label.modify_conservation_visibility = Modificar la visibilidad de conservación
label.colour_residues_above_occurence = Residuos de color por encima del % de aparición
label.select_das_service_from_table = Seleccionar servicio DAS de la tabla para leer una descripción completa aquÃ.
label.session_update = Actualizar sesión
label.new_vamsas_session = Nueva sesión Vamsas
-label.load_vamsas_session = Cargar sesión Vamsas
-label.save_vamsas_session = Guardar sesión Vamsas
action.save_vamsas_session = Guardar Sesión Vamsas
label.select_vamsas_session_opened_as_new_vamsas_session= Selecciones una sesión vamsas para abrirla como una nueva sesión.
label.open_saved_vamsas_session = Abrir una sesión VAMSAS guardada
label.example_param = Ejemplo: {0}
label.select_file_format_before_saving = Debe seleccionar un formato de fichero antes de guardar!
label.file_format_not_specified = Formato de fichero no especificado
-label.alignment_contains_hidden_columns = El alineamiento contiene columnas ocultas.\nQuieres guardar s\u00F3lo el alineamiento visible?
label.couldnt_save_file = No se pudo guardar el fichero: {0}
label.error_saving_file = Error guardando el fichero
label.remove_from_default_list = eliminar de la lista de defectuosos?
label.features_can_be_added_from_searches_1 = (Las funciones pueden ser añadidas de búsquedas o
label.features_can_be_added_from_searches_2 = de ficheros de funciones Jalview / GFF)
label.calculating_pca= Calculando PCA
-label.reveal_columns = Mostrar Columnas
label.jalview_cannot_open_file = Jalview no puede abrir el fichero
label.jalview_applet = Aplicación Jalview
label.loading_data = Cargando datos
label.calculating_tree = Calculando árbol
label.state_queueing = En cola
label.state_running = Procesando
-label.state_complete = Completar
label.state_completed = Finalizado
label.state_job_cancelled = ¡Trabajo cancelado!
label.state_job_error = Error del trabajo!
label.load_features_annotations = Cargar caracterÃsticas/anotaciones ...
label.export_features = Exportar caracterÃsticas...
label.export_annotations = Exportar anotaciones ...
-label.jalview_copy = Copiar (sólo Jalview)
-label.jalview_cut = Cortar (sólo Jalview)
label.to_upper_case = Pasar a mayúsculas
label.to_lower_case = Pasar a minúsculas
label.toggle_case = Alternar mayúsculas y minúsculas
label.align_structures_using_linked_alignment_views = Alinear las estructuras utlizando las {0} vistas de alineamiento enlazadas
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_thereshold = Sin umbral
-label.threshold_feature_above_thereshold = Por encima del umbral
-label.threshold_feature_below_thereshold = Por debajo del umbral
-label.adjust_thereshold = Ajustar umbral
+label.threshold_feature_no_threshold = Sin umbral
+label.threshold_feature_above_threshold = Por encima del umbral
+label.threshold_feature_below_threshold = Por debajo del umbral
+label.adjust_threshold = Ajustar umbral
label.toggle_absolute_relative_display_threshold = Cambiar entre mostrar el umbral absoluto y el relativo.
label.display_features_same_type_different_label_using_different_colour = Mostrar las caracterÃsticas del mismo tipo con una etiqueta diferente y empleando un color distinto (p.e. caracterÃsticas del dominio)
label.select_colour_minimum_value = Seleccionar el color para el valor mÃnimo
label.select_colour_maximum_value = Seleccionar el color para el valor máximo
-label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista Jmol con todas las estructuras asociadas con la selección acxtual y superponer las utilizando el alineamiento.
label.open_url_param = Abrir URL {0}
label.open_url_seqs_param = Abrir URL ({0}..) ({1} secuencias)
label.load_pdb_file_associate_with_sequence = Cargar un fichero PDB y asociarlo con la secuencia {0}
label.logo = Logo
label.non_positional_features = CaracterÃsticas no posicionales
label.database_references = Referencias a base de datos
-label.share_selection_across_views = Compartir la selección en todas las vistas
-label.scroll_highlighted_regions = Desplazarse hasta las regiones resaltadas
+#label.share_selection_across_views = Compartir la selección en todas las vistas
+#label.scroll_highlighted_regions = Desplazarse hasta las regiones resaltadas
label.gap_symbol = SÃmbolo del hueco
-label.alignment_colour = Color del alineamiento
label.address = Dirección
label.port = Puerto
label.default_browser_unix = Navegador por defecto (Unix)
label.adjusting_parameters_for_calculation = Ajustar los parámetros para el cálculo existente
label.2d_rna_structure_line = 2D RNA {0}
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.view_structure_for = Visualizar la estructura para {0}
-label.view_all_structures = Visualizar todas las {0} estructuras.
-label.view_all_representative_structures = Visualizar todas las {0} estructuras representativas.
-label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista de Jmol con todas las estructuras representativas\nasociadas con la selecci\u00F3n actual\nsuperpuesta con el alineamiento actual.
-label.associate_structure_with_sequence = Asociar estructura con la secuencia
+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.discover_pdb_ids = Buscar PDB ids
label.text_colour = Color del texto
label.structure = Estructura
-label.view_structure = Visualizar estructura
label.clustalx_colours = Colores de Clustalx
label.above_identity_percentage = Sobre % identidad
label.create_sequence_details_report_annotation_for = Anotación para {0}
label.add_local_source = Añadir fuente local
label.set_as_default = Establecer por defecto
label.show_labels = Mostrar etiquetas
-label.background_colour = Color de fondo
label.associate_nodes_with = Asociar nodos con
label.jalview_pca_calculation = Cálculo del PCA por Jalview
label.link_name = Nombre del enalce
label.service_preset = Preselección del servicio
label.run_with_preset = Ejecutar {0} con preselección
label.view_service_doc_url = Visualizar <a href="{0}">{1}</a></html>
-label.submit_sequence = Enviar {0} {1} {2} {3} a<br/>{4}</html>
action.by_title_param = por {0}
-label.alignment = Alineamiento
-label.secondary_structure_prediction = Predicción de la estructura secundaria
-label.sequence_database_search = Búsqueda en base de datos de secuencias
-label.analysis = Análisis
-label.protein_disorder = Desorden en la proteÃna
label.source_from_db_source = Fuentes de {0}
label.from_msname = de {0}
label.superpose_with = Superponer con...
-action.do = Hacer
label.scale_label_to_column = Ajustar la etiqueta a la columna
label.add_new_row = Añadir nuevo fila
label.edit_label_description = Editar etiqueta/descripción
label.copied_sequences = Secuencias copiadas
label.cut_sequences = Cortar secuencias
label.conservation_colour_increment = Incremento de Conservación del Color ({0})
-label.percentage_identity_thereshold = Umbral del Porcentaje de Identidad ({0})
+label.percentage_identity_threshold = Umbral del Porcentaje de Identidad ({0})
label.error_unsupported_owwner_user_colour_scheme = Propietario no soportado para el diálogo del Esquema Cromático del Usuario
label.save_alignment_to_file = Guardar Alineamiento en fichero
label.save_features_to_file = Guardar CaracterÃsticas en un fichero
label.saving_vamsas_doc = Guardando el documento VAMSAS en {0}
label.load_feature_colours = Cargar colores de caracterÃsticas
label.save_feature_colours = Guardar esquema cromático de caracterÃsticas
-label.dataset_for = {0} conjunto de datos para {1}
label.select_startup_file = Seleccionar fichero de arranque
label.select_default_browser = Seleccionar navegador web por defecto
label.save_tree_as_newick = Guardar árbol como fichero newick
error.implementation_error_sortbyfeature = Error de implementación - sortByFeature debe ser uno de FEATURE_SCORE, FEATURE_LABEL o FEATURE_DENSITY.
error.not_yet_implemented = No se ha implementado todavÃa
error.unknown_type_dna_or_pep = Tipo desconocido {0} - dna o pep son los únicos valores permitidos
-error.implementation_error_dont_know_thereshold_annotationcolourgradient = Error de implementación: no se conoce el valor umbral para el AnnotationColourGradient actual.
-error.implementation_error_embeddedpopup_not_null = Error de implementación - embeddedPopup debe ser no nulo.
-error.invalid_colour_for_mycheckbox = Color no válido para MyCheckBox
-error.implementation_error_unrecognised_render_object_for_features_type = Error de implementación: no se reconoce el objeto de representación {0} para las caracterÃsticas de tipo {1}
-error.implementation_error_unsupported_feature_colour_object = Error de implementación: objeto de color de caracterÃsticas no soportado.
+error.implementation_error_dont_know_threshold_annotationcolourgradient = Error de implementación: no se conoce el valor umbral para el AnnotationColourGradient actual.
error.invalid_separator_parameter = Separador de parámetros no válido - debe tener longitud mayor que cero
error.alignment_cigararray_not_implemented = Alignment(CigarArray) no se ha implementado todavÃa
-error.weak_sequencei_equivalence_not_yet_implemented = Equivalencia débil sequenceI no se ha implementado todavÃa.
-error.implementation_error_can_only_make_alignmnet_from_cigararray = Error de implementación - sólo se puede construir un vista de alineamiento a partir de una CigarArray de secuencias.
error.empty_view_cannot_be_updated = una vista vacÃa no se puede actualizar.
error.mismatch_between_number_of_sequences_in_block = No hay coincidencia entre el número de secuencias en el bloque {0} ({1}) y la vista original ({2})
error.padding_not_yet_implemented = El relleno no se ha implementado todavÃa
error.implementation_bug_cigar_operation = Bug de implementación. La operación Cigar {0} {1} no es ni {2}, ni {3} ni {4}.
error.implementation_error_for_new_cigar = Error de implementación en new Cigar(SequenceI)
error.implementation_error_cigar_seq_no_operations = Error de implementación: la {0}a secuencia Cigar no tiene operaciones.
-error.implementation_error_jmol_getting_data = Error de implementación - Jmol parece estar todavÃa intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016
error.implementation_error_no_pdbentry_from_index = Error de implementación - no existe la correspondiente entrada pdb (para el Ãndice {0}) para añadir el mapeo de secuencias a
error.jmol_version_not_compatible_with_jalview_version = La versión {0} de Jmol no es compatible con esta versión de Jalview. Informe de este problema en http://issues.jalview.org
error.not_implemented_remove = Borrar: no implementado
error.not_implemented_clone = Clonar: no implementado
-error.implementation_error_chimera_getting_data = Error de implementación - Chimera parece estar todavÃa intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016
error.call_setprogressbar_before_registering_handler = llamada a setProgressBar antes de registrar el manejador de la barra de estado
label.cancelled_params = {0} cancelado
error.implementation_error_cannot_show_view_alignment_frame = Error de implementación: no es posible mostrar una vista de otro alineamiento en un AlignFrame.
-error.implementation_error_dont_know_about_thereshold_setting = Error de implementación: no se conoce la configuración del umbral para el AnnotationColourGradient actual.
+error.implementation_error_dont_know_about_threshold_setting = Error de implementación: no se conoce la configuración del umbral para el AnnotationColourGradient actual.
error.eps_generation_not_implemented = La generación de EPS no se ha implementado todavÃa
error.png_generation_not_implemented = La generación de PNG no se ha implementado todavÃa
error.try_join_vamsas_session_another = Tratando de establecer una sesión VAMSAS cuando ya habÃa otra conectada
error.implementation_error_cannot_find_marshaller_for_param_set =Error de implementación: no puede encontrar un marshaller para el conjunto de parámetros
error.implementation_error_old_jalview_object_not_bound =Error de implementación: ¡el objeto Jalview antiguo no está enlazado! ({0})
error.implementation_error_vamsas_doc_class_should_bind_to_type = Error de implementación: la clase de documento VAMSAS {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2})
-error.implementation_error_jalview_class_should_bind_to_type = Error de implementación: la clase Jalview {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2})
error.invalid_vamsas_rangetype_cannot_resolve_lists = RangeType VAMSAS no válido - ¡no es posible resolver ambas listas de Pos y Seg con los valores elegidos!
error.implementation_error_maplist_is_null = Error de implementación. MapList es nulo en initMapType.
error.implementation_error_cannot_have_null_alignment = Error de implementación: no es posible tener una clave nula en el alineamiento
label.marked = Marcada
label.containing = conteniendo
label.not_containing = no conteniendo
-label.not = no
label.no_feature_of_type_found = No se han encontrado caracterÃsticas del tipo {0}.
label.submission_params = EnvÃo {0}
label.empty_alignment_job = Trabajo de alineamiento vacÃo
label.pca_calculating = Calculando PCA
label.select_foreground_colour = Escoger color del primer plano
label.select_colour_for_text = Seleccione el color del texto
-label.adjunst_foreground_text_colour_thereshold = Ajustar el umbral del color del texto en primer plano
+label.adjunst_foreground_text_colour_threshold = Ajustar el umbral del color del texto en primer plano
label.select_subtree_colour = Seleccioanr el color del sub-árbol
label.create_new_sequence_features = Crear nueva(s) caracterÃstica(s) de secuencia
label.amend_delete_features = Arrelgar/Borrar caracterÃsticas de {0}
exception.mismatched_closing_char = Carácter de cierre discordante {0}
exception.mismatched_opening_char = Carácter de apertura discordante {0} en {1}
exception.invalid_datasource_couldnt_obtain_reader = Fuente de datos no válida. No es posible obtener el Reader
-exception.index_value_not_in_range = {0}: el valor del Ãndice {1} en se encuentra en el rango [0..{2}]
exception.unterminated_cigar_string = Cadena cigar sin terminar
exception.unexpected_operation_cigar_string_pos = Operación no esperada {0} en una cadena cigar (posición {1} en {2})
exception.couldnt_parse_responde_from_annotated3d_server = No es posible parsear la respuesta procedente del servidor Annotate3d
exception.pfam_no_sequences_found = No se han encontrado secuencias (entrada PFAM)
exception.stockholm_invalid_format = Este fichero no es tiene un formato STOCKHOLM válido: la primera lÃnea no contiene '# STOCKHOLM'
exception.couldnt_parse_sequence_line = No es posible parse la lÃnea de secuencia: {0}
-exception.error_parsing_line = Error parseando {0}
exception.unknown_annotation_detected = Anotación desconocida detectada: {0} {1}
exception.couldnt_store_sequence_mappings = No es posible almacenar los mapeos de secuencia para {0}
exception.matrix_too_many_iteration = Demasiadas iteraciones en {0} (el máximo es {1})
exception.browser_unable_to_locate = Imposible encontrar el navegador: {0}
exception.invocation_target_exception_creating_aedesc = InvocationTargetException mientras se creaba AEDesc: {0}
exception.illegal_access_building_apple_evt= IllegalAccessException mientras se construÃa AppleEvent: {0}
-exception.instantiation_creating_aedesc = InstantiationException mientras se creaba AEDesc: {0}
exception.unable_to_launch_url = Imposible lanzar la URL: {0}
exception.unable_to_create_internet_config = Imposible crear una instancia de configuración de Internet: {0}
exception.invocation_target_calling_url = InvocationTargetException mientras se invocaba openURL: {0}
exception.das_source_doesnt_support_sequence_command = La fuente {0} no soporta el comando sequence.
exception.invalid_das_source = Fuente DAS no válida: {0}
exception.ebiembl_retrieval_failed_on = La recuperación de datos EBI EMBL XML ha fallado en {0}:{1}
-label.no_embl_record_found = # No se ha recuperado ningún registro EMBL de {0}:{1}
-label.embl_successfully_parsed = # Se han parseado con éxito las consultas {0} en un alineamiento
exception.no_pdb_records_for_chain = No se han encontrado registros {0} para la cadena {1}
exception.unexpected_handling_rnaml_translation_for_pdb = Excepcion inesperada cuando se traducÃan a RNAML los datos PDB
exception.couldnt_recover_sequence_properties_for_alignment = No es posible recuperar las propiedades de la secuencia para el alineamiento
label.add_jabaws_url = Añadir nueva JABAWS URL
label.news_from_jalview = Noticias de http://www.jalview.org
label.cut_paste_alignmen_file = Cortar & Pegar fichero de alineamiento
-label.enter_redundancy_thereshold = Introducir el umbral de redundancia
-label.select_dark_light_set_thereshold = <i>Seleccionar un color oscuro y un color claro para el texto y establecer el umbral en que<br>cambiar entre colores, basándose en el color de fondo</i>
+label.enter_redundancy_threshold = Introducir el umbral de redundancia
+label.select_dark_light_set_threshold = <i>Seleccionar un color oscuro y un color claro para el texto y establecer el umbral en que<br>cambiar entre colores, basándose en el color de fondo</i>
label.select_feature_colour = Seleccionar color de las caracterÃsticas
label.ignore_gaps_consensus = Ignorar huecos en el consenso
label.show_group_histogram = Mostrar histograma de grupo
info.invalid_msa_notenough=No suficientes datos de sequencia para alinear
label.result=resultado
label.results=resultados
-label.no_mappings=No hay mapeados encontrados
label.struct_from_pdb=Procesar la estructura secundaria PDB
label.hide_selected_annotations=Ocultar anotaciones seleccionados
info.select_annotation_row=Seleccionar Fila de Anotaciones
action.yes=SÃ
label.export_settings=Exportar Ajustes
label.linked_view_title=Vista vinculada de cDNA y proteÃna
-label.view_protein_structure=Ver Estructura Proteica
label.couldnt_read_data=No se pudo leer los datos
status.opening_file=abriendo fichero
label.except_selected_sequences=Todo excepto secuencias seleccionadas
action.export_features=Exportar CaracterÃsticas
error.invalid_regex=Expresión regular inválida
label.autoadd_temp=Añadir anotación factor de temperatura al alineamiento
-tooltip.rnalifold_settings=Modificar la configuración de la predicción RNAAlifold. Úselo para ocultar o mostrar resultados del cálculo de RNA, o cambiar parámetros de el plegado de RNA.
label.chimera_path_tip=Jalview intentará primero las rutas introducidas aquÃ, Y si no las rutas usuales de instalación
label.structure_chooser=Selector de Estructuras
label.structure_chooser_manual_association=Selector de Estructuras - asociación manual
label.show_pdbstruct_dialog=Datos de Estructura 3D...
label.hide_all=Ocultar todos
label.invert=Invertir
-label.pdb_sequence_getcher=Buscador de Secuencias PDB
tooltip.aacon_settings=Cambiar ajustes para cálculos AACon
-label.align=Alinear
label.mark_as_representative=Marcar como representativa
label.include_description=Incluir Descripción
label.for=para
label.protein=ProteÃna
warn.oneseq_msainput_selection=La selección actual sólo contiene una única secuencia. ¿Quieres enviar todas las secuencias para la alineación en su lugar?
label.use_rnaview=Usar RNAView para estructura secondaria
-label.opens_the_jabaws_server_homepage=Abre la página de inicio del servidor JABAWS en navegador
label.search_all=Introducir uno o más valores de búsqueda separados por punto y coma ";" (Nota: buscará en toda la base de datos PDB)
label.confirm_close_chimera=Cerrará la conexión de Jalview a {0}.<br>¿Quieres cerrar la ventana Chimera también?
tooltip.rnalifold_calculations=Se calcularán predicciones de estructura secondaria de RNA para el alineaminento, y se actualizarán si se efectuan cambios
-Calcular predicciónes de estructura secondaria para el alineamiento
+tooltip.rnalifold_settings=Modificar la configuración de la predicción RNAAlifold. Úselo para ocultar o mostrar resultados del cálculo de RNA, o cambiar parámetros de el plegado de RNA.
label.show_selected_annotations=Mostrar anotaciones seleccionadas
status.colouring_chimera=Coloreando Chimera
label.configure_displayed_columns=Configurar Columnas Mostradas
-exception.pdb_server_error=Error desde el servidor PDB
exception.resource_not_be_found=El recurso solicitado no se ha encontrado
label.aacon_calculations=cálculos AACon
label.pdb_web-service_error=Error de servicio web PDB
warn.delete_all=<html>Borrar todas las secuencias cerrará la ventana del alineamiento.<br>Confirmar o Cancelar.
label.select_all=Seleccionar Todos
label.alpha_helix=Hélice Alfa
-label.sequence_details_for=Detalles de secuencia para {0}
label.chimera_help=Ayuda para Chimera
label.find_tip=Buscar alineamiento, selección o IDs de secuencia para una subsecuencia (sin huecos)
-exception.pdb_server_unreachable=Jalview no puede conectar con el servidor PDBE Solr.\nPor favor, asegúrese de que está conectado a Internet y vuelva a intentarlo.
label.structure_viewer=Visualizador de estructura for defecto
label.embbed_biojson=Incrustar BioJSON al exportar HTML
label.transparency_tip=Ajustar la transparencia a "ver a través" los colores de las caracterÃsticas.
info.invalid_msa_input_mininfo=Necesita por lo menos dos secuencias con al menos 3 residuos cada una, sin regiones ocultas entre ellas.
label.chimera_missing=Visualizador de estructura Chimera no encontrado.<br/>Por favor, introduzca la ruta de Chimera,<br/>o descargar e instalar la UCSF Chimera.
label.save_as_biojs_html=Guardar como HTML BioJs
-exception.pdb_rest_service_no_longer_available=Servicios Rest PDB ya no están disponibles!
exception.fts_server_unreachable=Jalview no puede conectar con el servidor {0}. \nPor favor asegúrese de que está conectado a Internet y vuelva a intentarlo.
exception.outofmemory_loading_mmcif_file=Sin memoria al cargar el fichero mmCIF
label.hide_columns_not_containing=Ocultar las columnas que no contengan
status.obtaining_mapping_with_nw_alignment=Obteniendo mapeo por alineamiento Needleman y Wunsch
status.exporting_alignment_as_x_file = Exportando alineamiento como fichero tipo {0}
label.column = Columna
-label.sequence = Secuencia
label.cant_map_cds = No se pudo mapear CDS a proteÃna\nDatos CDS faltantes o incompletos
label.operation_failed = Operación fallada
import static jalview.io.gff.GffConstants.CLINICAL_SIGNIFICANCE;
-import jalview.api.DBRefEntryI;
import jalview.datamodel.AlignedCodon;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
* its dataset sequence to the dataset
*/
cdsSeq = makeCdsSequence(dnaSeq.getDatasetSequence(), aMapping);
+ // cdsSeq has a name constructed as CDS|<dbref>
+ // <dbref> will be either the accession for the coding sequence,
+ // marked in the /via/ dbref to the protein product accession
+ // or it will be the original nucleotide accession.
SequenceI cdsSeqDss = cdsSeq.createDatasetSequence();
cdsSeqs.add(cdsSeq);
if (!dataset.getSequences().contains(cdsSeqDss))
* same source and accession, so need a different accession for
* the CDS from the dna sequence
*/
- DBRefEntryI dnaRef = dnaDss.getSourceDBRef();
- if (dnaRef != null)
- {
- // assuming cds version same as dna ?!?
- DBRefEntry proteinToCdsRef = new DBRefEntry(dnaRef.getSource(),
- dnaRef.getVersion(), cdsSeq.getName());
- proteinToCdsRef.setMap(new Mapping(cdsSeqDss, cdsToProteinMap
- .getInverse()));
- proteinProduct.addDBRef(proteinToCdsRef);
- }
+ // specific use case:
+ // Genomic contig ENSCHR:1, contains coding regions for ENSG01,
+ // ENSG02, ENSG03, with transcripts and products similarly named.
+ // cannot add distinct dbrefs mapping location on ENSCHR:1 to ENSG01
+ // JBPNote: ?? can't actually create an example that demonstrates we
+ // need to
+ // synthesize an xref.
+ // TODO: merge conflicts from JAL-2154 branch and use PrimaryDBRefs()
+ // for (DBRefEntry primRef:dnaDss.getPrimaryDBRefs())
+ // {
+ // creates a complementary cross-reference to the source sequence's
+ // primary reference.
+
+ // // problem here is that the cross-reference is synthesized -
+ // cdsSeq.getName() may be like 'CDS|dnaaccession' or 'CDS|emblcdsacc'
+ // // assuming cds version same as dna ?!?
+ // DBRefEntry proteinToCdsRef = new DBRefEntry(dnaRef.getSource(),
+ // dnaRef.getVersion(), cdsSeq.getName());
+ // proteinToCdsRef.setMap(new Mapping(cdsSeqDss, cdsToProteinMap
+ // .getInverse()));
+ // proteinProduct.addDBRef(proteinToCdsRef);
+ // }
/*
* transfer any features on dna that overlap the CDS
/*
* and add a reverse DbRef with the inverse mapping
*/
- if (mapFrom.getDatasetSequence() != null
- && mapFrom.getDatasetSequence().getSourceDBRef() != null)
+ if (mapFrom.getDatasetSequence() != null && false)
+ // && mapFrom.getDatasetSequence().getSourceDBRef() != null)
{
- DBRefEntry dbref = new DBRefEntry(mapFrom.getDatasetSequence()
- .getSourceDBRef());
- dbref.setMap(new Mapping(mapFrom.getDatasetSequence(), mapping
- .getInverse()));
- mapTo.addDBRef(dbref);
+ // possible need to search primary references... except, why doesn't xref
+ // == getSourceDBRef ??
+ // DBRefEntry dbref = new DBRefEntry(mapFrom.getDatasetSequence()
+ // .getSourceDBRef());
+ // dbref.setMap(new Mapping(mapFrom.getDatasetSequence(), mapping
+ // .getInverse()));
+ // mapTo.addDBRef(dbref);
}
if (fromDna)
* @return
*/
public boolean updateFrom(DBRefEntryI otherEntry);
+
+ /**
+ * Method to distinguish between direct and indirect database references
+ *
+ * primary references indicate the local sequence data directly corresponds
+ * with the database record. All other references are secondary. direct
+ * references indicate that part or all of the local sequence data can be
+ * mapped with another sequence, enabling annotation transfer.
+ * cross-references indicate the local sequence data can be corresponded to
+ * some other linear coordinate system via a transformation.
+ *
+ * This method is also sufficient to distinguish direct DBRefEntry mappings
+ * from other relationships - e.g. coding relationships (imply a 1:3/3:1
+ * mapping), but not transcript relationships, which imply a (possibly
+ * non-contiguous) 1:1 mapping
+ *
+ * The only way a dbref's mappings can be fully verified is via the local
+ * sequence frame, so rather than use isPrimary directly, please use
+ * SequenceI.getPrimaryDbRefs()
+ *
+ * @return true if this reference provides a primary accession for the
+ * associated sequence object
+ */
+ public boolean isPrimary();
}
"label.represent_group_with", new Object[] { "" }));
revealAll.setLabel(MessageManager.getString("action.reveal_all"));
revealSeq.setLabel(MessageManager.getString("action.reveal_sequences"));
- menu1.setLabel(MessageManager.getString("label.group") + ":");
+ menu1.setLabel(MessageManager.getString("label.group:"));
add(groupMenu);
this.add(seqMenu);
this.add(hideSeqs);
nucleotideColour.setLabel(MessageManager.getString("label.nucleotide"));
nucleotideColour.addActionListener(this);
modifyPID.setLabel(MessageManager
- .getString("label.modify_identity_thereshold"));
+ .getString("label.modify_identity_threshold"));
modifyPID.addActionListener(this);
modifyConservation.setLabel(MessageManager
- .getString("label.modify_conservation_thereshold"));
+ .getString("label.modify_conservation_threshold"));
modifyConservation.addActionListener(this);
annotationColour.setLabel(MessageManager
.getString("action.by_annotation"));
}
threshold.addItem(MessageManager
- .getString("label.threshold_feature_no_thereshold"));
+ .getString("label.threshold_feature_no_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_above_thereshold"));
+ .getString("label.threshold_feature_above_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_below_thereshold"));
+ .getString("label.threshold_feature_below_threshold"));
if (oldcs instanceof AnnotationColourGradient)
{
default:
throw new Error(
MessageManager
- .getString("error.implementation_error_dont_know_thereshold_annotationcolourgradient"));
+ .getString("error.implementation_error_dont_know_threshold_annotationcolourgradient"));
}
thresholdIsMin.setState(acg.thresholdIsMinMax);
thresholdValue.setText("" + acg.getAnnotationThreshold());
protected void populateThresholdComboBox(Choice threshold)
{
threshold.addItem(MessageManager
- .getString("label.threshold_feature_no_thereshold"));
+ .getString("label.threshold_feature_no_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_above_thereshold"));
+ .getString("label.threshold_feature_above_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_below_thereshold"));
+ .getString("label.threshold_feature_below_threshold"));
}
public jalview.datamodel.AlignmentAnnotation getCurrentAnnotation()
jPanel4.setBackground(Color.white);
threshold.addItemListener(this);
threshold.addItem(MessageManager
- .getString("label.threshold_feature_no_thereshold"));
+ .getString("label.threshold_feature_no_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_above_thereshold"));
+ .getString("label.threshold_feature_above_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_below_thereshold"));
+ .getString("label.threshold_feature_below_threshold"));
thresholdValue.addActionListener(this);
slider.setBackground(Color.white);
slider.setEnabled(false);
tmp = new Panel();
panel.add(tmp);
- tmp.add(new Label("Name: ", Label.RIGHT));
+ tmp.add(new Label(MessageManager.getString("label.name:"), Label.RIGHT));
tmp.add(name);
tmp = new Panel();
panel.add(tmp);
- tmp.add(new Label("Group: ", Label.RIGHT));
+ tmp.add(new Label(MessageManager.getString("label.group:"), Label.RIGHT));
tmp.add(source);
tmp = new Panel();
panel.add(tmp);
- tmp.add(new Label("Colour: ", Label.RIGHT));
+ tmp.add(new Label(MessageManager.getString("label.colour"), Label.RIGHT));
tmp.add(colourPanel);
bigPanel.add(panel, BorderLayout.NORTH);
panel = new Panel();
- panel.add(new Label("Description: ", Label.RIGHT));
+ panel.add(new Label(MessageManager.getString("label.description:"),
+ Label.RIGHT));
panel.add(new ScrollPane().add(description));
if (!newFeatures)
bigPanel.add(panel, BorderLayout.SOUTH);
panel = new Panel();
- panel.add(new Label(" Start:", Label.RIGHT));
+ panel.add(new Label(MessageManager.getString("label.start"),
+ Label.RIGHT));
panel.add(start);
- panel.add(new Label(" End:", Label.RIGHT));
+ panel.add(new Label(MessageManager.getString("label.end"),
+ Label.RIGHT));
panel.add(end);
bigPanel.add(panel, BorderLayout.CENTER);
}
// Fill the selected columns
ColumnSelection cs = av.getColumnSelection();
- gg.setColor(new Color(220, 0, 0));
int avCharWidth = av.getCharWidth();
int avcharHeight = av.getCharHeight();
- for (int sel : cs.getSelected())
+ if (cs != null)
{
- // TODO: JAL-2001 - provide a fast method to list visible selected in a
- // given range
- if (av.hasHiddenColumns())
+ gg.setColor(new Color(220, 0, 0));
+ boolean hasHiddenColumns = cs.hasHiddenColumns();
+ for (int sel : cs.getSelected())
{
- sel = av.getColumnSelection().findColumnPosition(sel);
- }
+ // TODO: JAL-2001 - provide a fast method to list visible selected in a
+ // given range
+ if (hasHiddenColumns)
+ {
+ if (cs.isVisible(sel))
+ {
+ sel = cs.findColumnPosition(sel);
+ }
+ else
+ {
+ continue;
+ }
+ }
- if ((sel >= startx) && (sel <= endx))
- {
- gg.fillRect((sel - startx) * avCharWidth, 0, avCharWidth,
- getSize().height);
+ if ((sel >= startx) && (sel <= endx))
+ {
+ gg.fillRect((sel - startx) * avCharWidth, 0, avCharWidth,
+ getSize().height);
+ }
}
}
if (av.getShowHiddenMarkers())
{
int widthx = 1 + endx - startx;
- for (int i = 0; i < av.getColumnSelection().getHiddenColumns()
- .size(); i++)
+ for (int i = 0; i < cs.getHiddenColumns().size(); i++)
{
- res = av.getColumnSelection().findHiddenRegionPosition(i)
- - startx;
+ res = cs.findHiddenRegionPosition(i) - startx;
if (res < 0 || res > widthx)
{
pid.cs = cs;
}
PIDSlider.setTitle(MessageManager
- .formatMessage("label.percentage_identity_thereshold",
+ .formatMessage("label.percentage_identity_threshold",
new String[] { source }));
if (ap.av.getAlignment().getGroups() != null)
avcg.setStatus(MessageManager.formatMessage(
"label.view_controller_toggled_marked",
new String[] {
- MessageManager.getString(toggle ? "label.toggled"
- : "label.marked"),
+ toggle ? MessageManager.getString("label.toggled")
+ : MessageManager.getString("label.marked"),
String.valueOf(columnCount),
- MessageManager
- .getString(invert ? "label.not_containing"
- : "label.containing"), featureType,
- Integer.valueOf(nseq).toString() }));
+ invert ? MessageManager
+ .getString("label.not_containing")
+ : MessageManager.getString("label.containing"),
+ featureType, Integer.valueOf(nseq).toString() }));
return true;
}
}
if (!seqcigararray.isSeqCigarArray())
{
throw new Error(
- MessageManager
- .getString("error.implementation_error_can_only_make_alignmnet_from_cigararray"));
+ "Implementation Error - can only make an alignment view from a CigarArray of sequences.");
}
// contigs = seqcigararray.applyDeletions();
contigs = seqcigararray.getDeletedRegions();
import jalview.api.DBRefEntryI;
+import java.util.Arrays;
+
public class DBRefEntry implements DBRefEntryI
{
String source = "", version = "", accessionId = "";
+
/**
* maps from associated sequence to the database sequence's coordinate system
*/
}
-
public DBRefEntry(String source, String version, String accessionId)
{
this(source, version, accessionId, null);
String otherAccession = other.getAccessionId();
if ((accessionId == null && otherAccession != null)
|| (accessionId != null && otherAccession == null)
- || (accessionId != null && !accessionId.equalsIgnoreCase(otherAccession)))
+ || (accessionId != null && !accessionId
+ .equalsIgnoreCase(otherAccession)))
{
return false;
}
* otherwise the versions have to match
*/
String otherVersion = other.getVersion();
-
+
if ((version == null || version.equals("0") || version.endsWith(":0"))
&& otherVersion != null)
{
return accessionId;
}
-
@Override
public void setAccessionId(String accessionId)
{
this.accessionId = accessionId;
}
-
@Override
public void setSource(String source)
{
this.source = source;
}
-
@Override
public void setVersion(String version)
{
this.version = version;
}
-
@Override
public Mapping getMap()
{
{
return getSrcAccString();
}
+
+ @Override
+ public boolean isPrimary()
+ {
+ /*
+ * if a map is present, unless it is 1:1 and has no SequenceI mate, it cannot be a primary reference.
+ */
+ if (map != null)
+ {
+ if (map.getTo() != null)
+ {
+ return false;
+ }
+ if (map.getMap().getFromRatio() != map.getMap().getToRatio()
+ || map.getMap().getFromRatio() != 1)
+ {
+ return false;
+ }
+ // check map is really 1:1, no shifts allowed.
+ if (map.getMap().getFromHighest() != map.getMap().getToHighest()
+ && map.getMap().getFromLowest() != map.getMap().getToLowest()
+ && !Arrays.equals(
+ map.getMap().getFromRanges().toArray(new int[0][]),
+ map.getMap().getToRanges().toArray(new int[0][])))
+ {
+ return false;
+ }
+ }
+ if (version == null)
+ {
+ // no version string implies the reference has not been verified at all.
+ return false;
+ }
+ // tricky - this test really needs to search the sequence's set of dbrefs to
+ // see if there is a primary reference that derived this reference.
+ String ucv = version.toUpperCase();
+ for (String primsrc : Arrays.asList(DBRefSource.allSources()))
+ {
+ if (ucv.startsWith(primsrc.toUpperCase()))
+ {
+ // by convention, many secondary references inherit the primary
+ // reference's
+ // source string as a prefix for any version information from the
+ // secondary reference.
+ return false;
+ }
+ }
+ return true;
+ }
}
*/
package jalview.datamodel;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* Defines internal constants for unambiguous annotation of DbRefEntry source
* strings and describing the data retrieved from external database sources (see
/**
* UNIPROT Accession Number
*/
- public static String UNIPROT = "UNIPROT";
+ public static final String UNIPROT = "UNIPROT";
/**
* UNIPROT Entry Name
*/
- public static String UP_NAME = "UNIPROT_NAME".toUpperCase();
+ public static final String UP_NAME = "UNIPROT_NAME".toUpperCase();
/**
* Uniprot Knowledgebase/TrEMBL as served from EMBL protein products.
/**
* PDB Entry Code
*/
- public static String PDB = "PDB";
+ public static final String PDB = "PDB";
/**
* EMBL ID
*/
- public static String EMBL = "EMBL";
+ public static final String EMBL = "EMBL";
/**
* EMBLCDS ID
*/
- public static String EMBLCDS = "EMBLCDS";
+ public static final String EMBLCDS = "EMBLCDS";
/**
* PFAM ID
*/
- public static String PFAM = "PFAM";
+ public static final String PFAM = "PFAM";
/**
* RFAM ID
*/
- public static String RFAM = "RFAM";
+ public static final String RFAM = "RFAM";
/**
* GeneDB ID
public static final String[] PROTEINDBS = { UNIPROT, PDB, UNIPROTKB,
EMBLCDSProduct, ENSEMBL }; // Ensembl ENSP* entries are protein
+
+ public static String[] allSources()
+ {
+ List<String> src = new ArrayList<String>();
+ for (Field f : DBRefSource.class.getFields())
+ {
+ if (String.class.equals(f.getType()))
+ {
+ try
+ {
+ src.add((String) f.get(null));
+ } catch (Exception x)
+ {
+ x.printStackTrace();
+ }
+ }
+ }
+ return src.toArray(new String[0]);
+ }
}
import jalview.analysis.AlignSeq;
import jalview.api.DBRefEntryI;
+import jalview.util.DBRefUtils;
+import jalview.util.MapList;
import jalview.util.StringUtils;
import java.util.ArrayList;
seq.getEnd());
}
description = seq.getDescription();
- sourceDBRef = seq.getSourceDBRef() == null ? null : new DBRefEntry(
- seq.getSourceDBRef());
if (seq != datasetSequence)
{
setDatasetSequence(seq.getDatasetSequence());
@Override
public PDBEntry getPDBEntry(String pdbIdStr)
{
- if (getDatasetSequence() == null
- || getDatasetSequence().getAllPDBEntries() == null)
+ if (getDatasetSequence() != null)
+ {
+ return getDatasetSequence().getPDBEntry(pdbIdStr);
+ }
+ if (pdbIds == null)
{
return null;
}
- List<PDBEntry> entries = getDatasetSequence().getAllPDBEntries();
+ List<PDBEntry> entries = getAllPDBEntries();
for (PDBEntry entry : entries)
{
if (entry.getId().equalsIgnoreCase(pdbIdStr))
return null;
}
- @Override
- public void setSourceDBRef(DBRefEntryI dbRef)
- {
- this.sourceDBRef = dbRef;
- }
@Override
- public DBRefEntryI getSourceDBRef()
+ public List<DBRefEntry> getPrimaryDBRefs()
{
- return this.sourceDBRef;
+ if (datasetSequence!=null)
+ {
+ return datasetSequence.getPrimaryDBRefs();
+ }
+ if (dbrefs==null || dbrefs.length==0)
+ {
+ return Arrays.asList(new DBRefEntry[0]);
+ }
+ synchronized (dbrefs)
+ {
+ List<DBRefEntry> primaries = new ArrayList<DBRefEntry>();
+ DBRefEntry tmp[] = new DBRefEntry[1], res[] = null;
+ for (DBRefEntry ref : dbrefs)
+ {
+ if (!ref.isPrimary())
+ {
+ continue;
+ }
+ if (ref.hasMap())
+ {
+ MapList mp = ref.getMap().getMap();
+ if (mp.getFromLowest() > start || mp.getFromHighest() < end)
+ {
+ // map only involves a subsequence, so cannot be primary
+ continue;
+ }
+ }
+ // whilst it looks like it is a primary ref, we also sanity check type
+ if (DBRefUtils.getCanonicalName(DBRefSource.PDB).equals(
+ DBRefUtils.getCanonicalName(ref.getSource())))
+ {
+ // PDB dbrefs imply there should be a PDBEntry associated
+ if (getPDBEntry(ref.getAccessionId()) != null)
+ {
+ primaries.add(ref);
+ }
+ continue;
+ }
+ // check standard protein or dna sources
+ tmp[0] = ref;
+ res = DBRefUtils.selectDbRefs(!isProtein(), tmp);
+ if (res != null && res[0] == tmp[0])
+ {
+ primaries.add(ref);
+ continue;
+ }
+ }
+ return primaries;
+ }
}
}
*/
package jalview.datamodel;
-import jalview.api.DBRefEntryI;
-
import java.util.List;
import java.util.Vector;
*/
public PDBEntry getPDBEntry(String pdbId);
- /**
- * Set the distinct source database, and accession number from which a
- * sequence and its start-end data were derived from. This is very important
- * for SIFTS mappings and must be set prior to performing SIFTS mapping.
- *
- * @param dbRef
- * the source dbRef for the sequence
- */
- public void setSourceDBRef(DBRefEntryI dbRef);
/**
- * Get the distinct source database, and accession number from which a
- * sequence and its start-end data were derived from.
+ * Get all primary database/accessions for this sequence's data. These
+ * DBRefEntry are expected to resolve to a valid record in the associated
+ * external database, either directly or via a provided 1:1 Mapping.
*
- * @return
+ * @return just the primary references (if any) for this sequence, or an empty
+ * list
*/
- public DBRefEntryI getSourceDBRef();
+ public List<DBRefEntry> getPrimaryDBRefs();
}
DBRefEntry retrievedref = new DBRefEntry(sourceDb,
getSequenceVersion(), accession);
dna.addDBRef(retrievedref);
- dna.setSourceDBRef(retrievedref);
// add map to indicate the sequence is a valid coordinate frame for the
// dbref
retrievedref.setMap(new Mapping(null, new int[] { 1, dna.getLength() },
dnaToProteinMapping.setTo(proteinSeq);
dnaToProteinMapping.setMappedFromId(proteinId);
proteinSeq.addDBRef(proteinDbRef);
- proteinSeq.setSourceDBRef(proteinDbRef);
ref.setMap(dnaToProteinMapping);
}
hasUniprotDbref = true;
DBRefSource.EMBLCDSProduct, getSequenceVersion(), proteinId);
}
product.addDBRef(proteinToEmblProteinRef);
- product.setSourceDBRef(proteinToEmblProteinRef);
if (dnaToProteinMapping != null
&& dnaToProteinMapping.getTo() != null)
{
// clunky: ensure Uniprot xref if we have one is on mapped sequence
SequenceI ds = proteinSeq.getDatasetSequence();
- ds.setSourceDBRef(proteinSeq.getSourceDBRef());
-
+ // TODO: Verify ensp primary ref is on proteinSeq.getDatasetSequence()
Mapping map = new Mapping(ds, mapList);
DBRefEntry dbr = new DBRefEntry(getDbSource(),
getEnsemblDataVersion(), proteinSeq.getName(), map);
DBRefEntry self = new DBRefEntry(getDbSource(),
getEnsemblDataVersion(), seq.getName());
seq.addDBRef(self);
- seq.setSourceDBRef(self);
}
/**
{
DBRefEntry dbref = DBRefUtils.parseToDbRef(sq, getDbSource(),
getEnsemblDataVersion(), name);
- sq.setSourceDBRef(dbref);
+ sq.addDBRef(dbref);
}
}
if (alignment == null)
showGroupConservation.setEnabled(!nucleotide);
rnahelicesColour.setEnabled(nucleotide);
purinePyrimidineColour.setEnabled(nucleotide);
- showComplementMenuItem.setText(MessageManager
- .getString(nucleotide ? "label.protein" : "label.nucleotide"));
+ showComplementMenuItem.setText(nucleotide ? MessageManager
+ .getString("label.protein") : MessageManager
+ .getString("label.nucleotide"));
setColourSelected(jalview.bin.Cache.getDefault(
nucleotide ? Preferences.DEFAULT_COLOUR_NUC
: Preferences.DEFAULT_COLOUR_PROT, "None"));
}
/**
- * Set or clear 'Show Sequence Features'
- *
- * @param evt
- * DOCUMENT ME!
- */
- @Override
- public void showSeqFeaturesHeight_actionPerformed(ActionEvent evt)
- {
- viewport.setShowSequenceFeaturesHeight(showSeqFeaturesHeight
- .isSelected());
- if (viewport.isShowSequenceFeaturesHeight())
- {
- // ensure we're actually displaying features
- viewport.setShowSequenceFeatures(true);
- showSeqFeatures.setSelected(true);
- }
- alignPanel.paintAlignment(true);
- if (alignPanel.getOverviewPanel() != null)
- {
- alignPanel.getOverviewPanel().updateOverviewImage();
- }
- }
-
- /**
* Action on toggle of the 'Show annotations' menu item. This shows or hides
* the annotations panel as a whole.
*
// object broker mechanism.
final Vector<JMenu> wsmenu = new Vector<JMenu>();
final IProgressIndicator af = me;
+
+ /*
+ * do not i18n these strings - they are hard-coded in class
+ * compbio.data.msa.Category, Jws2Discoverer.isRecalculable() and
+ * SequenceAnnotationWSClient.initSequenceAnnotationWSClient()
+ */
final JMenu msawsmenu = new JMenu("Alignment");
final JMenu secstrmenu = new JMenu(
"Secondary Structure Prediction");
final JMenu seqsrchmenu = new JMenu("Sequence Database Search");
final JMenu analymenu = new JMenu("Analysis");
final JMenu dismenu = new JMenu("Protein Disorder");
- // final JMenu msawsmenu = new
- // JMenu(MessageManager.getString("label.alignment"));
- // final JMenu secstrmenu = new
- // JMenu(MessageManager.getString("label.secondary_structure_prediction"));
- // final JMenu seqsrchmenu = new
- // JMenu(MessageManager.getString("label.sequence_database_search"));
- // final JMenu analymenu = new
- // JMenu(MessageManager.getString("label.analysis"));
- // final JMenu dismenu = new
- // JMenu(MessageManager.getString("label.protein_disorder"));
// JAL-940 - only show secondary structure prediction services from
// the legacy server
if (// Cache.getDefault("SHOW_JWS1_SERVICES", true)
/**
* DOCUMENT ME!
*
- * @return DOCUMENT ME!
- */
- @Override
- public ColumnSelection getColumnSelection()
- {
- return colSel;
- }
-
- /**
- * DOCUMENT ME!
- *
* @param tree
* DOCUMENT ME!
*/
default:
throw new Error(
MessageManager
- .getString("error.implementation_error_dont_know_about_thereshold_setting"));
+ .getString("error.implementation_error_dont_know_about_threshold_setting"));
}
thresholdIsMin.setSelected(acg.thresholdIsMinMax);
thresholdValue.setText("" + acg.getAnnotationThreshold());
protected void populateThresholdComboBox(JComboBox<String> threshold)
{
threshold.addItem(MessageManager
- .getString("label.threshold_feature_no_thereshold"));
+ .getString("label.threshold_feature_no_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_above_thereshold"));
+ .getString("label.threshold_feature_above_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_below_thereshold"));
+ .getString("label.threshold_feature_below_threshold"));
}
protected void seqAssociated_actionPerformed(ActionEvent arg0,
{
newFrame.hideFeatureColumns(SequenceOntologyI.EXON, false);
}
- String newtitle = String.format("%s %s %s", MessageManager
- .getString(dna ? "label.proteins" : "label.nucleotides"),
+ String newtitle = String.format("%s %s %s",
+ dna ? MessageManager.getString("label.proteins")
+ : MessageManager.getString("label.nucleotides"),
MessageManager.getString("label.for"), alignFrame.getTitle());
newFrame.setTitle(newtitle);
seqs.setSelected(seqsrc);
JPanel panel = new JPanel(new BorderLayout());
JPanel pane12 = new JPanel(new BorderLayout());
- pane12.add(new JLabel(MessageManager.getString("label.name")),
+ pane12.add(new JLabel(MessageManager.getString("label.name:")),
BorderLayout.CENTER);
pane12.add(nametf, BorderLayout.EAST);
panel.add(pane12, BorderLayout.NORTH);
threshold.setToolTipText(MessageManager
.getString("label.threshold_feature_display_by_score"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_no_thereshold")); // index 0
+ .getString("label.threshold_feature_no_threshold")); // index 0
threshold.addItem(MessageManager
- .getString("label.threshold_feature_above_thereshold")); // index 1
+ .getString("label.threshold_feature_above_threshold")); // index 1
threshold.addItem(MessageManager
- .getString("label.threshold_feature_below_thereshold")); // index 2
+ .getString("label.threshold_feature_below_threshold")); // index 2
jPanel3.setLayout(flowLayout2);
thresholdValue.addActionListener(new ActionListener()
{
slider.setOpaque(false);
slider.setPreferredSize(new Dimension(100, 32));
slider.setToolTipText(MessageManager
- .getString("label.adjust_thereshold"));
+ .getString("label.adjust_threshold"));
thresholdValue.setEnabled(false);
thresholdValue.setColumns(7);
jPanel3.setBackground(Color.white);
{
panel = new JPanel(new GridLayout(4, 1));
tmp = new JPanel();
- tmp.add(new JLabel(MessageManager.getString("label.select_feature")));
+ tmp.add(new JLabel(MessageManager.getString("label.select_feature")
+ + ":"));
overlaps = new JComboBox();
for (int i = 0; i < features.length; i++)
{
tmp = new JPanel();
panel.add(tmp);
- tmp.add(new JLabel(MessageManager.getString("label.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(MessageManager.getString("label.group") + ":",
+ tmp.add(new JLabel(MessageManager.getString("label.group:"),
JLabel.RIGHT));
tmp.add(source);
bigPanel.add(panel, BorderLayout.NORTH);
panel = new JPanel();
- panel.add(new JLabel(MessageManager.getString("label.description"),
+ panel.add(new JLabel(MessageManager.getString("label.description:"),
JLabel.RIGHT));
description.setFont(JvSwingUtils.getTextAreaFont());
description.setLineWrap(true);
init = false;
}
+ @Override
public void smoothFont_actionPerformed(ActionEvent e)
{
ap.av.antiAlias = smoothFont.isSelected();
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void ok_actionPerformed(ActionEvent e)
{
try
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void cancel_actionPerformed(ActionEvent e)
{
if (ap != null)
double iw = iBounds.getWidth();
if (mw < 1 || iw < 1)
{
- final String messageKey = iBounds.getHeight() < 1 ? "label.font_doesnt_have_letters_defined"
- : "label.font_too_small";
- JOptionPane.showInternalMessageDialog(this,
- MessageManager.getString(messageKey),
+ String message = iBounds.getHeight() < 1 ? MessageManager
+ .getString("label.font_doesnt_have_letters_defined")
+ : MessageManager.getString("label.font_too_small");
+ JOptionPane.showInternalMessageDialog(this, message,
MessageManager.getString("label.invalid_font"),
JOptionPane.WARNING_MESSAGE);
/*
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void fontName_actionPerformed(ActionEvent e)
{
if (init)
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void fontSize_actionPerformed(ActionEvent e)
{
if (init)
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void fontStyle_actionPerformed(ActionEvent e)
{
if (init)
*
* @param e
*/
+ @Override
public void defaultButton_actionPerformed(ActionEvent e)
{
Cache.setProperty("FONT_NAME", fontName.getSelectedItem().toString());
{
// create an entry for this score matrix for use in PCA
JCheckBoxMenuItem jm = new JCheckBoxMenuItem();
- jm.setText(MessageManager
- .getStringOrReturn("label.score_model", sm));
+ jm.setText(MessageManager.getStringOrReturn("label.score_model_",
+ sm));
jm.setSelected(pcaModel.getScore_matrix().equals(sm));
if ((ResidueProperties.scoreMatrices.get(sm).isDNA() && ResidueProperties.scoreMatrices
.get(sm).isProtein())
if (sg != null && sg.getSize() > 0)
{
- groupName.setText(MessageManager.formatMessage("label.name_param",
- new Object[] { sg.getName() }));
groupName.setText(MessageManager
.getString("label.edit_name_and_description_current_group"));
*/
private void jbInit() throws Exception
{
- groupMenu.setText(MessageManager.getString("label.group"));
groupMenu.setText(MessageManager.getString("label.selection"));
groupName.setText(MessageManager.getString("label.name"));
groupName.addActionListener(new java.awt.event.ActionListener()
progress = null;
label.setText(MessageManager
- .getString("label.enter_redundancy_thereshold"));
+ .getString("label.enter_redundancy_threshold"));
slider.setVisible(true);
applyButton.setEnabled(true);
valueField.setVisible(true);
}
PIDSlider.setTitle(MessageManager
- .formatMessage("label.percentage_identity_thereshold",
+ .formatMessage("label.percentage_identity_threshold",
new String[] { source }));
if (ap.av.getAlignment().getGroups() != null)
ArrayList<SequenceI> seqsWithoutSourceDBRef = new ArrayList<SequenceI>();
for (SequenceI seq : sequences)
{
- if (seq.getSourceDBRef() == null && seq.getDBRefs() == null)
+ if (seq.getPrimaryDBRefs().size() == 0)
{
seqsWithoutSourceDBRef.add(seq);
continue;
new JLabel(
"<html>"
+ MessageManager
- .getString("label.select_dark_light_set_thereshold")
+ .getString("label.select_dark_light_set_threshold")
+ "</html>"), BorderLayout.NORTH);
panel.add(col1);
panel.add(slider);
ap,
bigpanel,
MessageManager
- .getString("label.adjunst_foreground_text_colour_thereshold"),
+ .getString("label.adjunst_foreground_text_colour_threshold"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE, null, null, null);
super(source);
}
+ @Override
public void initData()
{
super.initData();
* @throws IOException
* If there is an error with the input file
*/
+ @Override
public void parse() throws IOException
{
StringBuffer treeString = new StringBuffer();
}
else
{
- // throw new IOException(MessageManager.formatMessage(
- // "exception.error_parsing_line", new String[] { line }));
+ // throw new IOException("Error parsing " + line);
System.err.println(">> missing annotation: " + line);
}
}
return seq;
}
+ @Override
public String print()
{
out = new StringBuffer();
DBRefEntry sourceDBRef = new DBRefEntry();
sourceDBRef.setAccessionId(getId());
sourceDBRef.setSource(DBRefSource.PDB);
- pdbSequence.setSourceDBRef(sourceDBRef);
+ // TODO: specify version for 'PDB' database ref if it is read from a file.
+ // TODO: decide if jalview.io should be creating primary refs!
+ sourceDBRef.setVersion("");
pdbSequence.addPDBId(entry);
pdbSequence.addDBRef(sourceDBRef);
SequenceI chainseq = pdbSequence;
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem();
-
JMenuItem copy = new JMenuItem();
JMenuItem cut = new JMenuItem();
});
JMenuItem modifyPID = new JMenuItem(
- MessageManager.getString("label.modify_identity_thereshold"));
+ MessageManager.getString("label.modify_identity_threshold"));
modifyPID.addActionListener(new ActionListener()
{
@Override
}
});
modifyConservation.setText(MessageManager
- .getString("label.modify_conservation_thereshold"));
+ .getString("label.modify_conservation_threshold"));
modifyConservation.addActionListener(new ActionListener()
{
@Override
}
- protected void showSeqFeaturesHeight_actionPerformed(
- ActionEvent actionEvent)
- {
- // TODO Auto-generated method stub
-
- }
-
protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
*/
public class ScaleRenderer
{
- public class ScaleMark
+ public final class ScaleMark
{
public final boolean major;
}
ArrayList<StructureMapping> seqToStrucMapping = new ArrayList<StructureMapping>();
- if (isMapUsingSIFTs)
+ if (isMapUsingSIFTs && seq.isProtein())
{
setProgressBar(null);
setProgressBar(MessageManager
return "cif".equalsIgnoreCase(fileExt);
}
+ /**
+ * retrieve a mapping for seq from SIFTs using associated DBRefEntry for
+ * uniprot or PDB
+ *
+ * @param seq
+ * @param pdbFile
+ * @param targetChainId
+ * @param pdb
+ * @param maxChain
+ * @param sqmpping
+ * @param maxAlignseq
+ * @return
+ * @throws SiftsException
+ */
private StructureMapping getStructureMapping(SequenceI seq,
String pdbFile, String targetChainId, StructureFile pdb,
PDBChain maxChain, jalview.datamodel.Mapping sqmpping,
final int sequenceStart = sequence.getStart();
if (absStart == -1)
{
- // Is local sequence contained in dataset sequence?
+ // couldn't find local sequence in sequence from database, so check if
+ // the database sequence is a subsequence of local sequence
absStart = nonGapped.indexOf(entrySeq);
if (absStart == -1)
- { // verification failed.
+ {
+ // verification failed. couldn't find any relationship between
+ // entrySeq and local sequence
messages.append(sequence.getName()
+ " SEQUENCE NOT %100 MATCH \n");
continue;
}
+ /*
+ * found match for the whole of the database sequence within the local
+ * sequence's reference frame.
+ */
transferred = true;
sbuffer.append(sequence.getName() + " HAS " + absStart
+ " PREFIXED RESIDUES COMPARED TO " + dbSource + "\n");
- //
- // + " - ANY SEQUENCE FEATURES"
- // + " HAVE BEEN ADJUSTED ACCORDINGLY \n");
- // absStart = 0;
- // create valid mapping between matching region of local sequence and
- // the mapped sequence
+
+ /*
+ * So create a mapping to the external entry from the matching region of
+ * the local sequence, and leave local start/end untouched.
+ */
mp = new Mapping(null, new int[] { sequenceStart + absStart,
sequenceStart + absStart + entrySeq.length() - 1 }, new int[]
{ entry.getStart(), entry.getStart() + entrySeq.length() - 1 },
1, 1);
- updateRefFrame = false; // mapping is based on current start/end so
- // don't modify start and end
+ updateRefFrame = false;
}
else
{
+ /*
+ * found a match for the local sequence within sequence from
+ * the external database
+ */
transferred = true;
+
// update start and end of local sequence to place it in entry's
// reference frame.
// apply identity map map from whole of local sequence to matching
// absStart+sequence.getStart()+entrySeq.length()-1},
// new int[] { entry.getStart(), entry.getEnd() }, 1, 1);
// relocate local features for updated start
+
if (updateRefFrame)
{
if (sequence.getSequenceFeatures() != null)
{
+ /*
+ * relocate existing sequence features by offset
+ */
SequenceFeature[] sf = sequence.getSequenceFeatures();
int start = sequenceStart;
int end = sequence.getEnd();
System.out.println("Adding dbrefs to " + sequence.getName()
+ " from " + dbSource + " sequence : " + entry.getName());
sequence.transferAnnotation(entry, mp);
- // unknownSequences.remove(sequence);
+
absStart += entry.getStart();
int absEnd = absStart + nonGapped.length() - 1;
if (!trimDatasetSeqs)
import jalview.ws.dbsources.Pdb;
import jalview.ws.dbsources.PfamFull;
import jalview.ws.dbsources.PfamSeed;
-import jalview.ws.dbsources.RfamFull;
import jalview.ws.dbsources.RfamSeed;
import jalview.ws.dbsources.Uniprot;
-import jalview.ws.dbsources.UniprotName;
import jalview.ws.dbsources.das.api.jalviewSourceI;
import jalview.ws.seqfetcher.ASequenceFetcher;
import jalview.ws.seqfetcher.DbSourceProxy;
addDBRefSourceImpl(EmblSource.class);
addDBRefSourceImpl(EmblCdsSource.class);
addDBRefSourceImpl(Uniprot.class);
- addDBRefSourceImpl(UniprotName.class);
addDBRefSourceImpl(Pdb.class);
addDBRefSourceImpl(PfamFull.class);
addDBRefSourceImpl(PfamSeed.class);
addDBRefSourceImpl(RfamSeed.class);
+
if (addDas)
{
registerDasSequenceSources();
{
DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion,
accessionId);
+
+ // mark dbRef as a primary reference for this sequence
dbRefs.add(dbRef);
}
- sequence.setSourceDBRef((dbRefs != null && dbRefs.size() > 0) ? dbRefs
- .get(0) : null);
Vector<PDBEntry> onlyPdbEntries = new Vector<PDBEntry>();
for (PDBEntry pdb : entry.getDbReference())
public DBRefEntryI getValidSourceDBRef(SequenceI seq)
throws SiftsException
{
- DBRefEntryI sourceDBRef = null;
- sourceDBRef = seq.getSourceDBRef();
- if (sourceDBRef != null && isValidDBRefEntry(sourceDBRef))
+ DBRefEntry[] dbRefs = seq.getDBRefs();
+ if (dbRefs == null || dbRefs.length < 1)
{
- return sourceDBRef;
+ throw new SiftsException(
+ "Source DBRef could not be determined. DBRefs might not have been retrieved.");
}
- else
+
+ for (DBRefEntryI dbRef : dbRefs)
{
- DBRefEntry[] dbRefs = seq.getDBRefs();
- if (dbRefs == null || dbRefs.length < 1)
+ if (dbRef == null || dbRef.getAccessionId() == null
+ || dbRef.getSource() == null)
{
- throw new SiftsException(
- "Source DBRef could not be determined. DBRefs might not have been retrieved.");
+ continue;
}
-
- for (DBRefEntryI dbRef : dbRefs)
+ if (isValidDBRefEntry(dbRef)
+ && dbRef.isPrimary()
+ && (dbRef.getSource().equalsIgnoreCase(DBRefSource.UNIPROT) || dbRef
+ .getSource().equalsIgnoreCase(DBRefSource.PDB)))
{
- if (dbRef == null || dbRef.getAccessionId() == null
- || dbRef.getSource() == null)
- {
- continue;
- }
- if (isFoundInSiftsEntry(dbRef.getAccessionId())
- && (dbRef.getSource().equalsIgnoreCase(DBRefSource.UNIPROT) || dbRef
- .getSource().equalsIgnoreCase(DBRefSource.PDB)))
- {
- seq.setSourceDBRef(dbRef);
- return dbRef;
- }
+ return dbRef;
}
}
- if (sourceDBRef != null && isValidDBRefEntry(sourceDBRef))
- {
- return sourceDBRef;
- }
throw new SiftsException("Could not get source DB Ref");
}
String originalSeq = AlignSeq.extractGaps(
jalview.util.Comparison.GapChars, seq.getSequenceAsString());
HashMap<Integer, int[]> mapping = new HashMap<Integer, int[]>();
- DBRefEntryI sourceDBRef = seq.getSourceDBRef();
+ DBRefEntryI sourceDBRef;
sourceDBRef = getValidSourceDBRef(seq);
// TODO ensure sequence start/end is in the same coordinate system and
// consistent with the choosen sourceDBRef
* sequence from the dna contig sequences
*/
DBRefEntry dbref = new DBRefEntry("ENSEMBL", "0", "dna1");
- dna1.getDatasetSequence().setSourceDBRef(dbref);
+ dna1.getDatasetSequence().addDBRef(dbref);
+ org.testng.Assert.assertEquals(dbref, dna1.getPrimaryDBRefs().get(0));
dbref = new DBRefEntry("ENSEMBL", "0", "dna2");
- dna2.getDatasetSequence().setSourceDBRef(dbref);
+ dna2.getDatasetSequence().addDBRef(dbref);
+ org.testng.Assert.assertEquals(dbref, dna2.getPrimaryDBRefs().get(0));
/*
* CDS sequences are 'discovered' from dna-to-protein mappings on the alignment
* verify peptide has added a dbref with reverse mapping to CDS
*/
assertNotNull(pep1.getDBRefs());
+ // FIXME pep1.getDBRefs() is 1 - is that the correct behaviour ?
assertEquals(2, pep1.getDBRefs().length);
dbref = pep1.getDBRefs()[1];
assertEquals("ENSEMBL", dbref.getSource());
assertFalse(ref1.updateFrom(ref2));
assertEquals("10", ref1.getVersion());
}
+
+ @Test(groups = { "Functional" })
+ public void testIsPrimary()
+ {
+ DBRefEntry dbr = new DBRefEntry(DBRefSource.UNIPROT, "", "Q12345");
+ assertTrue(dbr.isPrimary());
+ /*
+ * 1:1 mapping
+ */
+ dbr.setMap(new Mapping(null, new int[] { 1, 3 }, new int[] { 1, 3 }, 1,
+ 1));
+ assertTrue(dbr.isPrimary());
+ /*
+ * Version string is prefixed with another dbref source string (fail)
+ */
+ dbr.setVersion(DBRefSource.EMBL + ":0");
+ assertFalse(dbr.isPrimary());
+
+ /*
+ * Version string is alphanumeric
+ */
+ dbr.setVersion("0.1.b");
+ assertTrue(dbr.isPrimary());
+
+ /*
+ * 1:1 mapping with shift (fail)
+ */
+ dbr.setMap(new Mapping(null, new int[] { 1, 3 }, new int[] { 2, 4 }, 1,
+ 1));
+ assertFalse(dbr.isPrimary());
+
+ /*
+ * 1:1 mapping and sequenceRef (fail)
+ */
+ dbr.setMap(new Mapping(new Sequence("foo", "ASDF"), new int[] { 1, 3 },
+ new int[] { 1, 3 }, 1, 1));
+ assertFalse(dbr.isPrimary());
+
+ /*
+ * 1:3 mapping (fail)
+ */
+ dbr.setMap(new Mapping(null, new int[] { 1, 3 }, new int[] { 1, 3 }, 1,
+ 3));
+ assertFalse(dbr.isPrimary());
+ /*
+ * 2:2 mapping with shift (expected fail, but maybe use case for a pass)
+ */
+ dbr.setMap(new Mapping(null, new int[] { 1, 3 }, new int[] { 1, 3 }, 2,
+ 2));
+ assertFalse(dbr.isPrimary());
+
+ /*
+ * Version string is prefixed with another dbref source string
+ */
+ dbr.setVersion(DBRefSource.EMBL + ":0");
+ assertFalse(dbr.isPrimary());
+
+ }
}
sq.setDescription("Test sequence description..");
sq.setVamsasId("TestVamsasId");
- sq.setSourceDBRef(new DBRefEntry("PDB", "version0", "1TST"));
+ sq.addDBRef(new DBRefEntry("PDB", "version0", "1TST"));
- sq.addDBRef(new DBRefEntry("PDB", "version1", "1Tst"));
- sq.addDBRef(new DBRefEntry("PDB", "version2", "2Tst"));
- sq.addDBRef(new DBRefEntry("PDB", "version3", "3Tst"));
- sq.addDBRef(new DBRefEntry("PDB", "version4", "4Tst"));
+ sq.addDBRef(new DBRefEntry("PDB", "version1", "1PDB"));
+ sq.addDBRef(new DBRefEntry("PDB", "version2", "2PDB"));
+ sq.addDBRef(new DBRefEntry("PDB", "version3", "3PDB"));
+ sq.addDBRef(new DBRefEntry("PDB", "version4", "4PDB"));
sq.addPDBId(new PDBEntry("1PDB", "A", Type.PDB, "filePath/test1"));
sq.addPDBId(new PDBEntry("1PDB", "B", Type.PDB, "filePath/test1"));
sq.addPDBId(new PDBEntry("2PDB", "A", Type.MMCIF, "filePath/test2"));
sq.addPDBId(new PDBEntry("2PDB", "B", Type.MMCIF, "filePath/test2"));
+
+ DBRefEntry pdb1pdb = new DBRefEntry("PDB", "version1", "1PDB");
+ DBRefEntry pdb2pdb = new DBRefEntry("PDB", "version1", "2PDB");
+ List<DBRefEntry> primRefs = Arrays.asList(new DBRefEntry[] { pdb1pdb,
+ pdb2pdb });
+ sq.getDatasetSequence().addDBRef(pdb1pdb);
+ sq.getDatasetSequence().addDBRef(pdb2pdb);
sq.getDatasetSequence().addDBRef(
- new DBRefEntry("PDB", "version1", "1Tst"));
- sq.getDatasetSequence().addDBRef(
- new DBRefEntry("PDB", "version2", "2Tst"));
- sq.getDatasetSequence().addDBRef(
- new DBRefEntry("PDB", "version3", "3Tst"));
+ new DBRefEntry("PDB", "version3", "3PDB"));
sq.getDatasetSequence().addDBRef(
- new DBRefEntry("PDB", "version4", "4Tst"));
-
- sq.getDatasetSequence().addPDBId(
- new PDBEntry("1PDB", "A", Type.PDB, "filePath/test1"));
- sq.getDatasetSequence().addPDBId(
- new PDBEntry("1PDB", "B", Type.PDB, "filePath/test1"));
+ new DBRefEntry("PDB", "version4", "4PDB"));
+
+ PDBEntry pdbe1a=new PDBEntry("1PDB", "A", Type.PDB, "filePath/test1");
+ PDBEntry pdbe1b = new PDBEntry("1PDB", "B", Type.PDB, "filePath/test1");
+ PDBEntry pdbe2a=new PDBEntry("2PDB", "A", Type.MMCIF, "filePath/test2");
+ PDBEntry pdbe2b = new PDBEntry("2PDB", "B", Type.MMCIF, "filePath/test2");
sq.getDatasetSequence().addPDBId(
- new PDBEntry("2PDB", "A", Type.MMCIF, "filePath/test2"));
+ pdbe1a);
sq.getDatasetSequence().addPDBId(
- new PDBEntry("2PDB", "B", Type.MMCIF, "filePath/test2"));
+ pdbe1b);
+ sq.getDatasetSequence().addPDBId(pdbe2a);
+ sq.getDatasetSequence().addPDBId(pdbe2b);
+
+ /*
+ * test we added pdb entries to the dataset sequence
+ */
+ Assert.assertEquals(sq.getDatasetSequence().getAllPDBEntries(), Arrays
+ .asList(new PDBEntry[] { pdbe1a, pdbe1b, pdbe2a, pdbe2b }),
+ "PDB Entries were not found on dataset sequence.");
+ /*
+ * we should recover a pdb entry that is on the dataset sequence via PDBEntry
+ */
+ Assert.assertEquals(pdbe1a,
+ sq.getDatasetSequence().getPDBEntry("1PDB"),
+ "PDB Entry '1PDB' not found on dataset sequence via getPDBEntry.");
ArrayList<Annotation> annotsList = new ArrayList<Annotation>();
System.out.println(">>>>>> " + sq.getSequenceAsString().length());
annotsList.add(new Annotation("A", "A", 'X', 0.1f));
new AlignmentAnnotation("Test annot", "Test annot description",
annots));
Assert.assertEquals(sq.getDescription(), "Test sequence description..");
- Assert.assertEquals(sq.getDBRefs().length, 4);
+ Assert.assertEquals(sq.getDBRefs().length, 5);
Assert.assertEquals(sq.getAllPDBEntries().size(), 4);
Assert.assertNotNull(sq.getAnnotation());
Assert.assertEquals(sq.getAnnotation()[0].annotations.length, 2);
Assert.assertEquals(derived.getDescription(),
"Test sequence description..");
- Assert.assertEquals(derived.getDBRefs().length, 4);
+ Assert.assertEquals(derived.getDBRefs().length, 4); // come from dataset
Assert.assertEquals(derived.getAllPDBEntries().size(), 4);
Assert.assertNotNull(derived.getAnnotation());
Assert.assertEquals(derived.getAnnotation()[0].annotations.length, 2);
assertNotNull(sq.getSequenceFeatures());
assertArrayEquals(sq.getSequenceFeatures(),
derived.getSequenceFeatures());
+
+ /*
+ * verify we have primary db refs *just* for PDB IDs with associated
+ * PDBEntry objects
+ */
+
+ assertEquals(primRefs, sq.getPrimaryDBRefs());
+ assertEquals(primRefs, sq.getDatasetSequence().getPrimaryDBRefs());
+
+ assertEquals(sq.getPrimaryDBRefs(), derived.getPrimaryDBRefs());
+
}
/**
assertEquals(5, dbrefs.length);
assertEquals(DBRefSource.EMBL, dbrefs[0].getSource());
assertEquals("CAA30420.1", dbrefs[0].getAccessionId());
+ // TODO: verify getPrimaryDBRefs() for peptide products
assertEquals(cds1Map.getInverse(), dbrefs[0].getMap().getMap());
assertEquals(DBRefSource.EMBLCDS, dbrefs[1].getSource());
assertEquals("CAA30420.1", dbrefs[1].getAccessionId());
import java.util.HashSet;
import java.util.Properties;
import java.util.TreeSet;
+import java.util.regex.Pattern;
/**
* This class scans Java source files for calls to MessageManager and reports
public class MessageBundleChecker
{
/*
+ * regex ^"[^"]*"$
+ * opening quote, closing quote, no quotes in between
+ */
+ static Pattern STRING_PATTERN = Pattern.compile("^\"[^\"]*\"$");
+
+ /*
* number of text lines to read at a time in order to parse
* code that is split over several lines
*/
static int bufferSize = 3;
+ /*
+ * resource bundle key is arg0 for these methods
+ */
static final String METHOD1 = "MessageManager.getString(";
- static final String METHOD2 = "MessageManager.getStringOrReturn(";
+ static final String METHOD2 = "MessageManager.formatMessage(";
- static final String METHOD3 = "MessageManager.formatMessage(";
+ static final String METHOD3 = "MessageManager.getStringOrReturn(";
- static final String[] METHODS = { METHOD1, METHOD2, METHOD3 };
+ /*
+ * resource bundle key is arg1 for this method
+ */
+ static final String JVINIT = "JvSwingUtils.jvInitComponent(";
+
+ static final String[] METHODS = { METHOD1, METHOD2, METHOD3, JVINIT };
/*
* root of the Java source folders we want to scan
+ " possibly invalid parameter calls");
System.out.println(messageKeys.size()
- + " keys not found, possibly unused");
+ + " keys not found, either unused or constructed dynamically");
for (String key : messageKeys)
{
System.out.println(" " + key);
}
javaCount++;
+ /*
+ * skip class with designed dynamic lookup call
+ */
+ if (path.endsWith("gui/JvSwingUtils.java"))
+ {
+ return;
+ }
+
String[] lines = new String[bufferSize];
BufferedReader br = new BufferedReader(new FileReader(f));
for (int i = 0; i < bufferSize; i++)
{
continue;
}
- String methodArgs = combined.substring(pos + method.length());
+
+ /*
+ * extract what follows the opening bracket of the method call
+ */
+ String methodArgs = combined.substring(pos + method.length()).trim();
if ("".equals(methodArgs))
{
/*
- * continues on next line - catch in the next read loop iteration
+ * arguments are on next line - catch in the next read loop iteration
*/
continue;
}
- if (!methodArgs.startsWith("\""))
+ if (methodArgs.indexOf(",") == -1 && methodArgs.indexOf(")") == -1)
{
- System.out.println(String.format(
- "Possible dynamic key at %s line %s %s",
+ /*
+ * arguments continue on next line - catch in the next read loop iteration
+ */
+ continue;
+ }
+
+ if (JVINIT == method && methodArgs.indexOf(",") == -1)
+ {
+ /*
+ * not interested in 1-arg calls to jvInitComponent
+ */
+ continue;
+ }
+
+ if (METHOD3 == method)
+ {
+ System.out.println(String.format("Dynamic key at %s line %s %s",
path.substring(sourcePath.length()), lineNos, combined));
continue;
}
- methodArgs = methodArgs.substring(1);
- int quotePos = methodArgs.indexOf("\"");
- if (quotePos == -1)
+
+ String messageKey = getMessageKey(method, methodArgs);
+ if (messageKey == null)
{
System.out.println(String.format("Trouble parsing %s line %s %s",
path.substring(sourcePath.length()), lineNos, combined));
continue;
}
- String messageKey = methodArgs.substring(0, quotePos);
+
+ if (!(STRING_PATTERN.matcher(messageKey).matches()))
+ {
+ System.out.println(String.format("Dynamic key at %s line %s %s",
+ path.substring(sourcePath.length()), lineNos, combined));
+ continue;
+ }
+
+ /*
+ * strip leading and trailing quote
+ */
+ messageKey = messageKey.substring(1, messageKey.length() - 1);
+
if (!this.messages.containsKey(messageKey))
{
System.out.println(String.format(
}
}
+ /**
+ * Helper method to parse out the resource bundle key parameter of a method
+ * call
+ *
+ * @param method
+ * @param methodArgs
+ * the rest of the source line starting with arguments to method
+ * @return
+ */
+ private String getMessageKey(String method, String methodArgs)
+ {
+ String key = methodArgs;
+
+ /*
+ * locate second argument if calling jvInitComponent()
+ */
+ if (method == JVINIT)
+ {
+ int commaLoc = methodArgs.indexOf(",");
+ if (commaLoc == -1)
+ {
+ return null;
+ }
+ key = key.substring(commaLoc + 1).trim();
+ }
+
+ /*
+ * take up to next comma or ) or end of line
+ */
+ int commaPos = key.indexOf(",");
+ int bracePos = key.indexOf(")");
+ int endPos = commaPos == -1 ? bracePos : (bracePos == -1 ? commaPos
+ : Math.min(commaPos, bracePos));
+ if (endPos == -1 && key.length() > 1 && key.endsWith("\""))
+ {
+ endPos = key.length();
+ }
+
+ return endPos == -1 ? null : key.substring(0, endPos);
+ }
+
private String combineLines(String[] lines)
{
String combined = "";
var logger = project.getBuildListeners( ).firstElement( );
logger.setMessageOutputLevel( 1 );
</script>
- <echo message="Missing message labels compared to Messages.properties"/>
- <foreach target="compareProperties" param="file2">
+ <foreach target="compareBundles" param="file2">
<path>
<fileset dir="${basedir}/resources/lang">
<exclude name="Messages.properties" />
</foreach>
</target>
+<target name="compareBundles" description="compare a properties file with Messages.properties and vice versa">
+ <echo message=" "/>
+ <echo message="Missing message labels in ${file2} compared to Messages.properties"/>
+ <antcall target="compareProperties">
+ <param name="file1" value="resources/lang/Messages.properties"/>
+ <param name="file2" value="${file2}" />
+ </antcall>
+ <echo message=" "/>
+ <echo message="Missing message labels in Messages.properties compare to ${file2}"/>
+ <antcall target="compareProperties">
+ <param name="file2" value="resources/lang/Messages.properties"/>
+ <param name="file1" value="${file2}" />
+ </antcall>
+</target>
+
<target name="compareProperties" description="reports missing entries in one message bundle">
- <loadproperties srcFile="resources/lang/Messages.properties" prefix="prefixfile1"/>
+ <loadproperties srcFile="${file1}" prefix="prefixfile1"/>
<loadproperties srcFile="${file2}" prefix="prefixfile2"/>
<propertyselector property="file1.list" delimiter="," match="prefixfile1\.(.+)" select="\1"/>
<propertyselector property="file2.list" delimiter="," match="prefixfile2\.(.+)" select="\1"/>
- <echo message=" "/>
- <echo message="*** ${file2}:" />
<for list="${file1.list}" param="file1.property">
<sequential>
<if>