Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#535 closed (fixed)

Comparison of Hits reports

Reported by: Fredrik Levander Owned by: olle
Milestone: Proteios SE 2.8 Keywords:
Cc:

Description (last modified by Fredrik Levander)

It should be possible to make comparisons of Hits reports, i.e. unions and quantitative comparisons between parts of different Hits reports.

In the first revision it should be possible to compare the results of two queries, but we should consider enabling more complex comparisons later on.

Typically we would like to compare protein or peptide lists. Typically we would like to select for non-gel comparison:

  1. project
  2. local sample id (all in project / or one or more of the available)
  3. fraction (all or one or more of the available)
  4. peptide / protein
  5. combined FDR cutoff (no or limit)

For the lists we want to compare.

The resulting lists of hits should then be matched and output as: Common hits. Unique to sample x Unique to sample y

The actual matching should be on external ID for proteins and on description /sequence) for peptides. Since modifications can be written out differently from different search engines, matching should only be up to the first space. To start with, the entire hit can be printed out for each entry. For common hits, they can be printed first for sample x and then for sample y, right after each other. Here we can start with tab separated files.

A nice feature would be a Venn diagram with the numbers summarised, but it doesn't fit into the tab-separated file.

In the report all query settings should be written out.

Later on we would like to compare gels, and then the comparison should be per spot. We should also consider comparing a gel with a non-gel run. Then the matching should be as for non-gel.

It is worth to note that the same peptide sequence or protein id may appear multiple times in a list. Sorting on these could make things slightly clearer. For the statistics summary, the number of unique entries would be wanted. There could also be an option in the form to only list entries once, and then only the one with the lowest combined FDR could be kept for each peptide or protein list.

Change History (46)

comment:1 Changed 11 years ago by Gregory Vincic

Owner: changed from Gregory Vincic to olle

comment:2 Changed 11 years ago by olle

Status: newassigned

Ticket accepted.

comment:3 Changed 11 years ago by Fredrik Levander

component: servletplugin
Description: modified (diff)
priority: minormajor

comment:4 Changed 11 years ago by Fredrik Levander

Description: modified (diff)

comment:5 Changed 11 years ago by olle

Design discussion.

Summary of comparison variable used for different comparison modes, based on ticket description:

Comparison mode Comparison type Comparison variable
Gel-based protein Spot Id
Gel-based peptide Spot Id
Non-gel-based protein External Id
Non-gel-based peptide Description/sequence
Mixed (Gel/Non-gel) protein External Id
Mixed (Gel/Non-gel) peptide Description/sequence
Last edited 9 years ago by olle (previous) (diff)

comment:6 Changed 11 years ago by olle

Design update:

Indata selection process and created output file:

  1. An active project is selected. The created comparison report file is stored in the project directory of this project.
  2. A button "Hits Comparison Report" is added to the tool bar for the Hits table.
  3. Clicking on the "Hits Comparison Report" button in the tool bar for the Hits table, first shows a form for selecting two projects from selection boxes. The selection boxes should contain all projects that are represented in the Hits table, and the logged-in user is permitted to use.
  4. After selection of two projects, a form is shown for selection of gel external id or local sample id and fraction id values from multi-selection boxes, as well as combined search FDR (False Discovery Rate) upper cutoff for each of the selected projects. Several id values may be selected for each variable. The multi-selection boxes should contain all represented values of the variable for the project in question. In addition, it should be possible to select the comparison type (protein/peptide) and output filename prefix. Optional addition of the names of the compared projects to the output filename prefix should be available by checking a check box (default unchecked). If project names should be added to the output filename prefix, a check should be made that the resulting filename does not exceed the allowed length, in which case the prefix should be shortened in the added project name part to produce an allowed filename.
  5. The output filename is created by appending an underscore character and the comparison type (protein/peptide) to the output filename prefix, plus the file extension ".tsv" for a file with tab-separated values.

comment:7 Changed 11 years ago by olle

Design update.

Presentation of common and unique hits:

  • Following the design in the ticket description, each common hit should be printed first for project 1, followed by the corresponding for the project 2. However, since several matched hits for project 2 might be found for a hit in project 1, an initial column should display the project number "1" or "2" (not the project id value), in order to clearly indicate from what project the hit was taken.
  • A table header line should be printed for each table/list of common hits, unique hits for project 1, and unique hits for project 2. The column names in the header should be the localized strings used in the GUI table header for columns represented there, in order for the user to easier identify the variables.

