pandaspgs.ancestry_category.AncestryCategory

An object that stores data of type AncestryCategory. To understand the significance of each column of the DataFrame. Please visit "Other endpoints" in PGS Catalog Documentation for details.

Attributes:
  • raw_data

    list. Convert from obtained JSON data

  • ancestry_categories

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • categories

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • mode

    Fat or Thin. Specifies the mode of the returned object.

from pandaspgs.get_ancestry_category import get_ancestry_categories

ch = get_ancestry_categories()
ch
ch.raw_data
ch.mode
ch.ancestry_categories
ch.categories

Subset object s by either identifier or position

all_df = get_ancestry_categories()
all_df[0].ancestry_categories
all_df[0:3].ancestry_categories
all_df['AFR'].ancestry_categories
all_df[('AFR','ASN','EAS')].ancestry_categories

Objects can be manipulated like sets in the mathematical sense.

all_df = get_ancestry_categories()
one = all_df[0]
two = all_df[1]
three = all_df[2]
one_and_two = one+two
two_and_three = two+three
only_one = one_and_two - two_and_three
only_two = one_and_two & two_and_three
one_and_two_and_three = one_and_two | two_and_three
one_and_three = one_and_two ^ two_and_three

__init__

__init__(data: list = [], mode: str = 'Fat')
Parameters:
  • data (list, default: [] ) –

    Raw JSON data.

  • mode (str, default: 'Fat' ) –

    Fat or Thin. Specifies the mode of the object.