refgenie / refgenconf

A Python object for standardized reference genome assets.
http://refgenie.databio.org
BSD 2-Clause "Simplified" License
3 stars 6 forks source link

revamp looper plugin to accomodate multiple genomes #132

Closed nsheff closed 3 years ago

nsheff commented 3 years ago

Here's what I came up with. This makes the plugin more general.

Use with:

pre_submit:
  python_functions:
  - refgenconf.looper_refgenie_populate
var_templates:
  refgenie_config: "$REFGENIE"
command_template: >
  python pipeline.py 
  --index {refgenie[sample.genome].bowtie2_index.dir}
  --fasta-file {refgenie[sample.genome].fasta.fasta}
  --sample-name {sample.sample_name}
  --anno-name {refgenie[sample.genome].bwa_index.bwa_index}
  --custom-config {sample.custom_config_path}

So, now you can use refgenie[GENOME] to get at different genomes.

The way to configure the plugin in the PEP is now like this:

refgenie:
  tag_overrides:
    t7:
      bowtie2_index: "alternative_tag"
  path_overrides:
    - registry_path: "hg19/bowtie2_index"
      value: "test.xyz"
    - registry_path: "hg38/fasta.chrom_sizes"
      value: "refgenie://hg38_primary/fasta.chrom_sizes"
nsheff commented 3 years ago

updated demos available in https://github.com/refgenie/refgenie_looper_demo