コード例 #1
0
ファイル: steptaginput.py プロジェクト: rlupat/janis-core
    def check_types(self):
        from janis_core.workflow.workflow import InputNode, StepNode

        stoolin: TOutput = self.start.outputs()[
            self.stag
        ] if self.stag is not None else first_value(self.start.outputs())
        ftoolin: TInput = self.finish.inputs()[
            self.ftag
        ] if self.ftag is not None else first_value(self.finish.inputs())

        stype = stoolin.outtype
        ftype = ftoolin.intype

        start_is_scattered = (
            isinstance(self.start, StepNode) and self.start.scatter is not None
        )

        if start_is_scattered:
            Logger.log(
                f"This edge merges the inputs from '{full_dot(self.start, self.stag)}' for "
                f"'{full_dot(self.finish, self.ftag)}'"
            )
            stype = Array(stype)

        if self.scatter:
            if not isinstance(stype, Array):
                raise Exception(
                    f"Scatter was required for '{self.start.id()}.{self.stag} → '{self.finish.id()}.{self.ftag}' but "
                    f"the input type was {type(stype).__name__} and not an array"
                )
            stype = stype.subtype()

        source_has_default = (
            isinstance(self.start, InputNode) and self.start.default is not None
        )

        # Scatters are handled automatically by the StepTagInput Array unwrapping
        # Merges are handled automatically by the `start_is_scattered` Array wrap

        self.compatible_types = ftype.can_receive_from(stype, source_has_default)
        if not self.compatible_types:
            if isinstance(ftype, Array) and ftype.subtype().can_receive_from(stype):
                self.compatible_types = True

        if not self.compatible_types:

            s = full_dot(self.start, self.stag)
            f = full_dot(self.finish, self.ftag)
            message = (
                f"Mismatch of types when joining '{s}' to '{f}': "
                f"{stoolin.outtype.id()} -/→ {ftoolin.intype.id()}"
            )
            if isinstance(stype, Array) and ftype.can_receive_from(stype.subtype()):
                message += " (did you forget to SCATTER?)"
            Logger.critical(message)
コード例 #2
0
ファイル: selectors.py プロジェクト: xinzhel97/janis-core
    def returntype(self):
        retval = self.node.outputs()[self.tag].outtype

        if self.node.node_type != NodeType.STEP:
            return retval

        if hasattr(self.node, "scatter") and self.node.scatter is not None:
            retval = Array(retval)
        elif hasattr(self.node, "foreach") and self.node.foreach is not None:
            retval = Array(retval)

        return retval
コード例 #3
0
ファイル: steptaginput.py プロジェクト: rlupat/janis-core
    def add_source(self, start: Node, stag: Optional[str], should_scatter) -> Edge:
        """
        Add a connection
        :param start:
        :param stag:
        :param should_scatter:
        :return:
        """

        from janis_core.workflow.workflow import StepNode

        stype = (
            start.outputs()[stag] if stag is not None else first_value(start.outputs())
        ).outtype
        ftype = (
            self.finish.inputs()[self.ftag]
            if self.ftag is not None
            else first_value(self.finish.inputs())
        ).intype

        start_is_scattered = isinstance(start, StepNode) and start.scatter is not None

        if start_is_scattered:
            Logger.log(
                f"This edge merges the inputs from '{full_dot(start, stag)}' for "
                f"'{full_dot(self.finish, self.ftag)}'"
            )
            stype = Array(stype)

        if should_scatter:
            if not isinstance(stype, Array):
                raise Exception(
                    f"Scatter was required for '{start.id()}.{stag} → '{self.finish.id()}.{self.ftag}' but "
                    f"the input type was {type(stype).__name__} and not an array"
                )
            stype = stype.subtype()

        if len(self.source_map) == 1 and start.id() not in self.source_map:
            self.multiple_inputs = True

            if not isinstance(ftype, Array):
                raise Exception(
                    f"Adding multiple inputs to '{self.finish.id()}' and '{ftype.id()}' is not an array"
                )

        if not isinstance(stype, Array) and isinstance(ftype, Array):
            # https://www.commonwl.org/user_guide/misc/#connect-a-solo-value-to-an-input-that-expects-an-array-of-that-type
            self.multiple_inputs = True

        e = Edge(start, stag, self.finish, self.ftag, should_scatter=should_scatter)
        self.source_map[start.id()] = e
        return e
