示例#1
0
        public MZTabColumn(string name, Type type, bool optional, string order, Integer id)
        {
            _name = name;
            if (type == null) {
                throw new NullReferenceException("Column data type should not set null!");
            }

            _type = type;
            _optional = optional;
            _order = order;
            _id = id;
            _header = generateHeader(name);
            _logicPosition = generateLogicalPosition();
        }
 internal SmallMoleculeColumn(string name, Type columnType, bool optional, string order,Integer id)
     : base(name, columnType, optional, order, id)
 {
 }
示例#3
0
 /**
  * The search engine score for the given protein in the defined ms run. The type of score
  * MUST be defined in the metadata section. If the protein was not identified by the specified
  * search engine “null” must be reported
  *
  * @param id protein_search_engine_score[id] which MUST be defined in the metadata section.
  * @param msRun SHOULD NOT set null
  */
 public void setSearchEngineScore(Integer id, MsRun msRun, double searchEngineScore)
 {
     setValue(getLogicalPosition(PeptideColumn.SEARCH_ENGINE_SCORE, id, msRun), searchEngineScore);
 }
示例#4
0
 /**
  * The best search engine score (for this type of score) for the given protein across
  * all replicates reported. The type of score MUST be defined in the metadata section.
  * If the protein was not identified by the specified search engine “null” must be reported
  *
  * @param id protein_search_engine_score[id] which MUST be defined in the metadata section.
  */
 public void setBestSearchEngineScore(Integer id, double bestSearchEngineScore)
 {
     setValue(getLogicalPosition(PeptideColumn.BEST_SEARCH_ENGINE_SCORE, id, null), bestSearchEngineScore);
 }
示例#5
0
 /**
 * The search engine score for the given protein in the defined ms run. The type of score
 * MUST be defined in the metadata section. If the protein was not identified by the specified
 * search engine “null” must be reported
 *
 * @param id protein_search_engine_score[id] which MUST be defined in the metadata section.
 * @param msRun SHOULD NOT set null
 */
 public Double getSearchEngineScore(Integer id, MsRun msRun)
 {
     return getDouble(getLogicalPosition(PeptideColumn.SEARCH_ENGINE_SCORE, id, msRun));
 }
示例#6
0
 /**
  * The best search engine score (for this type of score) for the given protein across
  * all replicates reported. The type of score MUST be defined in the metadata section.
  * If the protein was not identified by the specified search engine “null” must be reported
  *
  * @param id protein_search_engine_score[id] which MUST be defined in the metadata section.
  */
 public Double getBestSearchEngineScore(Integer id)
 {
     return getDouble(getLogicalPosition(PeptideColumn.BEST_SEARCH_ENGINE_SCORE, id, null));
 }
 internal ProteinColumn(string name, Type columnType, bool optional, string order, Integer id)
     : base(name, columnType, optional, order, id)
 {
 }
示例#8
0
 public void setNumPeptidesDistinct(MsRun msRun, Integer numPeptidesDistinct)
 {
     setNumPeptidesDistinct(getPosition(ProteinColumn.NUM_PEPTIDES_DISTINCT, msRun), numPeptidesDistinct);
 }
