bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
994 stars 354 forks source link

ValueError: Could not find directory in config for picard #3585

Closed hocinebendou closed 2 years ago

hocinebendou commented 2 years ago

Version info

To Reproduce Exact bcbio command you have used:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/tools/software/bcbio/anaconda/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 608, in __call__
    return self.func(*args, **kwargs)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/joblib/parallel.py", line 256, in __call__
    for func, args, kwargs in self.items]
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/joblib/parallel.py", line 256, in <listcomp>
    for func, args, kwargs in self.items]
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/utils.py", line 55, in wrapper
    return f(*args, **kwargs)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/multitasks.py", line 327, in concat_variant_files
    return vcfutils.concat_variant_files(*args)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/variation/vcfutils.py", line 372, in concat_variant_files
    out_file = _run_concat_variant_files_gatk4(input_file_list, out_file, config)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/variation/vcfutils.py", line 404, in _run_concat_variant_files_gatk4
    broad_runner = broad.runner_from_config(config)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/broad/__init__.py", line 518, in runner_from_config
    return BroadRunner(_get_picard_ref(config), pdir, config)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/broad/__init__.py", line 508, in _get_picard_ref
    picard = config_utils.get_program("picard", config, "dir")
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/pipeline/config_utils.py", line 193, in get_program
    return _get_program_dir(name, pconfig)
  File "/tools/software/bcbio/anaconda/lib/python3.6/site-packages/bcbio/pipeline/config_utils.py", line 245, in _get_program_dir
    raise ValueError("Could not find directory in config for %s" % name)
ValueError: Could not find directory in config for picard
"""

Your yaml configuration file:

details:
- algorithm:
     aligner: bwa
     mark_duplicates: true
     variantcaller: vardict
     effects: snpeff
     effects_transcripts: canonical_cancer
     vcfanno: somatic
   analysis: variant2
   description: PD39456-normal
   files: ../input/HUMAN_1000Genomes_hs37d5_genomic_PD39456b.dupmarked.bam
   genome_build: hg38
   metadata:
     batch: bcbio
     phenotype: normal
- algorithm:
     aligner: bwa
     mark_duplicates: true
     variantcaller: vardict
     effects: snpeff
     effects_transcripts: canonical_cancer
     vcfanno: somatic
   analysis: variant2
   description: PD39456-tumor
   files: ../input/HUMAN_1000Genomes_hs37d5_genomic_PD39456a.dupmarked.bam
   genome_build: hg38
   metadata:
     batch: bcbio
     phenotype: tumor
 fc_date: '2021-12-05'
 fc_name: PD39456
 upload:
   dir: ../final_simplified
 resources:
   default:
     memory: 8G
     cores: 8
     jvm_opts: ["-Xms4G", "-Xmx8G"]

Log files (could be found in work/log) Please attach (10MB max): bcbio-nextgen-commands.log, and bcbio-nextgen-debug.log.

naumenko-sa commented 2 years ago

Hi @hocinebendou !

Thanks for reporting and sorry about the issue!

You are running bcbio1.1.1 which is from Nov 2018.

If it is your production freeze, just make sure nothing changed in the environment (whether bcbio/tools/bin in the PATH, do which picard and picard --version work?).

And/Or you may install the latest 1.2.9a bcbio and contribute to 1.2.9 release!

Sergey

kokyriakidis commented 2 years ago

Hi @naumenko-sa

I installed a fresh bcbio 1.2.9 and I get the same error message

ValueError: Could not find directory in config for picard

which picard does not produce anything and picard --version says that it does not exists.

when I get in tha java env conda activate java I see picard installed and running

I installed picard in base env and now I get /usr/bin/bash: gatk: command not found

Somehow bcbio cannot see the tools inside the java env.

naumenko-sa commented 2 years ago

Hi @kokyriakidis !

Are you sure you have added bcbio/tools/bin to the PATH after installation?

on my system:

$ which picard
/n/app/bcbio/1.2.9/tools/bin/picard
$ readlink -f `which picard`
/n/app/bcbio/1.2.9/anaconda/envs/java/share/picard-2.26.9-0/picard
$ echo $PATH
/n/app/bcbio/1.2.9/anaconda/bin:/n/app/bcbio/1.2.9/tools/bin:some_other_staff

Sergey

kokyriakidis commented 2 years ago

Oups... I had wrong path. Thanks for the reminder!