From: Chris B. <bi...@pc...> - 2008-10-17 13:17:24
|
Hey Tony, the command line actually does allow this. You can split the filename in the for-in-do loop into its components (drive letter, path, filename-prefix and filename-suffix) and insert whatever you want in between. See example below where I inserted "_filtered" just before the suffix (this would convert "hello.txt" to "hello_filtered.txt") for %%I in (*.*) do @echo FileFilter -in %%I -out %%~dI%%~pI%%~nI_filtered%%~xI REM explanation: REM "%%~dI%%~pI%%~nI" gives the complete filename except the suffix REM "%%~xI" gives the suffix of %%I REM see http://technet.microsoft.com/de-de/library/bb490909(en-us).aspx REM for details A more basic approach is simply to reuse the whole filename and just prepend or append something, i.e. REM basic version for %%I in (*.*) do @echo FileFilter -in %%I -out filtered_%%I You will obviously need to adapt the regular expression (*.*) and the actual command (everything after @echo) to your needs :) hope this helps. cheers Chris Larson, TR wrote: > Dear Chris, > Thanks for the quick reply - that was exactly the information I needed. > I will run some tests. > > I have one more question. Is there an easy way to batch signal > processing for several files? I'm talking hundreds of files here, and I > don't want tot do them one by one. I have run batches using Windows > command line with reAdW for converting thermo .raw to .mzXML format > using for-in-do syntax. This works because reAdW only needs the source > file and converts to the output format with no other user input needed. > I assume this won't work for the openms tools because an -out filename > needs to be explicitly specified for each file? Is there a way to > automatically specify an output name to a file while batching - e.g. to > append "filtered" to the input file "test.mzData" so that it is > automatically renamed to "test_filtered.mzData" during a batch execution > of baselineFilter? > > > thanks > Tony > > > > > thnaks > Tony > > - however, this > > Chris Bielow wrote: >> Hi Tony, >> >> Larson, TR wrote: >>> Hello, >>> I am completely new to using openms; yesterday I downloaded openms 1.2 >>> to have a play around with it. My primary interest is in processing and >>> peak-picking from LCMS and GCMS .cdf data files. I was initially pointed >>> to openms from users of the R package, xcms, because I needed to find a >>> tool to pre-process my .cdf files; specifically to remove noise from the >>> chromatograms before further processing. >>> >>> openms is the only package I found that can do this with .cdf files. >>> I've managed to work out how to use BaselineFilter, FileFilter, and >>> FileConverter from the TOPP command line interface. >>> >>> What I am typically doing is using FileConverter to get my .cdf files >>> into .mzData format, then applying BaselineFilter to reduce the baseline >>> noise, and finally using FileFilter to remove the residual noise below >>> an intensity threshold. >>> >>> However, I'm confused because the Signal Processing tutorial in the >>> openms .html documentation lists gaussian and savitzy-golay smoothing >>> filters in addition to the baseline filter - but I can't find either of >>> these from the TOPP command line. >> Have a look at NoiseFilter.exe >> which has a -type parameter: >> >> Options (mandatory options marked with '*'): >> -in <file>* Input raw data file (valid formats: 'mzData') >> -out <file>* Output raw data file (valid formats: 'mzData') >> -type <type>* Smoothing filter type (valid: 'sgolay,gaussian') >> >> >> >>> I'm also interested in other signal >>> noise processing, such as per-spectra thresholding, but there doesn't >>> seem to be a tool in openms for this. >> You could for example use FileFilter.exe with its -sn <number> Option. >> <number> is the minimal Signal-To-Noise ratio a peak needs to have in order to >> pass the filter. It works scanwise. >> Use '1' to filter about 50% of the data (as the noise is estimated using the >> median of a sliding window). Higher numbers will filter out more peaks (with >> e.g. '10' being very aggressive), lower SN values will filter out fewer peaks. >> Play with it a little until you find the settings which fit your needs. >> >>> I'm not a programmer, but I do want to make best use of openms. Can >>> someone please help me to understand how to apply these other signal >>> processing techniques to my data? Is this possible from the TOPP >>> command line using one of the .exe files or must I do it another way? >>> I've looked through all the documentation and I can't work it out. >> I hope the above will get you started. There is also the possibility to resample >> your data using Resampler.exe to make the peaks equidistant, but that is only >> needed in special cases. >> >> If you have more questions, don´t hesitate to ask :) >> >> cheers >> Chris >> >> >>> thanks >>> Tony >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >>> Build the coolest Linux based applications with Moblin SDK & win great prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> Open-ms-general mailing list >>> Ope...@li... >>> https://lists.sourceforge.net/lists/listinfo/open-ms-general > -- Freie Universitaet Berlin Institut fuer Informatik Phone: +49 30 838 75244 AG Algorithmische Bioinformatik room 011 Takustr. 9 D-14195 Berlin |