public static IParamContainer SetCompression( this IParamContainer pc, BinaryDataCompressionType compressionType) { switch (compressionType) { case BinaryDataCompressionType.NoCompression: return(pc.SetNoCompression()); case BinaryDataCompressionType.ZLib: return(pc.SetZlibCompression()); default: throw new NotSupportedException("Compression type not supported: " + compressionType.ToString()); } }
private void WriteParamGroup(IParamContainer pc) { var msParams = pc.CvParams.Where(x => IsMSParam(x) && HasValidOrEmptyUnit(x)); foreach (var cvp in msParams) { writer.WriteStartElement("cvParam"); WriteXmlAttribute("cvRef", "MS", true); WriteXmlAttribute("accession", cvp.CvAccession, true); WriteXmlAttribute("name", cvp.CvAccession, true); WriteXmlAttribute("value", cvp.GetStringOrDefault(), false); if (cvp.HasUnit()) { WriteXmlAttribute("unitCvRef", ParseCvRef(cvp.CvUnitAccession), true); WriteXmlAttribute("unitAccession", cvp.CvUnitAccession, true); WriteXmlAttribute("unitName", cvp.CvUnitAccession, true); } writer.WriteEndElement(); } var userParams = pc.UserParams.Where(x => HasValidOrEmptyUnit(x)); foreach (var up in userParams) { writer.WriteStartElement("userParam"); WriteXmlAttribute("name", up.Name, true); WriteXmlAttribute("value", up.GetStringOrDefault(), false); if (up.HasUnit()) { WriteXmlAttribute("unitCvRef", ParseCvRef(up.CvUnitAccession), true); WriteXmlAttribute("unitAccession", up.CvUnitAccession, true); WriteXmlAttribute("unitName", up.CvUnitAccession, true); } writer.WriteEndElement(); } }
public static IParamContainer SetBinaryDataType( this IParamContainer pc, BinaryDataType binaryDataType) { switch (binaryDataType) { case BinaryDataType.Float32: return(pc.Set32BitFloat()); case BinaryDataType.Float64: return(pc.Set64BitFloat()); case BinaryDataType.Int32: return(pc.Set32BitInteger()); case BinaryDataType.Int64: return(pc.Set64BitInteger()); default: throw new NotSupportedException("Data type not supported: " + binaryDataType.ToString()); } }
public static bool IsZlibCompression( this IParamContainer pc) { return(pc.HasCvParam("MS_1000574")); }
/// <summary> /// Signed 32-bit little-endian integer. [PSI:MS] /// </summary> public static IParamContainer Set32BitInteger( this IParamContainer pc) { return(pc.SetCvParam("MS:1000519").NoUnit()); }
public static bool Is32BitInteger( this IParamContainer pc) { return(pc.HasCvParam("MS:1000519")); }
/// <summary> /// 32-bit precision little-endian floating point conforming to IEEE-754. [PSI:MS] /// </summary> public static IParamContainer Set32BitFloat( this IParamContainer pc) { return(pc.SetCvParam("MS:1000521").NoUnit()); }
public static bool Is32BitFloat( this IParamContainer pc) { return(pc.HasCvParam("MS:1000521")); }
/// <summary> /// Compression using MS-Numpress short logged float compression. [https://github.com/fickludd/ms-numpress] /// </summary> public static IParamContainer SetMSNumpressShortLoggedFloatCompression( this IParamContainer pc) { return(pc.SetCvParam("MS:1002314").NoUnit()); }
internal ParamEdit(IParamContainer pc) { this.ParamContainer = pc; }
/// <summary> /// Compression using MS-Numpress linear prediction compression. [https://github.com/fickludd/ms-numpress] /// </summary> public static IParamContainer SetMSNumpressLinearPredictionCompression( this IParamContainer pc) { return(pc.SetCvParam("MS:1002312").NoUnit()); }
/// <summary> /// Compression using MS-Numpress positive integer compression. [https://github.com/fickludd/ms-numpress] /// </summary> public static IParamContainer SetMSNumpressPositiveIntegerCompression( this IParamContainer pc) { return(pc.SetCvParam("MS:1002313").NoUnit()); }
/// <summary> /// Zlib (gzip) Compression. [PSI:MS] /// </summary> public static IParamContainer SetZlibCompression( this IParamContainer pc) { return(pc.SetCvParam("MS_1000574").NoUnit()); }
public static IParamEdit BeginParamEdit( this IParamContainer pc) { return(new ParamEdit(pc)); }
public static bool IsNoCompression( this IParamContainer pc) { return(pc.HasCvParam("MS:1000576")); }
/// <summary> /// No Compression. [PSI:MS] /// </summary> public static IParamContainer SetNoCompression( this IParamContainer pc) { return(pc.SetCvParam("MS:1000576").NoUnit()); }
public static bool IsTimeArray( this IParamContainer pc) { return(pc.HasCvParam("MS:1000595")); }
public static bool IsIntensityArray( this IParamContainer pc) { return(pc.HasCvParam("MS:1000515")); }
/// <summary> /// A data array of m/z values. [PSI:MS] /// </summary> public static IParamContainer SetMzArray( this IParamContainer pc) { return(pc.SetCvParam("MS:1000514").PSIMS_Mz()); }