class_docstr: Base class for configuring VEP.
  
  To define a custom VEP configuration to for Query on Batch, construct a new class that inherits from :class:`.VEPConfig`
  and has the following parameters defined:
  
   - `json_type` (:class:`.HailType`): The type of the VEP JSON schema (as produced by VEP when invoked with the `--json` option).
   - `data_bucket` (:obj:`.str`) -- The location where the VEP data is stored.
   - `data_mount` (:obj:`.str`) -- The location in the container where the data should be mounted.
   - `batch_run_command` (:obj:`.list` of :obj:`.str`) -- The command line to run for a VEP job for a partition.
   - `batch_run_csq_header_command` (:obj:`.list` of :obj:`.str`) -- The command line to run when generating the consequence header.
   - `env` (dict of :obj:`.str` to :obj:`.str`) -- A map of environment variables to values to add to the environment when invoking the command.
   - `cloud` (:obj:`.str`) -- The cloud where the Batch Service is located.
   - `image` (:obj:`.str`) -- The docker image to run VEP.
   - `data_bucket_is_requester_pays` (:obj:`.bool`) -- True if the data bucket is requester pays.
   - `regions` (:obj:`.list` of :obj:`.str`) -- A list of regions the VEP jobs can run in.
  
  In addition, the method `command` must be defined with the following signature. The output is the exact command to run the
  VEP executable. The inputs are `consequence` and `tolerate_parse_error` which are user-defined parameters to :func:`.vep`,
  `part_id` which is the partition ID, `input_file` which is the path to the input file where the input data can be found, and
  `output_file` is the path to the output file where the VEP annotations are written to. An example is shown below:
  
  .. code-block:: python3
  
      def command(self,
                  consequence: bool,
                  tolerate_parse_error: bool,
                  part_id: int,
                  input_file: Optional[str],
                  output_file: str) -> List[str]:
          vcf_or_json = '--vcf' if consequence else '--json'
          input_file = f'--input_file {input_file}' if input_file else ''
          return f'''/vep/vep {input_file}         --format vcf         {vcf_or_json}         --everything         --allele_number         --no_stats         --cache         --offline         --minimal         --assembly GRCh37         --dir={self.data_mount}         --plugin LoF,human_ancestor_fa:{self.data_mount}/loftee_data/human_ancestor.fa.gz,filter_position:0.05,min_intron_size:15,conservation_file:{self.data_mount}/loftee_data/phylocsf_gerp.sql,gerp_file:{self.data_mount}/loftee_data/GERP_scores.final.sorted.txt.gz         -o STDOUT
      '''
  
  The following environment variables are added to the job's environment:
  
   - `VEP_BLOCK_SIZE` - The maximum number of variants provided as input to each invocation of VEP.
   - `VEP_PART_ID` - Partition ID.
   - `VEP_DATA_MOUNT` - Location where the vep data is mounted (same as `data_mount` in the config).
   - `VEP_CONSEQUENCE` - Integer equal to 0 or 1 on whether `csq` is False or True.
   - `VEP_TOLERATE_PARSE_ERROR` - Integer equal to 0 or 1 on whether `tolerate_parse_error` is False or True.
   - `VEP_OUTPUT_FILE` - String specifying the local path where the output TSV file with the VEP result should be located.
   - `VEP_INPUT_FILE` - String specifying the local path where the input VCF shard is located for all jobs.
  
  The `VEP_INPUT_FILE` environment variable is not available for the single job that computes the consequence header when
  ``csq=True``
