Hi Thomas,

To properly answer this question, I would like to know what is the purpose of 
this. Are you writing a unit test? Or some other purpose?

Basically, to process multiple tasks at the same time, you can use the 
TaskController module: MZmineCore.getTaskController().addTasks(tasks) or other 
addTask() methods - check the TaskController interface.

Best,

Tomas


===============================================
Tomas Pluskal
G0 Cell Unit, Okinawa Institute of Science and Technology Graduate University
1919-1 Tancha, Onna-son, Okinawa 904-0495, Japan
WWW: https://groups.oist.jp/g0
TEL: +81-98-966-8684
Fax: +81-98-966-2890

> On Jan 19, 2015, at 23:30, TFRD (Thomas Franck Dyrlund) <t...@steno.dk> wrote:
> 
> Hi all.
>  
> I’m trying to import raw files using the RawDataImportModule. I do however 
> have two problems:
>  
> 1.
> My files are being imported one at a time. If I do it through the raw data 
> import menu item then MZmine processes 4 at a time. How can I make the import 
> process multiple files at the same time?
>  
> 2.
> The raw files for import are not shown under "Tasks in progress…". How can I 
> add them to the task list?
>  
> Thanks for any help,
>  
> Thomas
>  
>  
> //Import raw data files
> int counter = 0;
> if (importrawfiles) {
> final RawDataImportModule RDI = new RawDataImportModule();
>           ParameterSet parameters = RDI.getParameterSetClass().newInstance();
>           List<Task> tasksList = new ArrayList<Task>();
>  
>           SortedMap<Integer, MsRun> msrun = 
> mzTabFile.getMetadata().getMsRunMap();
>           File newFiles[] = new File[msrun.size()];
>  
>           for(Entry<Integer, MsRun> entry : msrun.entrySet()) {
>                    File testFile = new 
> File(entry.getValue().getLocation().getPath());
>                    if(testFile.exists() && !testFile.isDirectory()) {
>                    importedFiles++;
>                    newFiles[counter] = new 
> File(entry.getValue().getLocation().getPath());
>                    }
>                    counter++;
>           }
>  
>           
> parameters.getParameter(RawDataImportParameters.fileNames).setValue(newFiles);
>           RDI.runModule(parameters, tasksList);
>  
>           for (Task t : tasksList) {
>                    t.run();
>           }
>  
> }
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet_______________________________________________
> Mzmine-devel mailing list
> Mzmine-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mzmine-devel

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Mzmine-devel mailing list
Mzmine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mzmine-devel

Reply via email to