<classpathentry kind="lib" path="lib/VARNAv3-91.jar"/>
<classpathentry kind="lib" path="lib/jfreesvg-2.1.jar"/>
<classpathentry kind="lib" path="lib/quaqua-filechooser-only-8.0.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/jersey-core-1.19.jar"/>
<classpathentry kind="lib" path="lib/jersey-json-1.19.jar"/>
<classpathentry kind="lib" path="lib/jsr311-api-1.1.1.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
label.above_identity_threshold = Above Identity Threshold
label.show_sequence_features = Show Sequence Features
label.nucleotide = Nucleotide
+ label.protein = Protein
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.about = About...
label.show_sequence_limits = Show Sequence Limits
label.feature_settings = Feature Settings...
- label.sequence_features = Sequence Features
label.all_columns = All Columns
label.all_sequences = All Sequences
label.selected_columns = Selected Columns
label.selected_sequences = Selected Sequences
+ label.except_selected_sequences = All except selected sequences
label.all_but_selected_region = All but Selected Region (Shift+Ctrl+H)
label.selected_region = Selected Region
label.all_sequences_columns = All Sequences and Columns
+ label.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.group_conservation = Group Conservation
label.show_consensus_histogram = Show Consensus Histogram
label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name
label.ignore_unmatched_dropped_files_info = <html>Do you want to <em>ignore</em> the {0} files whose names did not match any sequence IDs ?</html>
label.ignore_unmatched_dropped_files = Ignore unmatched dropped files?
+ label.view_name_original = Original
label.enter_view_name = Enter View Name
label.enter_label = Enter label
label.enter_label_for_the_structure = Enter a label for the structure?
label.load_features_annotations = Load Features/Annotations ...
label.export_features = Export Features ...
label.export_annotations = Export Annotations ...
- label.jalview_copy = Copy (Jalview Only)
- label.jalview_cut = Cut (Jalview Only)
label.to_upper_case = To Upper Case
label.to_lower_case = To Lower Case
label.toggle_case = Toggle Case
label.share_selection_across_views = Share selection across views
label.scroll_highlighted_regions = Scroll to highlighted regions
label.gap_symbol = Gap Symbol
- label.alignment_colour = Alignment Colour
+ label.prot_alignment_colour = Protein Alignment Colour
+ label.nuc_alignment_colour = Nucleotide Alignment Colour
label.address = Address
label.port = Port
label.default_browser_unix = Default Browser (Unix)
label.load_tree_for_sequence_set = Load a tree for this sequence set
label.export_image = Export Image
label.vamsas_store = VAMSAS store
- label.translate_cDNA = Translate cDNA
+ label.translate_cDNA = Translate as cDNA
+ label.linked_view_title = Linked cDNA 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_sequences = Add Sequences
label.new_window = New Window
+ label.split_window = Split Window
label.refresh_available_sources = Refresh Available Sources
label.use_registry = Use Registry
label.add_local_source = Add Local Source
label.settings_for_param = Settings for {0}
label.view_params = View {0}
label.select_all_views = Select all views
+ label.all_views = All Views
label.align_sequences_to_existing_alignment = Align sequences to an existing alignment
label.realign_with_params = Realign with {0}
label.calcname_with_default_settings = {0} with Defaults
label.normalise_logo = Normalise Logo
label.no_colour_selection_in_scheme = Please, make a colour selection before to apply colour scheme
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
+ label.mapping_failed = No sequence mapping could be made between the alignments.<br>A mapping requires sequence names to match, and equivalent sequence lengths.
+ action.no = No
+ action.yes = Yes
+ label.for = for
label.select_by_annotation = Select By Annotation
action.select_by_annotation = Select by Annotation...
label.threshold_filter = Threshold Filter
info.associate_wit_sequence = Associate with Sequence
label.search_result = Search Result
label.found_structures_summary = Found Structures Summary
+ label.configure_displayed_columns = Configure Displayed Columns
+ label.start_jalview = Start Jalview
+ label.biojs_html_export = BioJS
++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_getcher = PDB Sequence Fetcher
++label.result = result
++label.results = results
++label.structure_chooser = Structure Chooser
++label.select = Select :
++label.invert = Invert
++label.select_pdb_file = Select PDB File
++info.select_filter_option = Select Filter Option/Manual Entry
++info.associate_wit_sequence = Associate with Sequence
++label.search_result = Search Result
++label.found_structures_summary = Found Structures Summary
+label.configure_displayed_columns = Configure Displayed Columns
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*/
package jalview.io;
+
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.util.UrlLink;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
- import java.util.Vector;
++
+
/**
* generate HTML reports for a sequence
*
}
else
{
-- for (String urlstring : (Vector<String>) feature.links)
++ for (String urlstring : feature.links)
{
try
{
charOffset = (av_charWidth - fm.charWidth(s)) / 2;
g.drawString(String.valueOf(s), charOffset
+ (av_charWidth * (i - start)), pady);
+
}
}
}
charOffset = (av_charWidth - fm.charWidth(s)) / 2;
g.drawString(String.valueOf(s), charOffset
+ (av_charWidth * (i - start)), pady);
-
}
}
}
// current feature to render
for (sfindex = 0; sfindex < sfSize; sfindex++)
{
- if (!lastSequenceFeatures[sfindex].type.equals(type))
+ final SequenceFeature sequenceFeature = lastSequenceFeatures[sfindex];
+ if (!sequenceFeature.type.equals(type))
{
continue;
}
if (featureGroups != null
- && lastSequenceFeatures[sfindex].featureGroup != null
- && lastSequenceFeatures[sfindex].featureGroup.length() != 0
- && featureGroups
- .containsKey(lastSequenceFeatures[sfindex].featureGroup)
- && !featureGroups
- .get(
- lastSequenceFeatures[sfindex].featureGroup)
+ && sequenceFeature.featureGroup != null
+ && sequenceFeature.featureGroup.length() != 0
+ && featureGroups.containsKey(sequenceFeature.featureGroup)
+ && !featureGroups.get(sequenceFeature.featureGroup)
.booleanValue())
{
continue;
}
if (!offscreenRender
- && (lastSequenceFeatures[sfindex].getBegin() > epos || lastSequenceFeatures[sfindex]
+ && (sequenceFeature.getBegin() > epos || sequenceFeature
.getEnd() < spos))
{
continue;
}
if (offscreenRender && offscreenImage == null)
-- {
- if (lastSequenceFeatures[sfindex].begin <= start
- && lastSequenceFeatures[sfindex].end >= start)
++ {
+ if (sequenceFeature.begin <= start
+ && sequenceFeature.end >= start)
{
// this is passed out to the overview and other sequence renderers
// (e.g. molecule viewer) to get displayed colour for rendered
// sequence
- currentColour = new Integer(
- getColour(
- lastSequenceFeatures[sfindex]).getRGB());
+ currentColour = new Integer(getColour(sequenceFeature).getRGB());
// used to be retreived from av.featuresDisplayed
// currentColour = av.featuresDisplayed
// .get(sequenceFeatures[sfindex].type);
}
}
- else if (lastSequenceFeatures[sfindex].type
- .equals("disulfide bond"))
+ else if (sequenceFeature.type.equals("disulfide bond"))
{
-
- renderFeature(g, seq,
- seq.findIndex(lastSequenceFeatures[sfindex].begin) - 1,
- seq.findIndex(lastSequenceFeatures[sfindex].begin) - 1,
- getColour(lastSequenceFeatures[sfindex])
+ renderFeature(g, seq, seq.findIndex(sequenceFeature.begin) - 1,
+ seq.findIndex(sequenceFeature.begin) - 1,
+ getColour(sequenceFeature)
// new Color(((Integer) av.featuresDisplayed
// .get(sequenceFeatures[sfindex].type)).intValue())
, start, end, y1);
- renderFeature(g, seq,
- seq.findIndex(lastSequenceFeatures[sfindex].end) - 1,
- seq.findIndex(lastSequenceFeatures[sfindex].end) - 1,
- getColour(lastSequenceFeatures[sfindex])
+ renderFeature(g, seq, seq.findIndex(sequenceFeature.end) - 1,
+ seq.findIndex(sequenceFeature.end) - 1,
+ getColour(sequenceFeature)
// new Color(((Integer) av.featuresDisplayed
// .get(sequenceFeatures[sfindex].type)).intValue())
, start, end, y1);
}
- else if (showFeature(lastSequenceFeatures[sfindex]))
+ else if (showFeature(sequenceFeature))
{
if (av_isShowSeqFeatureHeight
- && lastSequenceFeatures[sfindex].score != Float.NaN)
+ && sequenceFeature.score != Float.NaN)
{
renderScoreFeature(g, seq,
- seq.findIndex(lastSequenceFeatures[sfindex].begin) - 1,
- seq.findIndex(lastSequenceFeatures[sfindex].end) - 1,
- getColour(lastSequenceFeatures[sfindex]), start, end,
- y1, normaliseScore(lastSequenceFeatures[sfindex]));
+ seq.findIndex(sequenceFeature.begin) - 1,
+ seq.findIndex(sequenceFeature.end) - 1,
+ getColour(sequenceFeature), start, end, y1,
+ normaliseScore(sequenceFeature));
}
else
{
- renderFeature(g, seq,
- seq.findIndex(lastSequenceFeatures[sfindex].begin) - 1,
- seq.findIndex(lastSequenceFeatures[sfindex].end) - 1,
- getColour(lastSequenceFeatures[sfindex]), start, end,
- y1);
+ renderFeature(g, seq, seq.findIndex(sequenceFeature.begin) - 1,
+ seq.findIndex(sequenceFeature.end) - 1,
+ getColour(sequenceFeature), start, end, y1);
}
}
*/
public static String parseJsonExceptionString(String jsonErrorResponse)
{
- String errorMessage = "RunTime error";
+ StringBuilder errorMessage = new StringBuilder(
+ "\n============= PDB Rest Client RunTime error =============\n");
++
try
{
JSONParser jsonParser = new JSONParser();
JSONObject jsonObj = (JSONObject) jsonParser.parse(jsonErrorResponse);
JSONObject errorResponse = (JSONObject) jsonObj.get("error");
- errorMessage = errorResponse.get("msg").toString();
+
JSONObject responseHeader = (JSONObject) jsonObj
.get("responseHeader");
- errorMessage += responseHeader.get("params").toString();
+ JSONObject paramsObj = (JSONObject) responseHeader.get("params");
+ String status = responseHeader.get("status").toString();
+ String message = errorResponse.get("msg").toString();
+ String query = paramsObj.get("q").toString();
+ String fl = paramsObj.get("fl").toString();
+
+ errorMessage.append("Status: ").append(status).append("\n");
+ errorMessage.append("Message: ").append(message).append("\n");
+ errorMessage.append("query: ").append(query).append("\n");
+ errorMessage.append("fl: ").append(fl).append("\n");
++
} catch (ParseException e)
{
e.printStackTrace();
}
- return errorMessage;
+ return errorMessage.toString();
}
/**
assertEquals("zABCDEF", seq.getSequenceAsString());
seq.insertCharAt(2, 2, 'x');
assertEquals("zAxxBCDEF", seq.getSequenceAsString());
+
// for static method see StringUtilsTest
}
seq.getDatasetSequence().setDatasetSequence(seq); // loop!
assertNull(seq.getSequenceFeatures());
}
- }
+ }
wantedFields.add(PDBDocField.GENUS);
wantedFields.add(PDBDocField.GENE_NAME);
wantedFields.add(PDBDocField.TITLE);
- assertEquals("molecule_type,pdb_id,genus,gene_name,title",
- PDBRestClient
- .getPDBDocFieldsAsCommaDelimitedString(wantedFields));
+
+ String expectedResult = "molecule_type,pdb_id,genus,gene_name,title";
+ String actualResult = PDBRestClient
+ .getPDBDocFieldsAsCommaDelimitedString(wantedFields);
+
+ assertEquals("", expectedResult, actualResult);
}
@Test
String parsedErrorResponse = PDBRestClient
.parseJsonExceptionString(jsonErrorResponse);
- String expectedErrorMsg = "org.apache.solr.search.SyntaxError: Cannot parse 'text:abc OR text:go:abc AND molecule_sequence:['' TO *]': Encountered \" \":\" \": \"\" at line 1, column 19.{\"q\":\"text:abc OR text:go:abc AND molecule_sequence:['' TO *]\",\"fl\":\"pdb_id\",\"sort\":\"\",\"rows\":\"100\",\"wt\":\"json\"}";
+ System.out.println(parsedErrorResponse);
+
+ String expectedErrorMsg = "\n============= PDB Rest Client RunTime error =============\n"
+ + "Status: 400\n"
+ + "Message: org.apache.solr.search.SyntaxError: Cannot parse 'text:abc OR text:go:abc AND molecule_sequence:['' TO *]': Encountered \" \":\" \": \"\" at line 1, column 19.\n"
+ + "query: text:abc OR text:go:abc AND molecule_sequence:['' TO *]\n"
+ + "fl: pdb_id\n";
+
assertEquals(expectedErrorMsg, parsedErrorResponse);
}