from dataclasses import dataclass
import typing
import typing_extensions
from flytekit.core.annotation import FlyteAnnotation
from latch.types.metadata import NextflowParameter
from latch.types.file import LatchFile
from latch.types.directory import LatchDir
# Import these into your `__init__.py` file:
#
# from .parameters import generated_parameters
@dataclass(frozen=True)
class Sample:
sample: str
fastq_1: LatchFile
fastq_2: typing.Optional[LatchFile]
strandedness: str
generated_parameters = {
'input': NextflowParameter(
type=typing.List[Sample],
samplesheet=True,
samplesheet_type='csv', # ADDED, also accepts 'tsv'
section_title='Input/output options',
description='Path to comma-separated file containing information about the samples in the experiment.',
),
'outdir': NextflowParameter(
type=LatchDir,
default=None,
section_title=None,
description='The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.',
),
'fasta': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title="Genome References",
description='Path to FASTA genome file.',
),
'gtf': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='Path to GTF annotation file.',
),
'gff': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='Path to GFF3 annotation file.',
),
'transcript_fasta': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='Path to FASTA transcriptome file.',
),
'additional_fasta': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='FASTA file to concatenate to genome FASTA file e.g. containing spike-in sequences.',
),
'bbsplit_fasta_list': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title='Read filtering options',
description='Path to comma-separated file containing a list of reference genomes to filter reads against with BBSplit. You have to also explicitly set `--skip_bbsplit false` if you want to use BBSplit.',
),
'hisat2_index': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='Path to directory or tar.gz archive for pre-built HISAT2 index.',
),
'salmon_index': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='Path to directory or tar.gz archive for pre-built Salmon index.',
),
'rsem_index': NextflowParameter(
type=typing.Optional[LatchFile],
default=None,
section_title=None,
description='Path to directory or tar.gz archive for pre-built RSEM index.',
),
'skip_bbsplit': NextflowParameter(
type=typing.Optional[bool],
default=True,
section_title=None,
description='Skip BBSplit for removal of non-reference genome reads.',
),
'pseudo_aligner': NextflowParameter(
type=typing.Optional[str],
default=None,
section_title=None,
description="Specifies the pseudo aligner to use - available options are 'salmon'. Runs in addition to '--aligner'.",
),
'umitools_bc_pattern': NextflowParameter(
type=typing.Optional[str],
default=None,
section_title=None,
description="The UMI barcode pattern to use e.g. 'NNNNNN' indicates that the first 6 nucleotides of the read are from the UMI.",
),
}