示例#9
0
 /**
 * The search engine score for the given protein in the defined ms run. The type of score
 * MUST be defined in the metadata section. If the protein was not identified by the specified
 * search engine “null” must be reported
 *
 * @param id protein_search_engine_score[id] which MUST be defined in the metadata section.
 * @param msRun SHOULD NOT set null
 */
 public Double getSearchEngineScore(Integer id)
 {
     return getDouble(getLogicalPosition(PSMColumn.SEARCH_ENGINE_SCORE, id, null));
 }
        /** Add {@link SearchEngineScore} followed by {@link MsRun} (MsRun will be null in the PSM section) which has stable order and name,
         * into {@link #optionalColumnMapping} and {@link #columnMapping}.
         *
         * @param column search_engine_score column to add. SHOULD NOT set null.
         * @param id of the {section}_search_engine_score[id] param defined in {@link Metadata} for this column. SHOULD NOT set null.
         * @param msRun {@link MsRun} for this search_engine_score
         *
         * The header will be represented as: search_engine_score[id]{_ms_run[1-n]}
         */
        public void AddSearchEngineScoreOptionalColumn(MZTabColumn column, Integer id, MsRun msRun)
        {
            String position = column.LogicPosition;
            if (optionalColumnMapping.ContainsKey(position)) {
                throw new ArgumentOutOfRangeException("There exists column " + optionalColumnMapping[position] + " in position " + position);
            }

            MZTabColumn newColumn = null;

            if (section.Equals(Section.Protein_Header)){
                if (column.Name.Equals(ProteinColumn.SEARCH_ENGINE_SCORE.Name)) {
                    newColumn = MZTabColumn.CreateOptionalColumn(section, column, id, msRun);
                }
            } else if (section.Equals(Section.Peptide_Header)){
                if (column.Name.Equals(PeptideColumn.SEARCH_ENGINE_SCORE.Name)) {
                    newColumn = MZTabColumn.CreateOptionalColumn(section, column, id, msRun);
                }
            }else if (section.Equals(Section.Small_Molecule_Header)){
                if (column.Name.Equals(SmallMoleculeColumn.SEARCH_ENGINE_SCORE.Name)) {
                    newColumn = MZTabColumn.CreateOptionalColumn(section, column, id, msRun);
                }
            }else if (section.Equals(Section.PSM_Header)){
                if (column.Name.Equals(PSMColumn.SEARCH_ENGINE_SCORE.Name)) {
                    newColumn = MZTabColumn.CreateOptionalColumn(section, column, id, null);
                }
            }

            if (newColumn != null) {
                optionalColumnMapping.Add(newColumn.LogicPosition, newColumn);
                columnMapping.Add(newColumn.LogicPosition, newColumn);
            }
        }
示例#11
0
 public void setNumPSMs(MsRun msRun, Integer numPSMs)
 {
     setNumPSMs(getLogicalPosition(ProteinColumn.NUM_PSMS, null, msRun), numPSMs.ToString());
 }
示例#12
0
 public void setNumPSMs(string logicalPosition, Integer numPSMs)
 {
     setValue(logicalPosition, numPSMs);
 }
示例#13
0
 public void setNumPeptidesUnique(MsRun msRun, Integer numPeptidesUnique)
 {
     setNumPeptidesUnique(getPosition(ProteinColumn.NUM_PEPTIDES_UNIQUE, msRun), numPeptidesUnique);
 }
示例#14
0
 public void setNumPeptidesUnique(string logicalPosition, Integer numPeptidesUnique)
 {
     setValue(logicalPosition, numPeptidesUnique);
 }
示例#15
0
        internal static MZTabColumn CreateOptionalColumn(Section section, MZTabColumn column, Integer id, IndexedElement element)
        {
            if (! column.isOptional()){
                throw new ArgumentException(column + " is not optional column!");
            }

            MZTabColumn optionColumn = null;

            if (section.Equals(Section.Protein_Header)){
                optionColumn = new ProteinColumn(column.Name, column.Type, column.isOptional(), column.Order, id);
            }
            else if (section.Equals(Section.Peptide_Header)){
                optionColumn = new PeptideColumn(column.Name, column.Type, column.isOptional(), column.Order, id);
            }
            else if (section.Equals(Section.PSM_Header)){
                optionColumn = new PSMColumn(column.Name, column.Type, column.isOptional(), column.Order, id);
            }
            else if (section.Equals(Section.Small_Molecule_Header)){
                optionColumn = new SmallMoleculeColumn(column.Name, column.Type, column.isOptional(), column.Order, id);
            }

            if (optionColumn != null && element != null){
                optionColumn.Element = element;
            }

            return optionColumn;
        }
示例#16
0
 /**
  * The search engine score for the given protein in the defined ms run. The type of score
  * MUST be defined in the metadata section. If the protein was not identified by the specified
  * search engine “null” must be reported
  *
  * @param id protein_search_engine_score[id] which MUST be defined in the metadata section.
  * @param msRun SHOULD NOT set null
  */
 public void setSearchEngineScore(Integer id, double searchEngineScore)
 {
     setValue(getLogicalPosition(PSMColumn.SEARCH_ENGINE_SCORE, id, null), searchEngineScore);
 }
示例#17
0
 public void setNumPeptidesDistinct(string logicalPosition, Integer numPeptidesDistinct)
 {
     setValue(logicalPosition, numPeptidesDistinct);
 }