Skip to content

Commit 355b4ee

Browse files
committed
Parameters for Python wrapper of R function
1 parent 96a2ea6 commit 355b4ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/LCMSSimulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def match_features(ground_truths, df):
174174

175175
from r_functions import XCMS
176176
tic()
177-
df_xcms = XCMS(mzMLfile)
177+
df_xcms = XCMS(mzMLfile, w1=5, w2=12, snr=3, intensity=10)
178178
toc()
179179
match_xcms = ground_truths.copy()
180180
match_features(match_xcms, df_xcms)

python/r_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ def init_r():
2424
XC = robjects.globalenv['XC']
2525
return PIT, XC
2626

27-
def XCMS(mzMLFile):
27+
def XCMS(mzMLFile, w1, w2, snr, intensity):
2828
df = pd.DataFrame(columns=['rt', 'mz', 'intensity'])
2929
_,XC = init_r()
30-
peaks_xcms = np.array(XC(mzXMLFile=mzMLFile))
30+
peaks_xcms = np.array(XC(mzXMLFile=mzMLFile, w1=w1, w2=w2, snr=snr, intensity=intensity))
3131
for i in range(peaks_xcms.shape[0]):
3232
rt = peaks_xcms[i,3]
3333
mz = peaks_xcms[i,0]

0 commit comments

Comments
 (0)