How to use the primer name from the oligo file

I have a oligo file with multiple primers with a name as suggested on the wiki: http://www.mothur.org/wiki/Oligos_File . How can I use this name in the downstream analysis in mothur? Is it possible to get only the sequences of one primer/group by using get.groups?

Yes, you could run a command like:

get.groups(fasta=yourFastaFile, groups=Group1)

I already tried that, but the groups are assigned to the barcode.primer combination, and I would like to retrieve all sequences from a specific primer like this:

trim.seqs(fasta=project_reads.fasta, oligos=mothur.oligos.csv)
get.groups(fasta=project_reads.trim.fasta,group=project_reads.groups,groups=Group1)
[DEBUG]: name = 'IGJYZ8Z07INLQV', group = 'PA.Group2'
[DEBUG]: name = 'IGJYZ8Z07IPGFZ', group = 'KC.Group1'
....
Group1 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.
...

And the oligos file looks like this:

forward AGAGTAAAGAGATATAGAGGAT    Group2
forward AGAGGAATATAGAAATAGGGAT Group1
barcode ACGAAGACGT      PA
barcode ACGGTATACA      KC

Any idea how to achieve this?

Thanks!

When you assign primers names as well as barcodes names, mothur concatenates the names to create one group name for the sequence. In the example you posted you will have the following possible groups: PA.Group1, PA.Group2, KC.Group1, KC.Group2. To select all the sequences with the primer from Group2 you will need to run:

trim.seqs(fasta=project_reads.fasta, oligos=mothur.oligos.csv)
get.groups(fasta=project_reads.trim.fasta,group=project_reads.groups,groups=PA.Group2-KC.Group2)