Submit Data – Step by Step Guide

To submit new data to the FEGA Portugal, please make sure to follow the steps below. More technical details are available on the overview page.

Step 1 – Register

  • Register in the Central EGA Website.
  • Create an RSA or ED25519 key pair, following instructions:
    1. Enter a personal directory in which you’ll want to save your keys, run the following command (you may choose a name different from “my_fega_key”):
ssh-keygen -t ed25519 -C my_fega_key -f ./my_fega_key
    1. The generator will ask for a passphrase, choose a secure passphrase to protect your key in case your key file is stolen.
    2. The key pair should have been created, having two files in the directory: my_fega_key and my_fega_key.pub (or similar, depending on the name you chose).
    3. The file ending with “.pub” is your public key and will be the one you shall register in EGA and possibly other services.
    4. Never give your private key file (without “.pub”) to anyone nor submit it into any website, that key should only be used locally, in your device to unencrypt data.
  • Insert your public key in your user profile in the EGA Website (link-soon).

Step 2 – Data Submission

  1. To create the LEGA Node’s public key file, copy the text below and create a file with it (save it as ‘LEGA.pub’, for example).
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJQJY9fFb6Bft7frHDeCLlQrh102adymVXgc9hlWPYN3 Service.Key@LocalEGA
  1. Encrypt the file(s) in C4GH format using the LEGA node’s public key. To do that, a user may use the command presented below, with the variables set accordingly:
crypt4gh encrypt --recipient_pk $lega_pubkey_file < $filename > $filename.c4gh
  1. Connect to the inbox SSH File Transfer Protocol (SFTP) port (in this work’s case, 2222) using the command shown below:
sftp -o User=$username -P 2222 -i $privkey_file $lega_ip

The parameters need to be set to match, respectively, the EGA username, the user’s private key file whose public key was previously registered at the CEGA, and the LEGA node IP address. Alternatively, the user might choose to use another tool to use SFTP, such as Filezilla.

After being connected, the user should have access to a personal inbox directory where all uploaded files are stored in LEGA while the metadata submission is not finished.

  1. Upload the data file(s) with the command put <filename> on the SFTP shell.

Example:

> sftp -o User=$username -P 2222 -i $privkey_file $lega_ip
Welcome to Local EGA Demo instance
Connected to 146.193.228.54.
sftp> put GCF_009914755.1_T2T-CHM13v2.0_genomic.fna.c4gh
Uploading GCF_009914755.1_T2T-CHM13v2.0_genomic.fna.c4gh to /GCF_009914755.1_T2T-CHM13v2.0_genomic.fna.c4gh
GCF_009914755.1_T2T-CHM13v2.0_genomic.fna.c4gh						100% 3011MB   5.5MB/s   09:06
sftp>

Incorrect or outdated submissions may also be removed from the inbox using the command rm <filename>, this is not valid for submissions that are already located at the staging or vault, though.

Step 3 – Metadata Submission

If the ingestion of the file succeeds, the user will be able to submit the metadata of the dataset.

  1. Access the website (link-soon) and fill the metadata for the ingested files.
  2. If the uploaded files do not appear in the submission portal, the ingestion might have failed, please contact the Helpdesk.

After the submission is accepted by the Helpdesk and released, the file is imported to the vault and the dataset is findable on the EGA website for accessors to request it.

Example:

A. Add a new Run by searching for the file
B. Fill the metadata to add the new Dataset