From accd8b9d94facd5855310a239549dc3a2ad0a86e Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Tue, 15 Aug 2023 10:58:29 +0100 Subject: [PATCH] minor changes --- sdrf_pipelines/maxquant/maxquant.py | 43 ++++++++++----------- sdrf_pipelines/normalyzerde/normalyzerde.py | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/sdrf_pipelines/maxquant/maxquant.py b/sdrf_pipelines/maxquant/maxquant.py index ae78f47..7e28380 100644 --- a/sdrf_pipelines/maxquant/maxquant.py +++ b/sdrf_pipelines/maxquant/maxquant.py @@ -707,17 +707,17 @@ def maxquant_ify_mods(self, sdrf_mods, mqconfdir): return ",".join(oms_mods) def maxquant_convert( - self, - sdrf_file, - fastaFilePath, - mqconfdir, + self, + sdrf_file, + fastaFilePath, + mqconfdir, matchBetweenRuns, - peptideFDR, - proteinFDR, - tempFolder, - raw_Folder, - numThreads, - output_path, + peptideFDR, + proteinFDR, + tempFolder, + raw_Folder, + numThreads, + output_path, ): print("PROCESSING: " + sdrf_file + '"') @@ -1693,8 +1693,7 @@ def maxquant_convert( referenceChannel = doc.createElement("referenceChannel") for key1, instr_val in file2instrument.items(): value2 = ( - str(file2enzyme[key1]) + file2label[key1] + str(file2mods[key1]) + str(file2pctol) + str( - file2fragtol) + str(file2enzyme[key1]) + file2label[key1] + str(file2mods[key1]) + str(file2pctol) + str(file2fragtol) ) datanalysisparams = {} for p in file2params.keys(): @@ -1717,10 +1716,10 @@ def maxquant_convert( "datanalysisparams": datanalysisparams, } if ( - "Lys8" in file2label[key1] - or "Arg10" in file2label[key1] - or "Arg6" in file2label[key1] - or "Lys6" in file2label[key1] + "Lys8" in file2label[key1] + or "Arg10" in file2label[key1] + or "Arg6" in file2label[key1] + or "Lys6" in file2label[key1] ): parameterGroup["0"]["silac_shape"] = file2silac_shape[key1] @@ -1748,10 +1747,10 @@ def maxquant_convert( } if ( - "Lys8" in file2label[key1] - or "Arg10" in file2label[key1] - or "Arg6" in file2label[key1] - or "Lys6" in file2label[key1] + "Lys8" in file2label[key1] + or "Arg10" in file2label[key1] + or "Arg6" in file2label[key1] + or "Lys6" in file2label[key1] ): parameterGroup[str(tag)]["silac_shape"] = file2silac_shape[key1] @@ -1924,8 +1923,8 @@ def maxquant_convert( if "Lys8" in j["label"] or "Arg10" in j["label"] or "Arg6" in j["label"] or "Lys6" in j["label"]: for lm in range(j["silac_shape"][0]): r = j["label"].split(",")[ - lm * j["silac_shape"][1]: lm * j["silac_shape"][1] + lm * j["silac_shape"][1] - ] + lm * j["silac_shape"][1] : lm * j["silac_shape"][1] + lm * j["silac_shape"][1] + ] if "Arg0" in r: r.remove("Arg0") text = ";".join(r) diff --git a/sdrf_pipelines/normalyzerde/normalyzerde.py b/sdrf_pipelines/normalyzerde/normalyzerde.py index 406fd10..4e6c876 100644 --- a/sdrf_pipelines/normalyzerde/normalyzerde.py +++ b/sdrf_pipelines/normalyzerde/normalyzerde.py @@ -18,7 +18,7 @@ def __init__(self) -> None: # Consider unlabeled analysis for now def convert_normalyzerde_design( - self, sdrf_file, split_by_columns, annotation_path, comparisons_path, maxquant_exp_design_file + self, sdrf_file, split_by_columns, annotation_path, comparisons_path, maxquant_exp_design_file ): sdrf = pd.read_csv(sdrf_file, sep="\t") sdrf = sdrf.astype(str)