Skip to content

ipr.annotate

handles annotating variants with annotation information from graphkb

get_gene_information()

Create the Gene Info object for upload to IPR with the other report information

def get_gene_information(
    graphkb_conn: GraphKBConnection, gene_names: Iterable[str]
) -> List[IprGene]:

Args

  • graphkb_conn (GraphKBConnection): [description]
  • gene_names (Iterable[str]): [description]

Returns

get_statements_from_variants()

Given a list of variant records from GraphKB, return all the related statements

def get_statements_from_variants(
    graphkb_conn: GraphKBConnection, variants: List[Record]
) -> List[Statement]:

Args

  • graphkb_conn (GraphKBConnection): the graphkb api connection object
  • variants (List[Record]): list of variant records

Returns

  • List[Statement]: list of Statement records from graphkb

get_second_pass_variants()

Given a list of statements that have been matched. Convert these to new category variants to be used in a second-pass matching

def get_second_pass_variants(
    graphkb_conn: GraphKBConnection, statements: List[Statement]
) -> List[Variant]:

Args

  • graphkb_conn (GraphKBConnection)
  • statements (List[Statement])

Returns

  • List[Variant]

get_ipr_statements_from_variants()

Matches to GraphKB statements from the list of input variants. From these results matches again with the inferred variants. Then returns the results formatted for upload to IPR

def get_ipr_statements_from_variants(
    graphkb_conn: GraphKBConnection, matches: List[Record], disease_name: str
) -> List[KbMatch]:

Args

  • graphkb_conn (GraphKBConnection)
  • matches (List[Record])
  • disease_name (str)

Returns

annotate_category_variants()

Annotate variant calls with information from GraphKB and return these annotations in the IPR alterations format

def annotate_category_variants(
    graphkb_conn: GraphKBConnection,
    variants: List[IprGeneVariant],
    disease_name: str,
    copy_variant: bool = True,
    show_progress: bool = False,
) -> List[KbMatch]:

Args

  • graphkb_conn (GraphKBConnection): the graphkb api connection object
  • variants (List[IprGeneVariant]): list of variants
  • disease_name (str)
  • copy_variant (bool)
  • show_progress (bool)

Returns

  • List[KbMatch]: list of kbMatches records for IPR

annotate_positional_variants()

Annotate variant calls with information from GraphKB and return these annotations in the IPR alterations format

def annotate_positional_variants(
    graphkb_conn: GraphKBConnection,
    variants: List[IprVariant],
    disease_name: str,
    show_progress: bool = False,
) -> List[KbMatch]:

Args

  • graphkb_conn (GraphKBConnection): the graphkb api connection object
  • variants (List[IprVariant]): list of variants. Defaults to [].
  • disease_name (str)
  • show_progress (bool)

Returns

  • List[KbMatch]: list of kbMatches records for IPR
Back to top