use of ubic.gemma.model.expression.bioAssayData.BioAssayDimension in project Gemma by PavlidisLab.
the class QuantitationTypeData method getPreferredDataVectors.
/**
* @return The 'preferred' data vectors - NOT the processed data vectors!
*/
private Collection<DesignElementDataVector> getPreferredDataVectors() {
Collection<DesignElementDataVector> result = new HashSet<>();
List<BioAssayDimension> dimensions = this.getBioAssayDimensions();
List<QuantitationType> qtypes = this.getPreferredQTypes();
for (DesignElementDataVector vector : vectors) {
if (!(vector instanceof ProcessedExpressionDataVector) && dimensions.contains(vector.getBioAssayDimension()) && qtypes.contains(vector.getQuantitationType()))
result.add(vector);
}
return result;
}
use of ubic.gemma.model.expression.bioAssayData.BioAssayDimension in project Gemma by PavlidisLab.
the class QuantitationTypeData method getMissingValueQTypes.
private List<QuantitationType> getMissingValueQTypes() {
List<QuantitationType> result = new ArrayList<>();
List<BioAssayDimension> dimensions = this.getBioAssayDimensions();
for (BioAssayDimension dim : dimensions) {
for (DesignElementDataVector vector : vectors) {
if (!vector.getBioAssayDimension().equals(dim))
continue;
QuantitationType qType = vector.getQuantitationType();
if (!qType.getType().equals(StandardQuantitationType.PRESENTABSENT))
continue;
// ArrayDesign adUsed = arrayDesignForVector( vector );
// if ( arrayDesign != null && !adUsed.equals( arrayDesign ) ) continue;
// if we get here, we're in the right place.
result.add(qType);
// on to the next dimension.
break;
}
}
return result;
}
use of ubic.gemma.model.expression.bioAssayData.BioAssayDimension in project Gemma by PavlidisLab.
the class QuantitationTypeData method getBioAssayDimensions.
/**
* @return a single BioAssayDimension except if there are multiple array designs used in the experiment.
*/
public List<BioAssayDimension> getBioAssayDimensions() {
List<BioAssayDimension> result = new ArrayList<>();
if (dimMap.keySet().size() > 0) {
result.addAll(dimMap.values());
return result;
}
if (this.vectors.isEmpty()) {
throw new IllegalStateException("No vectors, no bioassay dimensions");
}
ExpressionDataMatrixBuilder.log.debug("Checking all vectors to get bioAssayDimensions");
Collection<BioAssayDimension> dimensions = new HashSet<>();
for (DesignElementDataVector vector : vectors) {
ArrayDesign adUsed = this.arrayDesignForVector(vector);
if (!dimMap.containsKey(adUsed)) {
dimMap.put(adUsed, vector.getBioAssayDimension());
}
dimensions.add(vector.getBioAssayDimension());
}
ExpressionDataMatrixBuilder.log.debug("got " + dimensions.size() + " bioAssayDimensions");
result.addAll(dimensions);
return result;
}
use of ubic.gemma.model.expression.bioAssayData.BioAssayDimension in project Gemma by PavlidisLab.
the class QuantitationTypeData method getBkgSubChannelA.
public ExpressionDataDoubleMatrix getBkgSubChannelA() {
if (dat == null)
dat = this.getQuantitationTypesNeeded();
List<BioAssayDimension> dimensions = this.getBioAssayDimensions();
List<QuantitationType> qTypes = new ArrayList<>();
for (BioAssayDimension dimension : dimensions) {
QuantitationType qType = dat.getBkgSubChannelA(dimension);
if (qType != null)
qTypes.add(qType);
}
if (qTypes.size() != 0) {
return this.makeMatrix(qTypes);
}
return null;
}
use of ubic.gemma.model.expression.bioAssayData.BioAssayDimension in project Gemma by PavlidisLab.
the class QuantitationTypeData method getBackgroundChannelA.
public ExpressionDataDoubleMatrix getBackgroundChannelA() {
if (dat == null)
dat = this.getQuantitationTypesNeeded();
List<BioAssayDimension> dimensions = this.getBioAssayDimensions();
List<QuantitationType> qTypes = new ArrayList<>();
for (BioAssayDimension dimension : dimensions) {
QuantitationType qType = dat.getBackgroundChannelA(dimension);
if (qType != null)
qTypes.add(qType);
}
if (qTypes.size() != 0) {
return this.makeMatrix(qTypes);
}
return null;
}
Aggregations