Skip to content

Bioconda package for PCGR #283

Open
Open

Description

@maxibor

Dear PCRG devs,
Are you considering creating a bioconda package for PCGR ?
The advantage of distributing your tool through bioconda would be (on top of referencing) to have automated biocontainer creation (docker + singularity/apptainer).

This is turn would greatly ease the adoption/implementation of PCGR in workflow managers such as Snakemake/Nextflow, for example as in nf-core/variantprioritization.

Activity

  1. maxibor commented on Oct 28, 2025

    @maxibor
    Author

    Repo issue link for ref nf-core/variantprioritization#27

  2. self-assigned this
    on Oct 28, 2025
  3. pdiakumis commented on Oct 28, 2025

    @pdiakumis
    Collaborator

    Hi Maxime,

    Thanks for bringing this up!
    We are definitely considering publishing via bioconda, but there are a couple complications with the setup of our conda packages.

    PCGR as an app consists of a pcgr Python package and a pcgrr R package (that isn't released on CRAN or Bioconductor, which also complicates things re: bioconda). Each of those has its own conda package at https://anaconda.org/pcgr, which primarily have Python and R dependencies separated (though pcgrr also requires Python due to its argparse dependency). For PCGR to work, we create two separate conda envs:
    a) pcgr: contains pcgr, ensembl-vep, bcftools, vcfanno and other 'non-R' dependencies.
    b) pcgrr: contains r-pcgrr, r-cpsr, the bsgenome R data pkgs etc..

    We found splitting the envs up like this enabled us to overcome a few dependency issues, mainly with vep, perl, cyvcf2, htslib, and their interaction with R. There were also issues with getting a unified conda environment to work on MacOS.

    I do have a couple things in mind that I can try to see if we can simplify this structure. Since you're nudging I'll try to test those out in the next week or so ;-)

    Cheers,
    Peter

  4. famosab commented on Feb 25, 2026

    @famosab

    I have a comment regarding the combination of these conda packages: I would expect that if I combine them inot one environment that they are enought to run the tool. However the installation docks tell me that I need to access lock files to get the whole thing running via conda. Maybe you could also consider simplifying this - even if it means that we still need to install two packages (which is a reasonable effort).

    This is an error I get when running through such a conda environment:

        >     File "/opt/conda/bin/pcgr", line 10, in <module>
        >       sys.exit(cli())
        >                ^^^^^
        >     File "/opt/conda/lib/python3.12/site-packages/pcgr/main.py", line 144, in cli
        >       run_pcgr(input_data, output_data, conf_options)
        >     File "/opt/conda/lib/python3.12/site-packages/pcgr/main.py", line 323, in run_pcgr
        >       yaml_data = populate_config_data(conf_options, input_data["refdata_assembly_dir"],
        >                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        >     File "/opt/conda/lib/python3.12/site-packages/pcgr/config.py", line 234, in populate_config_data
        >       metadata_pd = metadata_pd._append(metadata_df, ignore_index=True)
        >                     ^^^^^^^^^^^^^^^^^^^
        >     File "/opt/conda/lib/python3.12/site-packages/pandas/core/generic.py", line 6206, in __getattr__
        >       return object.__getattribute__(self, name)
        >              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        >   AttributeError: 'DataFrame' object has no attribute '_append'
    
  5. pdiakumis commented on Mar 16, 2026

    @pdiakumis
    Collaborator

    Hi @famosab sorry for the delay.

    I would expect that if I combine them inot one environment that they are enought to run the tool

    Unfortunately you need a bit of luck to get those two conda pkgs working in a single environment, which is the main reason we've gone down the separate environment route. I think linux-only would work, but osx would struggle. And as it is now, pcgr wouldn't work with a single env because I've added some hacks in there to explicitly use the R conda env (not sure if the error you're getting is due to that).

    I'm in the middle of refactoring the conda setup (in the dev branch of this repo) which will focus primarily on linux (osx users can use docker/apptainer if needed). Hoping to be done with this part in a week or so.

  6. famosab commented on Mar 16, 2026

    @famosab

    @pdiakumis Thank you for the explanation! For me linux is perfectly fine - looking forward to an easier setup with conda!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions