Skip to main content

subhelper

helper scripts for submission to ena (microbial + sarscov2) and gisaid (sarscov2 only)

enahelper

interactive site: https://www.ebi.ac.uk/ena/submit/sra/#home webin (xml) submission: https://www.ebi.ac.uk/ena/submit/webin/

gisaidsub USAGE

usage: gisaidsub.py [-h] [-v] [--version] [--template TEMPLATE]
                    [--outputdir OUTPUTDIR] [--fasta_output FASTA_OUTPUT]
                    [--field_mappings FIELD_MAPPINGS]
                    [--global_values GLOBAL_VALUES]
                    meta_sheet fasta_dir

gisaidsub prepares files for gisaid sub using the interactive batch
submission.

positional arguments:
  meta_sheet            path to metadata sheet
  fasta_dir             directory of fasta files

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         verbose output
  --version             show program's version number and exit
  --template TEMPLATE   Path to GISAID template
  --outputdir OUTPUTDIR
                        output directory
  --fasta_output FASTA_OUTPUT
                        fasta output filename
  --field_mappings FIELD_MAPPINGS
                        field mappings YAML
  --global_values GLOBAL_VALUES
                        global values YAML

Licence: GPLv3 by Nabil-Fareed Alikhan <nabil@happykhan.com>

gisaidsub explained

The way the script works is that you first need a directory of all the fasta consensus files in one directory.

You then need an existing sheet of metadata, usually this is provided to you.

You then need to make two yaml files, that tell the script rules on what fields map to what. First field, is the name that GISAID wants in its table, the second is what its call in your sheet. e.g.

covv_location: Location
covv_collection_date: Date_of_Collection
covv_gender: Gender
covv_patient_age: Age
sample_name: Sample

Then you want to have another yaml file of "globals", values that apply to every record, such as.

sample_prefix: MYSample-
submitter: <Your_gisiad_id>
covv_seq_technology: Illumina
covv_orig_lab: <originating lab>
covv_orig_lab_addr: <originating lab address>
covv_subm_lab: <submitting lab>
covv_subm_lab_addr: <submitting lab address> 
covv_authors: <authors>
country: <country collection>
continent: <continent>

You can add in as many of the standard gisaid fields. See gisaidschema or GISAID documentation for what those fields could be.

You then run gisaidhelper:

python gisaidsub.py metadata_they_gave.csv  all_fasta_dir --outputdir my_output  --field_mapping my_first_file.yaml --global_values something_global.yaml  

The script then:

  • takes you csv input swaps the field names as per the mapping yaml and add in the global info.
  • then it validates it with the gisaidscheme.py and produces a csv for submission.
  • It also goes to the fasta dir and merges the sequences into a single file (this is what gisaid wants)
  • and renames each sequence so it is consistent with the metadata. i.e. changes it to hcov-19/X/X/2021

Metadata

Release files for subhelper 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for subhelper 1.0.8
File Size Uploaded
subhelper-1.0.8.tar.gz 24.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for subhelper 1.0.8
File Interpreter ABI Platform
subhelper-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 49.6 kB

Release files / subhelper-1.0.8.tar.gz

Download URL subhelper-1.0.8.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0e335684415eeefaaf605429ca1fa51bdf57c4c7a4b81de460565cf10f9c103b
BLAKE2b-256 checksum
How to use checksums
5e36069f547db366a11c9b9e241f3a15f2f9f76d13eec3946e8775151f6be3bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / subhelper-1.0.8-py3-none-any.whl

Download URL subhelper-1.0.8-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8de53b79d5ed8e38a03a123ca81f4a09728ff02a54b7d2379ba12cf0fd5f84b4
BLAKE2b-256 checksum
How to use checksums
ad74a678c8dac537a4b4121206888d0bbb817dde8529c627e38dd719f96b80dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page