Which command can subsample fasta file

Hi, I have 20 samples in 20 individual fasta files. I combine them together in one fasta file. I want to random sub-sample 1000 seqs from each fasta file (not subsample from OTU table, I want to do it before build otu table). I was wondering which command can let me do this. Can I use the combined large fasta file? Or, I have do it 20 times with the 20 individual files.

Thanks,

Is it possible to do it? Thanks.

?

If you have the fasta files and a corresponding group file is should just be as simple as:

sub.sample(fasta=XXX, group=XXX, size=1000, persample=T)

If you don’t have a group file, you can make one:

make.group(fasta=file1.fasta-file2.fasta-file3.fasta-…-filen.fasta, groups=group1-group2-group3-…-groupn, output=final.groups)