From: Charles Ofoegbu Date: Wed, 8 Oct 2014 16:28:10 +0000 (+0100) Subject: Integration of Freemarker API to the Jalview help system to aid self-documentation... X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=67473776389cd0a6024aa3e401819e503970082c Integration of Freemarker API to the Jalview help system to aid self-documentation where possible using predefined templates and boiler-plates codes from Jalview codebase --- diff --git a/.classpath b/.classpath index a7270ff..82f7b5e 100644 --- a/.classpath +++ b/.classpath @@ -52,5 +52,6 @@ + diff --git a/help/html/menus/alignmentMenu.html b/help/html/menus/alignmentMenu.html index f219269..2a65e43 100755 --- a/help/html/menus/alignmentMenu.html +++ b/help/html/menus/alignmentMenu.html @@ -1,4 +1,5 @@ - + + - -Alignment Window Menus - + Alignment Window Menus - -

- Alignment Window Menus -

-
    -
  • File -
      -
    • Fetch Sequence
      Shows a - dialog window in which you can retrieve known ids from Uniprot, - EMBL, EMBLCDS, PFAM, Rfam, or PDB database using Web Services provided by the - European Bioinformatics Institute. See Sequence Fetcher .
    • -
    • Add Sequences
      Add - sequences to the visible alignment from file, URL, or cut & - paste window
      -
    • -
    • Reload
      Reloads the - alignment from the original file, if available.
      Warning: - This will delete any edits, analyses and colourings applied since - the alignment was last saved, and cannot be undone.
      -
    • -
    • Save (Control S)
      Saves - the alignment to the file it was loaded from (if available), in - the same format, updating the original in place.
      -
    • -
    • Save As (Control Shift S)
      Save - the alignment to local file. A file selection window will open, - use the "Files of type:" selection box to determine - which alignment format to save as. -
    • -
    • Output to Textbox
      The - alignment will be displayed in plain text in a new window, which - you can "Copy and Paste" using the pull down menu, or - your standard operating system copy and paste keys. The output - window also has a "New Window" button - to import the (possibly edited) text as a new alignment.
      - Select the format of the text by selecting one of the following - menu items.
      -
        -
      • FASTA -
      • -
      • MSF -
      • -
      • CLUSTAL -
      • -
      • BLC -
      • -
      • PIR -
      • -
      • PFAM -
      • -
    • -
    • Print (Control P)
      Jalview - will print the alignment using the current fonts and colours of - your alignment. If the alignment has annotations visible, these - will be printed below the alignment. If the alignment is wrapped - the number of residues per line of your alignment will depend on - the paper width or your alignment window width, whichever is the - smaller. -
    • -
    • Export Image
      Creates an - alignment graphic with the current view's annotation, alignment - background colours and group colours. If the alignment is wrapped, the output will also be - wrapped and will have the same visible residue width as the open - alignment.
      -
    • -
    • Export Features
      All - features visible on the alignment can be saved to file or - displayed in a textbox in either Jalview or GFF format
      -
    • -
    • Export Annotations
      All - annotations visible on the alignment can be saved to file or - displayed in a textbox in Jalview annotations format.
      -
    • -
    • Load Associated Tree
      Jalview - can view trees - stored in the Newick file format, and associate them with the - alignment. Note: the ids of the tree file and your alignment MUST - be the same.
    • -
    • Load Features / Annotations
      Load - files describing precalculated sequence features or alignment - annotations.
    • -
    • Close (Control W)
      Close - the alignment window. Make sure you have saved your alignment - before you close - either as a Jalview project or by using the Save - As menu. -
    • -
  • -
  • Edit -
      -
    • Undo (Control Z)
      This - will undo any edits you make to the alignment. This applies to - insertion or deletion of gaps, cutting residues or sequences from - the alignment or pasting sequences to the current alignment or - sorting the alignment. NOTE: It DOES NOT undo - colour changes, adjustments to group sizes, or changes to the - annotation panel.
      -
    • -
    • Redo (Control Y)
      Any - actions which you undo can be redone using redo. -
    • -
    • Cut (Control X)
      This - will make a copy of the currently selected residues before - removing them from your alignment. Click on a sequence name if you - wish to select a whole sequence.
      Use <CTRL> and X - (<APPLE> and X on MacOSX) to cut.
      -
    • -
    • Copy (Control C)
      Copies - the currently selected residues to the system clipboard - you can - also do this by pressing <CTRL> and C (<APPLE> and C - on MacOSX).
      If you try to paste the clipboard contents - to a text editor, you will see the format of the copied residues - FASTA.
    • -
    • Paste -
        -
      • To New Alignment (Control Shift V)
        -
        A new alignment window will be created from sequences - previously copied or cut to the system clipboard.
        Use - <CTRL> and <SHIFT> and V(<APPLE> and - <SHIFT;> and and V on MacOSX) to paste.
        -
      • -
      • Add To This Alignment (Control V)
        -
        Copied sequences from another alignment window can be - added to the current Jalview alignment. -
      • -
    • -
    • Delete (Backspace)
      This - will delete the currently selected residues without copying them - to the clipboard. Like the other edit operations, this can be - undone with Undo. -
    • -
    • Remove Left (Control L)
      If - the alignment has marked columns, the alignment will be trimmed to - the left of the leftmost marked column. To mark a column, mouse - click the scale bar above the alignment. Click again to unmark a - column, or select "Deselect All" to deselect all - columns.
    • -
    • Remove Right (Control R)
      If - the alignment has marked columns, the alignment will be trimmed to - the left of the leftmost marked column. To mark a column, mouse - click the scale bar above the alignment. Click again to unmark a - column, or select "Deselect All" to deselect all - columns.
    • -
    • Remove Empty Columns (Control E)
      -
      All columns which only contain gap characters - ("-", ".") will be deleted.
      You may - set the default gap character in preferences.
      -
    • -
    • Remove All Gaps (Control Shift E)
      - Gap characters ("-", ".") will be - deleted from the selected area of the alignment. If no selection - is made, ALL the gaps in the alignment will be removed.
      - You may set the default gap character in preferences.
      -
    • -
    • Remove Redundancy (Control D)
      Selecting - this option brings up a window asking you to select a threshold. - If the percentage identity between any two sequences (under the - current alignment) exceeds this value then one of the sequences - (the shorter) is discarded. Press the "Apply" button to - remove redundant sequences. The "Undo" button will undo - the last redundancy deletion. -
    • -
    • Pad Gaps
      When selected, - the alignment will be kept at minimal width (so there no empty - columns before or after the first or last aligned residue) and all - sequences will be padded with gap characters to the before and - after their terminating residues.
      This switch is useful - when making a tree using unaligned sequences and when working with - alignment analysis programs which require 'properly aligned - sequences' to be all the same length.
      You may set the - default for Pad Gaps in the preferences.
      -
    • -
  • -
  • Select -
      -
    • Find... - (Control F)
      Opens the Find dialog box to - search for residues, sequence name or residue position within the - alignment and create new sequence features from the queries.
      -
    • -
    • Select All (Control A)
      Selects - all the sequences and residues in the alignment.
      Use - <CTRL> and A (<APPLE> and A on a MacOSX) to select - all.
    • -
    • Deselect All (Escape)
      Removes - the current selection box (red dashed box) from the alignment - window. All selected sequences, residues and marked columns will - be deselected.
      Use <ESCAPE> to deselect - all.
    • -
    • Invert Sequence Selection (Control I)
      -
      Any sequence ids currently not selected will replace the - current selection. -
    • -
    • Invert Column Selection (Control Alt I)
      -
      Any columns currently not selected will replace the current - column selection. -
    • -
    • Create Group (Control G)
      - Create a group containing the currently selected sequences.
    • -
    • Remove Group (Shift Control G)
      - Ungroup the currently selected sequence group. (Create/Remove group new in Jalview 2.8.1)
    • -
    • Make Groups for selection
      The currently - selected groups of the alignment will be subdivided according to - the contents of the currently selected region.
      Use this to - subdivide an alignment based on the different combinations of - residues observed at specific positions. (new in jalview 2.5)
      -
    • -
    • Undefine Groups (Control U)
      The - alignment will be reset with no defined groups.
      WARNING: - This cannot be undone.
      -
    • -
  • -
  • View -
      -
    • New View (Control T)
      - Creates a new view from the current alignment view.
      -
    • -
    • Expand Views (X)
      Display - each view associated with the alignment in its own alignment - window, allowing several views to be displayed simultaneously.
      -
    • -
    • Gather Views (G)
      Each - view associated with the alignment will be displayed within its - own tab on the current alignment window.
      -
    • -
    • Show→(all Columns / Sequences / - Sequences and Columns)
      All hidden Columns / - Sequences / Sequences and Columns will be revealed.
      -
    • -
    • Hide→(all Columns / Sequences / - Selected Region / All but Selected Region )
      - Hides the all the currently selected Columns / Sequences / Region - or everything but the selected Region.
      -
    • -
    • Automatic Scrolling
      When - selected, the view will automatically scroll to display the - highlighted sequence position corresponding to the position under - the mouse pointer in a linked alignment or structure view.
    • -
    • Show Annotations
      If this - is selected the "Annotation Panel" will be displayed - below the alignment. The default setting is to display the - conservation calculation, quality calculation and consensus values - as bar charts. -
    • -
    • Autocalculated Annotation
      Settings - for the display of autocalculated annotation. -
        -
      • Apply to all groups
        When - ticked, any modification to the current settings will be applied - to all autocalculated annotation.
      • -
      • Show Consensus Histogram
        - Enable or disable the display of the histogram above the - consensus sequence.
      • -
      • Show Consensus Logo
        Enable - or disable the display of the Consensus Logo above the consensus - sequence.
      • -
      • Normalise Consensus Logo
        -
        When enabled, scales all logo stacks to the same height, - making it easier to compare symbol diversity in highly variable - regions.
      • -
      • Group Conservation
        When - ticked, display a conservation row for all groups (only available - for protein alignments).
      • -
      • Apply to all groups
        When - ticked, display a consensus row for all groups.
      • -
    • -
    • Show Sequence Features
      Show - or hide sequence features on this alignment. -
    • -
    • Seqence - Feature Settings...
      Opens the - Sequence Feature Settings dialog box to control the colour and - display of sequence features on the alignment, and configure and - retrieve features from DAS annotation servers. -
    • -
    • Sequence ID Tooltip (application - only)
      This submenu's options allow the inclusion or - exclusion of non-positional sequence features or database cross - references from the tooltip shown when the mouse hovers over the - sequence ID panel.
      -
    • -
    • Alignment Properties...
      Displays - some simple statistics computed for the current alignment view and - any named properties defined on the whole alignment. -
    • -
    • Overview - Window
      A scaled version of the alignment will - be displayed in a small window. A red box will indicate the - currently visible area of the alignment. Move the visible region - using the mouse. -
    • -
  • -
  • Alignment Window Format Menu -
      -
    • Font...
      Opens the - "Choose Font" dialog box, in order to change the font of - the display and enable or disable 'smooth fonts' (anti-aliasing) - for faster alignment rendering.
    • -
    • Wrap
      When ticked, the - alignment display is "wrapped" - to the width of the alignment window. This is useful if your - alignment has only a few sequences to view its full width at once.
      - Additional options for display of sequence numbering and scales are - also visible in wrapped layout mode:
      -
        -
      • Scale Above
        Show the alignment - column position scale.
      • -
      • Scale Left
        Show the sequence - position for the first aligned residue in each row in the left - column of the alignment.
      • -
      • Scale Right
        Show the sequence - position for the last aligned residue in each row in the - right-most column of the alignment.
      • -
      • Show Sequence Limits
        If - this box is selected the sequence name will have the start and - end position of the sequence appended to the name, in the format - NAME/START-END -
      • -
      • Right Align Sequence ID
        If - this box is selected then the sequence names displayed in the - sequence label area will be aligned against the left-hand edge - of the alignment display, rather than the left-hand edge of the - alignment window. -
      • -
      • Show Hidden Markers
        When - this box is selected, positions in the alignment where rows and - columns are hidden will be marked by blue arrows. -
      • -
      • Boxes
        If this is - selected the background of a residue will be coloured using the - selected background colour. Useful if used in conjunction with - "Colour Text."
        -
      • -
      • Text
        If this is - selected the residues will be displayed using the standard 1 - character amino acid alphabet. -
      • -
      • Colour Text
        If this is - selected the residues will be coloured according to the - background colour associated with that residue. The colour is - slightly darker than background so the amino acid symbol remains - visible. -
      • -
      • Show Gaps
        When this is - selected, gap characters will be displayed as "." or - "-". If unselected, then gap characters will appear as - blank spaces.
        You may set the default gap character in - preferences.
        -
      • -
      • Centre Annotation Labels
        Select - this to center labels along an annotation row relative to their - associated column (default is off, i.e. left-justified). -
      • -
      • Show Unconserved
        When - this is selected, all consensus sequence symbols will be - rendered as a '.', highlighting mutations in highly conserved - alignments. -
      • + + +

        Alignment Window Menus x

        -
    • -
    -
  • +
      -
    - +
  • File +
      +
    • Fetch Sequence
      + Shows a dialog window in which you can retrieve known ids +from Uniprot, EMBL, EMBLCDS, PFAM, Rfam, or PDB database using Web +Services provided by the European Bioinformatics Institute. See Sequence Fetcher .
    • +
    • Add Sequences
      +Add sequences to the visible alignment from file, URL, or cut & +paste window
    • +
    • Reload
      +Reloads the alignment from the original file, if available.
      + Warning: This will delete any edits, analyses and +colourings applied since the alignment was last saved, and cannot be +undone.
    • +
    • Save (Control S)
      +Saves the alignment to the file it was loaded from (if available), in +the same format, updating the original in place.
    • +
    • Save As (Control Shift S)
      +
      Save the alignment to local file. A file selection +window will open, use the "Files of type:" selection box to determine +which alignment format to save as. +
    • +
    • Output to Textbox
      +
      The alignment will be displayed in plain text in a +new window, which you can "Copy and Paste" using the pull down menu, or +your standard operating system copy and paste keys. The output window +also has a "New Window" button to import the +(possibly edited) text as a new alignment.
      +Select the format of the text by selecting one of the following menu +items.
      + +
        +
      • FASTA
      • +
      • MSF
      • +
      • CLUSTAL
      • +
      • BLC
      • +
      • PIR
      • +
      • PFAM
      • +
      +
    • +
    • Print (Control P)
      +
      Jalview will print the alignment using the current +fonts and colours of your alignment. If the alignment has annotations +visible, these will be printed below the alignment. If the alignment is +wrapped the number of residues per line of your alignment will depend +on the paper width or your alignment window width, whichever is the +smaller.
    • +
    • Export Image
      +Creates an alignment graphic with the current view's annotation, +alignment background colours and group colours. If the alignment is wrapped, the output will also be +wrapped and will have the same visible residue width as the open +alignment.
      + +
    • +
    • Export Features
      +All features visible on the alignment can be saved to file or displayed +in a textbox in either Jalview or GFF format
    • +
    • Export Annotations
      +All annotations visible on the alignment can be saved to file or +displayed in a textbox in Jalview annotations format.
    • +
    • Load Associated Tree
      +
      Jalview can view trees stored in the +Newick file format, and associate them with the alignment. Note: the +ids of the tree file and your alignment MUST be the same.
    • +
    • Load Features / Annotations
      +
      Load files describing precalculated sequence features or alignment annotations.
    • +
    • Close (Control W)
      + Close the alignment window. Make sure you have saved your +alignment before you close - either as a Jalview project or by using +the Save As menu.
    • +
    +
  • +
  • Edit +
      +
    • Undo (Control Z)
      +This will undo any edits you make to the alignment. This applies to +insertion or deletion of gaps, cutting residues or sequences from the +alignment or pasting sequences to the current alignment or sorting the +alignment. NOTE: It DOES NOT undo colour changes, +adjustments to group sizes, or changes to the annotation panel.
    • +
    • Redo (Control Y)
      +
      Any actions which you undo can be redone using +redo.
    • +
    • Cut (Control X)
      +
      This will make a copy of the currently selected +residues before removing them from your alignment. Click on a sequence +name if you wish to select a whole sequence.
      +Use <CTRL> and X (<APPLE> and X on MacOSX) to cut.
    • +
    • Copy (Control C)
      + Copies the currently selected residues to the system +clipboard - you can also do this by pressing <CTRL> and C +(<APPLE> and C on MacOSX).
      +If you try to paste the clipboard contents to a text editor, you will +see the format of the copied residues FASTA.
    • +
    • Paste +
        +
      • To New Alignment (Control Shift V)
        +
        A new alignment window will be created from +sequences previously copied or cut to the system clipboard.
        +Use <CTRL> and <SHIFT> and V(<APPLE> and +<SHIFT;> and and V on MacOSX) to paste.
      • +
      • Add To This Alignment (Control V)
        +
        Copied sequences from another alignment window +can be added to the current Jalview alignment.
      • +
      +
    • +
    • Delete (Backspace)
      +
      This will delete the currently selected residues +without copying them to the clipboard. Like the other edit operations, +this can be undone with Undo.
    • +
    • Remove Left (Control L)
      +
      If the alignment has marked columns, the alignment +will be trimmed to the left of the leftmost marked column. To mark a +column, mouse click the scale bar above the alignment. Click again to +unmark a column, or select "Deselect All" to deselect all columns.
    • +
    • Remove Right (Control R)
      +
      If the alignment has marked columns, the alignment +will be trimmed to the left of the leftmost marked column. To mark a +column, mouse click the scale bar above the alignment. Click again to +unmark a column, or select "Deselect All" to deselect all columns.
    • +
    • Remove Empty Columns (Control E)
      +
      All columns which only contain gap characters +("-", ".") will be deleted.
      +You may set the default gap character in preferences.
    • +
    • Remove All Gaps (Control Shift E)
      + Gap characters ("-", ".") will be deleted from the selected +area of the alignment. If no selection is made, ALL the gaps in the +alignment will be removed.
      +You may set the default gap character in preferences.
    • +
    • Remove Redundancy (Control D)
      +
      Selecting this option brings up a window asking +you to select a threshold. If the percentage identity between any two +sequences (under the current alignment) exceeds this value then one of +the sequences (the shorter) is discarded. Press the "Apply" button to +remove redundant sequences. The "Undo" button will undo the last +redundancy deletion.
    • +
    • Pad Gaps
      +
      When selected, the alignment will be kept at +minimal width (so there no empty columns before or after the first or +last aligned residue) and all sequences will be padded with gap +characters to the before and after their terminating residues.
      +This switch is useful when making a tree using unaligned sequences and +when working with alignment analysis programs which require 'properly +aligned sequences' to be all the same length.
      +You may set the default for Pad Gaps in the preferences.
    • +
    +
  • +
  • Select +
      +
    • Find... (Control F) +
      +Opens the Find dialog box to search for residues, sequence name or +residue position within the alignment and create new sequence features +from the queries.
    • +
    • Select All (Control A)
      +
      Selects all the sequences and residues in the +alignment.
      +Use <CTRL> and A (<APPLE> and A on a MacOSX) to select all.
    • +
    • Deselect All (Escape)
      +
      Removes the current selection box (red dashed box) +from the alignment window. All selected sequences, residues and marked +columns will be deselected.
      +Use <ESCAPE> to deselect all.
    • +
    • Invert Sequence Selection (Control I)
      +
      Any sequence ids currently not selected will +replace the current selection.
    • +
    • Invert Column Selection (Control Alt I)
      +
      Any columns currently not selected will replace +the current column selection.
    • +
    • Create Group (Control G)
      +
      Create a group containing the currently selected +sequences.
    • +
    • Remove Group (Shift Control G)
      +
      Ungroup the currently selected sequence group. +(Create/Remove group new in Jalview 2.8.1)
    • +
    • Make Groups for selection
      +
      The currently selected groups of the alignment +will be subdivided according to the contents of the currently selected +region.
      +Use this to subdivide an alignment based on the different combinations +of residues observed at specific positions. (new in jalview 2.5)
    • +
    • Undefine Groups (Control U)
      +
      The alignment will be reset with no defined groups.
      + WARNING: This cannot be undone.
    • +
    +
  • +
  • View +
      +
    • New View (Control T)
      +Creates a new view from the current alignment view.
    • +
    • Expand Views (X)
      +Display each view associated with the alignment in its own alignment +window, allowing several views to be displayed simultaneously.
    • +
    • Gather Views (G)
      +Each view associated with the alignment will be displayed within its +own tab on the current alignment window.
    • +
    • Show→(all Columns / Sequences / Sequences and Columns)
      +All hidden Columns / Sequences / Sequences and Columns will be +revealed.
    • +
    • Hide→(all Columns / Sequences / Selected Region / All +but Selected Region )
      +Hides the all the currently selected Columns / Sequences / Region or +everything but the selected Region.
    • +
    • Automatic Scrolling
      +
      When selected, the view will automatically scroll +to display the highlighted sequence position corresponding to the +position under the mouse pointer in a linked alignment or structure +view.
    • +
    • Show Annotations
      +
      If this is selected the "Annotation Panel" will be +displayed below the alignment. The default setting is to display the +conservation calculation, quality calculation and consensus values as +bar charts.
    • +
    • Autocalculated Annotation
      +
      Settings for the display of autocalculated +annotation. +
        +
      • Apply to all groups
        +
        When ticked, any modification to the current +settings will be applied to all autocalculated annotation.
      • +
      • Show Consensus Histogram
        +
        Enable or disable the display of the +histogram above the consensus sequence.
      • +
      • Show Consensus Logo
        +
        Enable or disable the display of the +Consensus Logo above the consensus sequence.
      • +
      • Normalise Consensus Logo
        +
        When enabled, scales all logo stacks to the +same height, making it easier to compare symbol diversity in highly +variable regions.
      • +
      • Group Conservation
        +
        When ticked, display a conservation row for +all groups (only available for protein alignments).
      • +
      • Apply to all groups
        +
        When ticked, display a consensus row for all +groups.
      • +
      +
    • +
    • Show Sequence Features
      + Show or hide sequence features on this alignment.
    • +
    • Seqence +Feature Settings...
      + Opens the Sequence Feature Settings dialog box to control +the colour and display of sequence features on the alignment, and +configure and retrieve features from DAS annotation servers.
    • + +
    • Sequence ID Tooltip (application +only)
      +This submenu's options allow the inclusion or exclusion of +non-positional sequence features or database cross references from the +tooltip shown when the mouse hovers over the sequence ID panel.
    • + +
    • Alignment Properties...
      +
      Displays some simple statistics computed for the +current alignment view and any named properties defined on the whole +alignment.
    • + +
    • Overview +Window
      +
      A scaled version of the alignment will be +displayed in a small window. A red box will indicate the currently +visible area of the alignment. Move the visible region using the mouse. +
    • + +
    +
  • + +
  • Alignment Window Format Menu +
      + +
    • Font...
      +
      Opens the "Choose Font" dialog box, in order to +change the font of the display and enable or disable 'smooth fonts' +(anti-aliasing) for faster alignment rendering.
    • + +
    • Wrap
      +
      When ticked, the alignment display is "wrapped" to the width of the +alignment window. This is useful if your alignment has only a few +sequences to view its full width at once.
      +Additional options for display of sequence numbering and scales are +also visible in wrapped layout mode:
      +
      +
        + +
      • Scale Above
        + Show the alignment column position scale.
      • + +
      • Scale Left
        + Show the sequence position for the first aligned +residue in each row in the left column of the alignment.
      • + +
      • Scale Right
        + Show the sequence position for the last aligned +residue in each row in the right-most column of the alignment.
      • + +
      • Show Sequence Limits
        +
        If this box is selected the sequence name will +have the start and end position of the sequence appended to the name, +in the format NAME/START-END
      • + +
      • Right Align Sequence ID
        +
        If this box is selected then the sequence +names displayed in the sequence label area will be aligned against the +left-hand edge of the alignment display, rather than the left-hand edge +of the alignment window.
      • + +
      • Show Hidden Markers
        +
        When this box is selected, positions in the +alignment where rows and columns are hidden will be marked by blue +arrows.
      • + +
      • Boxes
        +If this is selected the background of a residue will be coloured using +the selected background colour. Useful if used in conjunction with +"Colour Text."
      • + +
      • Text
        +
        If this is selected the residues will be +displayed using the standard 1 character amino acid alphabet.
      • + +
      • Colour Text
        +
        If this is selected the residues will be +coloured according to the background colour associated with that +residue. The colour is slightly darker than background so the amino +acid symbol remains visible.
      • + +
      • Show Gaps
        +
        When this is selected, gap characters will be +displayed as "." or "-". If unselected, then gap characters will appear +as blank spaces.
        +You may set the default gap character in preferences.
      • + +
      • Centre Annotation Labels
        +
        Select this to center labels along an +annotation row relative to their associated column (default is off, +i.e. left-justified).
      • + +
      • Show Unconserved
        +
        When this is selected, all consensus sequence +symbols will be rendered as a '.', highlighting mutations in highly +conserved alignments.
      • + +
      +
    • + +
    +
  • + +
