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

Update tbdb with user-specified reference genome doesn’t work #351

Open
ryanjameskennedy opened this issue May 2, 2024 · 1 comment
Open

Comments

@ryanjameskennedy
Copy link
Contributor

ryanjameskennedy commented May 2, 2024

I tried running the following given the GCF file provided by NCBI and it didn’t work:

singularity exec --bind /data depot.galaxyproject.org-singularity-tb-profiler-6.2.0--pyhdfd78af_1.img tb-profiler update_tbdb --match_ref /path/to/genomes/GCF_000195955.2.fasta --prefix converged_who_fohm_tbdb -d /path/to/tbdb/

Here is the error command:

                      Traceback (most recent call last):                                                                                                                                                                                                                 
                      File "/usr/local/bin/tb-profiler", line 583, in <module>                                                                                                                                                                                         
                        args.func(args)                                                                                                                                                                                                                                
                      File "/usr/local/bin/tb-profiler", line 242, in main_create_db                                                                                                                                                                                   
                        pp.create_db(args,extra_files=extra_files)                                                                                                                                                                                                     
                      File "/usr/local/lib/python3.10/site-packages/pathogenprofiler/db.py", line 537, in create_db                                                                                                                                                    
                        load_db(variables_file,args.software_name)                                                                                                                                                                                                     
                      File "/usr/local/lib/python3.10/site-packages/pathogenprofiler/db.py", line 555, in load_db                                                                                                                                                      
                        shutil.copyfile(source,target)                                                                                                                                                                                                                 
                      File "/usr/local/lib/python3.10/shutil.py", line 256, in copyfile                                                                                                                                                                                
                        with open(dst, 'wb') as fdst:                                                                                                                                                                                                                  
                    OSError: [Errno 30] Read-only file system: '/usr/local/share/tbprofiler/converged_who_fohm_tbdb.fasta'                                                                                                                                             
                    Cleaning up after failed run                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                       
Traceback (most recent call last):
  File "/usr/local/bin/tb-profiler", line 583, in <module>
    args.func(args)
  File "/usr/local/bin/tb-profiler", line 211, in main_update_tbdb
    pp.run_cmd(f"tb-profiler create_db --prefix {args.prefix} --csv mutations.csv --watchlist watchlist.csv {extra_args} --load")
  File "/usr/local/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 486, in run_cmd
    raise ValueError("Command Failed:\n%s\nstderr:\n%s" % (cmd,result.stderr.decode()))
ValueError: Command Failed:
/bin/bash -c set -o pipefail; tb-profiler create_db --prefix converged_who_fohm_tbdb --csv mutations.csv --watchlist watchlist.csv --rules rules.txt --match_ref /data/bnf/dev/ryan/jasen/assets/genomes/mycobacterium_tuberculosis/GCF_000195955.2.fasta --load
stderr:
Parsing mutations: 100%|██████████| 48797/48797 [00:37<00:00, 1289.28it/s]
Traceback (most recent call last):
  File "/usr/local/bin/tb-profiler", line 583, in <module>
    args.func(args)
  File "/usr/local/bin/tb-profiler", line 242, in main_create_db
    pp.create_db(args,extra_files=extra_files)
  File "/usr/local/lib/python3.10/site-packages/pathogenprofiler/db.py", line 537, in create_db
    load_db(variables_file,args.software_name)
  File "/usr/local/lib/python3.10/site-packages/pathogenprofiler/db.py", line 555, in load_db
    shutil.copyfile(source,target)
  File "/usr/local/lib/python3.10/shutil.py", line 256, in copyfile
    with open(dst, 'wb') as fdst:
OSError: [Errno 30] Read-only file system: '/usr/local/share/tbprofiler/converged_who_fohm_tbdb.fasta'
Cleaning up after failed run
@jodyphelan
Copy link
Owner

Hi @ryanjameskennedy

Did we manage to fix this? Is this what we talked about on slack?

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