Search in sources :

Example 6 with FactorValueValueObject

use of ubic.gemma.model.expression.experiment.FactorValueValueObject in project Gemma by PavlidisLab.

the class ExpressionExperimentSubSetDaoImpl method getFactorValuesUsed.

@Override
public Collection<FactorValueValueObject> getFactorValuesUsed(Long subSetId, Long experimentalFactor) {
    // noinspection unchecked
    List<FactorValue> list = this.getSessionFactory().getCurrentSession().createQuery("select distinct fv from ExpressionExperimentSubSet es join es.bioAssays ba join ba.sampleUsed bm " + "join bm.factorValues fv where es.id=:es and fv.experimentalFactor.id = :ef ").setParameter("es", subSetId).setParameter("ef", experimentalFactor).list();
    Collection<FactorValueValueObject> result = new HashSet<>();
    for (FactorValue fv : list) {
        result.add(new FactorValueValueObject(fv));
    }
    return result;
}
Also used : FactorValueValueObject(ubic.gemma.model.expression.experiment.FactorValueValueObject) FactorValue(ubic.gemma.model.expression.experiment.FactorValue) HashSet(java.util.HashSet)

Aggregations

FactorValueValueObject (ubic.gemma.model.expression.experiment.FactorValueValueObject)6 FactorValue (ubic.gemma.model.expression.experiment.FactorValue)3 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)2 ArrayDesignValueObject (ubic.gemma.model.expression.arrayDesign.ArrayDesignValueObject)2 ExperimentalFactorValueObject (ubic.gemma.model.expression.experiment.ExperimentalFactorValueObject)2 HashSet (java.util.HashSet)1 StopWatch (org.apache.commons.lang3.time.StopWatch)1 StopWatch (org.springframework.util.StopWatch)1 SearchResult (ubic.gemma.core.search.SearchResult)1 Condition (ubic.gemma.core.tasks.visualization.DifferentialExpressionGenesConditionsValueObject.Condition)1 IdentifiableValueObject (ubic.gemma.model.IdentifiableValueObject)1 ExpressionExperimentSet (ubic.gemma.model.analysis.expression.ExpressionExperimentSet)1 BibliographicReference (ubic.gemma.model.common.description.BibliographicReference)1 Characteristic (ubic.gemma.model.common.description.Characteristic)1 SearchSettingsValueObject (ubic.gemma.model.common.search.SearchSettingsValueObject)1 BioAssay (ubic.gemma.model.expression.bioAssay.BioAssay)1 BioAssayValueObject (ubic.gemma.model.expression.bioAssay.BioAssayValueObject)1 BioMaterial (ubic.gemma.model.expression.biomaterial.BioMaterial)1 BioMaterialValueObject (ubic.gemma.model.expression.biomaterial.BioMaterialValueObject)1 CompositeSequenceValueObject (ubic.gemma.model.expression.designElement.CompositeSequenceValueObject)1