From 6fccb171819ac12f75f68e774a5b7549d54e3ae5 Mon Sep 17 00:00:00 2001 From: Jeremy McRae Date: Thu, 21 May 2020 11:02:09 -0700 Subject: [PATCH] updated readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ea1e84f..ff0a6d8 100755 --- a/README.md +++ b/README.md @@ -17,15 +17,15 @@ and compression schemes have also been tested using example bgen files). #### Usage ```python from bgen import BgenFile -bfile = BgenFile(BGEN_PATH, SAMPLE_PATH=None) +bfile = BgenFile(BGEN_PATH, sample_path=None) rsids = bfile.rsids() # select a variant by indexing var = bfile[1000] # pull out genotype probabilities -probs = var.probabilities() # returns 2D numpy array -dosage = var.alt_dosage() # requires biallelic variant, returns numpy array +probs = var.probabilities # returns 2D numpy array +dosage = var.minor_allele_dosage # requires biallelic variant, returns numpy array # exclude variants from analyses by passing in indices to_drop = [1, 3, 500] @@ -37,9 +37,9 @@ dumped = pickle.dumps(var) var = pickle.loads(dumped) # iterate through every variant in the file, without preloading every variant -with BgenFile(BGEN_PATH, SAMPLE_PATH=None, delay_parsing=True) as bfile: +with BgenFile(BGEN_PATH, sample_path=None, delay_parsing=True) as bfile: for var in bfile: - probs = var.probabilities() - dosage = var.alt_dosage() + probs = var.probabilities + dosage = var.minor_allele_dosage ploidy = var.ploidy ```