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

locus_selection #39

Open
pabijanM opened this issue Mar 12, 2024 · 2 comments
Open

locus_selection #39

pabijanM opened this issue Mar 12, 2024 · 2 comments

Comments

@pabijanM
Copy link

Hi,
during locus selection, the script is reding read-depth and calculating coverage for all loci/individuals, but then it crashes with the following error:
Traceback (most recent call last):
File "/home/maciek.pabijan/.conda/envs/secapr_env/bin/secapr", line 33, in
sys.exit(load_entry_point('secapr==0+unknown', 'console_scripts', 'secapr')())
File "/home/maciek.pabijan/.conda/envs/secapr_env/lib/python3.8/site-packages/secapr-0+unknown-py3.8.egg/secapr/main.py", line 55, in main
File "/home/maciek.pabijan/.conda/envs/secapr_env/lib/python3.8/site-packages/secapr-0+unknown-py3.8.egg/secapr/locus_selection.py", line 350, in main
File "/home/maciek.pabijan/.conda/envs/secapr_env/lib/python3.8/site-packages/secapr-0+unknown-py3.8.egg/secapr/locus_selection.py", line 183, in extract_best_loci
File "/home/maciek.pabijan/.conda/envs/secapr_env/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'append'
(secapr_env) maciek.pabijan@azor:$ AttributeError: 'DataFrame' object has no attribute 'append'
AttributeError:: command not found
(secapr_env) maciek.pabijan@azor:
$ AttributeError: 'DataFrame' object has no attribute 'append'

I am using the latest development version. Any help would be useful!
Maciej

@kroeve
Copy link

kroeve commented May 31, 2024

Hi Maciej,

I got the same error. I found out that pd.append() was removed from pandas 2.0, hence causing this error. I changed line 183 of locus_selection.py from selected_rows = selected_rows.append(line) to selected_rows = selected_rows._append(line) to make it work. No idea though if the new commaned pd._append() changes the outcome, I'm really not a Python expert! But at least the script is finishing without error now and I could proceed with the pipeline.

Cheers,
Evelin

@pabijanM
Copy link
Author

Thank you Evelin, this worked for me!
best
Maciej

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