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

problems running pastML from bioconda install #21

Open
plasmid02 opened this issue Feb 5, 2024 · 2 comments
Open

problems running pastML from bioconda install #21

plasmid02 opened this issue Feb 5, 2024 · 2 comments

Comments

@plasmid02
Copy link

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
Copy link

maxgmarin commented Feb 7, 2024

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
Copy link
Author

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

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