Closed azmfaridee closed 11 years ago
I think you want:
CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
The groups parameter is used to select the samples you would like to include from the shared file. The group parameter is used to provide a group file.
If you include this in the constructor:
//code to parse group names users want to select and save these groups for sharedRabundVector to use later in read
groups = validParameter.validFile(parameters, "groups", false);
if (groups == "not found") { groups = ""; }
else { m->splitAtDash(groups, Groups); }
m->setGroups(Groups);
And then read the shared file using the inputdata class, mothur will handle checking the groups string to make sure they are valid, storing only the samples the user wants and eliminating zeroed OTUs caused by eliminating groups. If no groups are selected then all samples are stored.
//code to read the first label in the shared file.
InputData input (sharedfile, "sharedfile");
vector<SharedRAbundVector*> lookup = input.getSharedRAbundVectors();
The newcommandtemplate.cpp
execute function has a good example of how to use mothurs classes to handle a shared file.
I think you want:
CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
Ah, this is what I wanted two write, apologies for the unintentional mistake. So I take it that plabel
and group
's are basically a sort of filtering mechanism on the input data, which the user is able to fine tune.
I'd do on to implementing the rest of the class then.
Yes, that's right. The groups parameter lets you select samples and the label parameter lets you select the distance you are interested in looking at. The design file also has the "sets" parameter associated with it that lets you select the treatment you are interested in.
Here are some of the parameters that would bee needed to run the ClassifySharedCommand class.
Now keeping these in mind and following up from what we had from Issue #4, the
setParameters()
function looks something like this:@mothur-westcott @kdiverson Let me know if this makes any sense at all. I also have a question in mind, is the line
really necessary? I've seen this in other commands, what does it normally do?