Remove.groups invalid groups

Hi, I’m having a little trouble removing groups of samples from a shared file. I have a group file containing four groups and want to be left with only those samples from the fourth group in the shared file.

To do this I ran the following command and got this output:

_remove.groups(shared=three_month_final_shared, group=design_sheepvscontrols.txt, groups=negative-positive-wash)

Removed 30 sequences from your group file.
negative is not a valid group, and will be disregarded.
positive is not a valid group, and will be disregarded.
wash is not a valid group, and will be disregarded.
You provided no valid groups. I will run the command using all the groups in your file.
Removed groups: negative, positive, wash from your shared file.

Output File names:
design_sheepvscontrols.pick.txt
three_month_final_shared1.pick_

The group file is formatted fine as I have used it successfully with another command. I’m presuming I’m doing something wrong with the command but I’m not completely sure what.

Can you run…

count.groups(group=design_sheepvscontrols.txt)

… and post the output

Thanks for your reply. This is what I get:

_mothur > count.groups(group=design_sheepvscontrols.txt)

lung contains 54.
negative contains 10.
other contains 8.
positive contains 2.
wash contains 18.

Total seqs: 92.

Output File Names:
design_sheepvscontrols.count.summary_

Also,

I have just discovered that a similar thing happens when I try to run metastats with the same design file:

_metastats(shared=three_month_final_shared1.subsample, design=design_sheepvscontrols.txt, groups=lung-negative-positive-wash, processors=2)

Using 2 processors.
lung is not a valid group, and will be disregarded.
negative is not a valid group, and will be disregarded.
positive is not a valid group, and will be disregarded.
wash is not a valid group, and will be disregarded.
You provided no valid groups. I will run the command using all the groups in your file.
1
Comparing positive and other…

Comparing negative and lung…

Output File Names:
three_month_final_shared1.1.negative-lung.metastats
three_month_final_shared1.1.other-lung.metastats
three_month_final_shared1.1.other-negative.metastats
three_month_final_shared1.1.positive-lung.metastats
three_month_final_shared1.1.positive-negative.metastats_

I have tried this with several other deign files with different groups specified and it still happens. It seems quite random in the groups it decides are present in the group file after saying none of the groups specified were valid. In the above example it seems to leave out the group ‘wash’. In another design file with the groups 2D618-2D619-2D620-2D644-2D645-2S066 it leaves out 2S066.

Could you send your files to mothur.bugs@gmail.com?

I’ve sent them along. Thanks for your help.

Hi Laura,
The problem is mothur is expecting the groups negative-positive-wash to be listed as groups in the shared file. The way you have the files set up, mothur is considering them sets. To remove all the groups associated with the sets lung-negative-positive-wash, you would need to list them individually. i.e., something like:

mothur > remove.groups(shared=three_month_final_shared, design=design_sheepvscontrols.txt, groups= 2152N0049-2152N0050,…)

For the metastats command there is a sets parameter. So if you want to include only the groups associated with lung-negative-positive-wash, then you could run the following:

metastats(shared=three_month_final_shared1.subsample, design=design_sheepvscontrols.txt, sets=lung-negative-positive-wash, processors=2)

Kindly,
Sarah