Uploading a Trio to Curated Trio Datasets
BenchHub Team
2025-05-15
Source:vignettes/WIP/Uploading_a_Trio.rmd
Uploading_a_Trio.rmd
Instructions for Uploading a Trio to Curated Trio Datasets
This guide provides step-by-step instructions for uploading a Trio object to the Curated Trio Datasets. It includes creating a GitHub Personal Access Token (PAT) with gist write access and uploading data to Figshare.
Step 1: Create a GitHub Personal Access Token (PAT)
To upload metrics as a GitHub Gist, you need a GitHub PAT with gist write access.
- Log in to your GitHub account.
- Navigate to Settings > Developer settings > Personal access tokens > Tokens (classic).
- Click Generate new token.
- Select the following scopes:
-
gist
(for creating and managing gists)
-
- Click Generate token and copy the token.
Set the PAT in R
Add the token to your environment in R:
Sys.setenv(GITHUB_PAT = "your_personal_access_token")
Replace "your_personal_access_token"
with the token you
copied.
Ensure googlesheets4
is set up
-
Install the
googlesheets4
package if you haven’t already:install.packages("googlesheets4")
-
Authenticate with your Google account:
googlesheets4::gs4_auth()
Step 2: Add the Trio to Curated Trio Datasets
- In R, create a
Trio
object and ensure it is properly populated with data, auxiliary data, and metrics. - Use the
writeCTD()
method to upload the Trio metadata to the Curated Trio Datasets sheet:
trio$writeCTD(name = "Your Dataset Name")
- Follow the prompts to:
- Save the dataset and auxiliary data locally (optional).
- Provide the Figshare URL. For more detailed instructions on uploading to Figshare, see below.
- Select the data type (e.g., omics, clinical, spatial, other).
- Confirm the upload of auxiliary data to Figshare.
Step 3: Verify the Upload
Check the Curated Trio Datasets Google Sheet to ensure your dataset has been added: Curated Trio Datasets
Verify that the metrics have been uploaded as a GitHub Gist.
Notes
- Ensure you have an active internet connection during the upload process.
- If you encounter any issues, check that your GitHub PAT and Figshare URL are correctly set.
Uploading Data to Figshare
- Log in to your Figshare account.
- Click Create a new item.
- Fill in the required metadata fields (e.g., title, description, tags).
- Upload your dataset files (e.g.,
.rds
files for the dataset and auxiliary data).- NOTE:
writeCTD
can create the
- NOTE:
- Publish the item to make it publicly accessible.
- Copy the Figshare URL of the published item.
Happy uploading!