Skip to content

Commit

Permalink
Added SRM data to proteomics distribution data testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclynbeck-sage committed Nov 3, 2023
1 parent 72cfdb5 commit 38697f3
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uniqid,genename,uniprotid,ensg,tissue,log2_fc,ci_upr,ci_lwr,pval,cor_pval
RPL35|P42766,RPL35,P42766,ENSG00000136942,DLPFC,-0.0763864716519552,-0.0099209909244187,-0.1428519523794917,0.0194330864811924,0.0532108844452419
SLC6A12|P48065,SLC6A12,P48065,ENSG00000111181,DLPFC,0.0424329158355659,0.1099491140769349,-0.0250832824058029,0.303320959613638,0.5210898536952243
PTPN11|Q06124,PTPN11,Q06124,ENSG00000179295,DLPFC,0.0064652259159073,0.0458145863390218,-0.0328841345072071,0.9213060368774064,0.9998368407824682
PLXNB1|O43157,PLXNB1,O43157,ENSG00000164050,DLPFC,0.1315038527175516,0.2011640123915693,0.061843693043534,3.094711736695288e-05,0.0001727880719654
STX5|Q13190,STX5,Q13190,ENSG00000162236,DLPFC,0.0042787903893951,0.1178799748681132,-0.1093223940893228,0.9957000250037246,0.999696551493841
MTOR|P42345,MTOR,P42345,ENSG00000198793,DLPFC,-0.016913729214123,0.014911434052702,-0.0487388924809481,0.4255337386213362,0.6381170540950976
STX1B|P61266,STX1B,P61266,ENSG00000099365,DLPFC,-0.0627896276157541,-0.018089777426611,-0.1074894778048971,0.0029030746757215,0.0092621906320641
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uniqid,genename,uniprotid,ensg,tissue,log2_fc,ci_upr,ci_lwr,pval,cor_pval
RPL35|P42766,RPL35,P42766,ENSG00000136942,,-0.0763864716519552,-0.0099209909244187,-0.1428519523794917,0.0194330864811924,0.0532108844452419
SLC6A12|P48065,SLC6A12,P48065,ENSG00000111181,,0.0424329158355659,0.1099491140769349,-0.0250832824058029,0.303320959613638,0.5210898536952243
PTPN11|Q06124,PTPN11,Q06124,ENSG00000179295,DLPFC,0.0064652259159073,0.0458145863390218,-0.0328841345072071,0.9213060368774064,0.9998368407824682
PLXNB1|O43157,PLXNB1,O43157,ENSG00000164050,,0.1315038527175516,0.2011640123915693,0.061843693043534,3.094711736695288e-05,0.0001727880719654
STX5|Q13190,STX5,Q13190,ENSG00000162236,DLPFC,0.0042787903893951,0.1178799748681132,-0.1093223940893228,0.9957000250037246,0.999696551493841
MTOR|P42345,MTOR,P42345,ENSG00000198793,DLPFC,-0.016913729214123,0.014911434052702,-0.0487388924809481,0.4255337386213362,0.6381170540950976
STX1B|P61266,STX1B,P61266,ENSG00000099365,DLPFC,-0.0627896276157541,-0.018089777426611,-0.1074894778048971,0.0029030746757215,0.0092621906320641
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,14 @@
"median": 0.1132,
"third_quartile": 0.2011,
"type": "TMT"
},
{
"tissue": "DLPFC",
"min": -0.1363,
"max": 0.1209,
"first_quartile": -0.0399,
"median": 0.0043,
"third_quartile": 0.0244,
"type": "SRM"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"tissue": "AntPFC",
"min": -0.1806,
"max": 0.1514,
"first_quartile": -0.0561,
"median": -0.011,
"third_quartile": 0.0269,
"type": "LFQ"
},
{
"tissue": "DLPFC",
"min": -0.1472,
"max": 0.146,
"first_quartile": -0.0373,
"median": 0.018,
"third_quartile": 0.036,
"type": "LFQ"
},
{
"tissue": "MFG",
"min": -0.0979,
"max": 0.0192,
"first_quartile": -0.054,
"median": -0.0339,
"third_quartile": -0.0247,
"type": "LFQ"
},
{
"tissue": "TCX",
"min": -0.3847,
"max": 0.3455,
"first_quartile": -0.1109,
"median": -0.0953,
"third_quartile": 0.0717,
"type": "LFQ"
},
{
"tissue": "DLPFC",
"min": -0.4097,
"max": 0.5676,
"first_quartile": -0.0432,
"median": 0.1132,
"third_quartile": 0.2011,
"type": "TMT"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,14 @@
"median": 0.1104,
"third_quartile": 0.2545,
"type": "TMT"
},
{
"tissue": "DLPFC",
"min": -0.0782,
"max": 0.0546,
"first_quartile": -0.0284,
"median": -0.0063,
"third_quartile": 0.0048,
"type": "SRM"
}
]
15 changes: 14 additions & 1 deletion tests/transform/test_proteomics_distribution_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,53 @@ class TestTransformProteomicsDistributionData:
{
"proteomics": "test_proteomics_distribution_lfq_good_input.csv",
"proteomics_tmt": "test_proteomics_distribution_tmt_good_input.csv",
"proteomics_srm": "test_proteomics_distribution_srm_good_input.csv"
},
"proteomics_distribution_good_output.json",
),
( # pass with imperfect data
{
"proteomics": "test_proteomics_distribution_lfq_missing_input.csv",
"proteomics_tmt": "test_proteomics_distribution_tmt_missing_input.csv",
"proteomics_srm": "test_proteomics_distribution_srm_missing_input.csv"
},
"proteomics_distribution_missing_output.json",
),
( # pass with only two of the three proteomics types
{
"proteomics": "test_proteomics_distribution_lfq_good_input.csv",
"proteomics_tmt": "test_proteomics_distribution_tmt_good_input.csv",
},
"proteomics_distribution_good_output_two_types.json",
)
]
pass_test_ids = [
"Pass with good data (LFQ and TMT)",
"Pass with good data",
"Pass with missing data",
"Pass with only two out of three proteomics types (LFQ, TMT)"
]
fail_test_data = [
( # fail with bad data type
{
"proteomics": "test_proteomics_distribution_lfq_wrong_data_type.csv",
"proteomics_tmt": "test_proteomics_distribution_tmt_good_input.csv",
"proteomics_srm": "test_proteomics_distribution_srm_good_input.csv",
},
KeyError,
),
( # fail with all NA data
{
"proteomics": "test_proteomics_distribution_lfq_good_input.csv",
"proteomics_tmt": "test_proteomics_distribution_tmt_bad_input.csv",
"proteomics_srm": "test_proteomics_distribution_srm_good_input.csv",
},
KeyError,
),
( # fail with bad name
{
"bad_name": "test_proteomics_distribution_lfq_good_input.csv",
"proteomics_tmt": "test_proteomics_distribution_tmt_good_input.csv",
"proteomics_srm": "test_proteomics_distribution_srm_good_input.csv",
},
ValueError,
),
Expand Down

0 comments on commit 38697f3

Please sign in to comment.