ipb-halle / MetFragRelaunched

Relaunch of the initial MetFrag project.
http://ipb-halle.github.io/MetFrag/
17 stars 17 forks source link

Add ElementInclusion Filter command line flag #18

Closed korseby closed 5 years ago

korseby commented 5 years ago

Hi @c-ruttkies , @sneumann

Is there a command line option to metfrag where I can set the ElementInclusionFilter as I can when using the online version (with MetFragWeb) ?

It does not work using a parameter_list-file and also not on the command line, e.g.:

java -Xmx2048m -Xms1024m -jar /usr/local/bin/metfrag.jar ElementInclusionOptionalFilter=C,H,N,O,P,S ElementExclusion=Cl,Br,F MaximumTreeDepth=2 DatabaseSearchRelativeMassDeviation=10 FragmentPeakMatchAbsoluteMassDeviation=0.001 FragmentPeakMatchRelativeMassDeviation=10 MetFragDatabaseType=PubChem MetFragScoreTypes=FragmenterScore NeutralPrecursorMass=250.26855870556 IsPositiveIonMode=True PrecursorIonType=[M+Na]+ MetFragPeakListReader=de.ipbhalle.metfraglib.peaklistreader.FilteredStringTandemMassPeakListReader MetFragCandidateWriter=CSV PeakListString=119.083926794529_362;121.09904610227_967;122.107360953572_160;123.116845549776_756;133.102751722225_203;134.103396537856_102;135.11645610381_1560;137.131245842048_536;147.114782417154_700;149.132467303767_2383;150.138687808224_180;151.147222745419_335;161.130653601526_1336;162.135550225099_159;163.148551984916_4566;164.152193321854_622;165.162139874983_284;175.146640354038_1711;176.151074479567_169;177.162267717908_5490;178.165005190687_685;179.176343004649_221;189.162089614493_3059;190.164569378975_425;191.177031982117_4097;192.181908186112_582;203.177318060807_4672;204.180072382598_653;217.192706780987_4864;218.197383079608_615;231.209184678108_671;232.213936383458_139;245.223786635388_105;273.256112033523_17362;274.259675383408_3020 SampleName=100_911.556_273.2563_219353.328727272_pos_27_winter_Marpol_27_2-E,3_01_17272.mzML.txt

The command line interface exits with ERROR de.ipbhalle.metfrag.commandline.CommandLineTool - Parameter 'ElementInclusionOptionalFilter' not known.

schymane commented 5 years ago

When I built this into ReSOLUTION I used different options for the elements, can you check if these options work for you (this should point you to the code snippet where it starts)?

https://github.com/schymane/ReSOLUTION/blob/master/R/MetFragConfigR.R#L400

(I hope you can piece it together through the R code ... )


From: korseby notifications@github.com Sent: 27 November 2018 14:16:25 To: c-ruttkies/MetFragRelaunched Cc: Subscribed Subject: [c-ruttkies/MetFragRelaunched] Add ElementInclusion Filter command line flag (#18)

Hi @c-ruttkieshttps://github.com/c-ruttkies , @sneumannhttps://github.com/sneumann

Is there a command line option to metfrag where I can set the ElementInclusionFilter as I can when using the online version (with MetFragWeb) ?

It does not work using a parameter_list-file and also not on the command line, e.g.:

java -Xmx2048m -Xms1024m -jar /usr/local/bin/metfrag.jar ElementInclusionOptionalFilter=C,H,N,O,P,S ElementExclusion=Cl,Br,F MaximumTreeDepth=2 DatabaseSearchRelativeMassDeviation=10 FragmentPeakMatchAbsoluteMassDeviation=0.001 FragmentPeakMatchRelativeMassDeviation=10 MetFragDatabaseType=PubChem MetFragScoreTypes=FragmenterScore NeutralPrecursorMass=250.26855870556 IsPositiveIonMode=True PrecursorIonType=[M+Na]+ MetFragPeakListReader=de.ipbhalle.metfraglib.peaklistreader.FilteredStringTandemMassPeakListReader MetFragCandidateWriter=CSV PeakListString=119.083926794529_362;121.09904610227_967;122.107360953572_160;123.116845549776_756;133.102751722225_203;134.103396537856_102;135.11645610381_1560;137.131245842048_536;147.114782417154_700;149.132467303767_2383;150.138687808224_180;151.147222745419_335;161.130653601526_1336;162.135550225099_159;163.148551984916_4566;164.152193321854_622;165.162139874983_284;175.146640354038_1711;176.151074479567_169;177.162267717908_5490;178.165005190687_685;179.176343004649_221;189.162089614493_3059;190.164569378975_425;191.177031982117_4097;192.181908186112_582;203.177318060807_4672;204.180072382598_653;217.192706780987_4864;218.197383079608_615;231.209184678108_671;232.213936383458_139;245.223786635388_105;273.256112033523_17362;274.259675383408_3020 SampleName=100_911.556_273.2563_219353.328727272_pos_27_winter_Marpol_27_2-E,3_01_17272.mzML.txt

The command line interface exits with ERROR de.ipbhalle.metfrag.commandline.CommandLineTool - Parameter 'ElementInclusionOptionalFilter' not known.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/c-ruttkies/MetFragRelaunched/issues/18, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD4a_RA3D-JlLjOeXBMMoNXv9Y6bjpQpks5uzTspgaJpZM4Y1d4H.

korseby commented 5 years ago

Hi @schymane ,

I figured out that the command line tool needs several parameters set instead of just one to work correctly. Yesterday I tried to run the Galaxy metfrag-cli-batch modules successfully with a custom parameter file with the following parameters: FilterExcludedElements=Cl,Br,F FilterIncludedElements=C,H,N,O,P,S MetFragPreProcessingCandidateFilter=UnconnectedCompoundFilter,IsotopeFilter,ElementInclusionOptionalFilter,ElementExclusionFilter . I guess that MetFragPreProcessingCandidateFilter is important to include the right set of filters.

For our de.NBI CompMS metaRbolomics Hackathon in April we should integrate these parameters to metfRag as well :)