use of org.nextprot.api.core.domain.EntryReportStats in project nextprot-api by calipho-sib.
the class EntryGeneReportServiceImpl method reportEntry.
@Cacheable("entry-reports")
@Override
public List<EntryReport> reportEntry(String entryAccession) {
EntryReportStats ers = entryReportStatsService.reportEntryStats(entryAccession);
EntryReport report = new EntryReport();
report.setAccession(entryAccession);
report.setDescription(ers.getDescription());
report.setProteinExistence(ers.getProteinExistence());
report.setPropertyTest(EntryReport.IS_PROTEOMICS, ers.isProteomics());
report.setPropertyTest(EntryReport.IS_ANTIBODY, ers.isAntibody());
report.setPropertyTest(EntryReport.IS_3D, ers.is3D());
report.setPropertyTest(EntryReport.IS_DISEASE, ers.isDisease());
report.setPropertyCount(EntryReport.ISOFORM_COUNT, ers.countIsoforms());
report.setPropertyCount(EntryReport.VARIANT_COUNT, ers.countVariants());
report.setPropertyCount(EntryReport.PTM_COUNT, ers.countPTMs());
report.setPropertyCount(EntryReport.CURATED_PUBLICATION_COUNT, ers.countCuratedPublications());
report.setPropertyCount(EntryReport.ADDITIONAL_PUBLICATION_COUNT, ers.countAdditionalPublications());
report.setPropertyCount(EntryReport.PATENT_COUNT, ers.countPatents());
report.setPropertyCount(EntryReport.SUBMISSION_COUNT, ers.countSubmissions());
report.setPropertyCount(EntryReport.WEB_RESOURCE_COUNT, ers.countWebResources());
return duplicateReportForEachGene(entryAccession, report);
}
use of org.nextprot.api.core.domain.EntryReportStats in project nextprot-api by calipho-sib.
the class FilterAndPropertiesFieldsBuilder method init.
@Override
protected void init(Entry entry) {
EntryReportStats ers = entryReportStatsService.reportEntryStats(entry.getUniqueName());
// Filters and entry properties
EntryProperties props = entry.getProperties();
addField(Fields.ISOFORM_NUM, ers.countIsoforms());
int cnt;
cnt = ers.countPTMs();
if (cnt > 0) {
addField(Fields.PTM_NUM, cnt);
}
cnt = ers.countVariants();
if (cnt > 0) {
addField(Fields.VAR_NUM, cnt);
}
String filters = "";
if (props.getFilterstructure())
filters += "filterstructure ";
if (props.getFilterdisease())
filters += "filterdisease ";
if (props.getFilterexpressionprofile())
filters += "filterexpressionprofile ";
if (props.getFiltermutagenesis())
filters += "filtermutagenesis ";
if (props.getFilterproteomics())
filters += "filterproteomics ";
if (filters.length() > 0) {
addField(Fields.FILTERS, filters.trim());
}
// max length among all isoforms
addField(Fields.AA_LENGTH, props.getMaxSeqLen());
}
Aggregations