In the mothurGUIFile, there is an entry called ‘outputTypesNames’, which count the number of output files…
The next n lines are those output files, with some kind of pattern, like
group=[filename],merge,[extension]
Now I can’t figure out how those values are parsed are they?
How are those placedholders like [filename] are interpreted?
I use a decompiler to analyse the code( sorry if this is not allowed :oops: ) and found a possible bug in the
OutputTypes.java file , where the pattern to split the parts above is ‘-’ and not ‘,’.
The - is there because mothur allows multiple definitions of output filenames. This is done because some of our commands make the same file type in different ways. For example the split.abund command makes a count file like this: “[filename],[tag],[tag2],count_table-[filename],[tag],count_table” The filename will contain the “rare” or “abund” tag, but it may also contain a distance label. This information is used to both construct potential filenames and search for potential filenames matches in the output directories.
Btw, our source is open and you are more than welcome to decompile it, .
I understand the first two parameter ( Required and important ).
The last parameter is the output-file-list if set.
But I didn’t understand the parameters between.
What I got so far is that those parameters describe a list of groups…
These groups are used when mothur commands require a type of file that may come in different forms. Let me give you some examples:
only one group - For example, we use this with the distance files. Mothur has 2 formats of distance files: phylip and column. For commands like cluster a distance matrix is required, but we only want the user to input one file. So we created a group, “choose only one”. If the user provides a file for more than one input that belongs to this group then an error should be raised.
at least one group - For example, we use this with commands like get.seqs. The get.seqs command allows you to select sequences from multiple files. We want to make sure the user provide a file, but we don’t care which type it is. So we created a group “choose at least one”. If the user does not provide an input for any inputs belonging to this group an error should be raised.
linked group - For example, we use this with the column and name files. It means when one is provided then the other is required. For the cluster command, if the user provides a column formatted distance matrix mothur needs a names or count file to be able to run the command. So they are “linked”.
These input types are a way for mothur to tell the GUI the commands file requirements. If you ignore them, the worst that will happen is mothur will abort the command with an error message. The “only one group” and “at least one group” are the most important. The linked can be a bit tricky, because with the addition of the count file there is not a great way to say if you require a column file you must provide a name or count file. The name and count file are in a choose only one group, :).