AntonelliLab / seqcap_processor

Bioinformatic pipeline for processing Sequence Capture data for Phylogenetics
MIT License
21 stars 12 forks source link

locus_selection #39

Open pabijanM opened 8 months ago

pabijanM commented 8 months ago

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 commented 5 months ago

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 commented 5 months ago

Thank you Evelin, this worked for me! best Maciej