comment:8 Changed 11 years ago by olle

Design update on output filename prefix:

  • The default entry for the optional filename prefix will consist of the string "HitsComparisonReport_" concatenated to a timestamp in "YYYYMMDD_HHMM" format and a final undercore "_", e.g. on Dec 24, 2009, 23:55, the default optional filename prefix will be "HitsComparisonReport_20091224_2355_". If used for "protein" comparison type, the resulting output file with tab-separated values will have name "HitsComparisonReport_20091224_2355_protein.tsv". If optional project names are appended to the prefix, for projects "Demo Project" and "KW_090125b" the filename will be "HitsComparisonReport_20091224_2355_Demo_Project-KW_090125b_protein.tsv" (note that blanks in project names are replaced by underscores, and the project names are separated by a hyphen "-").

comment:9 Changed 11 years ago by olle

(In [3320]) Refs #535. Api/core updated to simplify database query for unique fraction id values in Hits for project:

  1. Class/file core/Hit.java in api/core/ updated with new public

static method List<String> getUniqueFractionIds(Project project, DbControl dc) for getting a list of unique fraction id values obtained from a database query.

  1. XML file conf/common-queries.xml in api/core/ updated with

query for unique fraction id values in Hits for project.

comment:10 Changed 11 years ago by olle

(In [3321]) Refs #535. Refs #287. Refs #290. First revision of support for comparison of hits report:

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

client/servlet/ added. It is coupled to new Hits table tool bar button "Hits Comparison Report" via a TableToolbarContext. It displays a form obtained by calling FormFactory new public method Form getHitsComparisonReportProjectSelectionForm(Project project, List<Project> projectList), and then forwards the results and action to new class HitsComparisonReport.

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

client/servlet/ added. It retrieves parameter values from valid parameters and displays a form obtained by calling FormFactory new public method Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault). It then forwards the results and action to new class CreateHitsComparisonReportJob.

  1. New class/file action/hit/CreateHitsComparisonReportJob.java

in client/servlet/ added. It retrieves parameter values from valid parameters and creates a job using new plug-in class HitsComparisonReportPlugin. Localization strings for hit table columns etc. are transferred to the created job.

  1. New class/file plugins/HitsComparisonReportPlugin.java in

plugin/ added. It compares hit lists obtained by database queries for the two selected projects, and stores the result in tables with tab-separated values in a file located in the project directory of the active project.

  1. Class/file gui/form/FormFactory.java in client/servlet/ updated:
  2. New public method

Form getHitsComparisonReportProjectSelectionForm(Project project, List<Project> projectList) added for selecting two projects to compare hits for.

  1. New public method

Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault) added for selecting various comparison parameter values.

  1. New private convenience method

Select<VString> selectMultiSelectionExternalGelId(DbControl dc, Project project, VString vStringParam) added.

  1. New public convenience method

Select<VString> selectMultiSelectionLocalSampleId(DbControl dc, Project project, VString vStringParam) added.

  1. New public convenience method

Select<VString> selectMultiSelectionFractionId(DbControl dc, Project project, VString vStringParam) added.

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

updated with new entries for various string keys.

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

client/servlet/ updated with icon assignments for various buttons.

comment:11 Changed 11 years ago by olle

(In [3323]) Refs #535. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated by activating filter on FDR (False Discovery Rate) upper cutoff:

  1. Private instance variable double fdrCutoff removed, since

it is not used.

  1. Private method List<Hit> fetchProjectHitList(..., double cutoff, ...)

updated to use a cutoff argument of type Float instead, List<Hit> fetchProjectHitList(..., Float cutoff, ...).

  1. Private method ItemQuery<Hit> createBasicHitQuery(..., double cutoff, ...)

updated to use a cutoff argument of type Float instead, ItemQuery<Hit> createBasicHitQuery(..., Float cutoff, ...). The created query is now filtered with respect to the input cutoff value, if the latter is not null.

comment:12 Changed 11 years ago by Fredrik Levander

(In [3336]) Refs #535. Changed initial query to find selectable projects so that it is not iterating through all the hits.

comment:13 Changed 11 years ago by olle

Design update:

  • The initial revision of Hits Comparison has some names of input fields, internal variables, and constants that are less appropriate for the case of comparing hits in the same project. These names should be changed to refer to two hit selections instead of two projects.
  • For non-gel comparison, the fraction id is optional and should be described as optional in the GUI.

