Ticket #554 (closed: fixed)

Opened 3 years ago

Last modified 15 months ago

Direct link to native search results view

Reported by: fredrik Owned by: olle
Milestone: Proteios SE 2.8 Keywords:
Cc:

Description

Users sometimes want to see the original Mascot or X!Tandem view of their search results. It would therefore be useful if one could access the original search results view from the File view, in case Mascot or X!Tandem servers are configured. Preferably a new browser window should open up with the view.

In the case of Mascot, the URI to the search result can be found in the results file, but it is currently not imported. The MascotFileReader? could be extended with a function to get the result URI.

In the case of X!tandem, the GPM number and the server configuration can be used to get the correct URL. This is not fail safe, since the server URI is not found in the results file.

Change History

comment:1 Changed 3 years ago by olle

  • Status changed from new to assigned

Ticket accepted.

comment:2 Changed 3 years ago by olle

Traceability note:

  • Import of Mascot result files was introduced in Ticket #140 (Mascot search results to hit import).
  • Retrieval of Mascot result files was introduced in Ticket #456 (Retrieval of Mascot XML results from Mascot server).
  • Import of X!Tandem result files was introduced in Ticket #129 (Implement X!Tandem Search Results import).
  • Retrieval of X!Tandem result files was introduced in Ticket #362 (Run X! Tandem from Proteios).

comment:3 Changed 3 years ago by olle

Discussion of obtaining URL of original X!Tandem result file:

  • Obtaining URL of an original X!Tandem result file might be more complicated than specified in the ticket description, as some result files get a time stamp suffix appended to the file name, as described in Proteios wiki page X!Tandem Search Engine Interface - Basic Operation. Such a result file still contains a reference inside the file to a relative output path based on the result filename without time stamp. However, the result file downloaded to Proteios contains the time stamp suffix, so if the latter filename has not been changed, it should be possible to parse the filename of the original X!Tandem result file from the filename of the downloaded file. The latter filename cannot be used directly, since normally the basename of the source spectrum file is used as prefix, and the original ".xml" file extension is exchanged for "xt.xml".

comment:4 Changed 3 years ago by olle

Design discussion:

It cannot be guaranteed that the constructed web link to original search results will work, as even if it is correctly constructed, the search results may have been removed, The full link should therefore be displayed, in order for the user to inspect it, and possibly modify it to make it work, if the user is in possession of more information than Proteios regarding the search conditions. For a working link, this also allows the user to either open the link in the original window, open it in a new browser window, or in a new browser tab.

Design of first version of functionality for viewing original search results for Mascot and X!Tandem:

  • The functionality will be implemented as two file extensions for viewing original results for search results files, one for Mascot search results files, and one for X!Tandem.
  • Search result files having wrong file type should be rejected. If rejection of a file is reported as an error in the GUI, only the last rejected file need to be reported.
  • Each extension will present a table with one row for each selected result file, that has not been rejected.
  • Each table row should contain the selected search result filename and the constructed web link.
  • When constructing the web links to original search results, it may be assumed that the same result inspection script is used for all web sites of the same type, i.e. one script for Mascot and one for X!Tandem.
  • Clicking on a web link should redirect to the corresponding web page. Since the link is a usual web link, the user has the option of selecting to open the link in a new window or a new tab, since several web browsers supports these options.
  • The table should be preceded by a short information on what data was used to construct the web link. In case of X!Tandem, it should be suggested to exchange the used web site url for the correct one, if the constructed link does not work.

comment:5 Changed 3 years ago by olle

(In [3276]) Refs #554. First version of support for viewing original search results for Mascot and X!Tandem:

  1. New class/file action/file/ViewOriginalMascotResultsExtension.java

in client/servlet/ added. It obtains a list of file id values for Mascot search result files and returns a table with input filenames and corresponding web links to original Mascot search results. The web link url is obtained from the "URI" XML tag in the input search result file.

  1. New class/file action/file/ViewOriginalXTandemResultsExtension.java

in client/servlet/ added. It obtains a list of file id values for X!Tandem search result files and returns a table with input filenames and corresponding web links to original X!Tandem search results. The web link url is constructed from the input search result filename and configuration of web site for X!Tandem search.

comment:6 Changed 3 years ago by olle

Design update:

  • File properties form should be extended with a new "Original search results" tool-bar button, when the file type indicates a Mascot or X!Tandem result file. Clicking on the button should display a table with a single entry for the input filename and corresponding web link to original search results.

comment:7 Changed 3 years ago by olle

