nPYc-toolbox翻译-7-配制 (Configuration)
配制 (Configuration)
https://npyc-toolbox.readthedocs.io/en/latest/configuration/configuration.html
可以以可重复的方式修改toobox的许多方面的行为,以通过创建配置文件创建新的工作流程,看Configuration SOPs和Generation of Targeted SOPs作为例子。
配制标准化流程
Dataset
对象的默认参数可以通过提供包含所需参数的SOP文件进行初始化来配置。SOP参数包括外形尺寸、格式等美观因素,质量控制参数和分析参数。
默认情况下,SOPS是从
nPYc/StudyDesigns/SOP/
目录中读取的,但这可以被sopPath=中指定的目录覆盖,该目录将在builtin SOP目录之前进行搜索。SOP文件是简单的JSON格式文件,用于填充属性字典的contnets文件。有关示例,请参阅
nPYc/StudyDesigns/SOP/
中的默认文件。表格3 所有数据集对象所需的SOP参数
Key
| Key | dtype | Usage |
| ------------------------ | ----------- | ----- |
| ‘analyticalMeasurements’ | list of str | |
| ‘excludeFromPlotting’ | list of str | |
| Parameter | type | Role |
| ----------------------------- | ----------- | ------------------------------------------------------------ |
| ‘rtWindow’ | float | 当根据保留时间对特性进行分组时,使用这种精度 |
| ‘corrThreshold’ | float | 当用线性参考([linearity reference](https://npyc-toolbox.readthedocs.io/en/latest/nomenclature.html#term-linearity-reference))滤波时,相关系数必须大于这个 |
| ‘corrMethod’ | str | 要计算的线性相关类型,必须是“皮尔逊”或“斯皮尔曼” |
| ‘rsdThreshold’ | float | 默认的百分比[RSD](https://npyc-toolbox.readthedocs.io/en/latest/nomenclature.html#term-rsd)截止 |
| ‘deltaMzArtifactual’ | float | |
| ‘overlapThresholdArtifactual’ | float | |
| ‘corrThresholdArtifactual’ | float | |
| ‘msPrecision’ | float | |
| ‘varianceRatio’ | float | |
| ‘blankThreshold’ | float | |
| ‘filenameSpec’ | str (regex) | |
靶标标准化流程的产生 (Generation of Targeted SOPs)
methodName
方法名称
chromatography
使用的色谱
ionisation
使用的极性(正离子或者负离子)
compoundID
数字ID("1","2",....)的列表,该列表与Targetlynx软件中的compound ID一致
IS
一列为"True""False"用来标识该化合物是否为内标物(Internal Standard)
unitFinal
一列化合物的测量值并联合unitCorrectionFactor应用后的(可以为空“”)
unitCorrectionFactor
一列值,用来乘上被测浓度以达到uniFinal("1","0.1","1000")
calibrationMethod
化合物的校准方法的清单,CalibrationMethod:
"noIS"
是指化合物中没有内标 (Internal Standard)或者内标物本身=(use area),"backcalculatedIS"
用于采用内标物的化合物=(use response),"noCalibration"
用于没有没有量化的化合物(检测相关的信息)calibrationEquation
-获得浓度的一系列公式,获得area, responseFactor, a 和 b.
*responseFactor*=(IS conc/IS Area)=response/Area(对于noIS,responseFactor为1),从校准样品中自动估计。
只有当<LLOQ值被噪声级别所取代时,才使用校准方程
(TargetedDataset._targetLynxApplyLimitsOfQuantificationNoiseFilled())
在TargetLynx中校整曲线建立为:
response = a * concentration + b (eq. 1)
相应(response)被定义为:
response = Area * (IS conc / ISArea) (eq. 2)
[for ‘noIS’ response = Area]根据公式2(eq. 2), 我们从代表样本中得到IS浓度(IS Conc)和IS面积(IS Area)的比率,于是计算
responseFactor=response/area (eq. 3)
因此,浓度
concentration=((area*responseFactor)-b)/a (eq. 4)
如果TargetLynx中 ‘axis transformation'设置为 log(但是依旧采用'Polynomial Type' = linear and 'Fit Weighting'=None)
公式1(eq. 1)变为:
log(response)=a*log(concentration)+b (eq. 5)
公式4变为:
concentration=10^(log(area*reponseFactor)-b)/a (eq. 5)
范例:
"((area * responseFactor)-b)/a"
,"10**((numpy.log10(area * responseFactor)-b)/a)"
,"area/a"
如果b不需要,那么在csv中设置o[对于linear noIS, area=respones, responseFactor=1, response=a*concentration]
quantificationType
使用的量化类型的列表,QuantificationType中有:
"IS"
,"QuantOwnLabeledAnalogue"
,"QuantAltLabeledAnalogue"
,"QuantOther"
或者是"Monitored"
注意:
quantificationType
"IS"
必须对应IS"True"
quantificationType
"Monitored"
必须与quantificationType"noCalibration"
对应externalID
A list of external ID, each external ID must also be present as its own field as a list of identifier (for that external ID). For example, if
"externalID":["PubChem ID"]
, the field"PubChem ID":["ID1","ID2","","ID75"]"
is required.sampleMetadataNotExported
sampleMetadata
列中的没有在输出及报告中的列表featureMetadataNotExpoted
featureMetadata
列中的没有在输出及报告中的列表
Listing 1 氨基酸TargetLynx标准化流程的示例(Gray N. et al. Human Plasma and Serum via Precolumn Derivatization with 6‑Aminoquinolyl‑N‑hydroxysuccinimidyl Carbamate: Application to Acetaminophen-Induced Liver Failure. Analytical Chemistry, 89, 2017, 2478−2487)
{
"methodName":"Amino Acid",
"chromatography":"R",
"ionisation":"POS",
"compoundID": ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73"],
"compoundName": ["4-Hydroxyproline","Alanine","Alanine-13C3-15N","Arginine","Arginine-13C6-15N4","Aspartic acid","Aspartic acid-13C4-15N","Asparagine","Carnosine","Cystine","Ethanolamine","Glutamic acid","Glutamic acid-13C5-15N","Glutamine","Glutamine-13C5","Glycine","Glycine-13C2-15N","Histidine","Histidine-13C6-15N3","Isoleucine","Isoleucine-13C6-15N","Leucine","Leucine-13C6-15N","Lysine","Lysine-13C6-15N2","Methionine","Methionine-13C5-15N","Phenylalanine","Phenylalanine-13C9-15N","Proline","Proline-13C5-15N","Serine","Serine-13C3-15N","Threonine","Threonine-13C4-15N","Tryptophan","Tyrosine","Valine","Valine-13C5-15N","beta-Amino-iso-Butyric acid","Citrulline","Cystathionine","3-Methylhistidine","1-Methylhistidine","Homoserine","Hydroxylysine","Ornithine","Aminoadipic acid","alpha-Amino-n-Butyric acid","Phosphoserine","Sarcosine","Taurine","beta-Alanine","gamma-Amino-n-Butyric acid","Methylamine","Creatine","4-Aminohippuric acid","5-Aminovaleric acid","Allantoin","Anserine","Cysteine","Epinephrine","Galactosamine","Glutathione","Homocystine","N-methyl-L-phenylalanine","N-methyl-valine","Octopamine","Putrescine","Tryptamine","Tyramine","Tyrosine-13C9-15N","Glycylglycine"],
"IS": ["False","False","True","False","True","False","True","False","False","False","False","False","True","False","True","False","True","False","True","False","True","False","True","False","True","False","True","False","True","False","True","False","True","False","True","False","False","False","True","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","False"],
"unitFinal":["\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","\u00B5M","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","noUnit","\u00B5M","noUnit"],
"unitCorrectionFactor": ["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"],
"calibrationMethod": ["backcalculatedIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","noIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","noIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","backcalculatedIS","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noCalibration","noIS","noCalibration"],
"calibrationEquation": ["((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","((area * responseFactor)-b)/a","","","","","","","","","","","","","","","","","","",""],
"quantificationType": ["QuantAltLabeledAnalogue","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantOwnLabeledAnalogue","IS","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantOwnLabeledAnalogue","IS","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","QuantAltLabeledAnalogue","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","Monitored","IS","Monitored"],
"externalID":[],
"sampleMetadataNotExported":["TargetLynx Sample ID", "MassLynx Row ID", "Acqu Date", "Acqu Time", "Instrument", "Sample Type"],
"featureMetadataNotExported":["calibrationEquation", "TargetLynx Feature ID", "unitCorrectionFactor", "CpdInfo", "Cpd Info", "Noise (area)", "a", "b", "r", "r2", "r^2", "# left", "Excluded"],
"analyticalMeasurements":{"Study" : "categorical", "Instrument" : "categorical", "Re-Run" : "categorical", "Suplemental Injections" : "categorical", "Matrix" : "categorical", "Well" : "categorical", "Plate" : "categorical", "Batch" : "categorical", "Dilution" : "continuous", "Measurement Date" : "date", "Measurement Time" : "date", "Acquired Time" : "date", "Run Order" : "continuous", "Correction Batch" : "categorical", "Assay data name": "categorical", "Assay data location": "categorical", "Sample position": "categorical", "Sample batch": "categorical", "Acquisition batch": "categorical", "Plot Sample Type": "categorical", "AssayRole": "categorical", "SampleType": "categorical", "Exclusion Details": "categorical", "Skipped": "categorical", "Assay protocol": "categorical"},
"excludeFromPlotting":["Sample File Name", "Sample Base Name", "Batch Termini", "Study Reference", "Long-Term Reference", "Method Reference", "Dilution Series", "Skipped", "Study Sample", "File Path", "Exclusion Details", "Assay protocol", "Status", "Measurement Date", "Measurement Time", "Data Present", "LIMS Present", "LIMS Marked Missing", "Assay data name", "Assay data location", "AssayRole", "SampleType", "Sampling ID", "Plot Sample Type", "SubjectInfoData", "Detector Unit", "TargetLynx Sample ID", "MassLynx Row ID"]
}
- 感谢你赐予我前进的力量