Labkey API Configuration¶
To access the LabKey API, you need to provide your credentials to the API so that you can access the data you are allowed. These credentials will be stored in a file called .netrc
(dot net rc), located in your home directory.
-
Obtain the
.netrc
template.-
To use the API on the desktop, open the terminal and copy the following folder:
-
To use the API on the HPC ssh onto the HPC and copy:
The copy task listed there will provide you with additional files that may be required depending whether you will use the R or Python client. They will not hurt your overall session configuration.
-
-
Open the file called
.netrc
(to use on both the desktop and the HPC, you'll need to open and edit both). The file contents are: - replace
yourusername
andyourPasswordHere
with the same username and password that you use to login the Research Environment. - Once the information is entered, save the file.
- Because the file contains your password, it should be set to read-write only for yourself.
- The file permissions can be checked by entering
ls -alh
in the terminal.- You should see a line like the following:
-rw------- <username> <username> .netrc
- You should see a line like the following:
- If the permissions are in any other form, e.g.
-rw-rw-rw-
, they are visible to others and need to be changed. - This can be done with the following command:
chmod 600 .netrc
, which will set read-write to you only.
- The file permissions can be checked by entering
The Research Environment has a 12GB RAM limit. It is designed for exploratory work only. For larger analyses, please use the HPC.
Video walkthrough¶
Troubleshooting: Potential errors upon incorrect setup (i.e. DOCTYPE, user permission denied, curl_fetch_memory)¶
In case the RLabKey API is incorrectly setup, please have at these FAQs:
If this does not resolve the issue, and you still have problems using the R LabKey API, please contact the Service Desk.