Split.groups creates empty files

I’ve been using split.groups to create individual fasta files for all the members of a MID belonging to a single OTU.

split.groups(fasta=seqs.in.MID1.fasta, group=final.an.0.03.otu) where the group file is the output from get.otulist with sort=name

This generates a fasta file for each OTU, just like it’s supposed to. The problem is, however, that there might be several hundred OTUs in the group file, there are usually only a dozen or so from an individual MID, so the vast majority of OTU files for a given MID are empty. Deleting several thousand empty files by hand when I get done running through 50 MIDs is annoying, and although I’ll probably end up just writing a separate script to do it, I thought maybe someone could point me towards a little known option for split.groups that could prevent them from being written in the first place.

Better yet, if someone has a suggestion for more efficiently generating the desired fasta files from a single fasta file containing all sequences, a group file assigning seqs to MIDs, and a group file assigning the same seqs to the appropriate OTUs, I’m all ears.

Thanks for the suggestion. In version 1.16.0, the split.groups command will no longer create blank files.