Skip to content
Snippets Groups Projects

Labkey api

Merged BIOPZ-Börsch Anastasiya requested to merge labkey_api into master
Files
2
scripts/README.md 0 → 100644
+ 38
0
In order to connect to the LabKey through API, you will first need to create a file `.netrc` in your home directory:
```bash
touch ${HOME}/.netrc
Add the following lines to the file:
```console
machine <remote-instance-of-labkey-server>
login <user-email>
password <user-password>
```
To secure the file, set permissions in a way that only you can see the content of the file:
```bash
chmod 400 .netrc
```
Install the `labkey` and `pandas` packages, ideally from a virtual environment (e.g., `virtualenv` or `conda`):
```bash
pip install labkey pandas
```
Run the LabKey API client script:
```bash
python labkey_api.py project_name labkey_table_nane
```
Example:
```bash
python labkey_api.py TEST_ABOERSCH RNA_Seq_data_template
```
The script outputs the requested LabKey table in the form of a pandas data frame.
Loading