Search in sources :

Example 1 with PhenotypeValueObject

use of ubic.gemma.model.genome.gene.phenotype.valueObject.PhenotypeValueObject in project Gemma by PavlidisLab.

the class PhenotypeAssociationDaoImpl method loadAllNeurocartaPhenotypes.

/**
 * find all phenotypes in Neurocarta, this was requested by AspireBD
 */
@Override
public Collection<PhenotypeValueObject> loadAllNeurocartaPhenotypes() {
    Collection<PhenotypeValueObject> phenotypeValueObjects = new HashSet<>();
    List<?> res = this.getSessionFactory().getCurrentSession().createQuery("select distinct c.valueUri,c.value from PhenotypeAssociation p join p.phenotypes c").list();
    for (Object o : res) {
        Object[] oa = (Object[]) o;
        String valueUri = (String) oa[0];
        String value = (String) oa[1];
        PhenotypeValueObject p = new PhenotypeValueObject(value, valueUri);
        phenotypeValueObjects.add(p);
    }
    return phenotypeValueObjects;
}
Also used : PhenotypeValueObject(ubic.gemma.model.genome.gene.phenotype.valueObject.PhenotypeValueObject) ExternalDatabaseStatisticsValueObject(ubic.gemma.model.genome.gene.phenotype.valueObject.ExternalDatabaseStatisticsValueObject) GeneValueObject(ubic.gemma.model.genome.gene.GeneValueObject) PhenotypeValueObject(ubic.gemma.model.genome.gene.phenotype.valueObject.PhenotypeValueObject) GeneEvidenceValueObject(ubic.gemma.model.genome.gene.phenotype.valueObject.GeneEvidenceValueObject) CharacteristicValueObject(ubic.gemma.model.genome.gene.phenotype.valueObject.CharacteristicValueObject)

Aggregations

GeneValueObject (ubic.gemma.model.genome.gene.GeneValueObject)1 CharacteristicValueObject (ubic.gemma.model.genome.gene.phenotype.valueObject.CharacteristicValueObject)1 ExternalDatabaseStatisticsValueObject (ubic.gemma.model.genome.gene.phenotype.valueObject.ExternalDatabaseStatisticsValueObject)1 GeneEvidenceValueObject (ubic.gemma.model.genome.gene.phenotype.valueObject.GeneEvidenceValueObject)1 PhenotypeValueObject (ubic.gemma.model.genome.gene.phenotype.valueObject.PhenotypeValueObject)1