use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class QuantitationTypeData method getUsefulQuantitationTypes.
/**
* @param eeQtTypes the QTs
* @return just the quantitation types that are likely to be 'useful': Preferred, present/absent, signals and background
* from both channels (if present).
*/
public static Collection<QuantitationType> getUsefulQuantitationTypes(Collection<QuantitationType> eeQtTypes) {
Collection<QuantitationType> neededQtTypes = new HashSet<>();
for (QuantitationType qType : eeQtTypes) {
String name = qType.getName();
if (qType.getIsPreferred()) {
ExpressionDataMatrixBuilder.log.info("Preferred=" + qType);
neededQtTypes.add(qType);
} else if (qType.getIsMaskedPreferred()) {
ExpressionDataMatrixBuilder.log.info("Masked preferred=" + qType);
neededQtTypes.add(qType);
} else if (ChannelUtils.isBackgroundChannelA(name)) {
neededQtTypes.add(qType);
ExpressionDataMatrixBuilder.log.info("Background A=" + qType);
} else if (ChannelUtils.isBackgroundChannelB(name)) {
neededQtTypes.add(qType);
ExpressionDataMatrixBuilder.log.info("Background B=" + qType);
} else if (ChannelUtils.isSignalChannelA(name)) {
neededQtTypes.add(qType);
ExpressionDataMatrixBuilder.log.info("Signal A=" + qType);
} else if (ChannelUtils.isSignalChannelB(name)) {
neededQtTypes.add(qType);
ExpressionDataMatrixBuilder.log.info("Signal B=" + qType);
} else if (name.matches("CH1D_MEAN")) {
/*
* Special case. This is the background subtracted channel 1 for GenePix data. It is only needed to
* reconstruct CH1 if it isn't present, which is surprisingly common in Stanford data sets
*/
neededQtTypes.add(qType);
} else if (qType.getType().equals(StandardQuantitationType.PRESENTABSENT)) {
ExpressionDataMatrixBuilder.log.info("Present/absent=" + qType);
neededQtTypes.add(qType);
}
}
return neededQtTypes;
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class QuantitationTypeData method isTwoColor.
private boolean isTwoColor() {
for (DesignElementDataVector v : vectors) {
CompositeSequence d = v.getDesignElement();
TechnologyType technologyType = d.getArrayDesign().getTechnologyType();
if (technologyType.equals(TechnologyType.ONECOLOR) || technologyType.equals(TechnologyType.NONE)) {
continue;
}
QuantitationType qt = v.getQuantitationType();
if ((qt.getIsPreferred() || qt.getIsMaskedPreferred()) && qt.getIsRatio()) {
return true;
}
}
return false;
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType 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.common.quantitationtype.QuantitationType 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;
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class QuantitationTypeData method getBackgroundChannelB.
public ExpressionDataDoubleMatrix getBackgroundChannelB() {
if (dat == null)
dat = this.getQuantitationTypesNeeded();
List<BioAssayDimension> dimensions = this.getBioAssayDimensions();
List<QuantitationType> qTypes = new ArrayList<>();
for (BioAssayDimension dimension : dimensions) {
QuantitationType qType = dat.getBackgroundChannelB(dimension);
if (qType != null)
qTypes.add(qType);
}
if (qTypes.size() != 0) {
return this.makeMatrix(qTypes);
}
return null;
}
Aggregations