Search in sources :

Example 1 with EntryProperties

use of org.nextprot.api.core.domain.EntryProperties in project nextprot-api by calipho-sib.

the class EntryPropertiesIntegrationDaoTest method testFindEntryProperties.

@Test
public void testFindEntryProperties() {
    EntryProperties props = this.entryPropertieDao.findEntryProperties("NX_P51659");
    assertTrue(props.getMaxSeqLen() > 760);
    assertTrue(props.getInteractionCount() > 17);
    assertTrue(props.getFiltermutagenesis());
    assertTrue(props.getFilterstructure());
    assertTrue(props.getFilterdisease());
    assertTrue(props.getFilterproteomics());
    assertTrue(props.getFilterexpressionprofile());
}
Also used : EntryProperties(org.nextprot.api.core.domain.EntryProperties) CoreUnitBaseTest(org.nextprot.api.core.test.base.CoreUnitBaseTest) Test(org.junit.Test)

Example 2 with EntryProperties

use of org.nextprot.api.core.domain.EntryProperties 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());
}
Also used : EntryProperties(org.nextprot.api.core.domain.EntryProperties) EntryReportStats(org.nextprot.api.core.domain.EntryReportStats)

Aggregations

EntryProperties (org.nextprot.api.core.domain.EntryProperties)2 Test (org.junit.Test)1 EntryReportStats (org.nextprot.api.core.domain.EntryReportStats)1 CoreUnitBaseTest (org.nextprot.api.core.test.base.CoreUnitBaseTest)1