Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--min_eps and --eps_step flags not recognized #9

Open
mariagviegas opened this issue Aug 9, 2023 · 1 comment
Open

--min_eps and --eps_step flags not recognized #9

mariagviegas opened this issue Aug 9, 2023 · 1 comment

Comments

@mariagviegas
Copy link

Hello,
because the program does not find any clusters for my protein sequence with the standard clustering settings, I was trying to change some of the epsilon settings. The "--eps_val" flag seems to be working. But once I try with "--min_eps" or "--eps_step", I get the following errors:

python scripts/ClusterMSA.py EX -i /home/pbuser/Documents/Maria/230809_test_af_cluster_SacETF/2ndtry/input/SacETF_cdc32.a3m -o /home/pbuser/Documents/Maria/230809_test_af_cluster_SacETF/2ndtry/output/standard --min_eps 1
EX
20240 seqs removed for containing more than 25% gaps, 646 remaining
Traceback (most recent call last):
File "/home/pbuser/af_cluster/AF_Cluster/scripts/ClusterMSA.py", line 101, in
eps_test_vals=np.arange(args.min_eps, args.max_eps+args.eps_step, args.eps_step)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: arange() not supported for inputs with DType <class 'numpy.dtypes.StrDType'>.

AND

python scripts/ClusterMSA.py EX -i /home/pbuser/Documents/Maria/230809_test_af_cluster_SacETF/2ndtry/input/SacETF_cdc32.a3m -o /home/pbuser/Documents/Maria/230809_test_af_cluster_SacETF/2ndtry/output/standard --eps_step .5
EX
20240 seqs removed for containing more than 25% gaps, 646 remaining
Traceback (most recent call last):
File "/home/pbuser/af_cluster/AF_Cluster/scripts/ClusterMSA.py", line 101, in
eps_test_vals=np.arange(args.min_eps, args.max_eps+args.eps_step, args.eps_step)
~~~~~~~~~~~~^~~~~~~~~~~~~~

It kind of seems like the input values were not being converted into floats and taken as strings.
Thank you in advance for your help!
Best,
María

@chenyuwai
Copy link

chenyuwai commented Feb 23, 2024

I also got this error. This can be solved by adding "type=" into the following 4 option definitions in ClusterMSA.py

    p.add_argument('--min_eps', action='store',default=3, type=float, help='Min epsilon value to scan for DBSCAN (Default 3).')
    p.add_argument('--max_eps', action='store',default=20, type=float, help='Max epsilon value to scan for DBSCAN (Default 20).')
    p.add_argument('--eps_step', action='store',default=.5, type=float, help='step for epsilon scan for DBSCAN (Default 0.5).')
    p.add_argument('--min_samples', action='store',default=3, type=int, help='Default min_samples for DBSCAN (Default 3, recommended no lower than that).')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants