Splitting a .shared file by abundance

I’m having a problem with .shared file formatting. I would like to kick the most abundant OTUs out of my file and re-run my analyses without them. I don’t want to use split.abund for this, because that requires me to back up to before the classify steps, and would (presumably) result in some OTUs being split up.

So I’m trying to sort the .shared file by OTU size in Excel, and just break it up into three separate .shared files. But my partial files seem to have a format problem. When I run summary.single on them, there is no error message, so they are presumably being read as a proper .shared. But the .summary file has a single line with no group names, and I also get a single .rabund file with the name of the first group.

My best guess is that mothur is not detecting the line breaks in my partial .shared files. I’ve tried ending the lines with and without a tab, and it doesn’t seem to help.

I made some modifications to mothur and uploaded version 1.30.1 to the wiki, http://www.mothur.org/wiki/Download_mothur. If you download the new version you can run the following:

remove.rare(shared=yourSharedFile, label=yourLabel, nseqs=yourAbundanceCutoff) - to get the abundant otus you want to remove
list.otulabels(shared=current) - list abundant otu labels
remove.otulabels(shared=originalSharedFile, accnos=outputFileFromList.otulabels) - remove abundant otus.

It works! Thanks!