Hyphens not ok in group names?

Hi,

I have been unfortunate enough to include hyphens in the group names defined in my oligos file:

forward GRGCATCACAGACCTG
#reverse AATTTGACTCAACRCGGG
barcode TAGTATCAGC fjord11-MID09
barcode CATAGTAGTG blank11-MID13
barcode CGTCTAGTAC NP11-MID17
barcode TACTCTCGTG NPSi11-MID23

I have not experienced that this has been problematic until I tried to use get.groups() to pull out sequences from specific groups. When I try to extract sequences from, for example, group “NP11-MID17”, I get the following error:

mothur > get.groups(group=mes_cop_final.groups, name=mes_cop_final.names, fasta=mes_cop_final.fasta, groups=NP11-MID17)

MID17 is not a valid group, and will be disregarded.
NP11 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 groupfile.
Selected 28868 sequences from your name file.
Selected 1149 sequences from your fasta file.
Selected 28868 sequences from your group file.

Output File names:
mes_cop_final.pick.names
mes_cop_final.pick.fasta
mes_cop_final.pick.groups

I tried also to use “” to contain the group name and got the same error message. So it seems that the hyphen is interpreted as a group separator regardless, which means that none of my group names make any sense. Have I just been unlucky here and need to change my group names to exclude the hyphen and rerun everything or is there a workaround?

Thanks in advance
Jess

You can escape the dashes.

mothur > get.groups(group=mes_cop_final.groups, name=mes_cop_final.names, fasta=mes_cop_final.fasta, groups=NP11-MID17)

Hi and thanks for the quick reply. I tried to enter the command as you suggested by escaping the dash but got the same error message:

mothur > get.groups(fasta=mes_cop_final.fasta,name=mes_cop_final.names,group=mes_cop_final.groups,groups=NP11-MID17)

MID17 is not a valid group, and will be disregarded.
NP11\ 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 groupfile.
Selected 28868 sequences from your name file.
Selected 1149 sequences from your fasta file.
Selected 28868 sequences from your group file.

Output File names:
mes_cop_final.pick.names
mes_cop_final.pick.fasta
mes_cop_final.pick.groups

I got it to work when I removed all the dashes from the .group file and replaced them with dots, but this seems like a rather clumsy way to fix the problem. My own fault for not noticing the obvious, as the documentation makes it quite clear that dashes are used to separate multiple inputs to a command. Regardless, thanks very much for your help :slight_smile:

cheers
Jess