Skip to content

Confusing vcfbub parameter usage: when to use --max-ref-length (-r) vs --max-allele-length (-a)? #1935

Description

@yeeus

In the recent minigraph-cactus pangenome pipeline, the usage of vcfbub appears inconsistent and confusing. Sometimes the code or documentation uses --max-ref-length (-r) and in other places, especially when preparing input for vcfwave, --max-allele-length (-a) is used. From a user's perspective, it is very hard to understand the scientific or practical rationale for choosing one over the other, especially since they have distinct biological implications:

  • --max-ref-length filters sites based only on the reference allele length.
  • --max-allele-length filters sites based on the maximum of any allele (ref or alt) length, which is more strict.

This inconsistency is explicitly visible in the minigraph-cactus source code (src/cactus/refmap/cactus_graphmap_join.py):

  1. Default flattened VCF: Uses --max-ref-length
    bub_cmd = [['vcfbub', '--input', bub_input_path, '--max-ref-length', str(max_ref_allele), '--max-level', '0']]
    if getOptionalAttrib(findRequiredNode(config.xmlRoot, "graphmap_join"), "filterAC0", typeFn=bool, default=False):
    bub_cmd.append(['bcftools', 'view', '-e', 'AC=0'])
    bub_cmd.append(['bgzip'])
  2. Input preparation for vcfwave: Uses -a (--max-allele-length)
    bub_cmd = [['vcfbub', '--input', bub_input_path, '-l', '0', '-a', str(max_ref_allele)],
    ['bcftools', 'annotate', '-x', 'INFO/AT'],
    ['bcftools', 'norm', '-m', '-any']]
    (It also mentions "using original HPRC recipe" here).

So, what are the precise rules/recommendations for choosing between these two options in the minigraph-cactus workflows (and if you are familiar with PGGB, what should one choose for the PGGB graph)? And, why is there a mixture of usage in the workflow code? Is it possible to standardize or at least document when and why one should be preferred over the other?

Having a consistent and transparent explanation would help users and downstream tool developers a lot.

Thanks! Best wishes!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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