Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroesb committed Jun 25, 2020
1 parent 8c91d29 commit 503fe6e
Showing 1 changed file with 53 additions and 19 deletions.
72 changes: 53 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,67 @@ The program to perform the following actions:
* cancel: cancel a private object and its dependent objects (**under development**)
* release: release a private object immediately to the public (**under development**)

## The tool dependencies in LINUX
## Tool dependencies

* curl
* Genshi
* subprocess
* shlex
* json
* argparse
* hashlib
* ftplib
* uuid
* datetime
* lxml
* pandas
* python 2.7+ including following packages:
* Genshi
* lxml
* pandas

## Installation

```
pip install ena-upload-cli
```

> Be aware that Windows can give problems with the `curl` commands executed by the script. Check that curl is available in your PATH.
## Usage

```
ENA_upload [-h] --action {add,modify} [--study STUDY]
--center CENTER_NAME --webin_id
WEBIN_ID --password PASSWORD
usage: ENA_upload [-h] --action {add,modify,cancel,release} [--study STUDY]
[--sample SAMPLE] [--experiment EXPERIMENT] [--run RUN]
[--data [FILE [FILE ...]]]
[--data [FILE [FILE ...]]] --center CENTER_NAME --webin_id
WEBIN_ID (--password PASSWORD | --secret SECRET) [-d]
optional arguments:
-h, --help show this help message and exit
--action {add,modify,cancel,release}
add: add an object to the archive
modify: modify an object in the
--study STUDY table of STUDY object
--sample SAMPLE table of SAMPLE object
--experiment EXPERIMENT
table of EXPERIMENT object
--run RUN table of RUN object
--data [FILE [FILE ...]]
data for submission
--center CENTER_NAME specific to your Webin account
--webin_id WEBIN_ID the usermane of your Webin account
--password PASSWORD the password of your Webin account
--secret SECRET .secret file containing the password of your Webin account
-d, --dev Flag to use the dev/sandbox endpoint of ENA.
```

Mandatory arguments: --action, --center, --webin_id, --password.
Mandatory arguments: --action, --center, --webin_id, --password or --secret.

### ENA Webin

A Webin can be made [here](https://www.ebi.ac.uk/ena/submit/sra/#home) if you don't have one already. The *--webin_id* parameter makes use of the full username looking like: `Webin-XXXXX`. Visit [Webin online](https://www.ebi.ac.uk/ena/submit/webin) to check on your submissions or [dev Webin](https://wwwdev.ebi.ac.uk/ena/submit/webin) to check on test submissions.

### The password parameter

To avoid exposing you password through the terminal history, it is recommended to make use of a `.secret` file, containing your password on the first line. Use instead of the *--password* parameter in the ena-upload-cli tool the *--secret* parameter to specify the location of the .secret file.


### dev instance


By default the submission will be done using following url to ENA: https://www.ebi.ac.uk/ena/submit/drop-box/submit/?auth=ENA

Use the *--dev* flag if you want to do a test submission using the tool by the sandbox dev instance of ENA: https://wwwdev.ebi.ac.uk/ena/submit/drop-box/submit/?auth=ENA. A TEST submission will be discarded within 24 hours

## Test the tool

Expand All @@ -69,8 +99,12 @@ outputs:

test command: **add metadata and sequence data**

`python ena_upload.py --action add --center 'your_center_name' --webin_id your_id --password your_password --study example_tables/ENA_template_studies.tsv --sample example_tables/ENA_template_samples.tsv --experiment example_tables/ENA_template_experiments.tsv --run example_tables/ENA_template_runs.tsv --data example_data/*gz`
`ena_upload --action add --center 'your_center_name' --webin_id your_id --password your_password --study example_tables/ENA_template_studies.tsv --sample example_tables/ENA_template_samples.tsv --experiment example_tables/ENA_template_experiments.tsv --run example_tables/ENA_template_runs.tsv --data example_data/*gz --dev`

test command: **modify a metadata**

`python ena_upload.py --action modify --center 'your_center_name' --webin_id your_id --password your_password --study example_tables/ENA_template_studies-2020-05-01T14\:21.tsv`
`ena_upload --action modify --center 'your_center_name' --webin_id your_id --password your_password --study example_tables/ENA_template_studies-2020-05-01T1421.tsv --dev`

test command **.secret file**

`ena-upload-cli --action add --center "VIB - UGENT" --webin_id Webin-56059 --study example_tables/ENA_template_studies.tsv --sample example_tables/ENA_template_samples.tsv --experiment example_tables/ENA_template_experiments.tsv --run example_tables/ENA_template_runs.tsv --data example_data/*gz --dev --secret .secret`

0 comments on commit 503fe6e

Please sign in to comment.