コード例 #4
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
    def returntype(self):
        if isinstance(self.args[0], list):
            rettype = self.args[0][0].returntype()
        else:
            outer_rettype = get_instantiated_type(self.args[0].returntype())
            if not isinstance(outer_rettype, Array):
                # hmmm, this could be a bad input selector
                rettype = outer_rettype
                if not isinstance(self.args[0], InputSelector):
                    Logger.warn(
                        f'Expected return type of "{self.args[0]}" to be an array, '
                        f'but found {outer_rettype}, will return this as a returntype.'
                    )
            else:
                rettype = outer_rettype.subtype()

        rettype = copy(get_instantiated_type(rettype))
        rettype.optional = False
        return Array(rettype)
コード例 #5
0
    def test_workflow(self):
        w = WorkflowBuilder("test_container_workflow")
        w.input("inp", String)
        w.input("aInp", Array(String))

        w.step("stp1", TestTool(testtool=w.inp))
        w.step("stp1_v2", TestToolV2(testtool=w.inp))
        w.step("stp2", ArrayTestTool(inps=w.aInp))

        cons = w.containers()
        self.assertSetEqual(
            {
                "ArrayStepTool", "TestTranslationtool",
                "TestTranslationtool_v0_0_2"
            },
            set(cons.keys()),
        )

        self.assertIsNone(cons["ArrayStepTool"])
        self.assertEqual("ubuntu:latest", cons["TestTranslationtool"])
        self.assertEqual("ubuntu:latest", cons["TestTranslationtool_v0_0_2"])
コード例 #6
0
from datetime import datetime
from typing import List, Optional, Dict, Any

from janis_core import *
from janis_core.types.common_data_types import Array, File, Boolean, Int, String