-
  • Colour -
      -
    • Apply Colour To All Groups
      If - this is selected, any changes made to the background colour will - be applied to all currently defined groups.
      -
    • -
    • Colour - Text...
      Opens the Colour Text dialog box to - set a different text colour for light and dark background, and the - intensity threshold for transition between them.
      -
    • -
    • Colour Scheme options: None, ClustalX, - Blosum62 Score, Percentage Identity, Zappo, Taylor, - Hydrophobicity, Helix Propensity, Strand Propensity, Turn - Propensity, Buried Index, Nucleotide, Purine/Pyrimidine, User Defined
      See - colours for a - description of all colour schemes.
    • -
    • By Conservation
      See Colouring by - Conservation.
    • -
    • Modify Conservation Threshold
      Use - this to display the conservation threshold slider window. Useful - if the window has been closed, or if the 'by conservation' option - appears to be doing nothing!
    • -
    • Above Identity Threshold
      See - Above Percentage - Identity .
      -
    • -
    • Modify Identity Threshold
      Use - this to set the threshold value for colouring above Identity. - Useful if the window has been closed.
      -
    • -
    • By Annotation
      Colours - the alignment on a per-column value from a specified annotation. - See Annotation - Colouring.
    • -
    • By RNA Helices
      - Colours the helices of an RNA alignment loaded from a Stockholm file. See - RNA Helices - Colouring.
      -
    • -
  • -
  • Calculate -
      -
    • Sort -
        -
      • by ID
        This will sort - the sequences according to sequence name. If the sort is - repeated, the order of the sorted sequences will be inverted.
        -
      • -
      • by Length
        This will - sort the sequences according to their length (excluding gap - characters). If the sort is repeated, the order of the sorted - sequences will be inverted.
      • -
      • by Group
        This - will sort the sequences according to sequence name. If the sort - is repeated, the order of the sorted sequences will be inverted. -
      • -
      • by Pairwise Identity
        This - will sort the selected sequences by their percentage identity to - the consensus sequence. The most similar sequence is put at the - top.
      • -
      • The Sort - menu will have some additional options if you have just done a - multiple alignment calculation, or opened a tree viewer window.
        -
      • -
      -
    • -
    • Calculate Tree
      Functions - for calculating trees on the alignment or the currently selected - region. See calculating - trees. -
        -
      • Average Distance Using % Identity
      • -
      • Neighbour Joining Using % Identity
      • -
      • Average Distance Using Blosum62
      • -
      • Neighbour Joining Using Blosum62
        -
      • -
      - Note: Since Version 2.8.1, a number of additional similarity measures for tree calculation are provided in this menu. -
    • -
    • Pairwise Alignments
      Applies - Smith and Waterman algorithm to selected sequences. See pairwise alignments.
      -
    • -
    • Principal Component Analysis
      Shows - a spatial clustering of the sequences based on similarity scores calculated with - the alignment. See Principal - Component Analysis.
      -
    • -
    • Extract Scores ... (optional)
      This - option is only visible if Jalview detects one or more white-space - separated values in the description line of the alignment - sequences.
      When selected, these numbers are parsed into - sequence associated annotation which can then be used to sort the - alignment via the Sort by→Score menu.

      -
    • -
    • Autocalculate Consensus
      For - large alignments it can be useful to deselect "Autocalculate - Consensus" when editing. This prevents the sometimes lengthy - calculations performed after each sequence edit.
      -
    • -
    • Sort With New Tree
      When - enabled, Jalview will automatically sort the alignment when a new - tree is calculated or loaded onto it.
    • -
    • Show Flanking Regions
      Opens - a new alignment window showing any additional sequence data either - side of the current alignment. Useful in conjunction with 'Fetch - Database References' when the 'Trim Retrieved Sequences' option is - disabled to retrieve full length sequences for a set of aligned - peptides.
    • -
  • + +
  • Colour +
      + +
    • Apply Colour To All Groups
      +
      If this is selected, any changes made to the +background colour will be applied to all currently defined groups.
      +
    • + +
    • Colour +Text...
      +Opens the Colour Text dialog box to set a different text colour for +light and dark background, and the intensity threshold for transition +between them.
    • + +
    • Colour Scheme options: None, ClustalX, +Blosum62 Score, Percentage Identity, Zappo, Taylor, Hydrophobicity, +Helix Propensity, Strand Propensity, Turn Propensity, Buried Index, +Nucleotide, Purine/Pyrimidine, User Defined
      +
      See colours +for a description of all colour schemes.
      +
    • + +
    • By Conservation
      +
      See Colouring +by Conservation.
      +
    • + +
    • Modify Conservation Threshold
      +
      Use this to display the conservation threshold +slider window. Useful if the window has been closed, or if the 'by +conservation' option appears to be doing nothing!
      +
    • + +
    • Above Identity Threshold
      +
      See Above +Percentage Identity .
      +
    • + +
    • Modify Identity Threshold
      +
      Use this to set the threshold value for colouring +above Identity. Useful if the window has been closed.
      +
    • + +
    • By Annotation
      + Colours the alignment on a per-column value from a specified +annotation. See Annotation +Colouring.
      +
    • + +
    • By RNA Helices
      + Colours the helices of an RNA alignment loaded from a +Stockholm file. See RNA +Helices Colouring.
      +
    • + +
    +
  • -
  • Web Service Menu
    This menu - is dynamic, and may contain user-defined web service entries in - addition to any of the following ones: -
      -
    • Fetch DB References
      This - submenu contains options for accessing any of the database services - that Jalview is aware of (e.g. DAS sequence servers and the - WSDBFetch service provided by the EBI) to verify sequence start/end - positions and retrieve all database cross references and PDB ids - associated with all or just the selected sequences in the alignment. -
        -
      • 'Trim Retrieved Sequences' - when checked, Jalview will - discard any additional sequence data for accessions associated with - sequences in the alignment.
        Note: Disabling this - could cause out of memory errors when working with genomic - sequence records !
        Added in Jalview 2.8.1 -
      • -
      • 'Standard Databases' will check sequences against the EBI - databases plus any active DAS sequence sources<
      • -
      Other sub-menus allow you to pick a specific source to query - - sources are listed alphabetically according to their nickname. -

    • -
    -

    Selecting items from the following submenus will start a - remote service on compute facilities at the University of Dundee, or - elsewhere. You need a continuous network connection in order to use - these services through Jalview. -

    -
      -
    • Alignment
      Align the currently - selected sequences or all sequences in the alignment, or re-align - unaligned sequences to the aligned sequences. Entries in this menu - provide access to the various alignment programs supported by JABAWS. See the Multiple Sequence - Alignment webservice client entry for more information.
    • -
    • Secondary Structure Prediction -
        -
      • JPred Secondary Structure Prediction
        - Secondary structure prediction by network consensus. See - the Jpred3 client entry for - more information. The behaviour of this calculation depends on - the current selection: -
          -
        • If nothing is selected, and the displayed sequences - appear to be aligned, then a JNet prediction will be run for - the first sequence in the alignment, using the current - alignment. Otherwise the first sequence will be submitted for - prediction.
        • -
        • If just one sequence (or a region on one sequence) has - been selected, it will be submitted to the automatic JNet - prediction server for homolog detection and prediction.
        • -
        • If a set of sequences are selected, and they appear to - be aligned, then the alignment will be used for a Jnet - prediction on the first sequence in the set - (that is, the one that appears first in the alignment window). -
        • -
        -
    • -
    • Analysis
      -
        -
      • Multi-Harmony
        Performs - functional residue analysis on a protein family alignment with - sub-families defined on it. See the Multi-Harmony service entry for more - information. -
      • -
    • -
  • - + +
  • Calculate +
      + +
    • Sort +
        + +
      • by ID
        +This will sort the sequences according to sequence name. If the sort is +repeated, the order of the sorted sequences will be inverted.
      • + +
      • by Length
        +This will sort the sequences according to their length (excluding gap +characters). If the sort is repeated, the order of the sorted sequences +will be inverted.
      • + +
      • by Group
        +
        This will sort the sequences according to +sequence name. If the sort is repeated, the order of the sorted +sequences will be inverted.
      • + +
      • by Pairwise Identity
        +
        This will sort the selected sequences by their +percentage identity to the consensus sequence. The most similar +sequence is put at the top.
      • + +
      • The Sort +menu will have some additional options if you have just done a +multiple alignment calculation, or opened a tree viewer window.
        +
      • + +
      +
    • + +
    • Calculate Tree
      + Functions for calculating trees on the alignment or the +currently selected region. See calculating +trees.
      +
        + +
      • Average Distance Using % Identity
      • + +
      • Neighbour Joining Using % Identity
      • + +
      • Average Distance Using Blosum62
      • + +
      • Neighbour Joining Using Blosum62
        +
      • + +
      + Note: Since Version 2.8.1, a number of +additional similarity measures for tree calculation are provided in +this menu.
    • + +
    • Pairwise Alignments
      + Applies Smith and Waterman algorithm to selected sequences. +See pairwise alignments.
      +
    • + +
    • Principal Component Analysis
      + Shows a spatial clustering of the sequences based on +similarity scores calculated with the alignment. See Principal Component Analysis. +
      +
    • + +
    • Extract Scores ... (optional)
      + This option is only visible if Jalview detects one or more +white-space separated values in the description line of the alignment +sequences.
      +When selected, these numbers are parsed into sequence associated +annotation which can then be used to sort the alignment via the Sort +by→Score menu.

      +
    • + +
    • Autocalculate Consensus
      + For large alignments it can be useful to deselect +"Autocalculate Consensus" when editing. This prevents the sometimes +lengthy calculations performed after each sequence edit.
      +
    • + +
    • Sort With New Tree
      + When enabled, Jalview will automatically sort the alignment +when a new tree is calculated or loaded onto it.
      +
    • + +
    • Show Flanking Regions
      + Opens a new alignment window showing any additional sequence +data either side of the current alignment. Useful in conjunction with +'Fetch Database References' when the 'Trim Retrieved Sequences' option +is disabled to retrieve full length sequences for a set of aligned +peptides.
    • + +
    +
  • + + +
  • Web Service Menu
    + This menu is dynamic, and may contain user-defined web service +entries in addition to any of the following ones:
    +
      + +
    • Fetch DB References
      + This submenu contains options for accessing any of the +database services that Jalview is aware of (e.g. DAS sequence servers +and the WSDBFetch service provided by the EBI) to verify sequence +start/end positions and retrieve all database cross references and PDB +ids associated with all or just the selected sequences in the +alignment.
      +
        + +
      • 'Trim Retrieved Sequences' - when checked, +Jalview will discard any additional sequence data for accessions +associated with sequences in the alignment.
        + Note: Disabling this could cause out of memory errors +when working with genomic sequence records !
        + Added in Jalview 2.8.1
      • + +
      • 'Standard Databases' will check sequences +against the EBI databases plus any active DAS sequence sources<
      • + +
      + Other sub-menus allow you to pick a specific +source to query - sources are listed alphabetically according to their +nickname.
      +
    • + +
    + +

    Selecting items from the following submenus will start +a remote service on compute facilities at the University of Dundee, or +elsewhere. You need a continuous network connection in order to use +these services through Jalview.

    + +
      + +
    • Alignment
      + Align the currently selected sequences or all sequences in +the alignment, or re-align unaligned sequences to the aligned +sequences. Entries in this menu provide access to the various alignment +programs supported by JABAWS. +See the Multiple Sequence +Alignment webservice client entry for more information.
    • + +
    • Secondary Structure Prediction +
        + +
      • JPred Secondary Structure Prediction
        + Secondary structure prediction by network consensus. See +the Jpred3 client entry for +more information. The behaviour of this calculation depends on the +current selection:
        +
          + +
        • If nothing is selected, and the +displayed sequences appear to be aligned, then a JNet prediction will +be run for the first sequence in the alignment, using the current +alignment. Otherwise the first sequence will be submitted for +prediction.
        • + +
        • If just one sequence (or a region on +one sequence) has been selected, it will be submitted to the automatic +JNet prediction server for homolog detection and prediction.
        • + +
        • If a set of sequences are selected, and +they appear to be aligned, then the alignment will be used for a Jnet +prediction on the first sequence in the set (that is, +the one that appears first in the alignment window).
        • + +
        +
      • +
      +
    • + +
    • Analysis
      +
      +
        + +
      • Multi-Harmony
        + Performs functional residue analysis on a protein family +alignment with sub-families defined on it. See the Multi-Harmony service entry for +more information.
      • + +
      +
    • + +
    +
  • - - + + \ No newline at end of file diff --git a/lib/freemarker.jar b/lib/freemarker.jar new file mode 100644 index 0000000..2d59e2d Binary files /dev/null and b/lib/freemarker.jar differ diff --git a/src/jalview/help/freemarker/AllignmentMenuTemplateData.java b/src/jalview/help/freemarker/AllignmentMenuTemplateData.java new file mode 100644 index 0000000..a1b808b --- /dev/null +++ b/src/jalview/help/freemarker/AllignmentMenuTemplateData.java @@ -0,0 +1,59 @@ +package jalview.help.freemarker; + +import jalview.io.AppletFormatAdapter; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.util.HashMap; +import java.util.Map; + +import freemarker.template.Configuration; +import freemarker.template.Template; +import freemarker.template.TemplateException; + +public class AllignmentMenuTemplateData +{ + + public static void main(String[] args) + { + // System.out.println("Absolute Path " + new File().getAbsoluteFile()); + generateAllignmentMenuTemplateData(); + } + public static void generateAllignmentMenuTemplateData() + { + Configuration cfg = new Configuration(); + try + { + // Load template from source folder + Template template = cfg + .getTemplate("/help/freemarker_templates/alignmentMenu.ftl"); + + // Build the data-model + Map data = new HashMap(); + data.put("format_adapters", AppletFormatAdapter.WRITEABLE_FORMATS); + + // Console output + Writer out = new OutputStreamWriter(System.out); + template.process(data, out); + out.flush(); + + // File output + Writer file = new FileWriter( + new File( + "help/html/freemarker_html_output/alignmentMenu.html")); + template.process(data, file); + file.flush(); + file.close(); + + } catch (IOException e) + { + e.printStackTrace(); + } catch (TemplateException e) + { + e.printStackTrace(); + } + } +} diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index ed49d5e..d56d853 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -54,8 +54,8 @@ public class AppletFormatAdapter * method */ public static final String[] WRITEABLE_FORMATS = new String[] - { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "AMSA", - "STH", PhylipFile.FILE_DESC }; + { "AMSA", "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", + PhylipFile.FILE_DESC, "PFAM", "STH" }; /** * List of extensions corresponding to file format types in WRITABLE_FNAMES diff --git a/src/jalview/io/PhylipFile.java b/src/jalview/io/PhylipFile.java index ce65eea..faf6714 100644 --- a/src/jalview/io/PhylipFile.java +++ b/src/jalview/io/PhylipFile.java @@ -49,7 +49,7 @@ public class PhylipFile extends AlignFile public static final String FILE_DESC = "PHYLIP"; /** - * + * * @see {@link AlignFile#AlignFile()} */ public PhylipFile() @@ -58,7 +58,7 @@ public class PhylipFile extends AlignFile } /** - * + * * @param source * @throws IOException */ @@ -80,7 +80,7 @@ public class PhylipFile extends AlignFile /** * Parses the input source - * + * * @see {@link AlignFile#parse()} */ @Override @@ -98,8 +98,8 @@ public class PhylipFile extends AlignFile "First line must contain the number of specifies and number of characters"); } - int numberSpecies = Integer.parseInt(lineElements[0]), numberCharacters = Integer - .parseInt(lineElements[1]); + int numberSpecies = Integer.parseInt(lineElements[0]); + int numberCharacters = Integer.parseInt(lineElements[1]); if (numberSpecies <= 0) { @@ -163,9 +163,11 @@ public class PhylipFile extends AlignFile // first check sequence is the expected length if (sequences[i].length() != numberCharacters) { - throw new IOException(sequenceElements[i].getName() + String warnMessage = sequenceElements[i].getName() + " sequence is incorrect length - should be " - + numberCharacters + " but is " + sequences[i].length()); + + numberCharacters + " but is " + sequences[i].length(); + + throw new IOException(warnMessage); } sequenceElements[i].setSequence(sequences[i].toString()); seqs.add(sequenceElements[i]); @@ -190,7 +192,7 @@ public class PhylipFile extends AlignFile /** * Removes any whitespace from txt, used to strip and spaces added to * sequences to improve human readability - * + * * @param txt * @return */ @@ -202,7 +204,7 @@ public class PhylipFile extends AlignFile /** * According to the specification, the name cannot have parentheses, square * brackets, colon, semicolon, comma - * + * * @param name * @return * @throws IOException @@ -210,7 +212,7 @@ public class PhylipFile extends AlignFile private String validateName(String name) throws IOException { char[] invalidCharacters = new char[] - { '(', ')', '[', ']', ':', ';', ',' }; + { '(', ')', '[', ']', ':', ';', ',' }; for (char c : invalidCharacters) { if (name.indexOf(c) > -1) @@ -228,8 +230,8 @@ public class PhylipFile extends AlignFile * characters; a blank line is added between each matrix; no spacing is added * between the sequence characters. *

    - * - * + * + * * @see {@link AlignFile#print()} */ @Override @@ -242,7 +244,7 @@ public class PhylipFile extends AlignFile sb.append( (seqs.size() > 0) ? Integer .toString(seqs.get(0).getSequence().length) : "0") - .append(newline); + .append(newline); // Due to how IO is handled, there doesn't appear to be a way to store // if the original file was sequential or interleaved; if there is, then @@ -309,7 +311,7 @@ public class PhylipFile extends AlignFile sb.append( s.getSequence(start, Math.min(start + numInterleavedColumns, sequenceLength))) - .append(newline); + .append(newline); } } diff --git a/test/jalview/ws/jabaws/MinJabawsClientTests.java b/test/jalview/ws/jabaws/MinJabawsClientTests.java index a938dd6..145cddf 100644 --- a/test/jalview/ws/jabaws/MinJabawsClientTests.java +++ b/test/jalview/ws/jabaws/MinJabawsClientTests.java @@ -5,7 +5,6 @@ import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.List; -import java.util.function.Consumer; import org.junit.Test; @@ -18,67 +17,87 @@ import compbio.ws.client.Services; public class MinJabawsClientTests { - /** - * simple test for the benefit of JAL-1338 - * @throws Exception - */ - @SuppressWarnings("rawtypes") - @Test - public void msaTest() throws Exception { - String url; - RegistryWS registry = Jws2Client - .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws"); - if (registry != null) { + /** + * simple test for the benefit of JAL-1338 + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @Test + public void msaTest() throws Exception { + String url; + RegistryWS registry = Jws2Client + .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws"); + if (registry != null) + { - MsaWS msaservice = null; - for (Services service : registry.getSupportedServices()) { - if (service.equals(Services.ClustalOWS)) { - msaservice = (MsaWS) Jws2Client.connect(url, service); - if (msaservice != null) { - break; - } - } - } - if (msaservice == null) { - fail("couldn't find a clustalO service on the public registry"); - } - FastaSequence fsq = new FastaSequence("seqA", - "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE"); - List iseqs = new ArrayList(); - for (int i = 0; i < 9; i++) { - iseqs.add(new FastaSequence(fsq.getId() + i, fsq.getSequence() - + fsq.getSequence().substring(i + 3, i + 3 + i))); - } + MsaWS msaservice = null; + for (Services service : registry.getSupportedServices()) + { + if (service.equals(Services.ClustalOWS)) + { + msaservice = (MsaWS) Jws2Client.connect(url, service); + if (msaservice != null) + { + break; + } + } + } + if (msaservice == null) + { + fail("couldn't find a clustalO service on the public registry"); + } + FastaSequence fsq = new FastaSequence("seqA", + "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE"); + List iseqs = new ArrayList(); + for (int i = 0; i < 9; i++) + { + iseqs.add(new FastaSequence(fsq.getId() + i, fsq.getSequence() + + fsq.getSequence().substring(i + 3, i + 3 + i))); + } - String jobid = msaservice.align(iseqs); - if (jobid != null) { - JobStatus js = null; - do { - try { - Thread.sleep(500); - } catch (InterruptedException q) { - } - ; - js = msaservice.getJobStatus(jobid); - } while (!js.equals(JobStatus.FAILED) - && !js.equals(JobStatus.CANCELLED) - && !js.equals(JobStatus.FINISHED)); - assertEquals("Trial alignment failed. State was " + js.name(), - js, JobStatus.FINISHED); - assertEquals( - "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly", - msaservice.getResult(jobid).getSequences().size(), - iseqs.size()); - msaservice.getResult(jobid).getSequences() - .forEach(new Consumer() { - @Override - public void accept(FastaSequence t) { - System.out.println(">"+t.getId()); - System.out.println(t.getFormattedFasta()); - } - }); - } + String jobid = msaservice.align(iseqs); + if (jobid != null) + { + JobStatus js = null; + do + { + try + { + Thread.sleep(500); + } catch (InterruptedException q) + { + } + ; + js = msaservice.getJobStatus(jobid); + } while (!js.equals(JobStatus.FAILED) + && !js.equals(JobStatus.CANCELLED) + && !js.equals(JobStatus.FINISHED)); + assertEquals("Trial alignment failed. State was " + js.name(), js, + JobStatus.FINISHED); + assertEquals( + "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly", + msaservice.getResult(jobid).getSequences().size(), + iseqs.size()); - } - } + List fastaSequences = msaservice.getResult(jobid).getSequences(); + for(FastaSequence fastaSequence : fastaSequences){ + System.out.println(">" + fastaSequence.getId()); + System.out.println(fastaSequence.getFormattedFasta()); + } + } + + // msaservice.getResult(jobid).getSequences() + // .forEach(new Consumer() + // { + // @Override + // public void accept(FastaSequence t) + // { + // System.out.println(">" + t.getId()); + // System.out.println(t.getFormattedFasta()); + // } + // }); + } + + } } +