Renaming groups in shared files due to '-' within the name

Hi everyone

I made the mistake of naming my samples (groups) using ‘-’ within the name (e.g. C-CC1-HF). I have about 150 samples named that way. Now I have run my analysis and come to the point where I would like to use the get.groups or remove.groups command to analyze a subsample of the sequences. I cannot do that as the command requires ‘-’ in-between samples or groups to be removed from my shared file. Any ideas how to fix that?

Can I change my sample names in the shared file? Or can I somehow use a different symbol other than ‘-’ in the get.groups command?

Thanks

You could change it in the shared file manually or you should be able to use a \ before the - in get.groups. It also might just be easier in the long run to go back to the beginning and rename the group names in the files or oligos files.

Pat

Thanks Pat

I tried going into the shared file (opening it through Excel) and changing the names by removing the ‘-’. I then saved the file (I got a message then some of the features of the file will no longer be available) and tried the command again. I tried to remove 6 of the groups
mothur > get.groups(shared=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.0.03.subsample.shared,groups=CAL2H-CBC2S-CBP2HD-CCC2HF-CCC2S-CDS2HD)

then it told me:
CAL2H is not a valid group, and will be disregarded.
CBC2S is not a valid group, and will be disregarded.
CBP2HD is not a valid group, and will be disregarded.
CCC2HF is not a valid group, and will be disregarded.
CCC2S is not a valid group, and will be disregarded.
CDS2HD 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.
Selected groups: CAL2H, CBC2S, CBP2HD, CCC2HF, CCC2S, CDS2HD from your shared file.

I tried you other suggestion with \ as well as - and both don’t work - same error message as above…

Any other suggestions other than to redo the analysis? Or am I doing something wrong when changing the names in the shared file?

Thanks for your help

Did you run something like:

mothur > get.groups(shared=abrecovery.an.shared, groups=A-B-C)

In our current version, 1.34, mothur will select groups A-B and C with the above command.