jacquard/utils/vcf.py
def add_info_field(self, field):
        """Adds new info field (flag or key=value pair).

        Args:
            field: String flag (e.g. "SOMATIC") or key-value ("NEW_DP=42")

        Raises:
            KeyError: if info field already exists
        """
        if field in self.info_dict:
            msg = "New info field [{}] already exists.".format(field)
            raise KeyError(msg)

        if "=" in field:
            key, value = field.split("=")
            self.info_dict[key] = value
        else:
            self.info_dict[field] = field

        self._join_info_fields()
def add_info_field(self, field):
        """Adds new info field (flag or key=value pair).

        Args:
            field: String flag (e.g. "SOMATIC") or key-value ("NEW_DP=42")

        Raises:
            KeyError: if info field already exists
        """
        if field in self.info_dict:
            msg = "New info field [{}] already exists.".format(field)
            raise KeyError(msg)

        if "=" in field:
            key, value = field.split("=")
            self.info_dict[key] = value
        else:
            self.info_dict[field] = field

        self._join_info_fields()
def add_info_field ( self , field ) : if field in self . info_dict : msg = "New info field [{}] already exists." . format ( field ) raise KeyError ( msg ) if "=" in field : key , value = field . split ( "=" ) self . info_dict [ key ] = value else : self . info_dict [ field ] = field self . _join_info_fields ( )
Adds new info field (flag or key=value pair).

        Args:
            field: String flag (e.g. "SOMATIC") or key-value ("NEW_DP=42")

        Raises:
            KeyError: if info field already exists
Adds new info field ( flag or key = value pair ) .