public static string GetHeader(IndexedElement element, string value) { StringBuilder sb = new StringBuilder(); sb.Append(OPT).Append("_").Append(element == null ? GLOBAL : element.Reference); sb.Append("_").Append(value.Replace(" ", "_")); return sb.ToString(); }
public static string GetHeader(IndexedElement element, CVParam param) { StringBuilder sb = new StringBuilder(); sb.Append(OPT).Append("_").Append(element == null ? GLOBAL : element.Reference); sb.Append("_").Append(CV).Append(param.Accession).Append("_").Append(param.Name.Replace(" ", "_")); return sb.ToString(); }
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; }
private AbundanceColumn(Section section, Field field, IndexedElement element, int offset) : base(translate(section.Name) + "_" + field.name, field.columnType, true, offset + field.position + "") { Element = element; }
public OptionColumn(IndexedElement element, string value, System.Type columnType, int offset) : base(GetHeader(element, value), columnType, true, offset + 1 + "") { }
public CVParamOptionColumn(IndexedElement element, CVParam param, System.Type columnType, int offset) : base(element, CV + param.Accession + "_" + param.Name.Replace(" ", "_"), columnType, offset) { this.param = param; }