Repository 'recetox_xmsannotator_advanced'
hg clone https://toolshed.g2.bx.psu.edu/repos/recetox/recetox_xmsannotator_advanced

Changeset 1:2c6fa447f6a0 (2023-07-20)
Previous changeset 0:cfd2e19f00a9 (2023-06-26) Next changeset 2:50ac7359ffe7 (2023-10-12)
Commit message:
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox-xmsannotator commit 8547c5323747595eabbeed29039a1b2363491243
modified:
utils.R
added:
test-data/adduct_table.csv
test-data/adduct_table.parquet
test-data/database.csv
test-data/database.parquet
test-data/expected_output.csv
test-data/expected_output.parquet
test-data/intensity_table.csv
test-data/intensity_table.parquet
test-data/metadata_table.csv
test-data/metadata_table.parquet
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/adduct_table.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/adduct_table.csv Thu Jul 20 06:29:06 2023 +0000
b
@@ -0,0 +1,3 @@
+,adduct,charge,mass,factor
+0,M-H,1,-1.007276,1
+1,M+H,1,1.007276,1
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/adduct_table.parquet
b
Binary file test-data/adduct_table.parquet has changed
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/database.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/database.csv Thu Jul 20 06:29:06 2023 +0000
b
b'@@ -0,0 +1,125 @@\n+,name,mz,hmdbid,molecular_formula,monoisotopic_mass,compound\n+0,Benzamide,122.0605,HMDB04461,C7H7NO,121.052763851,2139\n+1,Ethylphosphate,127.0158,HMDB12228,C2H7O4P,126.008195224,7775\n+2,Pyroglutamic acid,130.0502,HMDB00267,C5H7NO3,129.042593095,182\n+3,Indoxyl,134.0606,HMDB04094,C8H7NO,133.052763851,2058\n+4,N-Acetylarylamine,136.0761,HMDB01250,C8H9NO,135.068413915,965\n+5,N1-Methyl-2-pyridone-5-carboxamide,153.0664,HMDB04193,C7H8N2O2,152.05857751,2086\n+6,Diethylphosphate,155.0471,HMDB12209,C4H11O4P,154.039495352,7756\n+7,Succinylacetone,159.0655,HMDB00635,C7H10O4,158.057908808,495\n+8,3-Methyl-4-phenyl-3-buten-2-one,161.0965,HMDB31567,C11H12O,160.088815006,12746\n+9,3 Hydroxycoumarin,163.0393,HMDB02149,C9H6O3,162.031694058,1445\n+10,2-Hydroxyadipic acid,163.0609,HMDB00321,C6H10O5,162.05282343,225\n+11,3-Methylxanthine,167.0568,HMDB01886,C6H6N4O2,166.049075456,1255\n+12,Quinaldic acid,174.0547,HMDB00842,C10H7NO2,173.047678473,671\n+13,Herniarin,177.0551,HMDB29758,C10H8O3,176.047344122,10982\n+14,4-Methyl-1-phenyl-2-pentanone,177.1277,HMDB31569,C12H16O,176.120115134,12748\n+15,Hippuric acid,180.066,HMDB00714,C9H9NO3,179.058243159,565\n+16,7-Aminomethyl-7-carbaguanine,180.0886,HMDB11690,C7H9N5O,179.080709935,7268\n+17,Paraxanthine,181.0718,HMDB01860,C7H8N4O2,180.06472552,1234\n+18,Carbendazim,192.0773,HMDB31769,C9H9N3O2,191.069476547,12939\n+19,Phendimetrazine,192.1388,HMDB15519,C12H17NO,191.131014171,9782\n+20,Phenylacetylglycine,194.0816,HMDB00821,C10H11NO3,193.073893223,656\n+21,(R)-N-Methylsalsolinol,194.1178,HMDB03626,C11H15NO2,193.110278729,1940\n+22,(R)-3-Hydroxy-5-phenylpentanoic acid,195.1018,HMDB31517,C11H14O3,194.094294314,12696\n+23,3-Dechloroethylifosfamide,199.0393,HMDB13858,C5H12ClN2O2P,198.032491857,8611\n+24,Agrocybenine,207.1499,HMDB41445,C12H18N2O,206.141913208,22233\n+25,Cysteinyl-Serine,209.0595,HMDB28784,C6H12N2O4S,208.051777572,10052\n+26,1-Hydroxylorcaserin,212.084,HMDB60704,C11H14ClNO,211.076391782,41053\n+27,m-Chlorohippuric acid,214.0272,HMDB01309,C9H8ClNO3,213.019270834,1008\n+28,Deoxyribose 5-phosphate,215.032,HMDB01031,C5H11O7P,214.024239218,813\n+29,5-Methoxydimethyltryptamine,219.1495,HMDB02004,C13H18N2O,218.141913208,1341\n+30,1-(5-Acetyl-2-hydroxyphenyl)-3-methyl-1-butanone,221.1181,HMDB32589,C13H16O3,220.109944378,13682\n+31,1-(1-Propenylthio)propyl propyl disulfide,223.0641,HMDB33041,C9H18S3,222.057062646,14118\n+32,L-Cystathionine,223.0756,HMDB00099,C7H14N2O4S,222.067427636,67\n+33,Norketamine,224.0841,HMDB60549,C12H14ClNO,223.076391782,40914\n+34,Hydroxykynurenine,225.0872,HMDB00732,C10H12N2O4,224.079706882,581\n+35,Cuscohygrine,225.1963,HMDB30290,C13H24N2O,224.1888634,11500\n+36,Methyl dihydrojasmonate,227.1645,HMDB31740,C13H22O3,226.15689457,12914\n+37,Resveratrol,229.0862,HMDB03747,C14H12O3,228.07864425,1962\n+38,Methylphenidate,234.1491,HMDB14566,C14H19NO2,233.141578857,8933\n+39,Valerenic acid,235.1695,HMDB30016,C15H22O2,234.161979948,11231\n+40,Dillapional,237.0758,HMDB30582,C12H12O5,236.068473494,11787\n+41,Ethyl vanillin isobutyrate,237.1127,HMDB37683,C13H16O4,236.104859,18548\n+42,L-4-Chlorotryptophan,239.0587,HMDB30400,C11H11ClN2O2,238.050905313,11609\n+43,N-Undecanoylglycine,244.1909,HMDB13286,C13H25NO3,243.183443671,8280\n+44,Dimethylbenzyl carbinyl hexanoate,249.1852,HMDB32228,C16H24O2,248.177630012,13375\n+45,N-Acetylvanilalanine,254.1026,HMDB11716,C12H15NO5,253.095022595,7292\n+46,Palmitic amide,256.2638,HMDB12273,C16H33NO,255.256214683,7815\n+47,Nevirapine,267.1229,HMDB14383,C15H14N4O,266.11676109,8778\n+48,Alachlor,270.1259,HMDB31766,C14H20ClNO2,269.118256596,12936\n+49,Hypoglycin B,271.1291,HMDB29428,C12H18N2O5,270.121571696,10668\n+50,Cyclandelate,277.1804,HMDB15586,C17H24O3,276.172544634,9843\n+51,Gravolenic acid,281.1021,HMDB33884,C14H16O6,280.094688244,14938\n+52,1-Methyladenosine,282.1195,HMDB03331,C11H15N5O4,281.112403993,1842\n+53,Oleamide,282.2795,HMDB02117,C18H35NO,281.271864747,1424\n+54,N-Phenylacetylphenylalanine,284.1278,HMDB02372,C17H17NO3,283.120843415,1601\n+55,Glycylprolylhydroxyproline,2'..b'5754,41179\n+68,Eplerenone,415.2127,HMDB14838,C24H30O6,414.204238692,9174\n+69,Roflumilast N-oxide,419.0358,HMDB60590,C17H14Cl2F2N2O4,418.02986877,40951\n+70,Bicalutamide,431.0682,HMDB15260,C18H14F4N2O4S,430.061040456,9545\n+71,Sabadelin,531.4779,HMDB34033,C35H62O3,530.46989585,15084\n+72,Hyperforin,537.3954,HMDB30463,C35H52O4,536.386560152,11672\n+73,Furohyperforin,553.3903,HMDB33632,C35H52O5,552.381474774,14690\n+74,33-Deoxy-33-hydroperoxyfurohyperforin,569.3843,HMDB38387,C35H52O6,568.376389396,19229\n+75,Pteroyltriglutamic acid,700.2348,HMDB01902,C29H33N9O12,699.224867565,1269\n+76,Erythromycin,734.4688,HMDB14344,C37H67NO13,733.461241235,8743\n+77,Pelargonidin 3-sophoroside 5-glucoside,758.2233,HMDB33687,C33H41O20,757.219118752,14745\n+78,Degalloyltheaflavonin,785.1594,HMDB40548,C36H32O20,784.148693464,21347\n+79,Alatanin 2,832.2425,HMDB38826,C39H43O20,831.234768816,19662\n+80,Secaloside A,1002.2852,HMDB34565,C46H51NO24,1001.280101565,15591\n+81,Cinnamyl acetate,177.0912,HMDB29699,C11H12O2,176.083729628,10928\n+82,Donepezil metabolite M4,290.1746,HMDB13960,C17H23NO3,289.167793607,8669\n+83,Sphinganine,302.305,HMDB00269,C18H39NO2,301.298079497,184\n+84,Nizatidine,332.1195,HMDB14723,C12H21N5O2S2,331.113666321,9072\n+85,Diethylhexyl adipate,371.3156,HMDB40270,C22H42O4,370.308309832,21088\n+86,Azlocillin,462.1464,HMDB15194,C20H23N5O6S,461.136904183,9488\n+87,Diethylthiophosphate,171.0241,HMDB01460,C4H11O3PS,170.01665142,1128\n+88,3-Methoxybenzenepropanoic acid,181.0858,HMDB11751,C10H12O3,180.07864425,7320\n+89,2-Methyl-1-phenyl-2-propanyl acetate,193.1223,HMDB31571,C12H16O2,192.115029756,12750\n+90,1-Hydroxyphenanthrene,195.0804,HMDB59797,C14H10O,194.073164942,40190\n+91,Varenicline,212.1184,HMDB15398,C13H13N3,211.110947431,9672\n+92,Urolithin B,213.0548,HMDB13696,C13H8O3,212.047344122,8566\n+93,Harmine,213.1024,HMDB30311,C13H12N2O,212.094963016,11521\n+94,2-(4-Methyl-5-thiazolyl)ethyl butanoate,214.0899,HMDB32418,C10H15NO2S,213.082349419,13548\n+95,Cysteinyl-Glutamine,250.0864,HMDB28773,C8H15N3O4S,249.078326673,10041\n+96,N-Lauroylglycine,258.2062,HMDB13272,C14H27NO3,257.199093735,8278\n+97,N-Acetylcystathionine,265.0861,HMDB02381,C9H16N2O5S,264.077992322,1608\n+98,Acetyl-N-formyl-5-methoxykynurenamine,265.1184,HMDB04259,C13H16N2O4,264.11100701,2112\n+99,Metoprolol,268.1905,HMDB01932,C15H25NO3,267.183443671,1291\n+100,Malathion dicarboxylic acid,274.9808,HMDB60636,C6H11O6PS2,273.973465976,40995\n+101,12-Hydroxynevirapine,283.1191,HMDB13911,C15H14N4O2,282.111675712,8644\n+102,Oleic acid,283.2631,HMDB00207,C18H34O2,282.255880332,133\n+103,Octadecanamide,284.2948,HMDB34146,C18H37NO,283.287514811,15197\n+104,Avocadyne,285.2422,HMDB35473,C17H32O3,284.23514489,16436\n+105,Procaterol,291.1707,HMDB15453,C16H22N2O3,290.16304258,9724\n+106,Penbutolol,292.2263,HMDB15447,C18H29NO2,291.219829177,9719\n+107,3-Oxooctadecanoic acid,299.2579,HMDB10736,C18H34O3,298.250794954,6743\n+108,Methylgingerol,309.2059,HMDB29852,C18H28O4,308.198759384,11074\n+109,Pipericine,336.3262,HMDB31678,C22H41NO,335.318814939,12852\n+110,Docosanamide,340.3571,HMDB00583,C22H45NO,339.350115067,455\n+111,Polyoxyethylene (600) monoricinoleate,341.3046,HMDB32476,C21H40O3,340.297745146,13600\n+112,Perindopril,369.2402,HMDB14928,C19H32N2O5,368.231122144,9252\n+113,Doxapram,379.238,HMDB14701,C24H30N2O2,378.230728214,9053\n+114,Drotaverine,398.2326,HMDB15669,C24H31NO4,397.225308485,9917\n+115,Cinitapride,403.2322,HMDB15698,C21H30N4O4,402.226705468,9943\n+116,3-Hydroxy-9-hexadecenoylcarnitine,414.3211,HMDB13333,C23H43NO5,413.314123491,8310\n+117,beta-Citraurinene,419.3296,HMDB35686,C30H42O,418.323565966,16644\n+118,Didodecyl thiobispropanoate,515.4126,HMDB40172,C30H58O4S,514.405581034,20994\n+119,Indole-3-carbinol,148.076,HMDB05785,C9H9NO,147.068413915,2558\n+120,4-Pyridoxolactone,166.0503,HMDB03454,C8H7NO3,165.042593095,1898\n+121,D-Glucose,181.0715,HMDB00122,C6H12O6,180.063388116,77\n+122,Monoisobutyl phthalic acid,223.0967,HMDB02056,C12H14O4,222.089208936,1380\n+123,Nonivamide,294.2065,HMDB29846,C17H27NO3,293.199093735,11068\n'
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/database.parquet
b
Binary file test-data/database.parquet has changed
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/expected_output.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected_output.csv Thu Jul 20 06:29:06 2023 +0000
b
b'@@ -0,0 +1,213 @@\n+"chemical_ID","Confidence","score","Module_RTclust","mz","time","MatchCategory","theoretical.mz","delta_ppm","Name","Formula","MonoisotopicMass","Adduct","ISgroup","mean_int_vec","MD"\n+"HMDB61136",2,1e+05,"1_26",265.117617521303,197.946286627413,"Multiple",265.11828301,2.51,"di-Hydroxymelatonin","C13H16N2O4",264.11100701,"M+H","-",1171131.93425976,0.12\n+"HMDB61093",2,1e+05,"1_24",130.049811896097,194.967082477251,"Multiple",130.049869095,0.44,"dimethadione","C5H7NO3",129.042593095,"M+H","-",1015313.56125294,0.5\n+"HMDB61093",2,1e+05,"2_12",130.050009743661,180.781477071218,"Multiple",130.049869095,1.08,"dimethadione","C5H7NO3",129.042593095,"M+H","-",27986670.5464277,0.6\n+"HMDB61093",2,1e+05,"2_4",130.050009743656,167.775051211736,"Multiple",130.049869095,1.08,"dimethadione","C5H7NO3",129.042593095,"M+H","-",7142731.55699718,0.6\n+"HMDB60758",2,1e+05,"2_22",194.081219802905,193.332821119603,"Multiple",194.081169223,0.26,"4-Anilino-4-oxobutanoic acid","C10H11NO3",193.073893223,"M+H","-",3625916.09022134,0.9\n+"HMDB60758",2,1e+05,"1_21",194.080860682815,191.303073063571,"Multiple",194.081169223,1.59,"4-Anilino-4-oxobutanoic acid","C10H11NO3",193.073893223,"M+H","-",6605199.1514948,0.9\n+"HMDB60758",2,1e+05,"6_8",194.081221983551,174.194520186951,"Multiple",194.081169223,0.27,"4-Anilino-4-oxobutanoic acid","C10H11NO3",193.073893223,"M+H","-",4060946.00320151,0.9\n+"HMDB60734",2,1e+05,"3_21",181.085747879909,197.571573647594,"Multiple",181.08592025,0.95,"3-(3-Hydroxyphenyl)-2-methylpropionic acid","C10H12O3",180.07864425,"M+H","-",1815462.07818636,0.9\n+"HMDB60734",2,1e+05,"1_16",181.086076503782,183.470432852822,"Multiple",181.08592025,0.86,"3-(3-Hydroxyphenyl)-2-methylpropionic acid","C10H12O3",180.07864425,"M+H","-",541850.08968085,0.9\n+"HMDB60656",2,1e+05,"6_16",207.149213815429,183.717359515393,"Multiple",207.149189208,0.12,"Monoethylglycinexylidide","C12H18N2O",206.141913208,"M+H","-",2239170.94113507,0.15\n+"HMDB60486",2,1e+05,"6_4",134.060229128951,168.761595141885,"Multiple",134.060039851,1.41,"Mandelonitrile","C8H7NO",133.052763851,"M+H","-",1065781.81556994,0.7\n+"HMDB60486",2,1e+05,"1_19",134.060230180054,188.670143007497,"Multiple",134.060039851,1.42,"Mandelonitrile","C8H7NO",133.052763851,"M+H","-",2678406.60031051,0.7\n+"HMDB60389",2,1e+05,"6_8",194.081221983551,174.194520186951,"Multiple",194.081169223,0.27,"4-Hydroxy-5-phenyltetrahydro-13-oxazin-2-one","C10H11NO3",193.073893223,"M+H","-",4060946.00320151,0.9\n+"HMDB60389",2,1e+05,"2_22",194.081219802905,193.332821119603,"Multiple",194.081169223,0.26,"4-Hydroxy-5-phenyltetrahydro-13-oxazin-2-one","C10H11NO3",193.073893223,"M+H","-",3625916.09022134,0.9\n+"HMDB60389",2,1e+05,"1_21",194.080860682815,191.303073063571,"Multiple",194.081169223,1.59,"4-Hydroxy-5-phenyltetrahydro-13-oxazin-2-one","C10H11NO3",193.073893223,"M+H","-",6605199.1514948,0.9\n+"HMDB60366",2,1e+05,"1_21",194.080860682815,191.303073063571,"Multiple",194.081169223,1.59,"3-Carbamoyl-2-phenylpropionaldehyde","C10H11NO3",193.073893223,"M+H","-",6605199.1514948,0.9\n+"HMDB60366",2,1e+05,"6_8",194.081221983551,174.194520186951,"Multiple",194.081169223,0.27,"3-Carbamoyl-2-phenylpropionaldehyde","C10H11NO3",193.073893223,"M+H","-",4060946.00320151,0.9\n+"HMDB60366",2,1e+05,"2_22",194.081219802905,193.332821119603,"Multiple",194.081169223,0.26,"3-Carbamoyl-2-phenylpropionaldehyde","C10H11NO3",193.073893223,"M+H","-",3625916.09022134,0.9\n+"HMDB60262",2,1e+05,"2_4",130.050009743656,167.775051211736,"Multiple",130.049869095,1.08,"5-Oxoprolinate","C5H7NO3",129.042593095,"M+H","-",7142731.55699718,0.6\n+"HMDB60262",2,1e+05,"2_12",130.050009743661,180.781477071218,"Multiple",130.049869095,1.08,"5-Oxoprolinate","C5H7NO3",129.042593095,"M+H","-",27986670.5464277,0.6\n+"HMDB60262",2,1e+05,"1_24",130.049811896097,194.967082477251,"Multiple",130.049869095,0.44,"5-Oxoprolinate","C5H7NO3",129.042593095,"M+H","-",1015313.56125294,0.5\n+"HMDB59815",2,1e+05,"1_26",159.06514234819,197.330591811404,"Multiple",159.0651848'..b'95,1.08,"N-Acryloylglycine","C5H7NO3",129.042593095,"M+H","-",27986670.5464277,0.6\n+"HMDB01843",2,1e+05,"1_24",130.049811896097,194.967082477251,"Multiple",130.049869095,0.44,"N-Acryloylglycine","C5H7NO3",129.042593095,"M+H","-",1015313.56125294,0.5\n+"HMDB01843",2,1e+05,"2_4",130.050009743656,167.775051211736,"Multiple",130.049869095,1.08,"N-Acryloylglycine","C5H7NO3",129.042593095,"M+H","-",7142731.55699718,0.6\n+"HMDB01369",2,1e+05,"2_12",130.050009743661,180.781477071218,"Multiple",130.049869095,1.08,"Pyrroline hydroxycarboxylic acid","C5H7NO3",129.042593095,"M+H","-",27986670.5464277,0.6\n+"HMDB01369",2,1e+05,"1_24",130.049811896097,194.967082477251,"Multiple",130.049869095,0.44,"Pyrroline hydroxycarboxylic acid","C5H7NO3",129.042593095,"M+H","-",1015313.56125294,0.5\n+"HMDB01369",2,1e+05,"2_4",130.050009743656,167.775051211736,"Multiple",130.049869095,1.08,"Pyrroline hydroxycarboxylic acid","C5H7NO3",129.042593095,"M+H","-",7142731.55699718,0.6\n+"HMDB01250",2,1e+05,"3_1",136.075809178893,161.768440351593,"Multiple",136.075689915,0.88,"N-Acetylarylamine","C8H9NO",135.068413915,"M+H","-",9171351.71551996,0.8\n+"HMDB01250",2,1e+05,"1_9",136.075810213095,173.384016767433,"Multiple",136.075689915,0.88,"N-Acetylarylamine","C8H9NO",135.068413915,"M+H","-",14418158.1071989,0.8\n+"HMDB01250",2,1e+05,"1_25",136.075810213007,196.517081241411,"Multiple",136.075689915,0.88,"N-Acetylarylamine","C8H9NO",135.068413915,"M+H","-",2493807.1669498,0.8\n+"HMDB01250",2,1e+05,"3_16",136.075806020462,187.725344229595,"Multiple",136.075689915,0.85,"N-Acetylarylamine","C8H9NO",135.068413915,"M+H","-",14936643.8833927,0.8\n+"HMDB00859",2,1e+05,"6_8",194.081221983551,174.194520186951,"Multiple",194.081169223,0.27,"Methylhippuric acid","C10H11NO3",193.073893223,"M+H","-",4060946.00320151,0.9\n+"HMDB00859",2,1e+05,"2_22",194.081219802905,193.332821119603,"Multiple",194.081169223,0.26,"Methylhippuric acid","C10H11NO3",193.073893223,"M+H","-",3625916.09022134,0.9\n+"HMDB00859",2,1e+05,"1_21",194.080860682815,191.303073063571,"Multiple",194.081169223,1.59,"Methylhippuric acid","C10H11NO3",193.073893223,"M+H","-",6605199.1514948,0.9\n+"HMDB00821",2,1e+05,"2_22",194.081219802905,193.332821119603,"Multiple",194.081169223,0.26,"Phenylacetylglycine","C10H11NO3",193.073893223,"M+H","-",3625916.09022134,0.9\n+"HMDB00821",2,1e+05,"1_21",194.080860682815,191.303073063571,"Multiple",194.081169223,1.59,"Phenylacetylglycine","C10H11NO3",193.073893223,"M+H","-",6605199.1514948,0.9\n+"HMDB00821",2,1e+05,"6_8",194.081221983551,174.194520186951,"Multiple",194.081169223,0.27,"Phenylacetylglycine","C10H11NO3",193.073893223,"M+H","-",4060946.00320151,0.9\n+"HMDB00805",2,1e+05,"1_24",130.049811896097,194.967082477251,"Multiple",130.049869095,0.44,"Pyrrolidonecarboxylic acid","C5H7NO3",129.042593095,"M+H","-",1015313.56125294,0.5\n+"HMDB00805",2,1e+05,"2_4",130.050009743656,167.775051211736,"Multiple",130.049869095,1.08,"Pyrrolidonecarboxylic acid","C5H7NO3",129.042593095,"M+H","-",7142731.55699718,0.6\n+"HMDB00805",2,1e+05,"2_12",130.050009743661,180.781477071218,"Multiple",130.049869095,1.08,"Pyrrolidonecarboxylic acid","C5H7NO3",129.042593095,"M+H","-",27986670.5464277,0.6\n+"HMDB00635",2,1e+05,"1_26",159.06514234819,197.330591811404,"Multiple",159.065184808,0.27,"Succinylacetone","C7H10O4",158.057908808,"M+H","-",2202685.7054755,0.7\n+"HMDB00635",2,1e+05,"6_15",157.049850117045,182.354604362304,"Multiple",157.050632808,4.98,"Succinylacetone","C7H10O4",158.057908808,"M-H","-",1368493.99338325,0.5\n+"HMDB00267",2,1e+05,"2_12",130.050009743661,180.781477071218,"Multiple",130.049869095,1.08,"Pyroglutamic acid","C5H7NO3",129.042593095,"M+H","-",27986670.5464277,0.6\n+"HMDB00267",2,1e+05,"2_4",130.050009743656,167.775051211736,"Multiple",130.049869095,1.08,"Pyroglutamic acid","C5H7NO3",129.042593095,"M+H","-",7142731.55699718,0.6\n+"HMDB00267",2,1e+05,"1_24",130.049811896097,194.967082477251,"Multiple",130.049869095,0.44,"Pyroglutamic acid","C5H7NO3",129.042593095,"M+H","-",1015313.56125294,0.5\n'
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/expected_output.parquet
b
Binary file test-data/expected_output.parquet has changed
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/intensity_table.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intensity_table.csv Thu Jul 20 06:29:06 2023 +0000
b
b'@@ -0,0 +1,1340 @@\n+,id,data06_intensity,data07_intensity,data08_intensity\n+0,1.0,0.0,3786719.935982465,3337130.2371725794\n+1,3.0,142356656.91329387,84292123.72052653,116220468.2058125\n+2,4.0,0.0,3027831.662547251,4232563.395784442\n+3,5.0,0.0,814718.2931617,667412.6145220067\n+4,6.0,19769737.443290893,25946536.94788723,15256613.822737923\n+5,7.0,15083952.726032479,14719570.784554532,11882839.70348706\n+6,8.0,0.0,2277920.5184312323,1942789.2956770866\n+7,10.0,4854729.25883474,12877950.34415196,0.0\n+8,11.0,1029415.0130157267,0.0,4012725.880463593\n+9,12.0,88462686.27541009,51400636.98149244,91780479.6000601\n+10,13.0,2312182.9338387563,0.0,1896944.6217923078\n+11,14.0,0.0,44729007.606007695,23645236.062159825\n+12,15.0,3234271.342276033,0.0,2601596.1264230423\n+13,16.0,1929198.4170001938,3448090.041184255,0.0\n+14,17.0,0.0,798886.7831564497,1101602.2693081151\n+15,18.0,2282276.597171248,0.0,1606313.972825709\n+16,19.0,0.0,759304.3947481152,3646853.7696877397\n+17,20.0,330282.3227992036,278776.5554327081,0.0\n+18,21.0,0.0,23160923.296943318,22117547.04785022\n+19,22.0,10570351.654533645,8881448.287540229,75308429.03451341\n+20,23.0,7752586.02817777,11676511.081903085,0.0\n+21,24.0,30260384.73126008,11795881.581877084,40389416.01727903\n+22,25.0,2354529.497212735,1761619.3100370043,938805.5857698871\n+23,26.0,1520872.4312920996,3128327.034165404,923959.5398163607\n+24,27.0,694602.8761622463,939710.7881728864,0.0\n+25,28.0,713628.4281276342,0.0,282790.34185351845\n+26,29.0,0.0,3900994.4905791725,6575023.0564733725\n+27,30.0,20536453.82937628,23253714.916183833,21386674.967423715\n+28,31.0,0.0,7304026.545117522,3026517.6004653675\n+29,32.0,15114932.651229557,14916944.691303898,12775559.776099104\n+30,33.0,14424888.724110445,12366214.956459975,0.0\n+31,34.0,20467956.31021,0.0,16391704.6923078\n+32,35.0,0.0,7402923.242942371,6969953.019063297\n+33,36.0,92767767.20713098,87800638.95837219,0.0\n+34,37.0,2332162.6711178576,1560739.1651274154,1566654.2004814774\n+35,38.0,0.0,1200535.6865662502,805674.1233749337\n+36,39.0,0.0,3270758.975300478,3428788.2040354353\n+37,40.0,2162568.8958989843,0.0,2667291.600475484\n+38,41.0,833520.0706714265,995559.78965736,1116639.3654821322\n+39,42.0,21173242.39205589,19488083.89237884,17658786.06043141\n+40,43.0,1317911.9176046443,937710.7006160606,0.0\n+41,44.0,3425787.0110061704,0.0,2337951.5936972457\n+42,45.0,14541677.49471558,13613480.639922224,12375113.924173051\n+43,46.0,362977.2314844885,459689.6884736864,0.0\n+44,47.0,230192568.71506786,227726975.48512372,208960597.54399705\n+45,48.0,78315373.54343724,76067030.78791492,69559147.12287042\n+46,49.0,702982.5448415529,0.0,718188.7462305737\n+47,50.0,0.0,1313290.9672301277,511604.5238874303\n+48,51.0,8413937.940447528,13029100.94336713,0.0\n+49,52.0,1566637.6299146966,0.0,1679592.7137248383\n+50,53.0,0.0,521159.996972826,1088329.2038458365\n+51,54.0,1871917.7208578968,0.0,3966658.2675273772\n+52,55.0,207973975.03788096,98402326.18286812,92913584.44967818\n+53,56.0,3723903.7420609314,4095430.4260871606,3409507.333293102\n+54,57.0,2189762.7788654743,0.0,4060704.9292115415\n+55,58.0,3621307.006648633,2881453.5398542676,3017874.2019209014\n+56,59.0,230349022.11667612,240041960.09128687,222556785.04242972\n+57,60.0,0.0,1413795.9051286194,1527009.43739407\n+58,61.0,1879271.6103825893,6254257.87568896,3265971.0213680835\n+59,62.0,766322.4866708029,3294872.758340951,0.0\n+60,63.0,4040002.7326829317,16709009.323063482,7821854.172242306\n+61,64.0,18740147.77743628,52711839.982074,40494633.42620044\n+62,65.0,9353602.69861223,9730815.411262576,9666860.004242802\n+63,67.0,27484307.263310146,25379548.238836665,0.0\n+64,68.0,46671545.238956,49538318.49163457,39662795.08925435\n+65,69.0,64193818.05093253,60970967.60306041,59554226.37892931\n+66,70.0,46260467.41177864,55902919.519865975,49702374.269900195\n+67,71.0,1077202.9968058714,0.0,1665969.9661905698\n+68,72.0,105561436.08104753,105985241.41747703,76274919.0197859\n+69,73.0,19802324.677419476,19670412.849475812,14200003.36935331\n+70,74.0,2746161.1581661017,0.0,2285836.482909'..b'8\n+1270,1328.0,3316176.047074203,2586257.2700226973,0.0\n+1271,1329.0,1245764.722821853,497639.9855478351,0.0\n+1272,1330.0,0.0,2287435.1903160606,3069237.247625487\n+1273,1331.0,1368307.4850413203,841862.8434184236,0.0\n+1274,1332.0,15714228.269368835,16252834.091712672,8104977.743833792\n+1275,1333.0,0.0,45813167.48466623,42388766.33325454\n+1276,1334.0,2304367.9311818024,2395545.056409111,0.0\n+1277,1335.0,4526003.527304036,5255634.29505134,0.0\n+1278,1336.0,4168261.4524278077,450065.4946308741,319813.74278708076\n+1279,1337.0,6562896.488595994,5217767.249924383,4957461.48874551\n+1280,1338.0,2058689.7819410507,3158671.8141389918,3526720.574771427\n+1281,1339.0,3577647.659992869,869156.6789846206,0.0\n+1282,1340.0,527945.3044950481,0.0,439201.48146186053\n+1283,1341.0,2027542.6287098646,3397206.1176193343,0.0\n+1284,1342.0,56407432.311172135,50728605.965644576,42173359.0511313\n+1285,1343.0,5694347.765214383,8308152.414256208,9637728.428646894\n+1286,1344.0,8666901.794116128,9584895.584569741,8633759.75987401\n+1287,1345.0,201182747.53471845,142041081.35264966,135497250.5551177\n+1288,1346.0,5781550.864370721,7296486.762155778,0.0\n+1289,1347.0,20830812.349051952,18718188.709837522,15615447.235881776\n+1290,1348.0,13803652.572422406,10660808.575361975,7750662.433895541\n+1291,1349.0,6919548.481968597,5156003.494576378,7633115.204944289\n+1292,1351.0,3480857.659686397,3811546.5353887537,0.0\n+1293,1352.0,0.0,1785052.4657790186,1915297.8551436109\n+1294,1353.0,16059064.488867981,9905790.942690287,0.0\n+1295,1354.0,0.0,1004213.4160657639,832974.0077683418\n+1296,1355.0,0.0,2388416.4833319043,5890817.809179291\n+1297,1356.0,22573473.398637764,24462748.256281056,19008113.93734654\n+1298,1357.0,9167968.586194573,8757202.165113866,9917171.747454934\n+1299,1358.0,4610015.778231128,4397526.361084181,2491035.5115050413\n+1300,1360.0,3543490.4911724664,0.0,595994.1864958\n+1301,1361.0,7084964.540477733,9746745.830545716,7757014.803629353\n+1302,1363.0,0.0,4963911.195345684,5014458.997307369\n+1303,1364.0,3694786.630377724,4253528.4976376565,0.0\n+1304,1365.0,5698610.229477988,6195747.401676977,0.0\n+1305,1366.0,5860383.654092707,5188495.676768666,6321838.686778466\n+1306,1367.0,0.0,1638996.9192118722,2429751.5349601554\n+1307,1368.0,0.0,2824642.744101662,4594513.6732018525\n+1308,1369.0,0.0,5332449.100667671,9051213.19629663\n+1309,1370.0,5594113.500786316,6696040.671693137,0.0\n+1310,1371.0,24032076.1212716,21415660.92487946,17152792.21123678\n+1311,1372.0,9339571.005357344,7354207.799528984,0.0\n+1312,1373.0,30738388.844821043,29010052.9362187,20361647.03871724\n+1313,1374.0,8272946.231340717,5556279.42708868,4308740.108868918\n+1314,1375.0,4313258.0205298485,3290583.676409058,0.0\n+1315,1376.0,0.0,5252627.4018308325,2845672.435735295\n+1316,1377.0,0.0,768014.915727958,401609.46126459574\n+1317,1378.0,0.0,2201770.1033551367,2203691.2607268738\n+1318,1379.0,0.0,8321290.967137191,5750497.100384009\n+1319,1380.0,0.0,10591621.754909506,7891480.045507037\n+1320,1381.0,0.0,3906114.782575095,2589771.9961455883\n+1321,1382.0,0.0,5601082.139141499,5140786.139708643\n+1322,1383.0,0.0,27399892.298269976,16064773.402444407\n+1323,1384.0,0.0,3813040.8936050297,4497071.926620104\n+1324,1385.0,0.0,4835644.441886926,3958443.740907369\n+1325,1386.0,0.0,4956464.330730557,4321233.042384708\n+1326,1387.0,0.0,3175948.8327807994,4546643.999092702\n+1327,1388.0,0.0,1267174.6800289648,2326344.832547467\n+1328,1389.0,63824233.29079234,39535657.44055269,45659871.025588565\n+1329,1390.0,0.0,6098346.027442193,6432725.1547893975\n+1330,1391.0,0.0,5386140.126824307,4646929.920675641\n+1331,1392.0,0.0,3755748.5168017442,3321365.39529877\n+1332,1393.0,0.0,7633971.089933958,3587367.7090919586\n+1333,1394.0,315495523.1959585,306257596.59928745,284610669.90407276\n+1334,1395.0,0.0,64895066.834735006,55909359.48846816\n+1335,1396.0,0.0,6323200.901259199,5554031.140160088\n+1336,1397.0,0.0,10314074.913126376,11144791.456648901\n+1337,1398.0,0.0,4199480.41220474,3402056.3870444885\n+1338,1399.0,0.0,2268907.9178733546,1857644.293924679\n'
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/intensity_table.parquet
b
Binary file test-data/intensity_table.parquet has changed
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/metadata_table.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/metadata_table.csv Thu Jul 20 06:29:06 2023 +0000
b
b'@@ -0,0 +1,1340 @@\n+,id,mz,mzmin,mzmax,rt,rtmin,rtmax,npeaks,data06,data07,data08\n+0,1.0,110.03463289906179,110.03463203640032,110.03463376172326,189.90331509802155,189.44203084985378,190.36459934618932,2.0,0.0,1.0,1.0\n+1,3.0,112.05066477639019,112.05066276575226,112.05066704089161,163.27735969175174,162.10254953689665,164.6298836106644,3.0,1.0,1.0,1.0\n+2,4.0,112.07565637582633,112.0756554972068,112.07565725444586,185.44492145379184,184.07651389322737,186.81332901435633,2.0,0.0,1.0,1.0\n+3,5.0,113.02338762571361,113.02338673961654,113.0233885118107,172.1718694530046,170.91417696965038,173.42956193635885,2.0,0.0,1.0,1.0\n+4,6.0,113.05983818307935,113.05983574853632,113.05984006215004,170.6316635193729,167.094187061814,174.8693666378444,5.0,1.0,1.0,1.0\n+5,7.0,113.05983777733188,113.05983574840535,113.05984006220825,180.8824750038957,179.94879324780288,181.40699891970806,3.0,1.0,1.0,1.0\n+6,8.0,114.03726205384051,114.0372611598128,114.03726294786821,184.9377656087088,184.21777655557236,185.6577546618452,2.0,0.0,1.0,1.0\n+7,10.0,114.06619405738884,114.0661927756676,114.06619533911008,166.3394005272794,165.36610546090213,167.31269559365663,2.0,1.0,1.0,0.0\n+8,11.0,114.06619243777511,114.06619098707125,114.06619533913918,179.11913090787945,176.03202353197506,181.24243505040585,3.0,1.0,0.0,1.0\n+9,12.0,114.06635652867747,114.06635446355368,114.06635887032616,162.64470586909187,162.10279658697021,163.58800247296983,3.0,1.0,1.0,1.0\n+10,13.0,114.09137270456932,114.09137052799679,114.09137488114185,179.38985913904128,179.38202480876623,179.39769346931635,2.0,1.0,0.0,1.0\n+11,14.0,114.09153495318904,114.09153405874311,114.09153584763497,196.56300652530746,196.3038858372315,196.8221272133834,2.0,0.0,1.0,1.0\n+12,15.0,115.03900959553033,115.03900891810031,115.03901027296037,162.45994405294272,161.91626550761256,163.00362259827287,2.0,1.0,0.0,1.0\n+13,16.0,115.07527784305181,115.07527652248089,115.07527916362272,162.92905116973216,162.10331593062756,163.75478640883676,2.0,1.0,1.0,0.0\n+14,17.0,116.07062000057232,116.07061909069031,116.07062091045434,197.2251892013431,196.4255951156437,198.02478328704254,2.0,0.0,1.0,1.0\n+15,18.0,118.06532007101917,118.06531781873119,118.06532232330716,187.8459833888229,186.94295562458362,188.74901115306216,2.0,1.0,0.0,1.0\n+16,19.0,118.12249281130795,118.12249188523,118.12249373738588,166.4296033464008,165.0490190093245,167.8101876834771,2.0,0.0,1.0,1.0\n+17,20.0,119.06003952375521,119.06003818597775,119.06004086153267,186.42662636442367,185.7162131280154,187.13703960083197,2.0,1.0,1.0,0.0\n+18,21.0,121.06485676504602,121.06485581593618,121.06485771415583,171.2667643924604,170.47243429772445,172.06109448719633,2.0,0.0,1.0,1.0\n+19,22.0,122.0601556770615,122.06014946753558,122.06016015338616,175.83964311679065,174.45568703097345,176.65718781585826,3.0,1.0,1.0,1.0\n+20,23.0,122.06015878186084,122.06015741023364,122.06016015348803,195.69661854834672,195.1231442219471,196.27009287474635,2.0,1.0,1.0,0.0\n+21,24.0,122.09653924907798,122.09653642658967,122.09654114361967,162.42213059042817,161.62097339717977,164.04807791214262,4.0,1.0,1.0,1.0\n+22,25.0,123.04396936563676,123.0439665359828,123.04397123061364,179.00493780893453,176.59762497807833,181.61844297167195,4.0,1.0,1.0,1.0\n+23,26.0,123.05532792426558,123.0553227096459,123.05533694345546,172.74803448833947,167.90636,176.581414724188,4.0,1.0,1.0,1.0\n+24,27.0,123.06338619601263,123.06338481314157,123.0633875788837,165.35189767817906,165.1358302023736,165.5679651539845,2.0,1.0,1.0,0.0\n+25,28.0,123.06356842612627,123.06356607848788,123.06357077376465,168.56031250892394,167.62187794416315,169.49874707368474,2.0,1.0,0.0,1.0\n+26,29.0,123.09160069465214,123.09159972964527,123.09160165965902,180.7221724286081,180.60265788349375,180.84168697372246,2.0,0.0,1.0,1.0\n+27,30.0,123.09178541029979,123.09178298750003,123.09178832579542,187.16809782597582,186.52727581992224,187.77958137498848,3.0,1.0,1.0,1.0\n+28,31.0,124.03935025064618,124.03934927822347,124.03935122306889,166.36344933385317,165'..b'175,432.0726678261204,184.99751133993172,184.32031241266512,185.6046999552735,3.0,1.0,1.0,1.0\n+1311,1372.0,432.18597152025484,432.185968213425,432.1859781338564,163.4751249081163,162.10261856122347,166.09651361535876,3.0,1.0,1.0,0.0\n+1312,1373.0,434.14335681965184,434.14334902902414,434.1433655935497,189.7592249642131,189.3945747611153,189.94452769038784,3.0,1.0,1.0,1.0\n+1313,1374.0,434.16399323818314,434.16398544739855,434.16400201212934,175.44580346408856,174.44852312811886,176.02305375933383,3.0,1.0,1.0,1.0\n+1314,1375.0,434.24170037748127,434.2416954976177,434.2417052573449,164.0157800528145,163.27820067440774,164.75335943122127,2.0,1.0,1.0,0.0\n+1315,1376.0,435.1465251397342,435.1465217280158,435.14652855145255,189.90591984475267,189.797336530219,190.01450315928633,2.0,0.0,1.0,1.0\n+1316,1377.0,435.1794149861198,435.17941157417266,435.1794183980669,176.94418211483838,176.57324658667613,177.31511764300066,2.0,0.0,1.0,1.0\n+1317,1378.0,447.1053716535248,447.10536814804817,447.1053751590014,189.1225187398318,188.94812295687166,189.29691452279195,2.0,0.0,1.0,1.0\n+1318,1379.0,454.18094855636764,454.1809449951269,454.18095211760834,188.1374032285774,186.71492443014233,189.55988202701243,2.0,0.0,1.0,1.0\n+1319,1380.0,456.2074378998464,456.20743432305255,456.20744147664027,193.50241516221547,192.520289611748,194.48454071268296,2.0,0.0,1.0,1.0\n+1320,1381.0,462.1742300504525,462.17422642727144,462.1742336736336,197.6055686444787,196.82214625925545,198.38899102970194,2.0,0.0,1.0,1.0\n+1321,1382.0,463.191884305954,463.19188067432873,463.19188793757917,191.58403946293163,191.14381916141423,192.024259764449,2.0,0.0,1.0,1.0\n+1322,1383.0,470.1750275602718,470.1750238739557,470.1750312465879,196.0853809759089,195.77587381662315,196.3948881351946,2.0,0.0,1.0,1.0\n+1323,1384.0,471.17805975706636,471.1780560632356,471.1780634508971,195.70920895667587,194.5961783795395,196.8222395338122,2.0,0.0,1.0,1.0\n+1324,1385.0,471.18217714533455,471.18217345132604,471.18218083934306,180.83886640087525,179.83655403678355,181.8411787649669,2.0,0.0,1.0,1.0\n+1325,1386.0,477.06140219888545,477.0613984586524,477.0614059391185,193.99453817466508,192.40679366063242,195.58228268869775,2.0,0.0,1.0,1.0\n+1326,1387.0,509.2256942516151,509.2256902596762,509.22569824355395,176.24184473008515,174.25259264908135,178.23109681108895,2.0,0.0,1.0,1.0\n+1327,1388.0,518.1777109602499,518.1777068980829,518.177715022417,176.7325058961216,176.3366407691868,177.12837102305645,2.0,0.0,1.0,1.0\n+1328,1389.0,518.1982856345116,518.1982797812542,518.1982926239928,163.46659447650475,162.46882089729348,164.54948877930073,3.0,1.0,1.0,1.0\n+1329,1390.0,527.2443908654428,527.244386731843,527.2443949990427,191.66478743587896,191.03608470476323,192.29349016699473,2.0,0.0,1.0,1.0\n+1330,1391.0,542.2464928685225,542.2464886175668,542.2464971194782,193.3984162721881,192.82324195687778,193.9735905874984,2.0,0.0,1.0,1.0\n+1331,1392.0,542.5804435202704,542.5804392666091,542.5804477739316,192.87473689159782,192.27710050249124,193.4723732807044,2.0,0.0,1.0,1.0\n+1332,1393.0,543.2390765366213,543.2390722775925,543.2390807956499,173.9018507154908,172.30912199039324,175.4945794405884,2.0,0.0,1.0,1.0\n+1333,1394.0,565.1993608631858,565.1993552307969,565.1993681104865,191.7732444608016,191.17620172870704,192.16194466707302,3.0,1.0,1.0,1.0\n+1334,1395.0,566.2014219731216,566.2014175340793,566.201426412164,191.94680677314662,191.49948947717064,192.3941240691226,2.0,0.0,1.0,1.0\n+1335,1396.0,574.1669857507339,574.166981249219,574.1669902522489,187.21412964986803,186.29906590431145,188.12919339542464,2.0,0.0,1.0,1.0\n+1336,1397.0,580.2088534648059,580.2088489158639,580.2088580137479,189.85145220824683,189.36034417940223,190.34256023709142,2.0,0.0,1.0,1.0\n+1337,1398.0,580.5953816663177,580.5953771144982,580.5953862181374,192.5507358337751,192.3705667282985,192.7309049392517,2.0,0.0,1.0,1.0\n+1338,1399.0,626.2747329767543,626.274728066679,626.2747378868296,188.93095340742477,188.9131820444223,188.94872477042722,2.0,0.0,1.0,1.0\n'
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 test-data/metadata_table.parquet
b
Binary file test-data/metadata_table.parquet has changed
b
diff -r cfd2e19f00a9 -r 2c6fa447f6a0 utils.R
--- a/utils.R Mon Jun 26 13:55:56 2023 +0000
+++ b/utils.R Thu Jul 20 06:29:06 2023 +0000
[
@@ -2,36 +2,36 @@
 library(dplyr)
 
 load_table <- function(filename, filetype) {
-    if (filename == "None") {
-        return(NULL)
-    }
-    if (filetype == "csv") {
-        return(as.data.frame(read.csv(filename)))
-    } else {
-        return(as.data.frame(arrow::read_parquet(filename)))
-    }
+  if (filename == "None") {
+    return(NULL)
+  }
+  if (filetype == "csv") {
+    return(as.data.frame(read.csv(filename)))
+  } else {
+    return(as.data.frame(arrow::read_parquet(filename)))
+  }
 }
 
 save_table <- function(table, filename, filetype) {
-    if (filetype == "csv") {
-        write.csv(table, filename, row.names = FALSE)
-    } else {
-        arrow::write_parquet(table, filename)
-    }
+  if (filetype == "csv") {
+    write.csv(table, filename, row.names = FALSE)
+  } else {
+    arrow::write_parquet(table, filename)
+  }
 }
 
 create_filter_by_adducts <- function(comma_separated_values) {
-    if (comma_separated_values == "None") {
-        return(NA)
-    }
-    filter_by <- strsplit(trimws(comma_separated_values), ",")[[1]]
-    return(filter_by)
+  if (comma_separated_values == "None") {
+    return(NA)
+  }
+  filter_by <- strsplit(trimws(comma_separated_values), ",")[[1]]
+  return(filter_by)
 }
 
 create_peak_table <- function(metadata_table, intensity_table) {
-    metadata_table <- select(metadata_table, id, mz, rt)
-    peak_table <- inner_join(metadata_table, intensity_table, by = "id")
-    peak_table <- rename(peak_table, peak = id)
-    peak_table$peak <- as.integer(peak_table$peak)
-    return(peak_table)
+  metadata_table <- select(metadata_table, id, mz, rt)
+  peak_table <- inner_join(metadata_table, intensity_table, by = "id")
+  peak_table <- rename(peak_table, peak = id)
+  peak_table$peak <- as.integer(peak_table$peak)
+  return(peak_table)
 }