From e3375ec543951b0e652f119932d2d336e998b83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Barrero=20Rodr=C3=ADguez?= Date: Mon, 19 Feb 2024 11:13:33 +0100 Subject: [PATCH] merge q2info --- 4_qTableReport/qReportMaker.py | 5 +++++ 4_qTableReport/qReportMaker.yaml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/4_qTableReport/qReportMaker.py b/4_qTableReport/qReportMaker.py index 5ec1b70..ce973c1 100644 --- a/4_qTableReport/qReportMaker.py +++ b/4_qTableReport/qReportMaker.py @@ -374,6 +374,11 @@ def qReportDesign(config, quan, qTableD, contrast): for i,j in qTableD.columns ]) + # Add info contained in q2info + if os.path.isfile(config['q2info']): + q2info = pd.read_csv(config['q2info'], sep='\t') + q2info.columns = pd.MultiIndex.from_tuples([qTableD.columns[0] if n==0 else (i,'','') for n,i in enumerate(q2info.columns)]) + qTableD = pd.merge(q2info, qTableD, how='right', on=[qTableD.columns[0]]) plotted_q = [os.path.splitext(i)[0] for i in os.listdir(config['plotFolder'])] qTableD[qTableD.columns[0]] = \ diff --git a/4_qTableReport/qReportMaker.yaml b/4_qTableReport/qReportMaker.yaml index bed5806..66059cf 100644 --- a/4_qTableReport/qReportMaker.yaml +++ b/4_qTableReport/qReportMaker.yaml @@ -8,6 +8,9 @@ infile: D:\CNIC\Scripts\ReportStats\test\FDR_LIMMA_NM_qfq_table_pgmfreq.tsv # Output file outfolder: D:\CNIC\Scripts\ReportStats\test\ +# Path to file relating protein Uniprot ID (first col) to other information (e.g. Category) +q2info: S:\U_Proteomica\UNIDAD\NextCloud\1_PTM_Analysis\Heteroplasmia_Heart\ReportStats-v0.6\myMitocarta.tsv + # FDR threshold used qvThr: - 0.01