Adapterremoval_V0_1_0 = CommandToolBuilder(
    tool="AdapterRemoval",
    base_command=["AdapterRemoval"],
    inputs=[
        ToolInput(
            tag="in_file_one",
            input_type=Array(t=File(), optional=True),
            prefix="--file1",
            doc=InputDocumentation(
                doc=
                "Input files containing mate 1 reads or single-ended reads; one or\nmore files may be listed [REQUIRED]."
            )),
        ToolInput(
            tag="in_file_two",
            input_type=Boolean(optional=True),
            prefix="--file2",
            doc=InputDocumentation(
                doc=
                "[FILE ...]\nInput files containing mate 2 reads; if used, then the same number of\nfiles as --file1 must be listed [OPTIONAL]."
            )),
        ToolInput(
            tag="in_identify_adapters",
            input_type=Boolean(optional=True),
            prefix="--identify-adapters",
            doc=InputDocumentation(
コード例 #7
0
     prefix="--id-frac",
     doc=InputDocumentation(
         doc=
         "Decide that a guide 'hits' a group/taxon if it 'hits'\na fraction of sequences in that group/taxon that\nexceeds this value; lower values correspond to more\nspecificity."
     )),
 ToolInput(
     tag="in_id_method",
     input_type=String(optional=True),
     prefix="--id-method",
     doc=InputDocumentation(
         doc=
         "Choice of method to query for specificity. 'lshnn' for\nLSH near-neighbor approach. 'shard' for approach that\nshards k-mers across small tries."
     )),
 ToolInput(
     tag="in_specific_against_fast_as",
     input_type=Array(t=String(), optional=True),
     prefix="--specific-against-fastas",
     doc=InputDocumentation(
         doc=
         "Path to one or more FASTA files giving sequences, such\nthat guides are designed to be specific against (i.e.,\nnot hit) these sequences, according to --id-m and\n--id-frac. This is equivalent to specifying the FASTAs\nin the main input (as positional inputs), except that,\nwhen provided here, guides are not designed for them\nand they do not need to be aligned."
     )),
 ToolInput(
     tag="in_specific_against_tax_a",
     input_type=File(optional=True),
     prefix="--specific-against-taxa",
     doc=InputDocumentation(
         doc=
         "Path to TSV file giving giving taxonomies from which\nto download all genomes and ensure guides are specific\nagainst (i.e., not hit) these. The TSV file has 2\ncolumns: (1) a taxonomic ID; (2) segment label, or\n'None' if unsegmented"
     )),
 ToolInput(
     tag="in_do_not_allow_gu_pairing",
コード例 #8
0
from datetime import datetime
from typing import List, Optional, Dict, Any

from janis_core import *
from janis_core.types.common_data_types import Int, String, Array, File, Boolean

Design_Py_Sliding_Window_Auto_From_Args_V0_1_0 = CommandToolBuilder(tool="design.py_sliding_window_auto_from_args", base_command=["design.py", "sliding-window", "auto-from-args"], inputs=[ToolInput(tag="in_guide_length", input_type=Int(optional=True), prefix="--guide-length", doc=InputDocumentation(doc="Length of guide to construct")), ToolInput(tag="in_obj", input_type=String(optional=True), prefix="--obj", doc=InputDocumentation(doc="Objective function to solve. 'maximize-activity'\nmaximizes the expected activity of the guide set of\nthe target genomes subject to soft and hard\nconstraints on the size of the guide set. 'minimize-\nguides' minimizes the number of guides in the guide\nset subject to coverage constraints across the target\ngenomes.")), ToolInput(tag="in_guide_mismatches", input_type=Int(optional=True), prefix="--guide-mismatches", doc=InputDocumentation(doc="Allow for this number of mismatches when determining\nwhether a guide covers a sequence")), ToolInput(tag="in_guide_cover_frac", input_type=String(optional=True), prefix="--guide-cover-frac", doc=InputDocumentation(doc="The fraction of all sequences that must be covered by\nthe guides.")), ToolInput(tag="in_soft_guide_constraint", input_type=Int(optional=True), prefix="--soft-guide-constraint", doc=InputDocumentation(doc="Soft constraint on the number of guides. There is no\npenalty for a number of guides <=\nSOFT_GUIDE_CONSTRAINT, and having a number of guides\nbeyond this is penalized. See --penalty-strength. This\nvalue must be <= HARD_GUIDE_CONSTRAINT.")), ToolInput(tag="in_hard_guide_constraint", input_type=Int(optional=True), prefix="--hard-guide-constraint", doc=InputDocumentation(doc="Hard constraint on the number of guides. The number of\nguides designed for a target will be <=\nHARD_GUIDE_CONSTRAINT.")), ToolInput(tag="in_penalty_strength", input_type=Int(optional=True), prefix="--penalty-strength", doc=InputDocumentation(doc="Importance of the penalty when the number of guides\nexceeds the soft guide constraint. Namely, for a guide\nset G, if the penalty strength is L and the soft guide\nconstraint is h, then the penalty in the objective\nfunction is L*max(0, |G|-h). Must be >= 0. The value\ndepends on the output of activity model and reflects a\ntolerance for more guides; for the default activity\nmodel reasonable values are in the range [0.1, 0.5].")), ToolInput(tag="in_maximization_algorithm", input_type=String(optional=True), prefix="--maximization-algorithm", doc=InputDocumentation(doc="Algorithm to use for solving submodular maximization\nproblem. 'greedy' is the canonical deterministic\ngreedy algorithm (Nemhauser 1978) for constrained\nmonotone submodular maximization, which may perform\nwell in practice but has poor theoretical guarantees\nhere because the function is not monotone (unless\n--penalty-strength is 0). 'random-greedy' is the\nrandomized greedy algorithm (Buchbinder 2014) for\nconstrained non-monotone submodular maximization that\nhas good worst-case theoretical guarantees.")), ToolInput(tag="in_missing_th_res", input_type=Int(optional=True), prefix="--missing-thres", doc=InputDocumentation(doc="MISSING_THRES MISSING_THRES\n<A> <B> <C>; parameters governing the threshold on\nwhich sites to ignore due to too much missing data.\nThe 3 values specify not to attempt to design guides\noverlapping sites where the fraction of sequences with\nmissing data is > min(A, max(B, C*m)) where m is the\nmedian fraction of sequences with missing data over\nthe alignment. Set a=1 and b=1 to not ignore sites due\nto missing data.")), ToolInput(tag="in_id_m", input_type=Int(optional=True), prefix="--id-m", doc=InputDocumentation(doc="Allow for this number of mismatches when determining\nwhether a guide 'hits' a sequence in a group/taxon\nother than the for which it is being designed; higher\nvalues correspond to more specificity.")), ToolInput(tag="in_id_frac", input_type=String(optional=True), prefix="--id-frac", doc=InputDocumentation(doc="Decide that a guide 'hits' a group/taxon if it 'hits'\na fraction of sequences in that group/taxon that\nexceeds this value; lower values correspond to more\nspecificity.")), ToolInput(tag="in_id_method", input_type=String(optional=True), prefix="--id-method", doc=InputDocumentation(doc="Choice of method to query for specificity. 'lshnn' for\nLSH near-neighbor approach. 'shard' for approach that\nshards k-mers across small tries.")), ToolInput(tag="in_specific_against_fast_as", input_type=Array(t=String(), optional=True), prefix="--specific-against-fastas", doc=InputDocumentation(doc="Path to one or more FASTA files giving sequences, such\nthat guides are designed to be specific against (i.e.,\nnot hit) these sequences, according to --id-m and\n--id-frac. This is equivalent to specifying the FASTAs\nin the main input (as positional inputs), except that,\nwhen provided here, guides are not designed for them\nand they do not need to be aligned.")), ToolInput(tag="in_specific_against_tax_a", input_type=File(optional=True), prefix="--specific-against-taxa", doc=InputDocumentation(doc="Path to TSV file giving giving taxonomies from which\nto download all genomes and ensure guides are specific\nagainst (i.e., not hit) these. The TSV file has 2\ncolumns: (1) a taxonomic ID; (2) segment label, or\n'None' if unsegmented")), ToolInput(tag="in_do_not_allow_gu_pairing", input_type=Boolean(optional=True), prefix="--do-not-allow-gu-pairing", doc=InputDocumentation(doc="When determining whether a guide binds to a region of\ntarget sequence, do not count G-U (wobble) base pairs\nas matching. Default is to tolerate G-U pairing:\nnamely, A in an output guide sequence matches G in the\ntarget and C in an output guide sequence matches T in\nthe target (since the synthesized guide is the reverse\ncomplement of the output guide sequence)")), ToolInput(tag="in_required_guides", input_type=File(optional=True), prefix="--required-guides", doc=InputDocumentation(doc="Path to a file that gives guide sequences that will be\nincluded in the guide cover and output for the windows\nin which they belong, e.g., if certain guide sequences\nare shown experimentally to perform well. The file\nmust have 3 columns: col 1 gives an identifier for the\nalignment that the guide covers, such that i\nrepresents the i'th FASTA given as input (0-based);\ncol 2 gives a guide sequence; col 3 gives the start\nposition of the guide (0-based) in the alignment")), ToolInput(tag="in_blacklisted_ranges", input_type=File(optional=True), prefix="--blacklisted-ranges", doc=InputDocumentation(doc="Path to a file that gives ranges in alignments from\nwhich guides will not be constructed. The file must\nhave 3 columns: col 1 gives an identifier for the\nalignment that the range corresponds to, such that i\nrepresents the i'th FASTA given as input (0-based);\ncol 2 gives the start position of the range\n(inclusive); col 3 gives the end position of the range\n(exclusive)")), ToolInput(tag="in_blacklisted_km_ers", input_type=Int(optional=True), prefix="--blacklisted-kmers", doc=InputDocumentation(doc="Path to a FASTA file that gives k-mers to blacklisted\nfrom guide sequences. No guide sequences will be\nconstructed that contain these k-mers. The k-mers make\nup the sequences in the FASTA file; the sequence names\nare ignored. k-mers should be long enough so that not\ntoo many guide sequences are deemed to be unsuitable,\nand should be at most the length of the guide")), ToolInput(tag="in_require_flanking_five", input_type=Int(optional=True), prefix="--require-flanking5", doc=InputDocumentation(doc="Require the given sequence on the 5' protospacer\nflanking site (PFS) of each designed guide; this\ntolerates ambiguity in the sequence (e.g., 'H'\nrequires 'A', 'C', or 'T', or, equivalently, avoids\nguides flanked by 'G'). Note that this is the 5' end\nin the target sequence (not the spacer sequence).")), ToolInput(tag="in_require_flanking_three", input_type=Int(optional=True), prefix="--require-flanking3", doc=InputDocumentation(doc="Require the given sequence on the 3' protospacer\nflanking site (PFS) of each designed guide; this\ntolerates ambiguity in the sequence (e.g., 'H'\nrequires 'A', 'C', or 'T', or, equivalently, avoids\nguides flanked by 'G'). Note that this is the 3' end\nin the target sequence (not the spacer sequence).")), ToolInput(tag="in_seed", input_type=String(optional=True), prefix="--seed", doc=InputDocumentation(doc="SEED will set the random seed, guaranteeing the same\noutput given the same inputs. If SEED is not set to\nthe same value, output may vary across different runs.")), ToolInput(tag="in_predict_activity_model_path", input_type=File(optional=True), prefix="--predict-activity-model-path", doc=InputDocumentation(doc="PREDICT_ACTIVITY_MODEL_PATH\nPaths to directories containing serialized models in\nTensorFlow's SavedModel format for predicting guide-\ntarget activity. There are two arguments: (1)\nclassification model to determine which guides are\nactive; (2) regression model, which is used to\ndetermine which guides (among active ones) are highly\nactive. The models/ directory contains example models.\nIf not set, ADAPT does not predict activities to use\nduring design.")), ToolInput(tag="in_predict_activity_th_res", input_type=Int(optional=True), prefix="--predict-activity-thres", doc=InputDocumentation(doc="PREDICT_ACTIVITY_THRES\nThresholds to use for decisions on output of\npredictive models. There are two arguments: (1)\nclassification threshold for deciding which guide-\ntarget pairs are active (in [0,1], where higher values\nhave higher precision but less recall); (2) regression\nthreshold for deciding which guide-target pairs are\nhighly active (>= 0, where higher values limit the\nnumber determined to be highly active). If not set but\n--predict-activity-model-path is set, then ADAPT uses\ndefault thresholds stored with the models.")), ToolInput(tag="in_use_simple_binary_activity_prediction", input_type=Boolean(optional=True), prefix="--use-simple-binary-activity-prediction", doc=InputDocumentation(doc="If set, predict activity using a simple binary\nprediction between guide and target according to their\ndistance, with the threshold determined based on\n--guide-mismatches. This is only applicable when OBJ\nis 'maxmimize-activity'. This does not use a\nserialized model for predicting activity, so\n--predict-activity-model-path should not be set when\nthis is set.")), ToolInput(tag="in_do_not_memoize_guide_computations", input_type=Boolean(optional=True), prefix="--do-not-memoize-guide-computations", doc=InputDocumentation(doc="If set, do not memoize computations during the search,\nincluding of guides identified at each site and of\nspecificity queries. This can be helpful for\nbenchmarking the improvement of memoization, or if\nthere is reason to believe memoization will slow the\nsearch (e.g., if possible amplicons rarely overlap).\nNote that activity predictions are still memoized.")), ToolInput(tag="in_debug", input_type=Boolean(optional=True), prefix="--debug", doc=InputDocumentation(doc="Debug output")), ToolInput(tag="in_verbose", input_type=Boolean(optional=True), prefix="--verbose", doc=InputDocumentation(doc="Verbose output")), ToolInput(tag="in_window_size", input_type=Int(optional=True), prefix="--window-size", doc=InputDocumentation(doc="Ensure that selected guides are all a window of this\nsize")), ToolInput(tag="in_window_step", input_type=String(optional=True), prefix="--window-step", doc=InputDocumentation(doc="Amount by which to increase the window start position\nfor every iteration")), ToolInput(tag="in_sort", input_type=Boolean(optional=True), prefix="--sort", doc=InputDocumentation(doc="If set, sort output TSV by number of guides\n(ascending) then by score (descending); default is to\nsort by window position")), ToolInput(tag="in_path_mafft_used", input_type=File(optional=True), prefix="--mafft-path", doc=InputDocumentation(doc="Path to mafft executable, used for generating\nalignments")), ToolInput(tag="in_prep_memoize_dir", input_type=File(optional=True), prefix="--prep-memoize-dir", doc=InputDocumentation(doc="Path to directory in which to memoize alignments and\nstatistics on them. If set to 's3://BUCKET/PATH', it\nwill save to the S3 bucket if boto3 and botocore are\ninstalled and access key information exists via\nAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or via AWS\nCLI. If not set, this does not memoize this\ninformation.")), ToolInput(tag="in_sample_seqs", input_type=Int(optional=True), prefix="--sample-seqs", doc=InputDocumentation(doc="After fetching accessions, randomly select SAMPLE_SEQS\nof them with replacement from each taxonomy any move\nforward in the design with these. This is useful for\ntesting and measuring output growth as input size\ngrows, as well as assessing the dispersion in output\nassociated with some input sample.")), ToolInput(tag="in_prep_influenza", input_type=Boolean(optional=True), prefix="--prep-influenza", doc=InputDocumentation(doc="If set, fetch sequences using the NCBI Influenza\ndatabase; should only be used for Influenza A or B\nvirus taxonomies")), ToolInput(tag="in_cover_by_year_decay", input_type=Int(optional=True), prefix="--cover-by-year-decay", doc=InputDocumentation(doc="COVER_BY_YEAR_DECAY\n<A> <B>; if set, group input sequences by year and set\na desired partial cover for each year (fraction of\nsequences that must be covered by guides) as follows:\nAll years >= A receive a desired cover fraction of\nGUIDE_COVER_FRAC for guides (and PRIMER_COVER_FRAC for\nprimers). Each preceding year receives a desired cover\nfraction that decays by B -- i.e., year n is given\nB*(desired cover fraction of year n+1).")), ToolInput(tag="in_cluster_threshold", input_type=Int(optional=True), prefix="--cluster-threshold", doc=InputDocumentation(doc="Maximum inter-cluster distance to use when clustering\ninput sequences prior to alignment. Expressed as\naverage nucleotide dissimilarity (1-ANI, where ANI is\naverage nucleotide identity); higher values result in\nfewer clusters")), ToolInput(tag="in_use_accessions", input_type=File(optional=True), prefix="--use-accessions", doc=InputDocumentation(doc="If set, use specified accessions instead of fetching\nneighbors for the given taxonomic ID(s). This provides\na path to a TSV file with 3 columns: (1) a taxonomic\nID; (2) segment label, or 'None' if unsegmented; (3)\naccession. Each row specifies an accession to use in\nthe input, and values for columns 1 and 2 can appear\nin multiple rows.")), ToolInput(tag="in_use_fast_a", input_type=File(optional=True), prefix="--use-fasta", doc=InputDocumentation(doc="If set, use sequences in fasta instead of fetching\nneighbors for the given taxonomic ID(s). This provides\na path to a TSV file with 3 columns: (1) a taxonomic\nID; (2) segment label, or 'None' if unsegmented; (3)\npath to FASTA.")), ToolInput(tag="in_only_design_for", input_type=File(optional=True), prefix="--only-design-for", doc=InputDocumentation(doc="If set, only design for given taxonomies. This\nprovides a path to a TSV file with 2 columns: (1) a\ntaxonomic ID; (2) segment label, or 'None' if\nunsegmented")), ToolInput(tag="in_tax_a_to_ignore_for_specificity", input_type=File(optional=True), prefix="--taxa-to-ignore-for-specificity", doc=InputDocumentation(doc="If set, specify which taxa should be ignored when\nenforcing specificity while designing for other taxa.\nThis provides a path to a TSV file with 2 columns: (1)\na taxonomic ID A; (2) a taxonomic ID B such that B\nshould be ignored when determining specificity for A.\nWhen designing for A, this masks taxonomy B from all\nspecificity queries. This is useful, e.g., if B is a\nsubset of A.")), ToolInput(tag="in_ncbi_api_key", input_type=String(optional=True), prefix="--ncbi-api-key", doc=InputDocumentation(doc="API key to use for NCBI e-utils. Using this increases\nthe limit on requests/second and may prevent an IP\naddress from being blocked due to too many requests")), ToolInput(tag="in_aws_access_key_id", input_type=Int(optional=True), prefix="--aws-access-key-id", doc=InputDocumentation(doc="User Account Access Key for AWS. This is only\nnecessary if using S3 for memoization via\nPREP_MEMOIZE_DIR and AWS CLI is not installed and\nconfigured.")), ToolInput(tag="in_aws_secret_access_key", input_type=Int(optional=True), prefix="--aws-secret-access-key", doc=InputDocumentation(doc="User Account Secret Access Key for AWS. This is only\nnecessary if using S3 for memoization via\nPREP_MEMOIZE_DIR and AWS CLI is not installed and\nconfigured.")), ToolInput(tag="in_ref_accs", input_type=Array(t=String(), optional=True), prefix="--ref-accs", doc=InputDocumentation(doc="Accession(s) of reference sequence(s) to use for\ncuration (comma-separated). If not set, ADAPT will\nautomatically get accessions for reference sequences\nfrom NCBI based on the taxonomic ID")), ToolInput(tag="in_metadata_filter", input_type=Array(t=String(), optional=True), prefix="--metadata-filter", doc=InputDocumentation(doc="Only include accessions of specified taxonomic ID that\nmatch this metadata in the design. Metadata options\nare year, taxid, and country. Format as\n'metadata=value' or 'metadata!=value'. Separate\nmultiple values with commas and different metadata\nfilters with spaces (e.g. '--metadata-filter\nyear!=2020,2019 taxid=11060')")), ToolInput(tag="in_specific_against_metadata_filter", input_type=Array(t=String(), optional=True), prefix="--specific-against-metadata-filter", doc=InputDocumentation(doc="Only include accessions of the specified taxonomic ID\nthat do not match this metadata in the design, and be\nspecific against any accession that does match this\nmetadata. Metadata options are year, taxid, and\ncountry. Format as 'metadata=value' or\n'metadata!=value'. Separate multiple values with\ncommas and different metadata filters with spaces\n(e.g. '--specific-against-metadata-filter\nyear!=2020,2019 taxid=11060')")), ToolInput(tag="in_write_input_seqs", input_type=File(optional=True), prefix="--write-input-seqs", doc=InputDocumentation(doc="Path to a file to which to write the sequences\n(accession.version) being used as input for design")), ToolInput(tag="in_write_input_aln", input_type=Int(optional=True), prefix="--write-input-aln", doc=InputDocumentation(doc="Prefix of path to files to which to write the\nalignments being used as input for design; filenames\nare 'WRITE_INPUT_ALN.[cluster-number]'\n")), ToolInput(tag="in_var_48", input_type=String(), position=0, doc=InputDocumentation(doc="[--prep-memoize-dir PREP_MEMOIZE_DIR]")), ToolInput(tag="in_tax_id", input_type=String(), position=0, doc=InputDocumentation(doc="Taxonomic (e.g., species) ID from NCBI")), ToolInput(tag="in_segment", input_type=String(), position=1, doc=InputDocumentation(doc="Label of segment (e.g., 'S') if there is one, or\n'None' if unsegmented")), ToolInput(tag="in_out_tsv", input_type=String(), position=2, doc=InputDocumentation(doc="Path to output TSVs, with one per cluster; output TSVs\nare OUT_TSV.{cluster-number}"))], outputs=[], container="quay.io/biocontainers/adapt:1.2.0--py_0", version="v0.1.0")


if __name__ == "__main__":
    # or "cwl"
    Design_Py_Sliding_Window_Auto_From_Args_V0_1_0().translate("wdl")

コード例 #9
0
 def argtypes(self):
     return [Array(AnyType), Int]
コード例 #10
0
ファイル: selectors.py プロジェクト: xinzhel97/janis-core
 def returntype(self):
     return Array(Union[File, Directory])
コード例 #11
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
 def argtypes(self):
     return [Array(UnionType(AnyType)), String]
コード例 #12
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
 def returntype(self):
     return Array(String)
コード例 #13
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
 def argtypes(self):
     return [String, Array(AnyType)]
コード例 #14
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
 def returntype(self):
     return Array(self.args[0].returntype().subtype().subtype())
コード例 #15
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
 def returntype(self):
     return Array(Int())
コード例 #16
0
ファイル: standard.py プロジェクト: xinzhel97/janis-core
 def returntype(self):
     return Array(Array(AnyType))