Retrieve VCF file with the given key if it exists, handling bgzipped.
175408
def _get_variant_file(x, key, suffix="", sample=None, ignore_do_upload=False):
    
    out = []
    fname = utils.get_in(x, key)
    upload_key = list(key)
    upload_key[-1] = "do_upload"
    do_upload = tz.get_in(tuple(upload_key), x, True)
    if fname and (ignore_do_upload or do_upload):
        if fname.endswith(".vcf.gz"):
            out.append({"path": fname,
                        "type": "vcf.gz",
                        "ext": "%s%s" % (x["variantcaller"], suffix),
                        "variantcaller": x["variantcaller"]})
            if utils.file_exists(fname + ".tbi"):
                out.append({"path": fname + ".tbi",
                            "type": "vcf.gz.tbi",
                            "index": True,
                            "ext": "%s%s" % (x["variantcaller"], suffix),
                            "variantcaller": x["variantcaller"]})
        elif fname.endswith((".vcf", ".bed", ".bedpe", ".bedgraph", ".cnr", ".cns", ".cnn", ".txt", ".tsv")):
            ftype = utils.splitext_plus(fname)[-1][1:]
            if ftype == "txt":
                extended_ftype = fname.split("-")[-1]
                if "/" not in extended_ftype:
                    ftype = extended_ftype
            out.append({"path": fname,
                        "type": ftype,
                        "ext": "%s%s" % (x["variantcaller"], suffix),
                        "variantcaller": x["variantcaller"]})
    if sample:
        out_sample = []
        for x in out:
            x["sample"] = sample
            out_sample.append(x)
        return out_sample
    else:
        return out
657326
def _get_device_by_key(devices, key):
    '''
    
    '''
    device_keys = [d for d in devices if d.key == key]
    if device_keys:
        return device_keys[0]
    else:
        raise salt.exceptions.VMwareObjectNotFoundError(
            'Virtual machine device with unique key '
            '{0} does not exist'.format(key))
743494
def get_file_contents(self, file_key):
		'''
		'''
		#does not work
		self._raise_unimplemented_error()
		
		uri = '/'.join([self.api_uri,
						self.files_suffix,
						file_key,
						self.file_contents_suffix,
						])
		return self._req('get', uri)
670499
def get(key)
      return super if @content.key?(key)

      if inside_fiber?
        view = @view

        begin
          @waiting_for = key
          view.output_buffer, @parent = @child, view.output_buffer
          Fiber.yield
        ensure
          @waiting_for = nil
          view.output_buffer, @child = @parent, view.output_buffer
        end
      end

      super
    end
1213920
def _exists(self, key):
        
        filecache, keycache = self._fileslist()
        msg = keycache.get(key, None)
        if msg:
            path = msg.filename
            meta = filecache[path]
            return path, meta["hostname"], meta.get("flags", "")
        raise KeyError("not found %s" % key)
478678
def get_with_key(*args)
        args[0] = "/#{@api_key}/" + args[0]
        begin
          Tvdbr::Retryable.retry(:on => MultiXml::ParseError) do
            self.class.get(*args).parsed_response
          end
        rescue Tvdbr::RetryableError => e
          { 'Data' => nil }
        end
      end
527343
def get(self, key):
        
        upload = None
        files_states = self.backend.get(key)
        files = MultiValueDict()
        if files_states:
            for name, state in files_states.items():
                f = BytesIO()
                f.write(state['content'])

                # If the post is too large, we cannot use a
                # InMemoryUploadedFile instance.
                if state['size'] > settings.FILE_UPLOAD_MAX_MEMORY_SIZE:
                    upload = TemporaryUploadedFile(
                        state['name'],
                        state['content_type'],
                        state['size'],
                        state['charset'],
                    )
                    upload.file = f
                else:
                    f = BytesIO()
                    f.write(state['content'])
                    upload = InMemoryUploadedFile(
                        file=f,
                        field_name=name,
                        name=state['name'],
                        content_type=state['content_type'],
                        size=state['size'],
                        charset=state['charset'],
                    )
                files[name] = upload

                # Go to the first byte in the file for future use
                upload.file.seek(0)

        return files
65137
function(key, callback) {
	store.getBytes(key, function(err, value) {
		if (err) { throw 'could not retrieve BYTES for key: '+[key, err].join(' ') }
		callback(value)
	})
}
1333388
public V get(String key)
    {
        int index = exactMatchSearch(key);
        if (index >= 0)
        {
            return v[index];
        }

        return null;
    }
361255
function loadFromIndividualConfigFile(key) {
    key = _.replace(key, /\/|\\/g, ''); //forward and backslashes are unsafe when resolving filenames

    if (individualKeyCache[key]) {
        return individualKeyCache[key];
    } else {
        var toLoad = path.resolve(global.__appDir, 'config/' + key + '.json');

        var content = '{}';
        try {
            content = fs.readFileSync(toLoad);
        } catch (err) {
            //file must not exists
        }

        var json = {};
        try {
            json = JSON.parse(stripJsonComments(content.toString()));
        } catch (err) {
            console.warn('Error parsing JSON for %s', toLoad);
        }

        security.decryptObject(json, function (str) {
            //Decryption function
            return security.decrypt(str, process.env.decryptionKey);
        });
        individualKeyCache[key] = json;

        return individualKeyCache[key];
    }
}
696997
function _get(key){
	var ret = null;

	// Pull from cache or re-read from fs.
	//console.log('key: ' + key)
	//console.log('use_zcache_p: ' + use_zcache_p)
	if( use_zcache_p ){
	    ret = zcache[key];
	}else{
	    ret = afs.read_file(path_cache[key]);
	}

	return ret;
    }
805869
def cget(self, key):
        
        if key == "headertext":
            return self.__headertext
        elif key == "text":
            return self.__text
        elif key == "width":
            return self.__width
        elif key == "timeout":
            return self._timeout
        elif key == "background":
            return self.__background
        else:
            return ttk.Frame.cget(self, key)
261480
def _get(self, key):
        
        buf = BytesIO()

        self._get_file(key, buf)

        return buf.getvalue()
871198
public static function retrieve(FileSystemCacheKey $key, $newer_than=null) {
		$filename = $key->getFileName();
		
		if(!file_exists($filename)) return false;
		
		//if cached data is not newer than $newer_than
		if($newer_than && filemtime($filename) < $newer_than) return false;

		$fh = self::getFileHandle($filename,'r');
		if(!$fh) return false;
		
		$data = self::getContents($fh,$key);
		if(!$data) return false;


		self::closeFile($fh);		
		return $data->value;
	}
97739
function (key) {
            if (self.files) {
                return self.files[key] ? self.files[key] : null;
            }
        }
920871
def get_dataset(self, key, info):
        """"""
        logger.debug("Reading %s.", key)
        return self.file_content[key.name]
895445
def get(self, key):
        
        group = self.get_node(key)
        if group is None:
            raise KeyError('No object named {key} in the file'.format(key=key))
        return self._read_group(group)