Пример #1
0
  public Param getColunitSmallMolecule(SmallMoleculeTableField column)
      throws MzTabParsingException {
    if (column == SmallMoleculeTableField.ABUNDANCE
        || column == SmallMoleculeTableField.ABUNDANCE_STD
        || column == SmallMoleculeTableField.ABUNDANCE_STD_ERROR) {
      throw new MzTabParsingException(
          "The colunit field cannot be used to store units for abundance columns. Please use getSmallMoleculeQuantificationUnit");
    }

    if (column == SmallMoleculeTableField.CUSTOM) {
      throw new MzTabParsingException(
          "This function cannot be used to retrieve units for optional columns");
    }
    return getColunitSmallMolecule(column.toString());
  }
Пример #2
0
  public void setColunitSmallMolecule(SmallMoleculeTableField column, Param unit)
      throws MzTabParsingException {
    if (column == SmallMoleculeTableField.ABUNDANCE
        || column == SmallMoleculeTableField.ABUNDANCE_STD
        || column == SmallMoleculeTableField.ABUNDANCE_STD_ERROR) {
      throw new MzTabParsingException("Colunits must not be set for columns specifying abundance.");
    }

    if (column == SmallMoleculeTableField.CUSTOM) {
      throw new MzTabParsingException("This function cannot be used to set custom column units.");
    }

    if (column == SmallMoleculeTableField.ROW_PREFIX
        || column == SmallMoleculeTableField.HEADER_PREFIX) {
      throw new MzTabParsingException("ROW_PREFIX and HEADER_PREFIX are not valid columns.");
    }

    setColunitPeptide(column.toString(), unit);
  }