original_docstring: 
          Compute the GBWT index of the haplotypes in the given VCF. Returns the path to a GBWT file.
          
          Excludes the given sample from the index.
          
          
docstring: Compute the GBWT index of the haplotypes in the given VCF. Returns the path to a GBWT file.
  Excludes the given sample from the index.
docstring_tokens: Compute the GBWT index of the haplotypes in the given VCF . Returns the path to a GBWT file . Excludes the given sample from the index .
code: def _make_gbwt(self, sample, vg_file, vcf_file, region, tag=''):
          """
          Compute the GBWT index of the haplotypes in the given VCF. Returns the path to a GBWT file.
          
          Excludes the given sample from the index.
          
          """
          
          job_store = self._jobstore(tag)
          out_store = self._outstore(tag)
          out_store_name = self._outstore_name(tag)
  
          # What do we want to override from the default toil-vg config?
          overrides = argparse.Namespace(
              # toil-vg options
              vg_docker = self.vg_docker,
              container = self.container,
              # Toil options
              realTimeLogging = True,
              logLevel = "INFO",
              maxCores = self.cores
          )
  
          # Make the context
          context = Context(out_store, overrides)
  
          # The unfiltered and filtered vcf file
          uf_vcf_file = os.path.join(self.workdir, 'uf-' + os.path.basename(vcf_file))
          f_vcf_file = os.path.join(self.workdir, 'f-' + os.path.basename(vcf_file))
          if not f_vcf_file.endswith('.gz'):
              f_vcf_file += '.gz'
          
          # Get the inputs
          self._get_remote_file(vg_file, os.path.join(out_store, os.path.basename(vg_file)))
          self._get_remote_file(vcf_file, uf_vcf_file)
  
          # Exclude source sample to make the results not circular
          with context.get_toil(job_store) as toil:
              cmd = ['bcftools', 'view', os.path.basename(uf_vcf_file), '-s', '^' + sample, '-O', 'z']
              toil.start(Job.wrapJobFn(toil_call, context, cmd,
                                       work_dir = os.path.abspath(self.workdir),
                                       out_path = os.path.abspath(f_vcf_file)))
              cmd = ['tabix', '-f', '-p', 'vcf', os.path.basename(f_vcf_file)]
              toil.start(Job.wrapJobFn(toil_call, context, cmd,
                                       work_dir = os.path.abspath(self.workdir)))
          os.remove(uf_vcf_file)
          
          # Make the gbwt of the input graph
          # Don't bother with the GCSA
          index_name = 'index-gbwt'
          chrom, offset = self._bakeoff_coords(region)
          self._toil_vg_index(chrom, vg_file, None, "SKIP",
                              '--vcf_phasing {} --xg_index_cores {} --gbwt_index'.format(
                                  os.path.abspath(f_vcf_file), self.cores), tag, index_name)
          gbwt_path = os.path.join(out_store, index_name + '.gbwt')
          # Drop the extra xg
          os.remove(os.path.join(out_store, index_name + '.xg'))
          
          os.remove(f_vcf_file)
          os.remove(f_vcf_file + '.tbi')
  
          return gbwt_path
code_tokens: def _make_gbwt ( self , sample , vg_file , vcf_file , region , tag = '' ) : job_store = self . _jobstore ( tag ) out_store = self . _outstore ( tag ) out_store_name = self . _outstore_name ( tag ) overrides = argparse . Namespace ( vg_docker = self . vg_docker , container = self . container , realTimeLogging = True , logLevel = "INFO" , maxCores = self . cores ) context = Context ( out_store , overrides ) uf_vcf_file = os . path . join ( self . workdir , 'uf-' + os . path . basename ( vcf_file ) ) f_vcf_file = os . path . join ( self . workdir , 'f-' + os . path . basename ( vcf_file ) ) if not f_vcf_file . endswith ( '.gz' ) : f_vcf_file += '.gz' self . _get_remote_file ( vg_file , os . path . join ( out_store , os . path . basename ( vg_file ) ) ) self . _get_remote_file ( vcf_file , uf_vcf_file ) with context . get_toil ( job_store ) as toil : cmd = [ 'bcftools' , 'view' , os . path . basename ( uf_vcf_file ) , '-s' , '^' + sample , '-O' , 'z' ] toil . start ( Job . wrapJobFn ( toil_call , context , cmd , work_dir = os . path . abspath ( self . workdir ) , out_path = os . path . abspath ( f_vcf_file ) ) ) cmd = [ 'tabix' , '-f' , '-p' , 'vcf' , os . path . basename ( f_vcf_file ) ] toil . start ( Job . wrapJobFn ( toil_call , context , cmd , work_dir = os . path . abspath ( self . workdir ) ) ) os . remove ( uf_vcf_file ) index_name = 'index-gbwt' chrom , offset = self . _bakeoff_coords ( region ) self . _toil_vg_index ( chrom , vg_file , None , "SKIP" , '--vcf_phasing {} --xg_index_cores {} --gbwt_index' . format ( os . path . abspath ( f_vcf_file ) , self . cores ) , tag , index_name ) gbwt_path = os . path . join ( out_store , index_name + '.gbwt' ) os . remove ( os . path . join ( out_store , index_name + '.xg' ) ) os . remove ( f_vcf_file ) os . remove ( f_vcf_file + '.tbi' ) return gbwt_path
short_docstring: Compute the GBWT index of the haplotypes in the given VCF.
short_docstring_tokens: Compute the GBWT index of the haplotypes in the given VCF .
comment: """
          Compute the GBWT index of the haplotypes in the given VCF. Returns the path to a GBWT file.
          
          Excludes the given sample from the index.
          
          """$SEP$# What do we want to override from the default toil-vg config?$SEP$# toil-vg options$SEP$# Toil options$SEP$# Make the context$SEP$# The unfiltered and filtered vcf file$SEP$# Get the inputs$SEP$# Exclude source sample to make the results not circular$SEP$# Make the gbwt of the input graph$SEP$# Don't bother with the GCSA$SEP$# Drop the extra xg