Anaconda Python environment in the Sandbox
Anaconda Python environment is available in the sandbox wrapped through lmod linux tools. Apart from the lmod linux tools, there is also Anaconda Python environment as docker image available in Sandbox with specific packages loaded. Details of the packages along with creation of docker image can be found in git repo.
Run docker image
To run Anaconda Python environment release 1.0 type in the Terminal
docker run -v $PWD:/home/ivm -v /finngen:/finngen -it eu.gcr.io/finngen-sandbox-v3-containers/anaconda_python/anaconda3:1.0 /bin/bash
The above command takes you inside the docker image with mounted volumes of your home folder as well as finngen folder with all FinnGen data releases. Keep in mind there is only one python version which is 3.9.13. Any virtual environment created will be by default 3.9.13. There is no python2. Both python and python3 will load 3.9.13 version.
Details of Anaconda Python environment
Once you are in the docker image, you can list the installed packages using the following command
pip list
You can also see a specific Python package and the version using the following command
pip show <YOUR_PACKAGE_NAME>
Anaconda Python comes with google cloud bigquery and pandas_gbq packages which makes SQL query output to dataframe easy by running single line calls.
You can test pandas_gbq by running the query using the following command within interactive terminal
python -c 'from google.cloud import bigquery; import pandas_gbq; client = bigquery.Client(); query = """ SELECT FINNGENID FROM finngen-production-library.sandbox_tools_r10.finngen_r10_minimum_v1 LIMIT 10 """; df = pandas_gbq.read_gbq(query, project_id = client.project); print(df) '
Visualization packages
You can also do upset plots using UpSet Plot package installed in the Anaconda Python environment.
Additional package installations
Also, you can install a python package from the source by following the instructions from handbook page install a Python package from the source.
Contact us
Users can also request any packages that they want to be added into the Anaconda environment which will be updated every few months. Request can be sent tohumgen-servicedesk@helsinki.fi
Last updated