Returns a set of the (maybe REF and) ALT strings that were called, using GT in FORMAT.
        Returns None if GT not in the record
357562
def called_alts_from_genotype(self):
        ''''''
        if 'GT' not in self.FORMAT:
            return None

        genotype_indexes = set([int(x) for x in self.FORMAT['GT'].split('/')])
        alts = set()

        for i in genotype_indexes:
            if i == 0:
                alts.add(self.REF)
            else:
                alts.add(self.ALT[i-1])

        return alts
1345028
def _get_referenced_fields_and_fragment_names(
    context,  # ValidationContext
    cached_fields_and_fragment_names,  # type: Dict[SelectionSet, Tuple[Dict[str, List[Tuple[Union[GraphQLInterfaceType, GraphQLObjectType, None], Field, GraphQLField]]], List[str]]]
    fragment,  # type: InlineFragment
):
    # type: (...) -> Tuple[Dict[str, List[Tuple[Union[GraphQLInterfaceType, GraphQLObjectType, None], Field, GraphQLField]]], List[str]]
    """"""

    # Short-circuit building a type from the AST if possible.
    cached = cached_fields_and_fragment_names.get(fragment.selection_set)

    if cached:
        return cached

    fragment_type = type_from_ast(  # type: ignore
        context.get_schema(), fragment.type_condition
    )

    return _get_fields_and_fragments_names(  # type: ignore
        context, cached_fields_and_fragment_names, fragment_type, fragment.selection_set
    )
205950
def gt_type(self):
        
        if not self.called:
            return None  # not called
        elif all(a == 0 for a in self.gt_alleles):
            return HOM_REF
        elif len(set(self.gt_alleles)) == 1:
            return HOM_ALT
        else:
            return HET
599581
def strings(self, otherchar=None):
		'''
			
		'''

		# In the case of a regex like "[^abc]", there are infinitely many (well, a
		# very large finite number of) single characters which will match. It's not
		# productive to iterate over all of these giving every single example.
		# You must supply your own "otherchar" to stand in for all of these
		# possibilities.
		for string in self.to_fsm().strings():

			# Have to represent `fsm.anything_else` somehow.
			if fsm.anything_else in string:
				if otherchar == None:
					raise Exception("Please choose an 'otherchar'")
				string = [
					otherchar if char == fsm.anything_else else char
					for char in string
				]

			yield "".join(string)
866398
def get_stack_refs(refs: list):  # copy pasted from Senza
    
    refs = list(refs)
    refs.reverse()
    stack_refs = []
    last_stack = None
    while refs:
        ref = refs.pop()
        if last_stack is not None and re.compile(r'v[0-9][a-zA-Z0-9-]*$').match(ref):
            stack_refs.append(StackReference(last_stack, ref))
        else:
            try:
                with open(ref) as fd:
                    data = yaml.safe_load(fd)
                ref = data['SenzaInfo']['StackName']
            except (OSError, IOError):
                # It's still possible that the ref is a regex
                pass

            if refs:
                version = refs.pop()
            else:
                version = None
            stack_refs.append(StackReference(ref, version))
            last_stack = ref
    return stack_refs
749763
def get_attribute_references(instring):
    
    parsed = ConditionGrammar().conditions.parseString(instring)
    result = parsed if isinstance(parsed[0], str) else parsed[0]
    return result.attribute_reference.asList() if result.attribute_reference else []
1173630
def getTriggerStrings(self, parScope, parName):
        
        # The data structure of _allTriggers was chosen for how easily/quickly
        # this particular access can be made here.
        fullName = parScope+'.'+parName
        return self._allTriggers.get(fullName)
1938
def _symbols():
    
    global _SYMBOLS
    if _SYMBOLS is None:
        tmp = [(s, 'symbol') for s in _data()['symbol'].keys()]
        tmp += [(s, 'alpha3') for s in _data()['alpha3'].keys()]
        tmp += [(s.name, 'name') for s in _data()['alpha3'].values()]
        _SYMBOLS = sorted(
            tmp,
            key=lambda s: (len(s[0]), ord(s[0][0])),
            reverse=True)

    return _SYMBOLS
