# Hyphens not ok in group names?

**URL:** https://forum.mothur.org/t/hyphens-not-ok-in-group-names/1642
**Category:** Commands in mothur
**Created:** [January 13, 2014, 12:38pm UTC](https://forum.mothur.org/t/hyphens-not-ok-in-group-names/1642 "2014-01-13T12:38:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jessicalouiseray](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jessicalouiseray](https://forum.mothur.org/u/jessicalouiseray)
#### Post date: [January 13, 2014, 12:38pm UTC](https://forum.mothur.org/t/hyphens-not-ok-in-group-names/1642/1 "2014-01-13T12:38:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)
#### Post date: [January 14, 2014, 5:33pm UTC](https://forum.mothur.org/t/hyphens-not-ok-in-group-names/1642/2 "2014-01-14T17:33:01Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![jessicalouiseray](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jessicalouiseray](https://forum.mothur.org/u/jessicalouiseray)
#### Post date: [January 15, 2014, 8:53am UTC](https://forum.mothur.org/t/hyphens-not-ok-in-group-names/1642/3 "2014-01-15T08:53:10Z")

</div>

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 🙂

cheers  
Jess
