<jupyter_start><jupyter_text>pyOpenCGA basic variant and interpretation usage------**[NOTE]** The server methods used by pyopencga client are defined in the following swagger URL:- http://bioinfodev.hpc.cam.ac.uk/opencga-test/webservices**[NOTE]** Current implemented methods are registered at the following spreadsheet:- https://docs.google.com/spreadsheets/d/1QpU9yl3UTneqwRqFX_WAqCiCfZBk5eU-4E3K-WVvuoc/edit?usp=sharing  Loading pyOpenCGA<jupyter_code>from pyopencga.opencga_config import ClientConfiguration
from pyopencga.opencga_client import OpencgaClient
from pprint import pprint
import json<jupyter_output><empty_output><jupyter_text>Setting credentials for LogIn **Credentials** Plese add the credentials for opencga login into a file in json format and read them from there.<jupyter_code># server host
host = 'http://bioinfo.hpc.cam.ac.uk/opencga-prod'

# user credentials
user = "demouser"
passwd = "<PASSWORD>" ## you can skip this, see below.

# the user demo access projects from user opencga
prj_owner = "demo"<jupyter_output><empty_output><jupyter_text>Creating ConfigClient for server connection configuration<jupyter_code># Creating ClientConfiguration dict
config_dict = {"rest": {
                       "host": host 
                    }
               }

print("Config information:\n",config_dict)<jupyter_output>Config information:
 {'rest': {'host': 'http://bioinfo.hpc.cam.ac.uk/opencga-prod'}}<jupyter_text>Login with user credentials<jupyter_code>config = ClientConfiguration(config_dict)
oc = OpencgaClient(config)

## Login
oc.login(user, passwd)<jupyter_output><empty_output><jupyter_text>**You are now connected to OpenCGA**  Querying Variants Let's get the variant client to query OpenCGA server<jupyter_code>## Let's use corpasome study
study = 'family:corpasome'
variant_client = oc.variants
variants = variant_client.query(study=study, gene='BRCA2', limit=1)
# pprint(variants.get_responses())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10504844467108618, 'fraction_numerical': 0.00407955124936257, 'mean_word_length': 5.86013986013986, 'pattern_counts': {'":': 2, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '340308', 'license': 'Apache-2.0', 'n_tokens_mistral': 650, 'n_tokens_neox': 626, 'n_words': 150, 'path': 'opencga-client/src/main/python/notebooks/general-notebooks/pyopencga_basic_notebook_003-variants.ipynb', 'repo_name': 'julie-sullivan/opencga', 'size': '1959'}