Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of Fork and ForkBranch #343

Open
nh13 opened this issue Nov 11, 2023 · 0 comments
Open

Improve documentation of Fork and ForkBranch #343

nh13 opened this issue Nov 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nh13
Copy link
Contributor

nh13 commented Nov 11, 2023

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,
@nh13 nh13 added the enhancement New feature or request label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant