diff --git a/.gitignore b/.gitignore index 5458a518..ad1af402 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,12 @@ coverage.xml .hypothesis/ .pytest_cache/ +# ignore unit test data folder +tests/unit_tests/data/mokapot/** +!tests/unit_tests/data/mokapot/*.tab +!tests/unit_tests/data/predictions/ + + # Translations *.mo *.pot @@ -71,6 +77,7 @@ instance/ # Sphinx documentation docs/_build/ +docs/api/ # PyBuilder target/ @@ -139,3 +146,8 @@ dmypy.json # Used by ProteomicsDB runs to describe the oktoberfest version hash.file + + +# output files in tutorials folder +tutorials/ +!tutorials/Oktoberfest Tutorial.ipynb diff --git a/tests/unit_tests/data/predictions/library_input.csv b/tests/unit_tests/data/predictions/library_input.csv new file mode 100644 index 00000000..f8b6886e --- /dev/null +++ b/tests/unit_tests/data/predictions/library_input.csv @@ -0,0 +1,4 @@ +,"MODIFIED_SEQUENCE","COLLISION_ENERGY","PRECURSOR_CHARGE","FRAGMENTATION" +0,"[UNIMOD:737]-PEPTIDEK[UNIMOD:737]",30,2,"HCD" +1,"[UNIMOD:737]-PEPTIDE",30,2,"HCD" +2,"[UNIMOD:737]-M[UNIMOD:35]EC[UNIMOD:4]TIDEK[UNIMOD:737]",35,1,"CID" diff --git a/tests/unit_tests/data/predictions/library_output.csv b/tests/unit_tests/data/predictions/library_output.csv new file mode 100644 index 00000000..2dc9c742 --- /dev/null +++ b/tests/unit_tests/data/predictions/library_output.csv @@ -0,0 +1,4 @@ +,MODIFIED_SEQUENCE,COLLISION_ENERGY,PRECURSOR_CHARGE,FRAGMENTATION,INTENSITY_PRED_Y1+,INTENSITY_PRED_Y1++,INTENSITY_PRED_Y1+++,INTENSITY_PRED_B1+,INTENSITY_PRED_B1++,INTENSITY_PRED_B1+++,INTENSITY_PRED_Y2+,INTENSITY_PRED_Y2++,INTENSITY_PRED_Y2+++,INTENSITY_PRED_B2+,INTENSITY_PRED_B2++,INTENSITY_PRED_B2+++,INTENSITY_PRED_Y3+,INTENSITY_PRED_Y3++,INTENSITY_PRED_Y3+++,INTENSITY_PRED_B3+,INTENSITY_PRED_B3++,INTENSITY_PRED_B3+++,INTENSITY_PRED_Y4+,INTENSITY_PRED_Y4++,INTENSITY_PRED_Y4+++,INTENSITY_PRED_B4+,INTENSITY_PRED_B4++,INTENSITY_PRED_B4+++,INTENSITY_PRED_Y5+,INTENSITY_PRED_Y5++,INTENSITY_PRED_Y5+++,INTENSITY_PRED_B5+,INTENSITY_PRED_B5++,INTENSITY_PRED_B5+++,INTENSITY_PRED_Y6+,INTENSITY_PRED_Y6++,INTENSITY_PRED_Y6+++,INTENSITY_PRED_B6+,INTENSITY_PRED_B6++,INTENSITY_PRED_B6+++,INTENSITY_PRED_Y7+,INTENSITY_PRED_Y7++,INTENSITY_PRED_Y7+++,INTENSITY_PRED_B7+,INTENSITY_PRED_B7++,INTENSITY_PRED_B7+++,INTENSITY_PRED_Y8+,INTENSITY_PRED_Y8++,INTENSITY_PRED_Y8+++,INTENSITY_PRED_B8+,INTENSITY_PRED_B8++,INTENSITY_PRED_B8+++,INTENSITY_PRED_Y9+,INTENSITY_PRED_Y9++,INTENSITY_PRED_Y9+++,INTENSITY_PRED_B9+,INTENSITY_PRED_B9++,INTENSITY_PRED_B9+++,INTENSITY_PRED_Y10+,INTENSITY_PRED_Y10++,INTENSITY_PRED_Y10+++,INTENSITY_PRED_B10+,INTENSITY_PRED_B10++,INTENSITY_PRED_B10+++,INTENSITY_PRED_Y11+,INTENSITY_PRED_Y11++,INTENSITY_PRED_Y11+++,INTENSITY_PRED_B11+,INTENSITY_PRED_B11++,INTENSITY_PRED_B11+++,INTENSITY_PRED_Y12+,INTENSITY_PRED_Y12++,INTENSITY_PRED_Y12+++,INTENSITY_PRED_B12+,INTENSITY_PRED_B12++,INTENSITY_PRED_B12+++,INTENSITY_PRED_Y13+,INTENSITY_PRED_Y13++,INTENSITY_PRED_Y13+++,INTENSITY_PRED_B13+,INTENSITY_PRED_B13++,INTENSITY_PRED_B13+++,INTENSITY_PRED_Y14+,INTENSITY_PRED_Y14++,INTENSITY_PRED_Y14+++,INTENSITY_PRED_B14+,INTENSITY_PRED_B14++,INTENSITY_PRED_B14+++,INTENSITY_PRED_Y15+,INTENSITY_PRED_Y15++,INTENSITY_PRED_Y15+++,INTENSITY_PRED_B15+,INTENSITY_PRED_B15++,INTENSITY_PRED_B15+++,INTENSITY_PRED_Y16+,INTENSITY_PRED_Y16++,INTENSITY_PRED_Y16+++,INTENSITY_PRED_B16+,INTENSITY_PRED_B16++,INTENSITY_PRED_B16+++,INTENSITY_PRED_Y17+,INTENSITY_PRED_Y17++,INTENSITY_PRED_Y17+++,INTENSITY_PRED_B17+,INTENSITY_PRED_B17++,INTENSITY_PRED_B17+++,INTENSITY_PRED_Y18+,INTENSITY_PRED_Y18++,INTENSITY_PRED_Y18+++,INTENSITY_PRED_B18+,INTENSITY_PRED_B18++,INTENSITY_PRED_B18+++,INTENSITY_PRED_Y19+,INTENSITY_PRED_Y19++,INTENSITY_PRED_Y19+++,INTENSITY_PRED_B19+,INTENSITY_PRED_B19++,INTENSITY_PRED_B19+++,INTENSITY_PRED_Y20+,INTENSITY_PRED_Y20++,INTENSITY_PRED_Y20+++,INTENSITY_PRED_B20+,INTENSITY_PRED_B20++,INTENSITY_PRED_B20+++,INTENSITY_PRED_Y21+,INTENSITY_PRED_Y21++,INTENSITY_PRED_Y21+++,INTENSITY_PRED_B21+,INTENSITY_PRED_B21++,INTENSITY_PRED_B21+++,INTENSITY_PRED_Y22+,INTENSITY_PRED_Y22++,INTENSITY_PRED_Y22+++,INTENSITY_PRED_B22+,INTENSITY_PRED_B22++,INTENSITY_PRED_B22+++,INTENSITY_PRED_Y23+,INTENSITY_PRED_Y23++,INTENSITY_PRED_Y23+++,INTENSITY_PRED_B23+,INTENSITY_PRED_B23++,INTENSITY_PRED_B23+++,INTENSITY_PRED_Y24+,INTENSITY_PRED_Y24++,INTENSITY_PRED_Y24+++,INTENSITY_PRED_B24+,INTENSITY_PRED_B24++,INTENSITY_PRED_B24+++,INTENSITY_PRED_Y25+,INTENSITY_PRED_Y25++,INTENSITY_PRED_Y25+++,INTENSITY_PRED_B25+,INTENSITY_PRED_B25++,INTENSITY_PRED_B25+++,INTENSITY_PRED_Y26+,INTENSITY_PRED_Y26++,INTENSITY_PRED_Y26+++,INTENSITY_PRED_B26+,INTENSITY_PRED_B26++,INTENSITY_PRED_B26+++,INTENSITY_PRED_Y27+,INTENSITY_PRED_Y27++,INTENSITY_PRED_Y27+++,INTENSITY_PRED_B27+,INTENSITY_PRED_B27++,INTENSITY_PRED_B27+++,INTENSITY_PRED_Y28+,INTENSITY_PRED_Y28++,INTENSITY_PRED_Y28+++,INTENSITY_PRED_B28+,INTENSITY_PRED_B28++,INTENSITY_PRED_B28+++,INTENSITY_PRED_Y29+,INTENSITY_PRED_Y29++,INTENSITY_PRED_Y29+++,INTENSITY_PRED_B29+,INTENSITY_PRED_B29++,INTENSITY_PRED_B29+++,PREDICTED_IRT +0,[UNIMOD:737]-PEPTIDEK[UNIMOD:737],30,2,HCD,0.23809576034545898,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,0.8115681409835815,1.0000000116860974e-07,1.0000000116860974e-07,1.0,1.0000000116860974e-07,1.0000000116860974e-07,0.16860607266426086,1.0000000116860974e-07,1.0000000116860974e-07,0.009546236135065556,1.0000000116860974e-07,1.0000000116860974e-07,0.05823937803506851,1.0000000116860974e-07,1.0000000116860974e-07,0.0676455870270729,1.0000000116860974e-07,1.0000000116860974e-07,0.039169538766145706,1.0000000116860974e-07,1.0000000116860974e-07,0.07002319395542145,1.0000000116860974e-07,1.0000000116860974e-07,0.6715999841690063,0.01274949125945568,1.0000000116860974e-07,0.5392391085624695,1.0000000116860974e-07,1.0000000116860974e-07,0.02867981791496277,0.00021903926972299814,1.0000000116860974e-07,0.07469962537288666,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,39.420433 +1,[UNIMOD:737]-PEPTIDE,30,2,HCD,0.522221565246582,1.0271855899190996e-07,1.0000000116860974e-07,1.0271855899190996e-07,1.0271855899190996e-07,1.0000000116860974e-07,0.6478652358055115,1.0271855899190996e-07,1.0000000116860974e-07,0.6932786107063293,1.0271855899190996e-07,1.0000000116860974e-07,1.0271855899190996e-07,1.0271855899190996e-07,1.0000000116860974e-07,0.03741396963596344,0.04295269027352333,1.0000000116860974e-07,1.0271855899190996e-07,1.0271855899190996e-07,1.0000000116860974e-07,1.0,0.016776476055383682,1.0000000116860974e-07,0.024784639477729797,1.0271855899190996e-07,1.0000000116860974e-07,0.47810620069503784,1.0271855899190996e-07,1.0000000116860974e-07,1.0271855899190996e-07,1.0271855899190996e-07,1.0000000116860974e-07,0.6293804049491882,0.0024885176680982113,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,43.523045 +2,[UNIMOD:737]-M[UNIMOD:35]EC[UNIMOD:4]TIDEK[UNIMOD:737],35,1,CID,0.2831476628780365,1.0000000116860974e-07,1.0000000116860974e-07,1.3209350413490029e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0,1.0000000116860974e-07,1.0000000116860974e-07,1.3209350413490029e-07,1.0000000116860974e-07,1.0000000116860974e-07,0.38974782824516296,1.0000000116860974e-07,1.0000000116860974e-07,0.018663309514522552,1.0000000116860974e-07,1.0000000116860974e-07,0.16417913138866425,1.0000000116860974e-07,1.0000000116860974e-07,0.019735727459192276,1.0000000116860974e-07,1.0000000116860974e-07,0.27998510003089905,1.0000000116860974e-07,1.0000000116860974e-07,0.009887314401566982,1.0000000116860974e-07,1.0000000116860974e-07,0.48476091027259827,1.0000000116860974e-07,1.0000000116860974e-07,0.009575176984071732,1.0000000116860974e-07,1.0000000116860974e-07,0.26375487446784973,1.0000000116860974e-07,1.0000000116860974e-07,0.019234927371144295,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,1.0000000116860974e-07,24.778168 diff --git a/tests/unit_tests/test_predictions.py b/tests/unit_tests/test_predictions.py new file mode 100644 index 00000000..0e186cb6 --- /dev/null +++ b/tests/unit_tests/test_predictions.py @@ -0,0 +1,33 @@ +import unittest +from pathlib import Path + +import pandas as pd + +from oktoberfest.data import Spectra +from oktoberfest.pr import grpc_predict + + +class TestTMTProsit(unittest.TestCase): + """Test class for TMT model predictions.""" + + def test_prosit_tmt(self): + """Test retrieval of predictions from prosit tmt models via koina.""" + library = Spectra.from_csv(Path(__file__).parent / "data" / "predictions" / "library_input.csv") + print(library.spectra_data["COLLISION_ENERGY"]) + grpc_predict( + library=library, + url="10.157.98.62:8500", + intensity_model="Prosit_2020_intensity_TMT", + irt_model="Prosit_2020_irt_TMT", + ssl=False, + alignment=False, + job_type="", + ) + + expected_df = pd.read_csv(Path(__file__).parent / "data" / "predictions" / "library_output.csv") + sparse_cols = [col for col in library.spectra_data.columns if col.startswith("INTENSITY_PRED")] + for sparse_col in sparse_cols: + expected_df[sparse_col] = expected_df[sparse_col].astype(library.spectra_data[sparse_col].dtype) + expected_df["PREDICTED_IRT"] = expected_df["PREDICTED_IRT"].astype(library.spectra_data["PREDICTED_IRT"].dtype) + + pd.testing.assert_frame_equal(library.spectra_data, expected_df)