diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java index 6de611e8956eecb99e1662edfd52e4bddf00f60b..f0c30e2f1965268ea3dc76ddae956e65767ec195 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java @@ -204,7 +204,7 @@ public class ProteinViewer extends AbstractViewer<IEntityInformationHolder> impl String accessionNumber = info.getAccessionNumber(); TabItem item = new TabItem(accessionNumber); item.setLayout(new FitLayout()); - PropertyGrid propertyGrid = new PropertyGrid(viewContext, 3); + PropertyGrid propertyGrid = new PropertyGrid(viewContext, 4); final Map<String, Object> properties = new LinkedHashMap<String, Object>(); properties.put(viewContext.getMessage(Dict.ACCESSION_NUMBER), info); propertyGrid.registerPropertyValueRenderer(IndistinguishableProteinInfo.class, @@ -213,6 +213,7 @@ public class ProteinViewer extends AbstractViewer<IEntityInformationHolder> impl .getDescription()); String markedSequence = markPeptides(info.getSequence(), peptides); properties.put(viewContext.getMessage(Dict.SEQUENCE_NAME), markedSequence); + properties.put(viewContext.getMessage(Dict.COVERAGE), info.getCoverage()); propertyGrid.setProperties(properties); ContentPanel contentPanel = new ContentPanel(); contentPanel.setHeight("100%"); @@ -300,6 +301,8 @@ public class ProteinViewer extends AbstractViewer<IEntityInformationHolder> impl String markedSequence = markPeptides(proteinDetails.getSequence(), proteinDetails.getPeptides()); properties.put(viewContext.getMessage(Dict.SEQUENCE_NAME), markedSequence); + + properties.put(viewContext.getMessage(Dict.COVERAGE), proteinDetails.getCoverage()); propertyGrid.registerPropertyValueRenderer(Peptide.class, PropertyValueRenderers .createPeptideRenderer(viewContext)); diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/ProteinDetailsBO.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/ProteinDetailsBO.java index 9f7092acc194e7ebe4c6e641bff847393be02ead..25a8e021224cb2e3fe66f1498a07fba9deaf7bbf 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/ProteinDetailsBO.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/ProteinDetailsBO.java @@ -71,6 +71,7 @@ class ProteinDetailsBO extends AbstractBusinessObject implements IProteinDetails details.setSequence(protein.getSequence()); details.setDatabaseNameAndVersion(protein.getDatabaseNameAndVersion()); details.setProbability(protein.getProbability()); + details.setCoverage(100 * protein.getCoverage()); details.setFalseDiscoveryRate(protein.getFalseDiscoveryRate()); String dataSetPermID = protein.getDataSetPermID(); details.setDataSetPermID(dataSetPermID); @@ -108,6 +109,7 @@ class ProteinDetailsBO extends AbstractBusinessObject implements IProteinDetails info.setAccessionNumberType(builder.getTypeOrNull()); info.setDescription(protein.getDescription()); info.setSequence(protein.getSequence()); + info.setCoverage(100 * protein.getCoverage()); infos.add(info); } return infos; diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/dataaccess/IProteinQueryDAO.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/dataaccess/IProteinQueryDAO.java index 2888433b7adb6ca0addab2fc34fe4c5db3bc2b63..0bbed1dc0b756ac020d9360fe8c9274595a8eadc 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/dataaccess/IProteinQueryDAO.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/dataaccess/IProteinQueryDAO.java @@ -87,7 +87,7 @@ public interface IProteinQueryDAO extends BaseQuery public DataSet<Sequence> listProteinSequencesByProteinReference(long proteinReferenceID); @Select("select ds.id as data_set_id, ds.perm_id as data_set_perm_id, p.id as protein_id, " - + "probability, count(pe.id) as peptide_count, amino_acid_sequence, s.db_id, name_and_version " + + "probability, coverage, count(pe.id) as peptide_count, amino_acid_sequence, s.db_id, name_and_version " + "from data_sets as ds join experiments as e on ds.expe_id = e.id " + " join proteins as p on p.dase_id = ds.id " + " join identified_proteins as ip on ip.prot_id = p.id " @@ -95,7 +95,7 @@ public interface IProteinQueryDAO extends BaseQuery + " join databases as db on s.db_id = db.id " + " left join peptides as pe on pe.prot_id = p.id " + "where s.prre_id = ?{2} and e.perm_id = ?{1} and ip.is_primary = 't' " - + "group by data_set_id, data_set_perm_id, protein_id, probability, " + + "group by data_set_id, data_set_perm_id, protein_id, probability, coverage, " + " amino_acid_sequence, s.db_id, name_and_version order by data_set_perm_id") public DataSet<IdentifiedProtein> listProteinsByProteinReferenceAndExperiment( String experimentPermID, long proteinReferenceID); @@ -103,7 +103,7 @@ public interface IProteinQueryDAO extends BaseQuery @Select("select * from peptides where prot_id = ?{1}") public DataSet<IdentifiedPeptide> listIdentifiedPeptidesByProtein(long proteinID); - @Select("select accession_number, description, amino_acid_sequence " + @Select("select accession_number, description, amino_acid_sequence, coverage " + "from identified_proteins as ip join sequences as s on ip.sequ_id = s.id " + " join protein_references as pr on s.prre_id = pr.id " + "where ip.prot_id = ?{1} and ip.is_primary = 'f'") diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/IndistinguishableProteinInfo.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/IndistinguishableProteinInfo.java index e96a36e187772781ecb45f10536f6bf22abac21b..508b79e529d4bc01563d27008dfc69bc45547f45 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/IndistinguishableProteinInfo.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/IndistinguishableProteinInfo.java @@ -31,6 +31,8 @@ public class IndistinguishableProteinInfo extends AccessionNumberProvider private String description; + private double coverage; + public final String getSequence() { return sequence; @@ -50,4 +52,14 @@ public class IndistinguishableProteinInfo extends AccessionNumberProvider { this.description = description; } + + public void setCoverage(double coverage) + { + this.coverage = coverage; + } + + public double getCoverage() + { + return coverage; + } } diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/ProteinDetails.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/ProteinDetails.java index aa306a7c62763caf53595b4084ca2b6a9f2a5f16..694f6d867a14499d1a743190dd8f7ebc5e8b8a3b 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/ProteinDetails.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/ProteinDetails.java @@ -36,6 +36,8 @@ public class ProteinDetails implements IsSerializable, Serializable private String databaseNameAndVersion; private double probability; + + private double coverage; private double falseDiscoveryRate; @@ -86,6 +88,16 @@ public class ProteinDetails implements IsSerializable, Serializable this.probability = probability; } + public void setCoverage(double coverage) + { + this.coverage = coverage; + } + + public double getCoverage() + { + return coverage; + } + public void setFalseDiscoveryRate(double falseDiscoveryRate) { this.falseDiscoveryRate = falseDiscoveryRate; diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IdentifiedProtein.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IdentifiedProtein.java index 10ffe5044197ccf0ab58aa1f81fa9bad46449716..58f3d7a7ae4e376a9f43f99359a70946de1f2ade 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IdentifiedProtein.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IdentifiedProtein.java @@ -51,6 +51,9 @@ public class IdentifiedProtein extends AbstractDTOWithID @ResultColumn("probability") private double probability; + @ResultColumn("coverage") + private double coverage; + private double falseDiscoveryRate; public final String getDataSetPermID() @@ -113,6 +116,16 @@ public class IdentifiedProtein extends AbstractDTOWithID this.probability = probability; } + public void setCoverage(double coverage) + { + this.coverage = coverage; + } + + public double getCoverage() + { + return coverage; + } + public final double getFalseDiscoveryRate() { return falseDiscoveryRate; diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IndistinguishableProtein.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IndistinguishableProtein.java index 05aaac1a08afc8f2978303e9bddd7aeb66ecb381..8414b778160daac28085b5ea51a48642796b486e 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IndistinguishableProtein.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/IndistinguishableProtein.java @@ -30,6 +30,9 @@ public class IndistinguishableProtein extends ProteinReference @ResultColumn("amino_acid_sequence") private String sequence; + @ResultColumn("coverage") + private double coverage; + public void setSequence(String sequence) { this.sequence = sequence; @@ -40,4 +43,14 @@ public class IndistinguishableProtein extends ProteinReference return sequence; } + public void setCoverage(double coverage) + { + this.coverage = coverage; + } + + public double getCoverage() + { + return coverage; + } + } diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/ProteinReferenceWithProtein.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/ProteinReferenceWithProtein.java index 2eb03624586a83ea8f5e8f8343520f3a216508b4..65db03747b8ea14e84cd49ebaa830d3c1c629273 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/ProteinReferenceWithProtein.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/dto/ProteinReferenceWithProtein.java @@ -81,5 +81,4 @@ public class ProteinReferenceWithProtein extends ProteinReference implements Ser return coverage; } - }