# Remove.groups with low seqs count before sub.samples  454SOP

**URL:** <https://forum.mothur.org/t/remove-groups-with-low-seqs-count-before-sub-samples-454sop/1823>\
**Category:** Commands in mothur\
**Created:** [May 2, 2014, 4:43pm UTC](https://forum.mothur.org/t/remove-groups-with-low-seqs-count-before-sub-samples-454sop/1823 "2014-05-02T16:43:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oalzahal](https://avatars.discourse-cdn.com/v4/letter/o/e9bcb4/32.png) [@oalzahal](https://forum.mothur.org/u/oalzahal)\
**Post date:** [May 2, 2014, 4:43pm UTC](https://forum.mothur.org/t/remove-groups-with-low-seqs-count-before-sub-samples-454sop/1823/1 "2014-05-02T16:43:11Z")

</div>

Normalization to the group with lowest sequence count is demonstrated as a must, however, if one of the samples has a low count (in my case 160 seqs), how can i remove those samples or groups.  
here how i did it but not sure if it is the most efficient way:  
i went back to files prior to OTU analysis i.e.  
final.names  
final.fasta  
final.groups  
final.taxonomy

and removed the unwanted groups:  
remove.groups(fasta=final.fasta, name=final.names, group=final.groups, taxonomy=final.taxonomy, groups=G2-G3-G6-G7)

  
Removed 6281 sequences from your name file. Removed 2530 sequences from your fasta file. Removed 6281 sequences from your group file. Removed 2530 sequences from your taxonomy file.

Output File names:  
final.pick.names  
final.pick.fasta  
final.pick.groups  
final.pick.taxonomy

  
then i redid the dist.seqs, cluster, make.shared, and count.groups and finally finishing with sub.samples.

Is this the correct or best way, since re"cluster"ing takes lots of time.

many thanks

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [May 2, 2014, 7:27pm UTC](https://forum.mothur.org/t/remove-groups-with-low-seqs-count-before-sub-samples-454sop/1823/2 "2014-05-02T19:27:41Z")

</div>

Hi there,

So you can do remove.groups or you can just put everything through cluster. Then you can rarefy or subsample everything to a given number of reads per sample and those with fewer reads than your threshold will automatically get tossed.

Pat

---

<div class="post-metadata">

**Author:** ![oalzahal](https://avatars.discourse-cdn.com/v4/letter/o/e9bcb4/32.png) [@oalzahal](https://forum.mothur.org/u/oalzahal)\
**Post date:** [May 2, 2014, 7:54pm UTC](https://forum.mothur.org/t/remove-groups-with-low-seqs-count-before-sub-samples-454sop/1823/3 "2014-05-02T19:54:29Z")

</div>

great thanks.