class_docstr_tok: ["Base","class","for","configuring","VEP",".","To","define","a","custom","VEP","configuration","to","for","Query","on","Batch",",","construct","a","new","class","that","inherits","from",":","class",":","`",".VEPConfig","`","and","has","the","following","parameters","defined",":","-","`","json_type","`","(",":","class",":","`",".HailType","`",")",":","The","type","of","the","VEP","JSON","schema","(","as","produced","by","VEP","when","invoked","with","the","`","--","json","`","option",")",".","-","`","data_bucket","`","(",":","obj",":","`",".str","`",")","--","The","location","where","the","VEP","data","is","stored",".","-","`","data_mount","`","(",":","obj",":","`",".str","`",")","--","The","location","in","the","container","where","the","data","should","be","mounted",".","-","`","batch_run_command","`","(",":","obj",":","`",".list","`","of",":","obj",":","`",".str","`",")","--","The","command","line","to","run","for","a","VEP","job","for","a","partition",".","-","`","batch_run_csq_header_command","`","(",":","obj",":","`",".list","`","of",":","obj",":","`",".str","`",")","--","The","command","line","to","run","when","generating","the","consequence","header",".","-","`","env","`","(","dict","of",":","obj",":","`",".str","`","to",":","obj",":","`",".str","`",")","--","A","map","of","environment","variables","to","values","to","add","to","the","environment","when","invoking","the","command",".","-","`","cloud","`","(",":","obj",":","`",".str","`",")","--","The","cloud","where","the","Batch","Service","is","located",".","-","`","image","`","(",":","obj",":","`",".str","`",")","--","The","docker","image","to","run","VEP",".","-","`","data_bucket_is_requester_pays","`","(",":","obj",":","`",".bool","`",")","--","True","if","the","data","bucket","is","requester","pays",".","-","`","regions","`","(",":","obj",":","`",".list","`","of",":","obj",":","`",".str","`",")","--","A","list","of","regions","the","VEP","jobs","can","run","in",".","In","addition",",","the","method","`","command","`","must","be","defined","with","the","following","signature",".","The","output","is","the","exact","command","to","run","the","VEP","executable",".","The","inputs","are","`","consequence","`","and","`","tolerate_parse_error","`","which","are","user-defined","parameters","to",":","func",":","`",".vep","`",",","`","part_id","`","which","is","the","partition","ID",",","`","input_file","`","which","is","the","path","to","the","input","file","where","the","input","data","can","be","found",",","and","`","output_file","`","is","the","path","to","the","output","file","where","the","VEP","annotations","are","written","to",".","An","example","is","shown","below",":","..","code-block",":",":","python3","def","command","(","self",",","consequence",":","bool",",","tolerate_parse_error",":","bool",",","part_id",":","int",",","input_file",":","Optional","[","str","]",",","output_file",":","str",")","-",">","List","[","str","]",":","vcf_or_json","=","'","--","vcf","'","if","consequence","else","'","--","json'","input_file","=","f","'","--","input_file","{","input_file","}","'","if","input_file","else","``","return","f","''","'\/vep\/vep","{","input_file","}","--","format","vcf","{","vcf_or_json","}","--","everything","--","allele_number","--","no_stats","--","cache","--","offline","--","minimal","--","assembly","GRCh37","--","dir=","{","self.data_mount","}","--","plugin","LoF",",","human_ancestor_fa",":","{","self.data_mount","}","\/loftee_data\/human_ancestor.fa.gz",",","filter_position:0.05",",","min_intron_size:15",",","conservation_file",":","{","self.data_mount","}","\/loftee_data\/phylocsf_gerp.sql",",","gerp_file",":","{","self.data_mount","}","\/loftee_data\/GERP_scores.final.sorted.txt.gz","-o","STDOUT","``","'","The","following","environment","variables","are","added","to","the","job","'s","environment",":","-","`","VEP_BLOCK_SIZE","`","-","The","maximum","number","of","variants","provided","as","input","to","each","invocation","of","VEP",".","-","`","VEP_PART_ID","`","-","Partition","ID",".","-","`","VEP_DATA_MOUNT","`","-","Location","where","the","vep","data","is","mounted","(","same","as","`","data_mount","`","in","the","config",")",".","-","`","VEP_CONSEQUENCE","`","-","Integer","equal","to","0","or","1","on","whether","`","csq","`","is","False","or","True",".","-","`","VEP_TOLERATE_PARSE_ERROR","`","-","Integer","equal","to","0","or","1","on","whether","`","tolerate_parse_error","`","is","False","or","True",".","-","`","VEP_OUTPUT_FILE","`","-","String","specifying","the","local","path","where","the","output","TSV","file","with","the","VEP","result","should","be","located",".","-","`","VEP_INPUT_FILE","`","-","String","specifying","the","local","path","where","the","input","VCF","shard","is","located","for","all","jobs",".","The","`","VEP_INPUT_FILE","`","environment","variable","is","not","available","for","the","single","job","that","computes","the","consequence","header","when","``","csq=True","``"]
code: def command(
      self,
      consequence: bool,
      tolerate_parse_error: bool,
      part_id: int,
      input_file: Optional[str],
      output_file: str,
  ) -> List[str]:
      raise NotImplementedError
  
imports: import abc
  import logging
  import hail
  from collections import Counter
  import os
  from shlex import quote
  from typing import Dict, Tuple, List, Optional, Union
  from hailtop import pip_version
  from hailtop.utils import async_to_blocking
  import hailtop.batch_client
  from hailtop.config import get_deploy_config
  from hailtop import yamlx
  from hail.backend.service_backend import ServiceBackend
  from hail.typecheck import typecheck, oneof, anytype, nullable, numeric
  from hail.expr.expressions.expression_typecheck import expr_float64
  from hail.utils import FatalError
  from hail.utils.java import Env, info, warning
  from hail.utils.misc import divide_null, guess_cloud_spark_provider, new_temp_file
  from hail.matrixtable import MatrixTable
  from hail.table import Table
  from hail.ir import TableToTableApply
  from .misc import require_biallelic, require_row_key_variant, require_col_key_str, require_table_key_variant, require_alleles_field
label_desc: Use image node_id 1 for calling the VEPConfig obj's underlying member method code with example usage: obj.command(consequence, tolerate_parse_error, part_id, input_file, output_file) without return types