bacpop / PopPUNK

PopPUNK 👨‍🎤 (POPulation Partitioning Using Nucleotide Kmers)
https://www.bacpop.org/poppunk
Apache License 2.0
87 stars 17 forks source link

Query data not working #258

Closed Drojok closed 1 year ago

Drojok commented 1 year ago

Versions

Command used and output returned

Describe the bug

Drojok commented 1 year ago

I am new to PopPunk and not sure if I have got it work in my path I am getting a response below

FileNotFoundError: [Errno 2] No such file or directory: 'staph_aureus_adjustedstaph_aureus_adjusted.txt/staph_aureus_adjustedstaph_aureus_adjusted.txt.dists.pkl'

please assist

johnlees commented 1 year ago

Please fill in the issue template with version, command and output, otherwise we do not have enough information to help you

Drojok commented 1 year ago

% poppunk_visualise --ref-db staphylococcus_aureus_v1_refs --query-db staph_aureus_adjusted\staph_aureus_adjusted.txt --output s_aureus.viz --phandango --threads 4

Graph-tools OpenMP parallelisation enabled: with 4 threads PopPUNK: visualise Traceback (most recent call last): File "/Users/davidojok/opt/anaconda3/envs/poppunk/bin/poppunk_visualise", line 11, in sys.exit(main()) File "/Users/davidojok/opt/anaconda3/envs/poppunk/lib/python3.10/site-packages/PopPUNK/visualise.py", line 624, in main generate_visualisations(args.query_db, File "/Users/davidojok/opt/anaconda3/envs/poppunk/lib/python3.10/site-packages/PopPUNK/visualise.py", line 284, in generate_visualisations rlist, qlist, self, complete_distMat = readPickle(distances) File "/Users/davidojok/opt/anaconda3/envs/poppunk/lib/python3.10/site-packages/PopPUNK/utils.py", line 184, in readPickle with open(pklName + ".pkl", 'rb') as pickle_file: FileNotFoundError: [Errno 2] No such file or directory: 'staph_aureus_adjustedstaph_aureus_adjusted.txt/staph_aureus_adjustedstaph_aureus_adjusted.txt.dists.pkl'

Hi Lees, this is the out put. The version I am using is 2.6.0

johnlees commented 1 year ago

Try changing your command to:

poppunk_visualise --ref-db staphylococcus_aureus_v1_refs --query-db staph_aureus_adjusted --output s_aureus.viz --phandango --threads 4
Drojok commented 1 year ago

Hi Lees, After copying and pasting, this is the output

poppunk_db % poppunk_visualise --ref-db staphylococcus_aureus_v1_refs --query-db staph_aureus_adjusted --output s_aureus.viz --phandango --threads 4

Graph-tools OpenMP parallelisation enabled: with 4 threads PopPUNK: visualise Traceback (most recent call last): File "/Users/davidojok/opt/anaconda3/envs/poppunk/bin/poppunk_visualise", line 11, in sys.exit(main()) File "/Users/davidojok/opt/anaconda3/envs/poppunk/lib/python3.10/site-packages/PopPUNK/visualise.py", line 624, in main generate_visualisations(args.query_db, File "/Users/davidojok/opt/anaconda3/envs/poppunk/lib/python3.10/site-packages/PopPUNK/visualise.py", line 284, in generate_visualisations rlist, qlist, self, complete_distMat = readPickle(distances) File "/Users/davidojok/opt/anaconda3/envs/poppunk/lib/python3.10/site-packages/PopPUNK/utils.py", line 184, in readPickle with open(pklName + ".pkl", 'rb') as pickle_file: FileNotFoundError: [Errno 2] No such file or directory: 'staph_aureus_adjusted/staph_aureus_adjusted.dists.pkl'

Please help

johnlees commented 1 year ago

What is the contents of the staph_aureus_adjusted folder?

Drojok commented 1 year ago

the staph_aureus_adjusted is a txt file with the isolate lists and path to all isolates

Drojok commented 1 year ago

No header

johnlees commented 1 year ago

I am not sure exactly what you are trying to do here? Obtain strain assignments for new data? Please see this page if so: https://poppunk.readthedocs.io/en/latest/query_assignment.html

poppunk_visualise can only be used after running the query command

johnlees commented 1 year ago

Closing due to lack of information