Skip to content

Improve documentation of Fork and ForkBranch #343

Open

Description

@nh13

In the description of Fork and ForkBranch here, Fork "shows a set of mutually-exclusive alternatives". How are the mutually exclusive parameters in each ForkBranch written into the workflow function? Perhaps I confusing that fact that the interface elements are mutually exclusive, but the parameters are not?

E.g. I have one ForkBranch has a single parameter (single end FASTQ), and another ForkBranch that has two parameters (one for each end of paired end FASTQs). So the user must specify either the parameters in the first ForkBranch or the second, but not both.

So which of the following are the workflow function signatures?

  1. All are optional. But then how do we enforce from the interface that unpaired_fq is None when the other ForkBranch is used
@workflow(metadata)
def myworkflow(
  fastq_fork: str,
  unpaired_fq: Optional[LatchFile] = None,
  paired_r1_fq: Optional[LatchFile] = None,
  paired_r2_fq: Optional[LatchFile] = None,
  1. This is from the rna-seq workflow (the first one is not optional, the rest are: link. What is the value for unpaired_fq when paired FASTQs are given?
@workflow(metadata)
def myworkflow(
  fastq_fork: str,
  unpaired_fq: LatchFile,
  paired_r1_fq: Optional[LatchFile] = None,
  paired_r2_fq: Optional[LatchFile] = None,
  1. None of the parameters are optional, but this makes no sense since some really are.
@workflow(metadata)
def myworkflow(
  fastq_fork: str,
  unpaired_fq: LatchFile,
  paired_r1_fq: LatchFile,
  paired_r2_fq: LatchFile,

Activity

  1. added
    enhancement
    on Nov 11, 2023
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions