def inputs(self) -> List[ToolInput]: return [ ToolInput("vcf", Vcf(optional=True), position=1, shell_quote=False), ToolInput( "compressedTabixVcf", VcfTabix(optional=True), position=1, shell_quote=False, ), ToolInput( "compressedVcf", CompressedVcf(optional=True), position=1, shell_quote=False, ), ToolInput( "reference", FastaWithDict(), prefix="-r", position=4, shell_quote=False, ), ToolInput( "outputFilename", Filename(extension=".vcf", suffix=".norm"), position=6, prefix="-o", shell_quote=False, ), ]
def outputs(self): return [ ToolOutput( "out", CompressedVcf(), glob=InputSelector("outputFilename"), ) ]
def inputs(self): return [ ToolInput("vcf", Array(CompressedVcf()), position=15), ToolInput( "outputFilename", Filename(extension=".vcf.gz"), prefix="-o", doc="--output: When output consists of a single stream, " "write it to FILE rather than to standard output, where it is written by default.", ), *self.additional_args, ]
def inputs(self) -> List[ToolInput]: return [ ToolInput("vcf", CompressedVcf(), position=3, shell_quote=False), ToolInput("reference", FastaWithDict(), prefix="-r", position=8, shell_quote=False), ToolInput( "outputFilename", Filename(extension=".vcf", suffix=".norm"), prefix=">", position=10, shell_quote=False, ), ]
def tests(self): remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data" return [ TTestCase( name="basic", input={ "outputType": "z", "vcf": f"{remote_dir}/NA12878-BRCA1.generated.gathered.vcf.gz", }, output=CompressedVcf.basic_test( "out", 11602, 221, ["GATKCommandLine"], "fcc35adbb0624abc91f6de2e9042f749", ), ) ]
def tests(self): remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data" return [ TTestCase( name="basic", input={ "file": f"{remote_dir}/NA12878-BRCA1.generated.gathered.vcf", }, output=CompressedVcf.basic_test( "out", 11500, 221, ["GATKCommandLine"], "b7acb0a9900713cc7da7aeed5160c971", ), ) ]
def tests(self): return [ TTestCase( name="basic", input={ "file": os.path.join( BioinformaticsTool.test_data_path(), "wgsgermline_data", "NA12878-BRCA1.generated.gathered.vcf", ), }, output=CompressedVcf.basic_test( "out", 11500, 221, ["GATKCommandLine"], "b7acb0a9900713cc7da7aeed5160c971", ), ) ]
def tests(self): return [ TTestCase( name="basic", input={ "outputType": "z", "vcf": os.path.join( BioinformaticsTool.test_data_path(), "wgsgermline_data", "NA12878-BRCA1.generated.gathered.vcf.gz", ), }, output=CompressedVcf.basic_test( "out", 11602, 221, ["GATKCommandLine"], "fcc35adbb0624abc91f6de2e9042f749", ), ) ]
def inputs(self): return [ ToolInput("vcf", CompressedVcf, position=3), ToolInput( "truth", CompressedVcf(), prefix="-t", doc="use this VCF as ground truth for ROC generation", ), ToolInput( "windowSize", Int(optional=True), prefix="-w", default=30, doc="compare records up to this many bp away (default 30)", ), ToolInput("reference", FastaWithDict, prefix="-r", doc="FASTA reference file"), ]
def inputs(self) -> List[ToolInput]: return [ ToolInput( "inp", CompressedVcf(), position=8, localise_file=True, doc="File from which to create the index. The input data file must be position sorted and " "compressed by bgzip which has a gzip(1) like interface.", ), ToolInput( "preset", String(optional=True), prefix="--preset", position=2, doc="-p: Input format for indexing. Valid values are: gff, bed, sam, vcf. This option should " "not be applied together with any of -s, -b, -e, -c and -0; it is not used for data " "retrieval because this setting is stored in the index file. [gff]", default="vcf", ), *self.additional_args, ]
def inputs(self) -> List[ToolInput]: return [ ToolInput( "inputFile", CompressedVcf(), prefix="--input_file", doc="Input file name. Can use compressed file (gzipped).", ), ToolInput( "outputFilename", Filename( prefix=InputSelector("inputFile", remove_file_extension=True), extension=".vcf", ), prefix="--output_file", doc="(-o) Output file name. Results can write to STDOUT by specifying " ' as the output file name - this will force quiet mode. Default = "variant_effect_output.txt"', ), ToolInput( "vcf", Boolean(), default=True, prefix="--vcf", doc="Writes output in VCF format. Consequences are added in the INFO field of the VCF file, using the " 'key "CSQ". Data fields are encoded separated by "|"; the order of fields is written in the VCF header.' ' Output fields in the "CSQ" INFO field can be selected by using --fields. If the input format was VCF,' " the file will remain unchanged save for the addition of the CSQ field (unless using any filtering). " "Custom data added with --custom are added as separate fields, using the key specified for each data " "file. Commas in fields are replaced with ampersands (&) to preserve VCF format.", ), # ToolInput('plugin', [PLUGINS](optional=True), prefix='--plugin', # doc='Use named plugin. Plugin modules should be installed in the Plugins subdirectory of the VEP cache directory (defaults to $HOME/.vep/). Multiple plugins can be used by supplying the --plugin flag multiple times. See plugin documentation. Not used by default'), ToolInput( "help", Boolean(optional=True), prefix="--help", doc="Display help message and quit", ), ToolInput( "quiet", Boolean(optional=True), prefix="--quiet", doc="(-q) Suppress warning messages.Not used by default", ), ToolInput( "verbose", Boolean(optional=True), prefix="--verbose", doc="(-v) Print out a bit more information while running. Not used by default", ), ToolInput( "config", File(optional=True), prefix="--config", doc="""Load configuration options from a config file. The config file should consist of whitespace-separated pairs of option names and settings e.g.: output_file my_output.txt species mus_musculus format vcf host useastdb.ensembl.org A config file can also be implicitly read; save the file as $HOME/.vep/vep.ini (or equivalent directory if using --dir). Any options in this file will be overridden by those specified in a config file using --config, and in turn by any options specified on the command line. You can create a quick version file of this by setting the flags as normal and running VEP in verbose (-v) mode. This will output lines that can be copied to a config file that can be loaded in on the next run using --config. Not used by default""", ), ToolInput( "everything", Boolean(optional=True), prefix="--everything", doc="(-e) Shortcut flag to switch on all of the following: --sift b, --polyphen b, --ccds, " "--uniprot, --hgvs, --symbol, --numbers, --domains, --regulatory, --canonical, --protein, " "--biotype, --uniprot, --tsl, --appris, --gene_phenotype --af, --af_1kg, --af_esp, " "--af_gnomad, --max_af, --pubmed, --variant_class, --mane", ), ToolInput( "species", String(optional=True), prefix="--species", doc='Species for your data. This can be the latin name e.g. "homo_sapiens" or any Ensembl alias e.g. ' '"mouse". Specifying the latin name can speed up initial database connection as the registry does ' 'not have to load all available database aliases on the server. Default = "homo_sapiens"', ), ToolInput( "assembly", String(optional=True), prefix="--assembly", doc="""(-a) Select the assembly version to use if more than one available. If using the cache, you must have the appropriate assembly's cache file installed. If not specified and you have only 1 assembly version installed, this will be chosen by default. Default = use found assembly version""", ), ToolInput( "inputData", String(optional=True), prefix="--input_data", doc="(--id) Raw input data as a string. May be used, for example, to input a single rsID or HGVS " "notation quickly to vep: --input_data rs699", ), ToolInput( "format", String(optional=True), prefix="--format", doc='Input file format - one of "ensembl", "vcf", "hgvs", "id", "region", "spdi". By default, ' "VEP auto-detects the input file format. Using this option you can specify the input file is " "Ensembl, VCF, IDs, HGVS, SPDI or region format. Can use compressed version (gzipped) of any " "file format listed above. Auto-detects format by default", ), ToolInput( "forceOverwrite", Boolean(optional=True), prefix="--force_overwrite", doc="(--force) By default, VEP will fail with an error if the output file already exists. You can " "force the overwrite of the existing file by using this flag. Not used by default", ), ToolInput( "statsFile", String(optional=True), default="variant_effect_output.txt_summary.html", prefix="--stats_file", doc="(--sf) Summary stats file name. This is an HTML file containing a summary of the VEP run - the " 'file name must end ".htm" or ".html". Default = "variant_effect_output.txt_summary.html"', ), ToolInput( "noStats", Boolean(optional=True), prefix="--no_stats", doc="""Don\'t generate a stats file. Provides marginal gains in run time.""", ), ToolInput( "statsText", Boolean(optional=True), prefix="--stats_text", doc="Generate a plain text stats file in place of the HTML.", ), ToolInput( "warningFile", Filename(suffix="warning", extension=".txt"), prefix="--warning_file", doc="File name to write warnings and errors to. Default = STDERR (standard error)", ), ToolInput( "maxSvSize", Boolean(optional=True), prefix="--max_sv_size", doc="Extend the maximum Structural Variant size VEP can process.", ), ToolInput( "noCheckVariantsOrder", Boolean(optional=True), prefix="--no_check_variants_order", doc="Permit the use of unsorted input files. However running VEP on unsorted input files slows down " "the tool and requires more memory.", ), ToolInput( "fork", Int(optional=True), default=CpuSelector(), prefix="--fork", doc="Enable forking, using the specified number of forks. Forking can dramatically improve runtime. " "Not used by default", ), ToolInput( "custom", Array(BedTabix, optional=True), prefix="--custom", prefix_applies_to_all_elements=True, doc="Add custom annotation to the output. Files must be tabix indexed or in the bigWig format. " "Multiple files can be specified by supplying the --custom flag multiple times. " "See https://asia.ensembl.org/info/docs/tools/vep/script/vep_custom.html for full details. " "Not used by default", ), ToolInput( "gff", File(optional=True), prefix="--gff", doc="Use GFF transcript annotations in [filename] as an annotation source. " "Requires a FASTA file of genomic sequence.Not used by default", ), ToolInput( "gtf", File(optional=True), prefix="--gtf", doc="Use GTF transcript annotations in [filename] as an annotation source. " "Requires a FASTA file of genomic sequence.Not used by default", ), ToolInput( "bam", Bam(optional=True), prefix="--bam", doc="ADVANCED Use BAM file of sequence alignments to correct transcript models not derived from " "reference genome sequence. Used to correct RefSeq transcript models. " "Enables --use_transcript_ref; add --use_given_ref to override this behaviour. Not used by default", ), ToolInput( "useTranscriptRef", Boolean(optional=True), prefix="--use_transcript_ref", doc="By default VEP uses the reference allele provided in the input file to calculate consequences " "for the provided alternate allele(s). Use this flag to force VEP to replace the provided " "reference allele with sequence derived from the overlapped transcript. This is especially " "relevant when using the RefSeq cache, see documentation for more details. The GIVEN_REF and " "USED_REF fields are set in the output to indicate any change. Not used by default", ), ToolInput( "useGivenRef", Boolean(optional=True), prefix="--use_given_ref", doc="Using --bam or a BAM-edited RefSeq cache by default enables --use_transcript_ref; add this flag " "to override this behaviour and use the provided reference allele from the input. Not used by default", ), ToolInput( "customMultiAllelic", Boolean(optional=True), prefix="--custom_multi_allelic", doc="By default, comma separated lists found within the INFO field of custom annotation VCFs are " "assumed to be allele specific. For example, a variant with allele_string A/G/C with associated " 'custom annotation "single,double,triple" will associate triple with C, double with G and single ' "with A. This flag instructs VEP to return all annotations for all alleles. Not used by default", ), ToolInput( "tab", Boolean(optional=True), prefix="--tab", doc="Writes output in tab-delimited format. Not used by default", ), ToolInput( "json", Boolean(optional=True), prefix="--json", doc="Writes output in JSON format. Not used by default", ), ToolInput( "compressOutput", String(optional=True), default="bgzip", prefix="--compress_output", doc="Writes output compressed using either gzip or bgzip. Not used by default", ), ToolInput( "fields", Array(String, optional=True), prefix="--fields", doc="""Configure the output format using a comma separated list of fields. Can only be used with tab (--tab) or VCF format (--vcf) output. For the tab format output, the selected fields may be those present in the default output columns, or any of those that appear in the Extra column (including those added by plugins or custom annotations). Output remains tab-delimited. For the VCF format output, the selected fields are those present within the ""CSQ"" INFO field. Example of command for the tab output: --tab --fields ""Uploaded_variation,Location,Allele,Gene"" Example of command for the VCF format output: --vcf --fields ""Allele,Consequence,Feature_type,Feature"" Not used by default""", ), ToolInput( "minimal", Boolean(optional=True), prefix="--minimal", doc="Convert alleles to their most minimal representation before consequence calculation i.e. " "sequence that is identical between each pair of reference and alternate alleles is trimmed " "off from both ends, with coordinates adjusted accordingly. Note this may lead to discrepancies " "between input coordinates and coordinates reported by VEP relative to transcript sequences; " "to avoid issues, use --allele_number and/or ensure that your input variants have unique " "identifiers. The MINIMISED flag is set in the VEP output where relevant. Not used by default", ), ToolInput( "variantClass", Boolean(optional=True), prefix="--variant_class", doc="Output the Sequence Ontology variant class. Not used by default", ), ToolInput( "sift", String(optional=True), prefix="--sift", doc="Species limited SIFT predicts whether an amino acid substitution affects protein function based " "on sequence homology and the physical properties of amino acids. VEP can output the prediction " "term, score or both. Not used by default", ), ToolInput( "polyphen", String(optional=True), prefix="--polyphen", doc="Human only PolyPhen is a tool which predicts possible impact of an amino acid substitution on " "the structure and function of a human protein using straightforward physical and comparative " "considerations. VEP can output the prediction term, score or both. VEP uses the humVar score " "by default - use --humdiv to retrieve the humDiv score. Not used by default", ), ToolInput( "humdiv", Boolean(optional=True), prefix="--humdiv", doc="Human only Retrieve the humDiv PolyPhen prediction instead of the default humVar. " "Not used by default", ), ToolInput( "nearest", String(optional=True), prefix="--nearest", doc="""Retrieve the transcript or gene with the nearest protein-coding transcription start site (TSS) to each input variant. Use ""transcript"" to retrieve the transcript stable ID, ""gene"" to retrieve the gene stable ID, or ""symbol"" to retrieve the gene symbol. Note that the nearest TSS may not belong to a transcript that overlaps the input variant, and more than one may be reported in the case where two are equidistant from the input coordinates. Currently only available when using a cache annotation source, and requires the Set::IntervalTree perl module. Not used by default""", ), ToolInput( "distance", Array(Int, optional=True), separator=",", prefix="--distance", doc="Modify the distance up and/or downstream between a variant and a transcript for which VEP will assign the upstream_gene_variant or downstream_gene_variant consequences. Giving one distance will modify both up- and downstream distances; prodiving two separated by commas will set the up- (5') and down - (3') stream distances respectively. Default: 5000", ), ToolInput( "overlaps", Boolean(optional=True), prefix="--overlaps", doc="Report the proportion and length of a transcript overlapped by a structural variant in VCF format.", ), ToolInput( "genePhenotype", Boolean(optional=True), prefix="--gene_phenotype", doc="Indicates if the overlapped gene is associated with a phenotype, disease or trait. See list of phenotype sources. Not used by default", ), ToolInput( "regulatory", Boolean(optional=True), prefix="--regulatory", doc="Look for overlaps with regulatory regions. VEP can also report if a variant falls in a high information position within a transcription factor binding site. Output lines have a Feature type of RegulatoryFeature or MotifFeature. Not used by default", ), ToolInput( "cellType", Boolean(optional=True), prefix="--cell_type", doc="Report only regulatory regions that are found in the given cell type(s). Can be a single cell type or a comma-separated list. The functional type in each cell type is reported under CELL_TYPE in the output. To retrieve a list of cell types, use --cell_type list. Not used by default", ), ToolInput( "individual", Array(String, optional=True), prefix="--individual", separator=",", doc='Consider only alternate alleles present in the genotypes of the specified individual(s). May be a single individual, a comma-separated list or "all" to assess all individuals separately. Individual variant combinations homozygous for the given reference allele will not be reported. Each individual and variant combination is given on a separate line of output. Only works with VCF files containing individual genotype data; individual IDs are taken from column headers. Not used by default', ), ToolInput( "phased", Boolean(optional=True), prefix="--phased", doc="Force VCF genotypes to be interpreted as phased. For use with plugins that depend on phased data. Not used by default", ), ToolInput( "alleleNumber", Boolean(optional=True), prefix="--allele_number", doc="Identify allele number from VCF input, where 1 = first ALT allele, 2 = second ALT allele etc. Useful when using --minimal Not used by default", ), ToolInput( "showRefAllele", Boolean(optional=True), prefix="--show_ref_allele", doc='Adds the reference allele in the output. Mainly useful for the VEP "default" and tab-delimited output formats. Not used by default', ), ToolInput( "totalLength", Boolean(optional=True), prefix="--total_length", doc="Give cDNA, CDS and protein positions as Position/Length. Not used by default", ), ToolInput( "numbers", Boolean(optional=True), prefix="--numbers", doc="Adds affected exon and intron numbering to to output. Format is Number/Total. Not used by default", ), ToolInput( "noEscape", Boolean(optional=True), prefix="--no_escape", doc="Don't URI escape HGVS strings. Default = escape", ), ToolInput( "keepCsq", Boolean(optional=True), prefix="--keep_csq", doc="Don't overwrite existing CSQ entry in VCF INFO field. Overwrites by default", ), ToolInput( "vcfInfoField", String(optional=True), prefix="--vcf_info_field", doc='Change the name of the INFO key that VEP write the consequences to in its VCF output. Use "ANN" for compatibility with other tools such as snpEff. Default: CSQ', ), ToolInput( "terms", String(optional=True), prefix="--terms", doc='(-t) The type of consequence terms to output. The Ensembl terms are described here. The Sequence Ontology is a joint effort by genome annotation centres to standardise descriptions of biological sequences. Default = "SO"', ), ToolInput( "noHeaders", Boolean(optional=True), prefix="--no_headers", doc="Don't write header lines in output files. Default = add headers", ), ToolInput( "hgvs", Boolean(optional=True), prefix="--hgvs", doc="Add HGVS nomenclature based on Ensembl stable identifiers to the output. Both coding and protein sequence names are added where appropriate. To generate HGVS identifiers when using --cache or --offline you must use a FASTA file and --fasta. HGVS notations given on Ensembl identifiers are versioned. Not used by default", ), ToolInput( "hgvsg", Boolean(optional=True), prefix="--hgvsg", doc="Add genomic HGVS nomenclature based on the input chromosome name. To generate HGVS identifiers when using --cache or --offline you must use a FASTA file and --fasta. Not used by default", ), ToolInput( "shiftHgvs", Boolean(optional=True), prefix="--shift_hgvs", doc="""Enable or disable 3\' shifting of HGVS notations. When enabled, this causes ambiguous insertions or deletions (typically in repetetive sequence tracts) to be "shifted" to their most 3' possible coordinates (relative to the transcript sequence and strand) before the HGVS notations are calculated; the flag HGVS_OFFSET is set to the number of bases by which the variant has shifted, relative to the input genomic coordinates. Disabling retains the original input coordinates of the variant. Default: 1 (shift)""", ), ToolInput( "transcriptVersion", Boolean(optional=True), prefix="--transcript_version", doc="Add version numbers to Ensembl transcript identifiers", ), ToolInput( "protein", Boolean(optional=True), prefix="--protein", doc="Add the Ensembl protein identifier to the output where appropriate. Not used by default", ), ToolInput( "symbol", Boolean(optional=True), prefix="--symbol", doc="Adds the gene symbol (e.g. HGNC) (where available) to the output. Not used by default", ), ToolInput( "ccds", Boolean(optional=True), prefix="--ccds", doc="Adds the CCDS transcript identifer (where available) to the output. Not used by default", ), ToolInput( "uniprot", Boolean(optional=True), prefix="--uniprot", doc="Adds best match accessions for translated protein products from three UniProt-related databases (SWISSPROT, TREMBL and UniParc) to the output. Not used by default", ), ToolInput( "tsl", Boolean(optional=True), prefix="--tsl", doc="Adds the transcript support level for this transcript to the output. Not used by default. Note: Only available for human on the GRCh38 assembly", ), ToolInput( "appris", Boolean(optional=True), prefix="--appris", doc="Adds the APPRIS isoform annotation for this transcript to the output. Not used by default. Note: Only available for human on the GRCh38 assembly", ), ToolInput( "canonical", Boolean(optional=True), prefix="--canonical", doc="Adds a flag indicating if the transcript is the canonical transcript for the gene. Not used by default", ), ToolInput( "mane", Boolean(optional=True), prefix="--mane", doc="Adds a flag indicating if the transcript is the MANE Select transcript for the gene. Not used by default. Note: Only available for human on the GRCh38 assembly", ), ToolInput( "biotype", Boolean(optional=True), prefix="--biotype", doc="Adds the biotype of the transcript or regulatory feature. Not used by default", ), ToolInput( "domains", Boolean(optional=True), prefix="--domains", doc="Adds names of overlapping protein domains to output. Not used by default", ), ToolInput( "xrefRefseq", Boolean(optional=True), prefix="--xref_refseq", doc="Output aligned RefSeq mRNA identifier for transcript. Not used by default. Note: The RefSeq and Ensembl transcripts aligned in this way MAY NOT, AND FREQUENTLY WILL NOT, match exactly in sequence, exon structure and protein product", ), ToolInput( "synonyms", Tsv(optional=True), prefix="--synonyms", doc="Load a file of chromosome synonyms. File should be tab-delimited with the primary identifier in column 1 and the synonym in column 2. Synonyms allow different chromosome identifiers to be used in the input file and any annotation source (cache, database, GFF, custom file, FASTA file). Not used by default", ), ToolInput( "checkExisting", Boolean(optional=True), prefix="--check_existing", doc="""Checks for the existence of known variants that are co-located with your input. By default the alleles are compared and variants on an allele-specific basis - to compare only coordinates, use --no_check_alleles. Some databases may contain variants with unknown (null) alleles and these are included by default; to exclude them use --exclude_null_alleles. See this page for more details. Not used by default""", ), ToolInput( "checkSvs", Boolean(optional=True), prefix="--check_svs", doc="Checks for the existence of structural variants that overlap your input. Currently requires database access. Not used by default", ), ToolInput( "clinSigAllele", Boolean(optional=True), prefix="--clin_sig_allele", doc="Return allele specific clinical significance. Setting this option to 0 will provide all known clinical significance values at the given locus. Default: 1 (Provide allele-specific annotations)", ), ToolInput( "excludeNullAlleles", Boolean(optional=True), prefix="--exclude_null_alleles", doc="Do not include variants with unknown alleles when checking for co-located variants. Our human database contains variants from HGMD and COSMIC for which the alleles are not publically available; by default these are included when using --check_existing, use this flag to exclude them. Not used by default", ), ToolInput( "noCheckAlleles", Boolean(optional=True), prefix="--no_check_alleles", doc="""When checking for existing variants, by default VEP only reports a co-located variant if none of the input alleles are novel. For example, if your input variant has alleles A/G, and an existing co-located variant has alleles A/C, the co-located variant will not be reported. Strand is also taken into account - in the same example, if the input variant has alleles T/G but on the negative strand, then the co-located variant will be reported since its alleles match the reverse complement of input variant. Use this flag to disable this behaviour and compare using coordinates alone. Not used by default""", ), ToolInput( "af", Boolean(optional=True), prefix="--af", doc="Add the global allele frequency (AF) from 1000 Genomes Phase 3 data for any known co-located variant to the output. For this and all --af_* flags, the frequency reported is for the input allele only, not necessarily the non-reference or derived allele. Not used by default", ), ToolInput( "maxAf", Boolean(optional=True), prefix="--max_af", doc="Report the highest allele frequency observed in any population from 1000 genomes, ESP or gnomAD. Not used by default", ), ToolInput( "af1kg", String(optional=True), prefix="--af_1kg", doc="Add allele frequency from continental populations (AFR,AMR,EAS,EUR,SAS) of 1000 Genomes Phase 3 to the output. Must be used with --cache. Not used by default", ), ToolInput( "afEsp", Boolean(optional=True), prefix="--af_esp", doc="Include allele frequency from NHLBI-ESP populations. Must be used with --cache. Not used by default", ), ToolInput( "afGnomad", Boolean(optional=True), prefix="--af_gnomad", doc="Include allele frequency from Genome Aggregation Database (gnomAD) exome populations. Note only data from the gnomAD exomes are included; to retrieve data from the additional genomes data set, see this guide. Must be used with --cache Not used by default", ), ToolInput( "afExac", Boolean(optional=True), prefix="--af_exac", doc="Include allele frequency from ExAC project populations. Must be used with --cache. Not used by default. Note: ExAC data has been superceded by gnomAD. This flag remains for those wishing to use older cache versions containing ExAC data.", ), ToolInput( "pubmed", Boolean(optional=True), prefix="--pubmed", doc="Report Pubmed IDs for publications that cite existing variant. Must be used with --cache. Not used by default", ), ToolInput( "failed", Boolean(optional=True), prefix="--failed", doc="When checking for co-located variants, by default VEP will exclude variants that have been flagged as failed. Set this flag to include such variants. Default: 0 (exclude)", ), ToolInput( "gencodeBasic", Boolean(optional=True), prefix="--gencode_basic", doc="Limit your analysis to transcripts belonging to the GENCODE basic set. This set has fragmented or problematic transcripts removed. Not used by default", ), ToolInput( "excludePredicted", Boolean(optional=True), prefix="--exclude_predicted", doc='When using the RefSeq or merged cache, exclude predicted transcripts (i.e. those with identifiers beginning with "XM_" or "XR_").', ), ToolInput( "transcriptFilter", Boolean(optional=True), prefix="--transcript_filter", doc='''ADVANCED Filter transcripts according to any arbitrary set of rules. Uses similar notation to filter_vep. You may filter on any key defined in the root of the transcript object; most commonly this will be ""stable_id"": --transcript_filter ""stable_id match N[MR]_""''', ), ToolInput( "checkRef", Boolean(optional=True), prefix="--check_ref", doc="Force VEP to check the supplied reference allele against the sequence stored in the Ensembl Core database or supplied FASTA file. Lines that do not match are skipped. Not used by default", ), ToolInput( "lookupRef", Boolean(optional=True), prefix="--lookup_ref", doc="Force overwrite the supplied reference allele with the sequence stored in the Ensembl Core database or supplied FASTA file. Not used by default", ), ToolInput( "dontSkip", Boolean(optional=True), prefix="--dont_skip", doc="Don't skip input variants that fail validation, e.g. those that fall on unrecognised sequences. Combining --check_ref with --dont_skip will add a CHECK_REF output field when the given reference does not match the underlying reference sequence.", ), ToolInput( "allowNonVariant", Boolean(optional=True), prefix="--allow_non_variant", doc="When using VCF format as input and output, by default VEP will skip non-variant lines of input (where the ALT allele is null). Enabling this option the lines will be printed in the VCF output with no consequence data added.", ), ToolInput( "chr", Array(String, optional=True), prefix="--chr", separator=",", doc='Select a subset of chromosomes to analyse from your file. Any data not on this chromosome in the input will be skipped. The list can be comma separated, with "-" characters representing an interval. For example, to include chromosomes 1, 2, 3, 10 and X you could use --chr 1-3,10,X Not used by default', ), ToolInput( "codingOnly", Boolean(optional=True), prefix="--coding_only", doc="Only return consequences that fall in the coding regions of transcripts. Not used by default", ), ToolInput( "noIntergenic", Boolean(optional=True), prefix="--no_intergenic", doc="Do not include intergenic consequences in the output. Not used by default", ), ToolInput( "pick", Boolean(optional=True), prefix="--pick", doc="Pick once line or block of consequence data per variant, including transcript-specific columns. Consequences are chosen according to the criteria described here, and the order the criteria are applied may be customised with --pick_order. This is the best method to use if you are interested only in one consequence per variant. Not used by default", ), ToolInput( "pickAllele", Boolean(optional=True), prefix="--pick_allele", doc="Like --pick, but chooses one line or block of consequence data per variant allele. Will only differ in behaviour from --pick when the input variant has multiple alternate alleles. Not used by default", ), ToolInput( "perGene", Boolean(optional=True), prefix="--per_gene", doc="Output only the most severe consequence per gene. The transcript selected is arbitrary if more than one has the same predicted consequence. Uses the same ranking system as --pick. Not used by default", ), ToolInput( "pickAlleleGene", Boolean(optional=True), prefix="--pick_allele_gene", doc="Like --pick_allele, but chooses one line or block of consequence data per variant allele and gene combination. Not used by default", ), ToolInput( "flagPick", Boolean(optional=True), prefix="--flag_pick", doc="As per --pick, but adds the PICK flag to the chosen block of consequence data and retains others. Not used by default", ), ToolInput( "flagPickAllele", Boolean(optional=True), prefix="--flag_pick_allele", doc="As per --pick_allele, but adds the PICK flag to the chosen block of consequence data and retains others. Not used by default", ), ToolInput( "flagPickAlleleGene", Boolean(optional=True), prefix="--flag_pick_allele_gene", doc="As per --pick_allele_gene, but adds the PICK flag to the chosen block of consequence data and retains others. Not used by default", ), ToolInput( "pickOrder", Array(String, optional=True), prefix="--pick_order", separator=",", doc="""Customise the order of criteria (and the list of criteria) applied when choosing a block of annotation data with one of the following options: --pick, --pick_allele, --per_gene, --pick_allele_gene, --flag_pick, --flag_pick_allele, --flag_pick_allele_gene. See this page for the default order. Valid criteria are: [ canonical appris tsl biotype ccds rank length mane ]. e.g.: --pick --pick_order tsl,appris,rank""", ), ToolInput( "mostSevere", Boolean(optional=True), prefix="--most_severe", doc="Output only the most severe consequence per variant. Transcript-specific columns will be left blank. Consequence ranks are given in this table. To include regulatory consequences, use the --regulatory option in combination with this flag. Not used by default", ), ToolInput( "summary", Boolean(optional=True), prefix="--summary", doc="Output only a comma-separated list of all observed consequences per variant. Transcript-specific columns will be left blank. Not used by default", ), ToolInput( "filterCommon", Boolean(optional=True), prefix="--filter_common", doc="Shortcut flag for the filters below - this will exclude variants that have a co-located existing variant with global AF > 0.01 (1%). May be modified using any of the following freq_* filters. Not used by default", ), ToolInput( "checkFrequency", Boolean(optional=True), prefix="--check_frequency", doc="Turns on frequency filtering. Use this to include or exclude variants based on the frequency of co-located existing variants in the Ensembl Variation database. You must also specify all of the --freq_* flags below. Frequencies used in filtering are added to the output under the FREQS key in the Extra field. Not used by default", ), ToolInput( "freqPop", String(optional=True), prefix="--freq_pop", doc="Name of the population to use in frequency filter. This must be one of the following: (1KG_ALL, 1KG_AFR, 1KG_AMR, 1KG_EAS, 1KG_EUR, 1KG_SAS, AA, EA, gnomAD, gnomAD_AFR, gnomAD_AMR, gnomAD_ASJ, gnomAD_EAS, gnomAD_FIN, gnomAD_NFE, gnomAD_OTH, gnomAD_SAS)", ), ToolInput( "freqFreq", Float(optional=True), prefix="--freq_freq", doc="Allele frequency to use for filtering. Must be a float value between 0 and 1", ), ToolInput( "freqGtLt", String(optional=True), prefix="--freq_gt_lt", doc="Specify whether the frequency of the co-located variant must be greater than (gt) or less than (lt) the value specified with --freq_freq", ), ToolInput( "freqFilter", String(optional=True), prefix="--freq_filter", doc="Specify whether to exclude or include only variants that pass the frequency filter", ), # CADD plugin ToolInput("caddReference", Array(VcfTabix, optional=True)), # Condel ToolInput( "condelConfig", Directory(optional=True), doc="Directory containing CondelPlugin config, in format: '<dir>/condel_SP.conf'", ), # dbNSFP ToolInput("dbnspReference", VcfTabix(optional=True), doc=""), ToolInput("dbsnpColumns", Array(String, optional=True)), # REVEL ToolInput("revelReference", VcfTabix(optional=True)), # CUSTOM ToolInput("custom1Reference", VcfTabix(optional=True)), ToolInput("custom1Columns", Array(String, optional=True)), ToolInput("custom2Reference", VcfTabix(optional=True)), ToolInput("custom2Columns", Array(String, optional=True)), ]
def inputs(self): return [ *super().inputs(), ToolInput( tag="outputFilename", input_type=Filename( prefix=InputSelector("variant"), suffix=".filtered", extension=".vcf", ), prefix="--output", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-O) File to which variants should be written Required."), ), ToolInput( tag="variant", input_type=CompressedVcf(), prefix="--variant", separate_value_from_prefix=True, doc=InputDocumentation( doc="(-V) A VCF file containing variants Required."), ), ToolInput( tag="addOutputSamProgramRecord", input_type=Boolean(optional=True), prefix="--add-output-sam-program-record", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-add-output-sam-program-record) If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false} " ), ), ToolInput( tag="addOutputVcfCommandLine", input_type=Boolean(optional=True), prefix="--add-output-vcf-command-line", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-add-output-vcf-command-line) If true, adds a command line header line to created VCF files. Default value: true. Possible values: {true, false} " ), ), ToolInput( tag="arguments_file", input_type=File(optional=True), prefix="--arguments_file", separate_value_from_prefix=True, doc=InputDocumentation( doc= "read one or more arguments files and add them to the command line This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="cloudIndexPrefetchBuffer", input_type=Int(optional=True), prefix="--cloud-index-prefetch-buffer", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-CIPB) Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1. " ), ), ToolInput( tag="cloudPrefetchBuffer", input_type=Int(optional=True), prefix="--cloud-prefetch-buffer", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-CPB) Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40. " ), ), ToolInput( tag="clusterSize", input_type=Int(optional=True), prefix="--cluster-size", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-cluster) The number of SNPs which make up a cluster. Must be at least 2 Default value: 3. " ), ), ToolInput( tag="clusterWindowSize", input_type=Int(optional=True), prefix="--cluster-window-size", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-window) The window size (in bases) in which to evaluate clustered SNPs Default value: 0. " ), ), ToolInput( tag="createOutputBamIndex", input_type=Boolean(optional=True), prefix="--create-output-bam-index", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-OBI) If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false} " ), ), ToolInput( tag="createOutputBamMd5", input_type=Boolean(optional=True), prefix="--create-output-bam-md5", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-OBM) If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="createOutputVariantIndex", input_type=Boolean(optional=True), prefix="--create-output-variant-index", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-OVI) If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false} " ), ), ToolInput( tag="createOutputVariantMd5", input_type=Boolean(optional=True), prefix="--create-output-variant-md5", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-OVM) If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="disableBamIndexCaching", input_type=Boolean(optional=True), prefix="--disable-bam-index-caching", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-DBIC) If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="disableReadFilter", input_type=String(optional=True), prefix="--disable-read-filter", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-DF) Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null. Possible Values: {WellformedReadFilter}" ), ), ToolInput( tag="disableSequenceDictionaryValidation", input_type=Boolean(optional=True), prefix="--disable-sequence-dictionary-validation", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-disable-sequence-dictionary-validation) If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="excludeIntervals", input_type=Boolean(optional=True), prefix="--exclude-intervals", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-XL) This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="filterExpression", input_type=Array(String, optional=True), prefix="--filter-expression", separate_value_from_prefix=True, prefix_applies_to_all_elements=True, doc=InputDocumentation( doc= "(-filter) One or more expressions used with INFO fields to filter This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="filterName", input_type=Array(String(optional=True)), prefix="--filter-name", separate_value_from_prefix=True, prefix_applies_to_all_elements=True, doc=InputDocumentation( doc= "Names to use for the list of filters This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="filterNotInMask", input_type=Boolean(optional=True), prefix="--filter-not-in-mask", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Filter records NOT in given input mask. Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="gatkConfigFile", input_type=String(optional=True), prefix="--gatk-config-file", separate_value_from_prefix=True, doc=InputDocumentation( doc= "A configuration file to use with the GATK. Default value: null." ), ), ToolInput( tag="gcsMaxRetries", input_type=Int(optional=True), prefix="--gcs-max-retries", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-gcs-retries) If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection Default value: 20. " ), ), ToolInput( tag="gcsProjectForRequesterPays", input_type=String(optional=True), prefix="--gcs-project-for-requester-pays", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Project to bill when accessing 'requester pays' buckets. If unset, these buckets cannot be accessed. Default value: . " ), ), ToolInput( tag="genotypeFilterExpression", input_type=String(optional=True), prefix="--genotype-filter-expression", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-G-filter) One or more expressions used with FORMAT (sample/genotype-level) fields to filter (see documentation guide for more info) This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="genotypeFilterName", input_type=String(optional=True), prefix="--genotype-filter-name", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-G-filter-name) Names to use for the list of sample/genotype filters (must be a 1-to-1 mapping); this name is put in the FILTER field for variants that get filtered This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="help", input_type=Boolean(optional=True), prefix="--help", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-h) display the help message Default value: false. Possible values: {true, false}" ), ), ToolInput( tag="inp", input_type=String(optional=True), prefix="--input", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-I) BAM/SAM/CRAM file containing reads This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="intervalExclusionPadding", input_type=Int(optional=True), prefix="--interval-exclusion-padding", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-ixp) Amount of padding (in bp) to add to each interval you are excluding. Default value: 0. " ), ), ToolInput( tag="intervalMergingRule", input_type=Boolean(optional=True), prefix="--interval-merging-rule", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-imr) Interval merging rule for abutting intervals Default value: ALL. Possible values: {ALL, OVERLAPPING_ONLY} " ), ), ToolInput( tag="intervalPadding", input_type=Boolean(optional=True), prefix="--interval-padding", separate_value_from_prefix=True, doc=InputDocumentation(doc="(-ip) Default value: 0."), ), ToolInput( tag="intervalSetRule", input_type=Boolean(optional=True), prefix="--interval-set-rule", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-isr) Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION} " ), ), ToolInput( tag="intervals", input_type=String(optional=True), prefix="--intervals", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-L) One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="invalidatePreviousFilters", input_type=Boolean(optional=True), prefix="--invalidate-previous-filters", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Remove previous filters applied to the VCF Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="invertFilterExpression", input_type=Boolean(optional=True), prefix="--invert-filter-expression", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-invfilter) Invert the selection criteria for --filter-expression Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="invertGenotypeFilterExpression", input_type=Boolean(optional=True), prefix="--invert-genotype-filter-expression", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-invG-filter) Invert the selection criteria for --genotype-filter-expression Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="lenient", input_type=Boolean(optional=True), prefix="--lenient", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-LE) Lenient processing of VCF files Default value: false. Possible values: {true, false}" ), ), ToolInput( tag="mask", input_type=Boolean(optional=True), prefix="--mask", separate_value_from_prefix=True, doc=InputDocumentation( doc="(-mask) Input mask Default value: null."), ), ToolInput( tag="maskExtension", input_type=Int(optional=True), prefix="--mask-extension", separate_value_from_prefix=True, doc=InputDocumentation( doc= "How many bases beyond records from a provided 'mask' should variants be filtered Default value: 0. " ), ), ToolInput( tag="maskName", input_type=String(optional=True), prefix="--mask-name", separate_value_from_prefix=True, doc=InputDocumentation( doc= "The text to put in the FILTER field if a 'mask' is provided and overlaps with a variant call Default value: Mask. " ), ), ToolInput( tag="missingValuesEvaluateAsFailing", input_type=Boolean(optional=True), prefix="--missing-values-evaluate-as-failing", separate_value_from_prefix=True, doc=InputDocumentation( doc= " When evaluating the JEXL expressions, missing values should be considered failing the expression Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="quiet", input_type=Boolean(optional=True), prefix="--QUIET", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="readFilter", input_type=String(optional=True), prefix="--read-filter", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-RF) Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null. Possible Values: {AlignmentAgreesWithHeaderReadFilter, AllowAllReadsReadFilter, AmbiguousBaseReadFilter, CigarContainsNoNOperator, FirstOfPairReadFilter, FragmentLengthReadFilter, GoodCigarReadFilter, HasReadGroupReadFilter, IntervalOverlapReadFilter, LibraryReadFilter, MappedReadFilter, MappingQualityAvailableReadFilter, MappingQualityNotZeroReadFilter, MappingQualityReadFilter, MatchingBasesAndQualsReadFilter, MateDifferentStrandReadFilter, MateOnSameContigOrNoMappedMateReadFilter, MateUnmappedAndUnmappedReadFilter, MetricsReadFilter, NonChimericOriginalAlignmentReadFilter, NonZeroFragmentLengthReadFilter, NonZeroReferenceLengthAlignmentReadFilter, NotDuplicateReadFilter, NotOpticalDuplicateReadFilter, NotSecondaryAlignmentReadFilter, NotSupplementaryAlignmentReadFilter, OverclippedReadFilter, PairedReadFilter, PassesVendorQualityCheckReadFilter, PlatformReadFilter, PlatformUnitReadFilter, PrimaryLineReadFilter, ProperlyPairedReadFilter, ReadGroupBlackListReadFilter, ReadGroupReadFilter, ReadLengthEqualsCigarLengthReadFilter, ReadLengthReadFilter, ReadNameReadFilter, ReadStrandFilter, SampleReadFilter, SecondOfPairReadFilter, SeqIsStoredReadFilter, SoftClippedReadFilter, ValidAlignmentEndReadFilter, ValidAlignmentStartReadFilter, WellformedReadFilter}" ), ), ToolInput( tag="readIndex", input_type=String(optional=True), prefix="--read-index", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-read-index) Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null. " ), ), ToolInput( tag="readValidationStringency", input_type=Boolean(optional=True), prefix="--read-validation-stringency", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-VS) Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT} " ), ), ToolInput( tag="reference", input_type=FastaWithIndexes(optional=True), prefix="--reference", separate_value_from_prefix=True, doc=InputDocumentation( doc="(-R) Reference sequence Default value: null."), ), ToolInput( tag="secondsBetweenProgressUpdates", input_type=Double(optional=True), prefix="--seconds-between-progress-updates", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-seconds-between-progress-updates) Output traversal statistics every time this many seconds elapse Default value: 10.0. " ), ), ToolInput( tag="sequenceDictionary", input_type=String(optional=True), prefix="--sequence-dictionary", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-sequence-dictionary) Use the given sequence dictionary as the master/canonical sequence dictionary. Must be a .dict file. Default value: null. " ), ), ToolInput( tag="setFilteredGenotypeToNoCall", input_type=Boolean(optional=True), prefix="--set-filtered-genotype-to-no-call", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Set filtered genotypes to no-call Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="sitesOnlyVcfOutput", input_type=Boolean(optional=True), prefix="--sites-only-vcf-output", separate_value_from_prefix=True, doc=InputDocumentation( doc= " If true, don't emit genotype fields when writing vcf file output. Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="tmpDir", input_type=Boolean(optional=True), prefix="--tmp-dir", separate_value_from_prefix=True, doc=InputDocumentation( doc="Temp directory to use. Default value: null."), ), ToolInput( tag="useJdkDeflater", input_type=Boolean(optional=True), prefix="--use-jdk-deflater", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-jdk-deflater) Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="useJdkInflater", input_type=Boolean(optional=True), prefix="--use-jdk-inflater", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-jdk-inflater) Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="verbosity", input_type=Boolean(optional=True), prefix="--verbosity", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-verbosity) Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG} " ), ), ToolInput( tag="version", input_type=Boolean(optional=True), prefix="--version", separate_value_from_prefix=True, doc=InputDocumentation( doc= "display the version number for this tool Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="disableToolDefaultReadFilters", input_type=Boolean(optional=True), prefix="--disable-tool-default-read-filters", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-disable-tool-default-read-filters) Disable all tool default read filters (WARNING: many tools will not function correctly without their default read filters on) Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="showhidden", input_type=Boolean(optional=True), prefix="--showHidden", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-showHidden) display hidden arguments Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="ambigFilterBases", input_type=Int(optional=True), prefix="--ambig-filter-bases", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Default value: null. Cannot be used in conjuction with argument(s) maxAmbiguousBaseFraction" ), ), ToolInput( tag="ambigFilterFrac", input_type=Double(optional=True), prefix="--ambig-filter-frac", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Threshold fraction of ambiguous bases Default value: 0.05. Cannot be used in conjuction with argument(s) maxAmbiguousBases" ), ), ToolInput( tag="maxFragmentLength", input_type=Boolean(optional=True), prefix="--max-fragment-length", separate_value_from_prefix=True, doc=InputDocumentation(doc="Default value: 1000000."), ), ToolInput( tag="minFragmentLength", input_type=Boolean(optional=True), prefix="--min-fragment-length", separate_value_from_prefix=True, doc=InputDocumentation(doc="Default value: 0."), ), ToolInput( tag="keepIntervals", input_type=String(optional=True), prefix="--keep-intervals", separate_value_from_prefix=True, doc=InputDocumentation( doc= "One or more genomic intervals to keep This argument must be specified at least once. Required. " ), ), ToolInput( tag="library", input_type=String(optional=True), prefix="--library", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-library) Name of the library to keep This argument must be specified at least once. Required." ), ), ToolInput( tag="maximumMappingQuality", input_type=Int(optional=True), prefix="--maximum-mapping-quality", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Maximum mapping quality to keep (inclusive) Default value: null. " ), ), ToolInput( tag="minimumMappingQuality", input_type=Int(optional=True), prefix="--minimum-mapping-quality", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Minimum mapping quality to keep (inclusive) Default value: 10. " ), ), ToolInput( tag="dontRequireSoftClipsBothEnds", input_type=Boolean(optional=True), prefix="--dont-require-soft-clips-both-ends", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="filterTooShort", input_type=Int(optional=True), prefix="--filter-too-short", separate_value_from_prefix=True, doc=InputDocumentation( doc="Minimum number of aligned bases Default value: 30."), ), ToolInput( tag="platformFilterName", input_type=Boolean(optional=True), prefix="--platform-filter-name", separate_value_from_prefix=True, doc=InputDocumentation( doc= "This argument must be specified at least once. Required." ), ), ToolInput( tag="blackListedLanes", input_type=String(optional=True), prefix="--black-listed-lanes", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Platform unit (PU) to filter out This argument must be specified at least once. Required." ), ), ToolInput( tag="readGroupBlackList", input_type=Boolean(optional=True), prefix="--read-group-black-list", separate_value_from_prefix=True, doc=InputDocumentation( doc= "This argument must be specified at least once. Required. " ), ), ToolInput( tag="keepReadGroup", input_type=String(optional=True), prefix="--keep-read-group", separate_value_from_prefix=True, doc=InputDocumentation( doc="The name of the read group to keep Required."), ), ToolInput( tag="maxReadLength", input_type=Int(optional=True), prefix="--max-read-length", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Keep only reads with length at most equal to the specified value Required." ), ), ToolInput( tag="minReadLength", input_type=Int(optional=True), prefix="--min-read-length", separate_value_from_prefix=True, doc=InputDocumentation( doc= "Keep only reads with length at least equal to the specified value Default value: 1." ), ), ToolInput( tag="readName", input_type=String(optional=True), prefix="--read-name", separate_value_from_prefix=True, doc=InputDocumentation( doc="Keep only reads with this read name Required."), ), ToolInput( tag="keepReverseStrandOnly", input_type=Boolean(optional=True), prefix="--keep-reverse-strand-only", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Keep only reads on the reverse strand Required. Possible values: {true, false} " ), ), ToolInput( tag="sample", input_type=String(optional=True), prefix="--sample", separate_value_from_prefix=True, doc=InputDocumentation( doc= "(-sample) The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required. " ), ), ToolInput( tag="invertSoftClipRatioFilter", input_type=Boolean(optional=True), prefix="--invert-soft-clip-ratio-filter", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Inverts the results from this filter, causing all variants that would pass to fail and visa-versa. Default value: false. Possible values: {true, false} " ), ), ToolInput( tag="softClippedLeadingTrailingRatio", input_type=Double(optional=True), prefix="--soft-clipped-leading-trailing-ratio", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Threshold ratio of soft clipped bases (leading / trailing the cigar string) to total bases in read for read to be filtered. Default value: null. Cannot be used in conjuction with argument(s) minimumSoftClippedRatio" ), ), ToolInput( tag="softClippedRatioThreshold", input_type=Double(optional=True), prefix="--soft-clipped-ratio-threshold", separate_value_from_prefix=True, doc=InputDocumentation( doc= " Threshold ratio of soft clipped bases (anywhere in the cigar string) to total bases in read for read to be filtered. Default value: null. Cannot be used in conjuction with argument(s) minimumLeadingTrailingSoftClippedRatio" ), ), ]
def inputs(self) -> List[ToolInput]: return [ ToolInput( "inputFile", CompressedVcf(), prefix="--input_file", doc="Input file name. Can use compressed file (gzipped).", ), ToolInput( "vcf", Boolean(), default=True, prefix="--vcf", doc="Writes output in VCF format. Consequences are added in the INFO field of the VCF file, using the " 'key "CSQ". Data fields are encoded separated by "|"; the order of fields is written in the VCF header.' ' Output fields in the "CSQ" INFO field can be selected by using --fields. If the input format was VCF,' " the file will remain unchanged save for the addition of the CSQ field (unless using any filtering). " "Custom data added with --custom are added as separate fields, using the key specified for each data " "file. Commas in fields are replaced with ampersands (&) to preserve VCF format.", ), ToolInput( "compressOutput", String(), default="bgzip", doc='Compress output: "gzip" or "bgzip"', ), ToolInput( "outputFilename", Filename(), prefix="-o", doc="Output file name" ), ToolInput( "inputData", String(optional=True), prefix="--input_data", doc="Raw input data as a string. May be used, to input a single rsID or HGVS notation quickly to vep:", ), ToolInput( "verbose", Boolean(optional=True), prefix="--verbose", doc="Print out a bit more information while running. ", ), ToolInput( "species", String(optional=True), prefix="--species", doc='Species for your data. This can be the latin name e.g. "homo_sapiens" or any Ensembl alias e.g. ' '"mouse". Specifying the latin name can speed up initial database connection as the registry does not ' 'have to load all available database aliases on the server. Default = "homo_sapiens"', ), ToolInput( "assembly", String(optional=True), prefix="--assembly", doc="Select the assembly version to use if more than one available. If using the cache, you must have " "the appropriate assembly's cache file installed. If not specified and you have only 1 assembly " "version installed, this will be chosen by default. Default = use found assembly version", ), ToolInput( "fileFormat", String(optional=True), prefix="--format", doc='one of "ensembl", "vcf", "hgvs", "id", "region", "spdi". By default, VEP auto-detects the input ' "file format. Using this option you can specify the input file is Ensembl, VCF, IDs, HGVS, SPDI or " "region format. Can use compressed version (gzipped) of any file format listed above. " "Auto-detects format by default", ), ToolInput( "statsFilename", Filename(suffix=".txt_summary", extension=".html"), prefix="--stats_file", doc="Summary stats file name. This is an HTML file containing a summary of the VEP run - the file " 'name must end ".htm" or ".html". Default = "variant_effect_output.txt_summary.html"', ), ToolInput( "maxSvSize", Int(optional=True), prefix="--max_sv_size", doc="Extend the maximum Structural Variant size VEP can process.", ), ToolInput( "noCheckVariantsOrder", Boolean(optional=True), prefix="--no_check_variants_order", doc="Permit the use of unsorted input files. However running VEP on unsorted " "input files slows down the tool and requires more memory.", ), ToolInput( "fork", Int(optional=True), default=CpuSelector(), prefix="--fork", doc="Enable forking, using the specified number of forks. Forking can dramatically improve runtime.", ), ToolInput( "plugin", Array(String(), optional=True), prefix="--plugin", separator=",", doc="[plugin name] Use named plugin. Plugin modules should be installed in the Plugins subdirectory " "of the VEP cache directory (defaults to $HOME/.vep/). Multiple plugins can be used by supplying " "the --plugin flag multiple times. See plugin documentation. .", ), ToolInput( "custom", String(optional=True), prefix="--custom", doc="[filename] Add custom annotation to the output. Files must be tabix indexed or in the bigWig " "format. Multiple files can be specified by supplying the --custom flag multiple times. See here " "for full details. ", ), ToolInput( "gff", String(optional=True), prefix="--gff", doc="[filename] Use GFF transcript annotations in [filename] as an annotation source. Requires a " "FASTA file of genomic sequence.", ), ToolInput( "gtf", String(optional=True), prefix="--gtf", doc="[filename] Use GTF transcript annotations in [filename] as an annotation source. " "Requires a FASTA file of genomic sequence.", ), ToolInput( "bam", String(optional=True), prefix="--bam", doc="[filename] ADVANCED Use BAM file of sequence alignments to correct transcript models not derived " "from reference genome sequence. Used to correct RefSeq transcript models. " "Enables --use_transcript_ref; add --use_given_ref to override this behaviour.", ), ToolInput( "useTranscriptRef", String(optional=True), prefix="--use_transcript_ref", doc="By default VEP uses the reference allele provided in the input file to calculate consequences for " "the provided alternate allele(s). Use this flag to force VEP to replace the provided reference " "allele with sequence derived from the overlapped transcript. This is especially relevant when " "using the RefSeq cache, see documentation for more details. The GIVEN_REF and USED_REF fields " "are set in the output to indicate any change.", ), ToolInput( "useGivenRef", String(optional=True), prefix="--use_given_ref", doc="Using --bam or a BAM-edited RefSeq cache by default enables --use_transcriipt_ref; add this flag " "to override this behaviour and use the provided reference allele from the input. ", ), ToolInput( "fields", Array(String(), optional=True), doc="Configure the output format using a comma separated list of fields. Can only be used with tab " "(--tab) or VCF format (--vcf) output. For the tab format output, the selected fields may be those " "present in the default output columns, or any of those that appear in the Extra column (including " "those added by plugins or custom annotations). Output remains tab-delimited. For the VCF format " 'output, the selected fields are those present within the "CSQ" INFO field.', ), ToolInput( "variantClass", String(optional=True), prefix="--variant_class", doc="Output the Sequence Ontology variant class. ", ), ToolInput( "sift", String(optional=True), prefix="--sift", doc="[p|s|b] Species limited SIFT predicts whether an amino acid substitution affects protein function " "based on sequence homology and the physical properties of amino acids. VEP can output the prediction " "term, score or both. ", ), ToolInput( "polyphen", String(optional=True), prefix="--polyphen", doc="[p|s|b] Human only PolyPhen is a tool which predicts possible impact of an amino acid " "substitution on the structure and function of a human protein using straightforward physical and " "comparative considerations. VEP can output the prediction term, score or both. VEP uses the " "humVar score by default - use --humdiv to retrieve the humDiv score. ", ), ToolInput( "humdiv", String(optional=True), prefix="--humdiv", doc="Human only Retrieve the humDiv PolyPhen predictioninstead of the default humVar.", ), ToolInput( "nearest", String(optional=True), prefix="--nearest", doc="[transcript|gene|symbol] Retrieve the transcript or gene with the nearest protein-coding " 'transcription start site (TSS) to each input variant. Use "transcript" to retrieve the transcript ' 'stable ID, "gene" to retrieve the gene stable ID, or "symbol" to retrieve the gene symbol. Note that ' "the nearest TSS may not belong to a transcript that overlaps the input variant, and more than one may " "be reported in the case where two are equidistant from the input coordinates. Currently only available" " when using a cache annotation source, and requires the Set::IntervalTree perl module. Currently " "only available when using a cache annotation source, and requires the Set::IntervalTree perl module.", ), ToolInput( "distance", String(optional=True), prefix="--distance", doc="[bp_distance(,downstream_distance_if_different)] Modify the distance up and/or downstream between " "a variant and a transcript for which VEP will assign the upstream_gene_variant or downstream_gene_" "variant consequences. Giving one distance will modify both up- and downstream distances; prodiving two " "separated by commas will set the up- (5') and down- (3') stream distances respectively. Default: 5000", ), ToolInput( "overlaps", String(optional=True), prefix="--overlaps", doc="Report the proportion and length of a transcript overlapped by a structural variant in VCF format.", ), ToolInput( "genePhenotype", String(optional=True), prefix="--gene_phenotype", doc="Indicates if the overlapped gene is associated with a phenotype, disease or trait. " "See list of phenotype sources. ", ), ToolInput( "regulatory", String(optional=True), prefix="--regulatory", doc="Look for overlaps with regulatory regions. VEP can also report if a variant falls in a high " "information position within a transcription factor binding site. Output lines have a Feature " "type of RegulatoryFeature or MotifFeature. ", ), ToolInput( "cellType", String(optional=True), prefix="--cell_type", doc="Report only regulatory regions that are found in the given cell type(s). Can be a single cell " "type or a comma-separated list. The functional type in each cell type is reported under CELL_" "TYPE in the output. To retrieve a list of cell types, use --cell_type list.", ), ToolInput( "individual", String(optional=True), prefix="--individual", doc="[all|ind list] Consider only alternate alleles present in the genotypes of the specified " 'individual(s). May be a single individual, a comma-separated list or "all" to assess all individuals ' "separately. Individual variant combinations homozygous for the given reference allele will not be " "reported. Each individual and variant combination is given on a separate line of output. Only works " "with VCF files containing individual genotype data; individual IDs are taken from column headers. ", ), ToolInput( "phased", String(optional=True), prefix="--phased", doc="Force VCF genotypes to be interpreted as phased. For use with plugins that depend on phased data.", ), ToolInput( "alleleNumber", String(optional=True), prefix="--allele_number", doc="Identify allele number from VCF input, where 1 = first ALT allele, 2 = second ALT allele etc. " "Useful when using --minimal ", ), ToolInput( "showRefAllele", String(optional=True), prefix="--show_ref_allele", doc="Adds the reference allele in the output. Mainly useful for" ' the VEP "default" and tab-delimited output formats. ', ), ToolInput( "totalLength", String(optional=True), prefix="--total_length", doc="Give cDNA, CDS and protein positions as Position/Length. ", ), ToolInput( "numbers", String(optional=True), prefix="--numbers", doc="Adds affected exon and intron numbering to to output. Format is Number/Total. ", ), ToolInput( "noEscape", String(optional=True), prefix="--no_escape", doc="Don't URI escape HGVS strings. Default = escape", ), ToolInput( "keepCsq", String(optional=True), prefix="--keep_csq", doc="Don't overwrite existing CSQ entry in VCF INFO field. Overwrites by default", ), ToolInput( "vcfInfoField", String(optional=True), prefix="--vcf_info_field", doc="[CSQ|ANN|(other)] Change the name of the INFO key that VEP write the consequences to in its VCF " 'output. Use "ANN" for compatibility with other tools such as snpEff. Default: CSQ', ), ToolInput( "terms", String(optional=True), prefix="--terms", doc="[SO|display|NCBI] The type of consequence terms to output. The Ensembl terms are described here. " "The Sequence Ontology is a joint effort by genome annotation centres to standardise descriptions " 'of biological sequences. Default = "SO"', ), ToolInput( "noHeaders", String(optional=True), prefix="--no_headers", doc="Don't write header lines in output files. Default = add headers", ), *VepBase_96_3.identifiers, ]
def code_block(ponFile: CompressedVcf, inputVcf: Vcf, outputVcf: String): from gzip import open as gZipOpen pon_hash = dict() seq = "" # Open PON file if ponFile.endswith("gz"): ponReader = gZipOpen(ponFile, "rb").read().splitlines() else: ponReader = open(ponFile, "r").read().splitlines() # Open sample VCF inputVcfReader = open(inputVcf).read().splitlines() if len(ponReader) >= 1 and len(inputVcfReader) >= 1: for line in ponReader: line = str(line, "utf-8") if not line.startswith("#"): ponrecord = line.split("\t") chr = ponrecord[0] key = ".".join(ponrecord[1:4]) list = [] if chr not in pon_hash: pon_hash[chr] = [] list.append(key) pon_hash[chr] = list else: if key not in pon_hash[chr]: list = pon_hash[chr] list.append(key) pon_hash[chr] = list for each in range(0, len(inputVcfReader)): if inputVcfReader[each].startswith("#"): if inputVcfReader[each].startswith("##FILTER"): index = int(each) + 1 else: eachrecord = inputVcfReader[each].split("\t") chr = eachrecord[0] filter = eachrecord[6].split(";") key = ".".join(eachrecord[1:4]) if chr in pon_hash and key in pon_hash[chr]: if "PASS" in filter: ind = filter.index("PASS") filter[ind] = "PON" else: filter.append("PON") seq = ";".join(filter) eachrecord[6] = seq seq = "\t".join(eachrecord) inputVcfReader[each] = seq inputVcfReader.insert( index, '##FILTER=<ID=PON,Description="Variant site found in panel of normals">', ) outputVcfReader = open(outputVcf, "w+") for eachrecord in inputVcfReader: outputVcfReader.write(eachrecord + "\n") outputVcfReader.close() return {"out": outputVcf}
def inputs(self) -> List[ToolInput]: return [ ToolInput("file", CompressedVcf(), position=2), *self.additional_inputs ]
def outputs(self) -> List[ToolOutput]: return [ToolOutput("out", Stdout(CompressedVcf()))]
def tests(self) -> Optional[List[TTestCase]]: bioinf_base = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics" chr17 = f"{bioinf_base}/petermac_testdata" return [ TTestCase( name="basic", input={ "normal_inputs": [[ f"{chr17}/NA24385-BRCA1_R1.fastq.gz", f"{chr17}/NA24385-BRCA1_R21.fastq.gz", ]], "normal_name": "NA24385-BRCA1", "tumor_inputs": [[ f"{chr17}/NA12878-NA24385-mixture-BRCA1_R1.fastq.gz", f"{chr17}/NA12878-NA24385-mixture-BRCA1_R2.fastq.gz", ]], "tumor_name": "NA12878-NA24385-mixture", "reference": f"{chr17}/Homo_sapiens_assembly38.chr17.fasta", "gridss_blacklist": f"{chr17}/consensusBlacklist.hg38.chr17.bed", "gnomad": f"{chr17}/af-only-gnomad.hg38.BRCA1.vcf.gz", "gatk_intervals": [f"{chr17}/BRCA1.hg38.bed"], "known_indels": f"{chr17}/Homo_sapiens_assembly38.known_indels.BRCA1.vcf.gz", "mills_indels": f"{chr17}/Mills_and_1000G_gold_standard.indels.hg38.BRCA1.vcf.gz", "snps_1000gp": f"{chr17}/1000G_phase1.snps.high_confidence.hg38.BRCA1.vcf.gz", "snps_dbsnp": f"{chr17}/Homo_sapiens_assembly38.dbsnp138.BRCA1.vcf.gz", "cutadapt_adapters": f"{chr17}/contaminant_list.txt", }, output=BamBai.basic_test("out_normal_bam", 3265300, 49500) + BamBai.basic_test("out_tumor_bam", 3341700, 49000) + TextFile.basic_test( "out_normal_performance_summary", 950, md5="e3205735e5fe8c900f05050f8ed73f19", ) + TextFile.basic_test( "out_tumor_performance_summary", 950, md5="122bfa2ece90c0f030015feba4ba7d84", ) + CompressedVcf.basic_test( "out_variants_gatk", 9040, 147, ["GATKCommandLine"], "a2e4f96c451754ef8cba80494ed98a70", ) + Vcf.basic_test( "out_variants", 44090, 156, ["GATKCommandLine"], "5fc0e861893e0a23f974808265a6917e", ) + Array.array_wrapper([ Vcf.basic_test( "out_variants_split", 34390, 147, ["GATKCommandLine"], "c083775bc8c49397fb65ec12cd435688", ) ]) + FastqGzPair.basic_test("out_normal_fastqc_reports", 441500, 439800) + FastqGzPair.basic_test("out_tumor_fastqc_reports", 434900, 440000), ) ]