Giter VIP home page Giter VIP logo

refgenie_nfcore's Introduction

Build package Test refgenie CLI install with bioconda

Refgenie

A standardized reference genome resource manager. See the documentation.

refgenie_nfcore's People

Contributors

nsheff avatar stolarczyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

refgenie_nfcore's Issues

'assets' KeyError when running `rgc.list_assets_by_genome()` with post_update hook

Hi,

I'm trying to use the post_update hook to generate a nextflow.config file with the refgenie genomes in it, basically copying the code from this repo here to a large extent.

I run into a KeyError for 'assets' in the rgc.list_assets_by_genome(), which is the first function called, see here:
https://github.com/KevinMenden/tools/blob/refgenie/nf_core/refgenie.py

I can reproduce the error as follows:

  • fresh refgenie genomes_config.yaml (refgenie init -c genomes_config.yaml)
  • refgenie pull dm6/fasta

After running this code, the genomes_config.yaml looks like this:

config_version: 0.4
genome_folder: /home/kevin/qbic/nfcore/refgenie_test
genome_servers: 
 - http://refgenomes.databio.org
genomes:
  8baf9d24ad8f5678f0fe1f5b21a812d410755d49e3123158:
    aliases: 
     - dm6

Running refgenie pull dm6/fasta a second time after that works.

Any help would be appreciated!

Cheers,
Kevin

Here's the full traceback:

refgenie pull dm6/fasta
Compatible refgenieserver instances: ['http://refgenomes.databio.org']
No local digest for genome alias: dm6
Setting 'dm6' identity with server: http://refgenomes.databio.org/v3/genomes/genome_digest/dm6
Determined digest for local 'dm6' alias: 8baf9d24ad8f5678f0fe1f5b21a812d410755d49e3123158
Set genome alias (8baf9d24ad8f5678f0fe1f5b21a812d410755d49e3123158: dm6)
Traceback (most recent call last):
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 1482, in pull
    genome = self.get_genome_alias_digest(alias=alias)
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 1705, in get_genome_alias_digest
    return self[CFG_GENOMES_KEY].get_key(alias=alias)
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/yacman/alias.py", line 223, in get_key
    raise UndefinedAliasError("No key defined for: {}".format(alias))
yacman.exceptions.UndefinedAliasError: No key defined for: dm6

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/attmap/ordattmap.py", line 45, in __getitem__
    return super(OrdAttMap, self).__getitem__(item)
KeyError: 'assets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kevin/anaconda3/envs/refgenie/bin/refgenie", line 10, in <module>
    sys.exit(main())
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenie/cli.py", line 241, in main
    rgc.pull(
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 1485, in pull
    if not self.set_genome_alias(
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 1867, in set_genome_alias
    set_aliases, removed_aliases = _check_and_set_alias(
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/yacman/yacman.py", line 165, in __exit__
    self.write()
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 2627, in write
    self.run_plugins(POST_UPDATE_HOOK)
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 2604, in run_plugins
    func(self)
  File "/home/kevin/qbic/nfcore/refgenie_test/tools/nf_core/refgenie.py", line 82, in update_config
    refgenie_genomes = print_nf_config(rgc)
  File "/home/kevin/qbic/nfcore/refgenie_test/tools/nf_core/refgenie.py", line 33, in print_nf_config
    abg = rgc.list_assets_by_genome()
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 1055, in list_assets_by_genome
    else self.list(order, include_tags=include_tags)
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 333, in list
    [
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/refgenconf/refgenconf.py", line 337, in <listcomp>
    list(self[CFG_GENOMES_KEY][g][CFG_ASSETS_KEY].keys()), key=order
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/attmap/pathex_attmap.py", line 56, in __getitem__
    v = super(PathExAttMap, self).__getitem__(item)
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/attmap/ordattmap.py", line 47, in __getitem__
    return AttMap.__getitem__(self, item)
  File "/home/kevin/anaconda3/envs/refgenie/lib/python3.9/site-packages/attmap/attmap.py", line 32, in __getitem__
    return self.__dict__[item]
KeyError: 'assets'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.