1002291
def get_nb_strings(self):
        
        nb = 0
        seen = []
        for digest, dx in self.analyzed_vms.items():
            if dx in seen:
                continue
            seen.append(dx)
            nb += len(dx.get_strings_analysis())
        return nb
1111421
def convert_references(ref_data, fmt):
    '''
    
    '''

    # Make fmt case insensitive
    fmt = fmt.lower()
    if fmt not in _converter_map:
        raise RuntimeError('Unknown reference format "{}"'.format(fmt))

    # Sort the data for all references
    for elref in ref_data:
        for rinfo in elref['reference_info']:
            rdata = rinfo['reference_data']
            rinfo['reference_data'] = [(k, sort.sort_single_reference(v)) for k, v in rdata]

    # Actually do the conversion
    ret_str = _converter_map[fmt]['function'](ref_data)

    return ret_str
795626
def get_string(self, idx):
        
        if idx in self.hook_strings:
            return self.hook_strings[idx]

        try:
            off = self.__manage_item[TypeMapItem.STRING_ID_ITEM][idx].get_string_data_off()
        except IndexError:
            log.warning("unknown string item @ %d" % idx)
            return "AG:IS: invalid string"

        try:
            if self.recode_ascii_string:
                if self.recode_ascii_string_meth:
                    return self.recode_ascii_string_meth(
                        self.__strings_off[off].get())
                return self.get_ascii_string(self.__strings_off[off].get())
            return self.__strings_off[off].get()
        except KeyError:
            log.warning("unknown string item @ 0x%x(%d)" % (off, idx))
            return "AG:IS: invalid string"
1329169
def get_regex_strings(self, regular_expressions):
        
        str_list = []
        if regular_expressions.count is None:
            return None
        for i in self.get_strings():
            if re.match(regular_expressions, i):
                str_list.append(i)
        return str_list
502510
def get_alt_name(self):
        
        if ('altName' in self.attributes and
                bool(self.attributes['altName'].strip())):
            return self.attributes['altName']
        else:
            return None
1088927
def format_references(self, t, i):
        """"""

        octal = self.get_octal(t, i)
        if octal:
            value = int(octal, 8)
            if value > 0xFF and self.is_bytes:
                # Re fails on octal greater than `0o377` or `0xFF`
                raise ValueError("octal escape value outside of range 0-0o377!")
            value = chr(value)
        elif t in _STANDARD_ESCAPES or t == '\\':
            value = _BACK_SLASH_TRANSLATION['\\' + t]
        elif not self.is_bytes and t == "U":
            value = chr(int(self.get_wide_unicode(i), 16))
        elif not self.is_bytes and t == "u":
            value = chr(int(self.get_narrow_unicode(i), 16))
        elif not self.is_bytes and t == "N":
            value = _unicodedata.lookup(self.get_named_unicode(i))
        elif t == "x":
            value = chr(int(self.get_byte(i), 16))
        else:
            i.rewind(1)
            value = '\\'
        return value
708425
def extra_from_record(self, record):
        
        return {
            attr_name: record.__dict__[attr_name]
            for attr_name in record.__dict__
            if attr_name not in BUILTIN_ATTRS
        }
737939
def get_access_flags_string(self):
        
        if self.access_flags_string == None:
            self.access_flags_string = get_access_flags_string(
                self.get_access_flags())

            if self.access_flags_string == "":
                self.access_flags_string = "0x%x" % self.get_access_flags()
        return self.access_flags_string
530988
String getRemarks() {

        if (!locale_set) {
            setLocale(Locale.getDefault());
        }

        String key = this.getTypeName();

        return BundleHandler.getString(hnd_remarks, key);
    }