You are here

limit_cluster_size default value

3 posts / 0 new
Last post
limit_cluster_size default value

Dear all,

I looked into the source code of Rosetta and found out that if in the input we don't assign -cluster:limit_cluster_size (default is -1), it seems the cluster size will be zero (line487~499, protocol/cluster/ Could someone please explain what is going on here?

in line 495, there is screening of j<=limit, which means, if limit is negative, the cluster list will never be populated. The weird part is that I still get good clusters if I don't give this value in the input.

Post Situation: 
Thu, 2011-11-24 17:57

It looks like you're referring to the ClusterBase::limit_groupsize() method. As I read the method, if the limit parameter is greater than zero, you scan through the list of clusters, replacing them with the first /limit/ items of that cluster, or all members if there are less than /limit/ items.

If limit is -1 or zero, you skip the trimming step completely, so you keep the clusters exactly as they are to start with.

It looks like it's been this way since at least version 3.2, although if you're seeing "j<=limit", you may be working with a pre-3.2 version. (Although the intent of the method looks to be the same back to 3.0).

Fri, 2011-11-25 10:47

oh!!! This is because

if ( limit < 1 ) return;

sorry i am being stupid.

Fri, 2011-11-25 15:57