fjug / MoMA

MoMA - the MotherMachine Analyzer
4 stars 7 forks source link

`mmpreprocess -c n` to analyse some fluo channels only #9

Closed julou closed 8 years ago

julou commented 8 years ago

when using -c 2 with a dataset for which 3 channels exist, the following error occurs (while the expected behaviour would be to load channels 1 and 2 only and to ignore images named _c0003.tif):

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.IllegalArgumentException: ERROR    File list corrupt. Attempt to load file /scratch/11477251.1.long.q/20151218_switch8h_pos6/20151218-switch8h-1-MMStack-Pos6-preproc_t0001_c0003.tif as channel 1.
    at com.jug.mmpreprocess.MMDataFrame.sanityChecks(MMDataFrame.java:82)
    at com.jug.mmpreprocess.MMDataFrame.<init>(MMDataFrame.java:59)
    at com.jug.mmpreprocess.MMDataSource.<init>(MMDataSource.java:66)
    at com.jug.mmpreprocess.MMPreprocess.main(MMPreprocess.java:52)
    ... 5 more
fjug commented 8 years ago

This is not a bug but more a misunderstanding... ;) The '-c' parameter is not meant to control how many channels you want to open, but to tell mmpreprocess how many channels are present. Once you tell him 2 and he finds 3 he is rightfully confused... ;) I will treat this issue as a feature request, thereby adding the feature to open a subset of all available channels.

julou commented 8 years ago

allright… I thought you wouldn't need a parameter to parse how many channels where present from the filenames :-p hence I assumed the more advanced feature…