comment:14 Changed 11 years ago by olle

(In [3341]) Refs #535. Refs #287. Support for comparison of hits report updated by changing some names of input fields, internal variables, and constants to refer to two hit selections instead of two projects:

  1. Class/file action/hit/HitsComparisonReportStep1.java in

client/servlet/ updated in protected method void runMe().

  1. Class/file action/hit/HitsComparisonReport.java in

client/servlet/ updated in protected method void runMe() and in names of valid parameters.

  1. Class/file action/hit/CreateHitsComparisonReportJob.java

in client/servlet/ updated:

  1. Protected method void runMe() updated.
  2. private List<String> fetchLocalizerKeyList()` updated.
  1. Class/file plugins/HitsComparisonReportPlugin.java in

plugin/ updated:

  1. Private inner class HitsComparisonData updated.
  2. Public method

void run(Request request, Response response, ProgressReporter progress) updated.

  1. Public method

void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress) updated.

  1. Name of private method

List<Hit> fetchProjectHitList(DbControl dc, Project theProject, ...) changed to List<Hit> fetchHitSelectionHitList(DbControl dc, Project theProject, ...).

  1. Class/file gui/form/FormFactory.java in client/servlet/ updated:
  2. Public method

Form getHitsComparisonReportProjectSelectionForm(Project project, List<Project> projectList) updated.

  1. Public method

Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault) updated.

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

updated.

comment:15 Changed 11 years ago by olle

(In [3342]) Refs #535. Refs #287. Support for comparison of hits report updated by indicating that selection of fraction id values is optional:

  1. Class/file action/hit/HitsComparisonReport.java in

client/servlet/ updated in protected method void runMe().

  1. Class/file gui/form/FormFactory.java in client/servlet/ updated

in public method Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault) .

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

updated with new string key.

comment:16 Changed 11 years ago by olle

Design update:

  • When an active project is selected, a menu entry for hits comparison should be added to the sub-menu to cascade menu <active project> -> Reports.

comment:17 Changed 11 years ago by olle

(In [3343]) Refs #535. Refs #287. Support for comparison of hits report updated by adding menu entry for hits comparison to the sub-menu to cascade menu <active project> -> Reports:

  1. Class/file gui/MainMenu.java in client/servlet/ updated in

private method Node createProjectMenu() by adding node for hits comparison.

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

updated with new string key.

comment:18 Changed 11 years ago by olle

Design update:

  • The instruction text for the first hits comparison form should inform the user that hits comparison should be performed after combining hits, followed by by protein assembly (the last step however not necessary for comparing peptides).
  • A summary of the number of hits in each of the three categories, "A: Common hits", "B: Unique hits for hit selection 1", and "C: Unique hits for hit selection 2", should be printed in the report before the tables with hits in each category.
  • The tables with hits in each category should have an initial column with the category descriptor "A", "B", or "C".

comment:19 Changed 11 years ago by olle

(In [3348]) Refs #535. Class/file action/hit/HitsComparisonReportStep1.java in client/servlet/ updated:

  1. Protected method void runMe() updated in instruction text

by adding note that hits comparison should be performed after combining hits, followed by protein assembly (last step however not necessary for comparing peptides).

comment:20 Changed 11 years ago by olle

(In [3349]) Refs #535. Refs #287. Support for hits comparison updated:

  1. Class/file action/hit/CreateHitsComparisonReportJob.java in

client/servlet/ updated in private method List<String> fetchLocalizerKeyList() by adding string keys.

  1. Class/file plugins/HitsComparisonReportPlugin.java in plugin/

updated in public method void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress):

  1. A summary of the number of hits in each of the three categories,

"A: Common hits", "B: Unique hits for hit selection 1", and "C: Unique hits for hit selection 2", is printed in the report before the tables with hits in each category.

  1. The tables with hits in each category now have an initial column

with the category descriptor "A", "B", or "C".

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

comment:21 Changed 11 years ago by olle

Design update:

  • The presented result tables should be sorted after the value of the comparison variable (currently all tables are sorted after external id). More sorting requirements may be added later for gel-based comparisons.

comment:22 Changed 11 years ago by olle

(In [3350]) Refs #535. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated to sort the presented result tables after the value of the comparison variable:

  1. Public method

void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress) updated to set value of new variable String sortParameterStr to correspond to the comparison variable, after which it is used as argument when calling updated private method List<Hit> fetchHitSelectionHitList(...).

  1. Private method

List<Hit> fetchHitSelectionHitList(..., boolean externalIdOrderingFlag) updated by exchanging argument boolean externalIdOrderingFlag for String sortParameterStr, List<Hit> fetchHitSelectionHitList(..., String sortParameterStr). The value of sortParameterStr is used as argument when calling updated private method ItemQuery<Hit> createBasicHitQuery(...).

  1. Private method

ItemQuery<Hit> createBasicHitQuery(..., boolean externalIdOrderingFlag) updated by exchanging argument boolean externalIdOrderingFlag for String sortParameterStr, ItemQuery<Hit> createBasicHitQuery(..., String sortParameterStr). If the value of sortParameterStr differs from null, the query results are sorted after the parameter corresponding to the value.

comment:23 Changed 11 years ago by olle

Design update for protein comparison:

  • The hits comparison form should be extended with a new section for protein comparison settings only. It should include a check box for ignoring combined search FDR (False Discovery Rate) upper cutoff (default checked), and a select box for score type, including options "Proteios Protein", "Mascot protein score", and "Tandem protein score" (default "Proteios Protein").
  • If protein hits are compared, the combined search FDR values should be ignored, if this setting was selected, and only hits with the selected score type should be compared.
  • If peptide hits are compared, the resulting hit tables should not be affected by the new settings.

comment:24 Changed 11 years ago by olle

(In [3351]) Refs #535. Refs #287. Support for hits comparison updated with protein comparison settings:

  1. Class/file action/hit/HitsComparisonReport.java in

client/servlet/ updated with new valid parameters for score type and flag to ignore FDR cutoff values.

  1. Class/file action/hit/CreateHitsComparisonReportJob.java in

client/servlet/ updated in protected method void runMe() by obtaining values from valid parameters of score type and flag to ignore FDR cutoff values, and transferring the values to the created job via job parameters.

  1. Class/file gui/form/FormFactory.java in client/servlet/ updated

in public method Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault) by adding new section for protein comparison settings, with check box for ignoring FDR cutoff values and select box for score type.

  1. Class/file plugins/HitsComparisonReportPlugin.java in plugin/

updated:

  1. Private inner class HitsComparisonData updated with new

instance variables with accessor methods for score type and flag to ignore FDR cutoff values.

  1. Public method

void run(Request request, Response response, ProgressReporter progress) updated to obtain values from job parameters for score type and flag to ignore FDR cutoff, and transferring these values to the created HitsComparisonData object given as argument when calling public method void doExport(DbControl dc, HitsComparisonData hcd, ....

  1. Public method

void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress) updated to get values from HitsComparisonData argument for score type and flag to ignore FDR cutoff. If the latter flag is set, FDR cutoff values are reset to null. The score type is used as argument when calling updated private method List<Hit> fetchHitSelectionHitList(...).

  1. Private method List<Hit> fetchHitSelectionHitList(...)

updated with new argument String scoreTypeStr. The value of scoreTypeStr is used as argument when calling updated private method ItemQuery<Hit> createBasicHitQuery(...).

  1. Private method ItemQuery<Hit> createBasicHitQuery(...)

updated with new argument String scoreTypeStr. If the value of scoreTypeStr differs from null, the query is filtered to only include hits with this score type value.

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

comment:25 Changed 11 years ago by olle

Design update for protein comparison:

  • The select box for score type should contain score types represented in the projects in the two hit selections (default should still be "Proteios Protein", if present).

comment:26 Changed 11 years ago by olle

(In [3352]) Refs #535. Class/file gui/form/FormFactory.java in client/servlet/ updated for hits comparison of proteins by obtaining score type options represented in the projects of the hit selections:

  1. Public method

Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault) updated by calling public static method List<String> getUniqueScoreTypes(Project project, DbControl dc) in class Hit to obtain score types represented in the projects of the hit selections, for use as options in score type select box.

comment:27 Changed 11 years ago by olle

Design update:

  • Note! This replaces the comparison variable summary entered 2009-06-22 11:45:04, as spot Id is now never used as comparison variable. However, for gel-based hit comparison, results are presented for each spot Id.

Definition: Result table set = A set of tables consisting of one table with common hits, followed by tables with unique hits for each hit selection.

Summary of comparison variable used for different comparison modes, based on ticket description:

Comparison mode Comparison type Comparison variable Presentation
Gel-based protein External Id One result table set for each spot Id
Gel-based peptide Description/sequence One result table set for each spot Id
Non-gel-based protein External Id Single result table set
Non-gel-based peptide Description/sequence Single result table set
Mixed (Gel/Non-gel) protein External Id Single result table set
Mixed (Gel/Non-gel) peptide Description/sequence Single result table set
Last edited 9 years ago by olle (previous) (diff)

comment:28 Changed 11 years ago by olle

(In [3354]) Refs #535. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated for gel-based hits comparison:

  1. Public method

void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress) updated:

  1. Comparison variable is now selected only depending on whether

protein or peptide comparison is performed.

  1. Gel-based comparison results are now presented as one result

table set for each spot Id present in the hit selections.

  1. Printing of a result table set has been extracted into a

separate private convenience method void printComparisonResult(PrintWriter writer, ...).

  1. New private convenience method

void printComparisonResult(PrintWriter writer, HitsComparisonData hcd, int numCommonHits, int numHitSelection1UniqueHits, int numHitSelection2UniqueHits, List<Hit> hitSelection1HitList, List<Hit> hitSelection2HitList, List<List<Integer>> hitSelection1CommonHitList, List<Boolean> hitSelection1UniqueHitList, List<Boolean> hitSelection2UniqueHitList) added. It prints a result table set for the input data.

  1. New private convenience method

List<Integer> fetchSpotIdList(List<Hit> hitSelection1HitList, List<Hit> hitSelection2HitList) added. It fetches spot id values from the hit selection hit lists.

comment:29 Changed 11 years ago by olle

Resolution: fixed
Status: assignedclosed

Ticket closed as the the core features of hits comparison have been implemented.

comment:30 Changed 10 years ago by olle

(In [3529]) Refs #639. Refs #535. Refs #287. Hits comparison of protein lists updated with option to only use leading proteins when comparing proteins:

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

updated with new public valid parameter VBoolean VONLYUSELEADINGPROTEINS.

  1. Class/file gui/form/FormFactory.java in client/servlet/ updated in

public method Form getHitsComparisonReportForm(Project project, Project project1, Project project2, String filenamePrefixDefault) by adding check-box coupled to valid parameter HitsComparisonReport.VONLYUSELEADINGPROTEINS.

  1. Class/file action/hit/CreateHitsComparisonReportJob.java in

client/servlet/ updated:

  1. Protected method void runMe() updated by obtaining value of

new valid VBoolean parameter HitsComparisonReport.VONLYUSELEADINGPROTEINS and setting it as values of new job parameter "onlyUseLeadingProteins".

  1. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated:
  2. Private inner class HitsComparisonData updated with new instance

variable boolean onlyUseLeadingProteins with public accessor methods. The default value is false.

  1. Public method

void run(Request request, Response response, ProgressReporter progress) updated to obtain value of new job parameter "onlyUseLeadingProteins" and transferring it to new instance of HitsComparisonData.

  1. Public method

void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress) updated by giving value of onlyUseLeadingProteins flag as argument when calling private method List<Hit> ofetchHitSelectionHitList(DbControl dc, Project theProject, ...). If the comparison is not of proteins, the value has first been reset to false.

  1. Private method

List<Hit> fetchHitSelectionHitList(DbControl dc, Project theProject, ...) updated with new argument Boolean onlyUseLeadingProteins, that is given as argument when calling private method private ItemQuery<Hit> createBasicHitQuery(Project theProject, ...).

  1. Private method

ItemQuery<Hit> createBasicHitQuery(Project theProject, ...) updated with new argument Boolean onlyUseLeadingProteins. If its value is true, the query is restricted to entries with property "firstInCombination" being equal to null.

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

updated with new string key.

comment:31 Changed 10 years ago by olle

(In [3530]) Refs #639. Refs #535. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated in java-doc for private method List<Hit> fetchHitSelectionHitList(DbControl dc, Project theProject, ...).

comment:32 Changed 10 years ago by olle

(In [3531]) Refs #639. Refs #535. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated in java-doc for private method ItemQuery<Hit> createBasicHitQuery(Project theProject, ...).

comment:33 Changed 9 years ago by olle

(In [4097]) Refs #730. Refs #535. Refs #287. Hits Comparison Report updated in GUI, to hopefully be simpler and increase consistency:

  1. Class/file action/hit/HitsComparisonReportStep1.java in client/servlet/ updated in page title.
  1. Class/file action/hit/HitsComparisonReport.java in client/servlet/ updated in page title.
  1. Class/file gui/form/ProjectComparisonForm.java in client/servlet/ updated to use one fieldset for each hit selection, when selecting projects, as separate fieldsets are used when selecting filter settings.
  1. English dictionary file locale/en/dictionary in client/servlet/ updated with new string keys.

comment:34 Changed 9 years ago by olle

(In [4098]) Refs #730. Refs #535. Class/file action/hit/CreateHitsComparisonReportJob.java in client/servlet/ updated to check that at least one gel id or local sample id is selected for each hit selection, and otherwise return to the selection page and display an error message:

  1. Protected method void runMe() updated to call new private convenience method boolean stringListHasNonTrivialItem(List<String> stringList) to check that at least one gel id or local sample id is selected for each hit selection, and otherwise return to the selection page and display an error message.
  1. New private convenience method boolean stringListHasNonTrivialItem(List<String> stringList) added. It returns true if the list is not null, and contains at least one item that is not null or an empty string, otherwise false is returned.

comment:35 Changed 9 years ago by olle

(In [4099]) Refs #737. Refs #535. Refs #287. Hits comparison report updated with new option to include modifications when comparing peptides:

  1. Class/file action/hit/HitsComparisonReport.java in client/servlet/ updated with new public static valid parameter VBoolean VINCLUDEMODIFICATIONS.
  1. Class/file gui/form/HitComparisonForm.java in client/servlet/ updated by adding new fieldset for peptide comparisons only and adding a new check box coupled to valid parameter HitsComparisonReport.VINCLUDEMODIFICATIONS to it. Default setting for including modifications is false. Code for hidden forward field moved to after visible fields.
  1. Class/file action/hit/CreateHitsComparisonReportJob.java in client/servlet/ updated to obtain value of new valid parameter VBoolean HitsComparisonReport.VINCLUDEMODIFICATIONS and set the value to new job parameter (value equal to null are set to false, which is the default value).
  1. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated to obtain the value of new job parameter for the include modifications flag. Private inner class HitsComparisonData updated with new private instance variable boolean modificationsIncluded with public accessor methods, and the value of the new boolean variable is set to that of the new job parameter for including modifications. Private method String fetchCompareString(Hit hit, boolean gelBasedComparison, String comparisonType) updated with new argument Boolean modificationsIncluded, and the full description/sequence string is used for comparisons when the value of modificationsIncluded is true, otherwise the string up to the first space is used.
  1. English dictionary file locale/en/dictionary in client/servlet/ updated with new string keys.

comment:36 Changed 9 years ago by olle

(In [4101]) Refs #736. Refs #535. Hits comparison updated to use a class with a more appropriate name than ProjectComparisonForm for the form of the first step when selecting comparison parameters, as more selections than projects are now made:

  1. Class/file action/hit/HitsComparisonReportStep1.java in client/servlet/ updated to use new form class HitComparisonStep1Form instead of previous ProjectComparisonForm.
  1. New class/file gui/form/HitComparisonStep1Form.java in client/servlet/ added. In its initial version, its functionality is a copy of previous file gui/form/ProjectComparisonForm.java in client/servlet/.

comment:37 Changed 9 years ago by olle

(In [4102]) Refs #736. Refs #535. Refs #287. Hits comparison report updated in GUI by placing general selections on first selection page, and display relevant options on second selection page, based on the initial selections. Option to select quantitative comparison report added, but no functionality for this alternative added:

  1. Class/file action/hit/HitsComparisonReportStep1.java in client/servlet/ updated in instruction text.
  1. Class/file gui/form/HitComparisonStep1Form.java in client/servlet/ updated by adding new initial fieldset for selecting general hits comparison settings.
  1. Class/file action/hit/HitsComparisonReport.java in client/servlet/ updated. New valid parameter VBoolean VQUANTITATIVECOMPARISONREPORT added. Protected method void runMe() updated to retrieve values of general hits comparison settings from valid parameters and transfer them to form class HitComparisonForm. Instruction text updated.
  1. Class/file gui/form/HitComparisonForm.java in client/servlet/ updated by adding arguments Boolean quantitativeComparison and String comparisonType to constructor. GUI updated by addition of new initial fieldset reporting values of general hits comparison settings, and only displaying relevant options, based on the initial selections.
  1. English dictionary file locale/en/dictionary in client/servlet/ updated with new string keys.

comment:38 Changed 9 years ago by olle

(In [4103]) Refs #736. Refs #535. Hits comparison report updated in GUI layout to place comparison type specific selections directly after display of general settings. Instruction text modified to be compatible with the new layout, and simplify addition of more selections:

  1. Class/file action/hit/HitsComparisonReportStep1.java in client/servlet/ updated in instruction text.
  1. Class/file action/hit/HitsComparisonReport.java in client/servlet/ updated in instruction text.
  1. Class/file gui/form/HitComparisonForm.java in client/servlet/ updated to place comparison type specific selections directly after display of general settings.

comment:39 Changed 9 years ago by olle

(In [4104]) Refs #736. Refs #535. Class Hit updated to facilitate database queries needed for quantitative comparison report:

  1. Class/file core/Hit.java in api/core/ updated by adding new public static methods List<String> getUniquePeptideSequences(Project project, DbControl dc), List<Integer> getUniqueCharges(Project project, DbControl dc), and List<String> getUniqueExternalIds(Project project, DbControl dc). The new methods use new predefined queries to obtain the result lists.
  1. XML file conf/common-queries.xml in api/core/ updated with new predefined queries "GET_UNIQUE_PEPTIDE_SEQUENCES_IN_HITS_FOR_PROJECT", "GET_UNIQUE_CHARGES_IN_HITS_FOR_PROJECT", and "GET_UNIQUE_EXTERNALIDS_IN_HITS_FOR_PROJECT".

comment:40 Changed 9 years ago by olle

(In [4105]) Refs #736. Refs #535. Refs #287. First preliminary version of hits comparison report with support for quantitative comparison report:

  1. Class/file action/hit/HitsComparisonReport.java in client/servlet/ updated by addition of new valid parameters VString VQUANTITYVARIABLE and VString VQUANTITYENTRY. Displayed instruction text is now modified depending on whether a non-quantitative or quantitative comparison report should be created.
  1. Class/file gui/form/HitComparisonForm.java in client/servlet/ updated to display different option depending on whether a non-quantitative or quantitative comparison report should be created. Selection of gel external id for the two hit selections is not available for quantitative comparison report. New private convenience method Select<VString> fillStringMultiSelectionBox(Select<VString> selectBox, List<String> optionStringList, String optionVariableName) added to simplify to create string multi-selection boxes.
  1. Class/file action/hit/CreateHitsComparisonReportJob.java in client/servlet/ updated to support quantitative comparison report. Input data consistency checks modified depending on whether a non-quantitative or quantitative comparison report should be created. Values of new valid parameters HitsComparisonReport.VQUANTITYVARIABLE and HitsComparisonReport.VQUANTITYENTRY are retrieved from request and transfered to the job by new job parameters. Different plug-in classes are used for the created job depending on whether a non-quantitative or quantitative comparison report should be created (HitsComparisonReportPlugin for non-quantitative and new plug-in class HitsComparisonQuantitativeReportPlugin for quantitative). New key strings needed for quantitative comparison report added to list used to obtain localized strings used by the plug-in.

  1. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated by removal of unused private instance variable boolean gelBasedExport and related public accessor methods.
  1. New class/file plugins/HitsComparisonQuantitativeReportPlugin.java in plugin/ added. It is based on existing class HitsComparisonReportPlugin, but modified for quantitative comparison report. Hit selection and report generation completely re-written. Unused methods from class HitsComparisonReportPlugin kept in code for now, in case they should be needed later.
  1. English dictionary file locale/en/dictionary in client/servlet/ updated with new string keys.
Last edited 9 years ago by olle (previous) (diff)

comment:41 Changed 9 years ago by olle

(In [4108]) Refs #736. Refs #535. Class/file plugins/HitsComparisonQuantitativeReportPlugin.java in plugin/ updated to exchange column title "Peptide Sequence" for "Description" for comparison type "protein"", as the data is obtained from the description field of the current hit (for peptides, this field contains the sequence plus optional modification information, explaining the original title of the column):

  1. Private method String fetchTabDelimitedHitTableHeaderForQuantitativeReport(List<String> hitSelection1LocalSampleIdList, List<String> hitSelection2LocalSampleIdList) updated by added initial argument String comparisonType. If value of new argument comparisonType is "protein", column title "Peptide Sequence" is exchanged for "Description".
  1. Public method void doExport(DbControl dc, HitsComparisonData hcd, File outCoreFile, ProgressReporter progress) update to include new argument String comparisonType when calling private method String fetchTabDelimitedHitTableHeaderForQuantitativeReport(String comparisonType, ...).

comment:42 Changed 9 years ago by olle

(In [4109]) Refs #736. Refs #535. Class/file plugins/HitsComparisonQuantitativeReportPlugin.java in plugin/ updated by fix of bug, that made t-test p-value be printed, when less than two valid entries for the quantity variable existed for each hit selection:

  1. Private method void printQuantitativeReportTableRow(...) updated by using variables hitSelection1Items and hitSelection2Items to check if more than one valid entry for the quantity variable exist for each hit selection, when deciding if a t-test p-value should be printed. Previously these numbers were taken from Apache statistics library objects ssa and ssb via calls ssa.getN() and ssb.getN(), but if one of the latter values was initially > 1 and the other == 0, two extra entries were made to the object with the smaller count before the t-test p-value calculation, resulting in both objects having a count larger than 1, when checked if the t-test p-value should be printed.

comment:43 Changed 9 years ago by olle

(In [4110]) Refs #736. Refs #535. Refs #287. Quantitative comparison report updated by clarification of table header titles, addition of a column after each quantity value column for a local sample id showing the number of entries used to obtain the value, simplification of statistical calculations by omitting use of dummy values when values are missing, and use of ratio entry "+" in case values exist for hit selection 1 but not for hit selection 2, and "-" if it is the other way around:

  1. Class/file plugins/HitsComparisonQuantitativeReportPlugin.java in plugin/ updated:
    a. Addition of string constants for string selection values, in order to avoid risk of wrong functionality due to misspellings in the source code (provided the constants themselves are given the correct values :)).
    b. Table header titles have been clarified.
    c. Private method Double processHitValue(Hit hit, Double columnValue, String quantityVariable, String quantityEntry) exchanged for new private methods, Double fetchHitQuantityValue(Hit hit, String quantityVariable) and Double updateColumnValue(Double columnValue, Double newValue, String quantityEntry), that together give the same functionality, but in addition allow the number of valid quantity values to be counted for a local sample id, which is reported in a new column after the column with the quantity value.
    d. Simplification of statistical calculations by omitting use of dummy values when values are missing (meaning that there is no need for variables statisticsNullValue and nullvalue). The ratio calculations are now performed using the Apache statistics library objects ssa and ssb.
    e. Ratio presentation updated to show entry "+" in case values exist for hit selection 1 but not for hit selection 2, and "-" if it is the other way around.
  1. Class/file action/hit/CreateHitsComparisonReportJob.java in client/servlet/ updated by addition of new string keys to list used to obtain localized strings used by the plug-in.
  1. English dictionary file locale/en/dictionary in client/servlet/ updated with new string keys.

comment:44 Changed 9 years ago by olle

(In [4162]) Refs #639. Refs #535. Hits comparison updated to set MIME type of created output file in tab-separated format to "text/plain", in order to make it easier to inspect directly:

  1. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated in public method void doExport(DbControl dc, HitsComparisonData hcd, Directory outCoreDir, String filename, ProgressReporter progress) to set MIME type of created output file in tab-separated format to "text/plain", in order to make it easier to inspect directly.

comment:45 Changed 9 years ago by Fredrik Levander

(In [4235]) Refs #535. Gel based comparison with FDR cutoff on proteins should ignore score type.

comment:46 Changed 9 years ago by olle

(In [4240]) Refs #765. Refs #535. Class/file plugins/HitsComparisonReportPlugin.java in plugin/ updated to hopefully fix permission problems in non-quantitative hits comparison when comparing hits from projects shared by other user:

  1. Private method void printComparisonResult(PrintWriter writer, HitsComparisonData hcd, List<List<GHit>> groupedHitList) updated to set active project to that of the hit before calling private method String fetchTabDelimitedHitTableRow(Hit hit). The project is set as active by calling new private convenience method Project setHitProjectActive(Hit hit, Project currentActiveProject, ItemFactory factory). The active project is reset to the one that was active when method printComparisonResult(...) was entered, if any.
  1. New private convenience method Project setHitProjectActive(Hit hit, Project currentActiveProject, ItemFactory factory) added. It sets the hit project as active and returns the active project.
Note: See TracTickets for help on using tickets.