evolbioinfo / pastml

Ancestral character reconstruction and visualisation for rooted phylogenetic trees
https://pastml.pasteur.fr
GNU General Public License v3.0
29 stars 6 forks source link

problems running pastML from bioconda install #21

Open plasmid02 opened 7 months ago

plasmid02 commented 7 months ago

Describe the bug I set up pastML from bioconda on a linux instance. Can't seem to run even the test data. Thanks for any hint on how to solve this!

pastml -t Albanian.tree.152tax.tre -d data.txt -s ',' Traceback (most recent call last): File "/home/tread/miniconda3/envs/pastml/bin/pastml", line 10, in sys.exit(main()) ^^^^^^ File "/home/tread/miniconda3/envs/pastml/lib/python3.12/site-packages/pastml/acr.py", line 1227, in main pastml_pipeline(**vars(params)) File "/home/tread/miniconda3/envs/pastml/lib/python3.12/site-packages/pastml/acr.py", line 649, in pastml_pipeline _validate_input(tree, columns, name_column if html_compressed or html_mixed else None, data, data_sep, id_index, File "/home/tread/miniconda3/envs/pastml/lib/python3.12/site-packages/pastml/acr.py", line 865, in _validate_input filtered_df = df.loc[common_ids, :]


  File "/home/tread/miniconda3/envs/pastml/lib/python3.12/site-packages/pandas/core/indexing.py", line 1179, in __getitem__
    check_dict_or_set_indexers(key)
  File "/home/tread/miniconda3/envs/pastml/lib/python3.12/site-packages/pandas/core/indexing.py", line 2767, in check_dict_or_set_indexers
    raise TypeError(
TypeError: Passing a set as an indexer is not supported. Use a list instead.
maxgmarin commented 7 months ago

Hello! I just ran pastml on the test data. Here are the exact commands I used to install and then run the test data. I hope it's useful.

Part 1: Setup pastml

# Use Mamba/conda to create a pastml environment w/ python3 installed
mamba create --name pastmlenv python=3

mamba activate pastmlenv

# Create a directory for storing the pastml repo and then clone repo

mkdir pastml_testing
cd pastml_testing 

git clone git@github.com:evolbioinfo/pastml.git

cd pastml

# Install pastml to env
pip install . 

Part 2: Run pastml on the test data

# Let’s run the recently installed `pastml` package on the test data

cd ~/Documents/pastml_testing/pastml

# Define paths to test data
AlbData=“examples/Albania/data”

Alb_Tre=“${AlbData}/Albanian.tree.152tax.tre”

Alb_Data_TXT=“${AlbData}/data.txt”

# Look at top 4 columns of test data
head -n 4 $Alb_Data_TXT

# Look at options for pastml
pastml --help

# Run pastml on test data
pastml --tree ${Alb_Tre} -s , --data ${Alb_Data_TXT} --out_data Alb.Test.out.txt --html Alb.Test.out.html
plasmid02 commented 7 months ago

Thanks! This worked for me. The difference seems to be using pip for pastel install rather than bioconda .