(In [3279]) Refs #554. Refs #287. Refs #290. File properties form extended with a new "Original search results" tool-bar button for inspecting original search results, when the file type indicates a Mascot or X!Tandem result file:

  1. Class/file action/file/ViewActiveFile.java in client/servlet/

updated in public method void runMe() by adding a new "Original search results" tool-bar button, when the file type indicates a Mascot or X!Tandem result file. The button is coupled to an action link to either action ViewOriginalMascotResultsExtension or ViewOriginalXTandemResultsExtension, depending on the file type. The id value of the file item is added to valid parameter FormFactory.VID, thereby giving the same result as if the file had been selected in the file table, and the extension then selected.

  1. English dictionary file locale/en/dictionary in client/servlet/

updated with entry for new string key.

  1. Default icon settings file "default" in icons/ in

client/servlet/ updated with icon assignment for new string key.

comment:8 Changed 3 years ago by olle

Design update for construction of link to original Mascot search results:

  • If the url obtained from the "URI" XML tag in the input search result file is a relative path, the link should be constructed from this url and and configuration of web site for Mascot search. The link text will be set to the url obtained from the "URI" XML tag, in order to indicate to the user, what input was used to construct the link.

comment:9 Changed 3 years ago by olle

(In [3280]) Refs #554. Support for viewing original search results for Mascot updated for the case when the url obtained from the "URI" XML tag in the input search result file is a relative path:

  1. Class/file action/file/ViewOriginalMascotResultsExtension.java

in client/servlet/ updated in protected method void runMe() to exchange a relative path for path on Mascot search web site, when constructing a link to original search results. The link text still shows the url obtained from the "URI" XML tag. The description text is extended to cover the new method of constructing the link.

comment:10 Changed 3 years ago by olle

(In [3282]) Refs #556. Refs #507. Refs #554. First version of view action for search results file cell in Hits table:

  1. Class/file action/ActionFactory.java in client/servlet/ updated

in public synchronized method ActionLink getViewActionLink(AttributeDefinition ad) by setting view action for search results file cell in Hits table to ViewHitSearchResultFile.class.

  1. Class/file action/hit/ViewActiveHit.java in client/servlet/

updated in private method Table constructHitTable(Hit hit) by setting view action for search results file cell in single hit view table to ViewHitSearchResultFile.class.

  1. New class/file action/hit/ViewHitSearchResultFile.java in

client/servlet/ added. It transfers the selected hit id to session attribute ViewActiveHit.VHITID, and then forwards the action to new action class ViewActiveHitSearchResultFile.class.

  1. New class/file action/hit/ViewActiveHitSearchResultFile.java in

client/servlet/ added. It the results in the search results file have been imported, the view action is set to class ViewActiveSpectrumSearch for inspecting the imported results, otherwise class ViewActiveFile for inspecting the search results file properties. Finally, the action is forwarded to the chosen view action class.

comment:11 Changed 3 years ago by olle

  • severity changed from 16 to 4

Severity set to 4, since the design needed some consideration, but the implementation to a large extent could be based on code in existing classes.

comment:12 Changed 3 years ago by olle

  • Status changed from assigned to closed
  • Resolution set to fixed

Ticket closed as the desired functionality has been added.

comment:13 Changed 15 months ago by olle

(In [4040]) Refs #720. Refs #554. Refs #287. Refs #290. First version of file type extensions button for file properties form:

  1. New class/file FileTypeContext.java in client/servlet/ added.

It is based on class HitContext, but has an attribute String fileTypeString, defining the file type for the context.

  1. Class/file action/file/ViewActiveFile.java in client/servlet/

updated:

  1. Public method void runMe() updated by exchanging code connected

to adding an "Original search results" button for a call to new private method Form addFileTypeExtensionsButton(Form form, File file), that adds a file type extension button.

  1. New private method Form addFileTypeExtensionsButton(Form form, File file)

added. It adds a file type extensions button to the toolbar, with a pop-up link to a table with extension classes implementing interface ContextEnabled through new class FileTypeContext, where the context file type attribute value equals that of the current file item.

  1. Class/file action/file/ViewOriginalMascotResultsExtension.java

in client/servlet/ updated to implement ContextEnabled through the new class FileTypeContext for file type string FileType.MASCOT_XML.

  1. Class/file action/file/ViewOriginalXTandemResultsExtension.java

in client/servlet/ updated to implement ContextEnabled through the new class FileTypeContext for file type string FileType.TANDEM_RESULT.

  1. English dictionary file locale/en/dictionary in client/servlet/

updated with new string keys.

  1. Default icon settings file "default" in icons/ in client/servlet/

updated with new icon assignments.

Note: See TracTickets for help on using tickets.