generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add files via upload * Add files via upload * Add files via upload * Delete config_files directory * Delete docs/thanks.md * Delete docs/rules_of_behavior.md * Delete docs/open_practices.md * Delete docs/code-of-conduct.md * Delete docs/DISCLAIMER.md * Delete docs/CONTRIBUTING.md * Delete test_input directory * Delete submission_preparation.py * Delete biosample_sra_submission.py * Delete genbank_submission.py * Delete original_CLI.md * Delete gisaid_uploader.py * Delete gisaid_submission.py * Add files via upload * Update seqsender.py Update version * Add files via upload
- Loading branch information
1 parent
0fd734f
commit 99d5844
Showing
159 changed files
with
44,758 additions
and
2,677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Package: seqsender | ||
Type: Package | ||
Title: Public Database Submission Pipeline | ||
Version: 1.0.0 | ||
Authors@R: | ||
c( | ||
person(given="Dakota", family="Howard", role=c("aut","cre"), | ||
email="psv4@cdc.gov", comment=c(ORCID="0000-0002-7674-0385")), | ||
person(given="Reina", family="Chau", role=c("aut"), | ||
email="snu3@cdc.gov", comment=c(ORCID="0000-0003-3012-1404")), | ||
person(given="Peter", family="Cook", role=c("aut"), | ||
email="ooj4@cdc.gov"), | ||
person(given="Kristine", family="Lacek", role=c("aut"), | ||
email="qgx6@cdc.gov", comment=c(ORCID="0000-0002-6247-5082")), | ||
person(given="Amanda", family="Sullivan", role=c("aut"), | ||
email="xpa3@cdc.gov"), | ||
person(given="Vikram", family="Setlur", role=c("aut"), | ||
email="xoe7@cdc.gov"), | ||
person(given="Thomas", family="Stark", role=c("aut"), | ||
email="ynh4@cdc.gov"), | ||
person(given="Brian", family="Lee", role=c("aut"), | ||
email="fya1@cdc.gov"), | ||
person(given="Ben", family="Rambo-Martin", role=c("aut"), | ||
email="nbx0@cdc.gov", comment=c(ORCID="0000-0002-8591-3954")) | ||
) | ||
Description: seqsender is a Python program that is designed to automate the process of generating | ||
necessary submission files (e.g. submission.xml, submission.zip, etc.) | ||
and then bulk uploading them via FTP to NCBI archives such as Genbank, BioSample, and SRA. | ||
Additionally, the program can batch uploading submissions of meta- and sequence-data to GISAID | ||
using their Command Line Interface Tools (e.g., EpiFlu and EpiCoV CLI). | ||
Currently, the pipeline is capable of uploading Influenza A Virus and SARS-COV-2 data. | ||
RoxygenNote: 7.2.3 | ||
License: GPL-3 + file LICENSE | ||
URL: https://github.com/CDCgov/seqsender | ||
GITHUB_PAGES: https://cdcgov.github.io/seqsender | ||
Docker: cdcgov/seqsender-dev:latest | ||
Encoding: UTF-8 | ||
VignetteBuilder: knitr | ||
BugReports: https://github.com/CDCgov/seqsender/issues | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Create an argument to pull a particular version of micromamba image | ||
ARG micromamba_version | ||
ARG micromamba_version=${micromamba_version:-1.5.3} | ||
|
||
############# base image ################## | ||
FROM --platform=$BUILDPLATFORM ubuntu:focal as base | ||
|
||
# local apt mirror support | ||
# start every stage with updated apt sources | ||
ARG APT_MIRROR_NAME= | ||
RUN if [ -n "$APT_MIRROR_NAME" ]; then sed -i.bak -E '/security/! s^https?://.+?/(debian|ubuntu)^http://'"$APT_MIRROR_NAME"'/\1^' /etc/apt/sources.list && grep '^deb' /etc/apt/sources.list; fi | ||
RUN apt-get update --allow-releaseinfo-change --fix-missing | ||
|
||
############# micromamba image ################## | ||
|
||
FROM --platform=$BUILDPLATFORM mambaorg/micromamba:${micromamba_version} as micromamba | ||
RUN echo "Getting micromamba image" | ||
|
||
############# Build Stage: Final ################## | ||
|
||
# Build the final image | ||
FROM base as final | ||
|
||
# if image defaults to a non-root user, then we may want to make the | ||
# next 3 ARG commands match the values in our image. | ||
ENV MAMBA_USER=$MAMBA_USER | ||
ENV MAMBA_USER_ID=$MAMBA_USER_ID | ||
ENV MAMBA_USER_GID=$MAMBA_USER_GID | ||
ENV MAMBA_ROOT_PREFIX="/opt/conda" | ||
ENV MAMBA_EXE="/bin/micromamba" | ||
|
||
COPY --from=micromamba "$MAMBA_EXE" "$MAMBA_EXE" | ||
COPY --from=micromamba /usr/local/bin/_activate_current_env.sh /usr/local/bin/_activate_current_env.sh | ||
COPY --from=micromamba /usr/local/bin/_dockerfile_shell.sh /usr/local/bin/_dockerfile_shell.sh | ||
COPY --from=micromamba /usr/local/bin/_entrypoint.sh /usr/local/bin/_entrypoint.sh | ||
COPY --from=micromamba /usr/local/bin/_dockerfile_initialize_user_accounts.sh /usr/local/bin/_dockerfile_initialize_user_accounts.sh | ||
COPY --from=micromamba /usr/local/bin/_dockerfile_setup_root_prefix.sh /usr/local/bin/_dockerfile_setup_root_prefix.sh | ||
|
||
# Install system dependencies | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install system libraries of general use | ||
RUN apt-get update --allow-releaseinfo-change --fix-missing \ | ||
&& apt-get install --no-install-recommends -y \ | ||
dos2unix \ | ||
ca-certificates \ | ||
&& apt clean autoclean \ | ||
&& apt autoremove --yes \ | ||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ | ||
|
||
# Create working directory | ||
ENV WORKDIR=/data | ||
|
||
# Set up volume directory | ||
VOLUME ${WORKDIR} | ||
|
||
# Set up working directory | ||
WORKDIR ${WORKDIR} | ||
|
||
# Allow permission to read and write to working directory | ||
RUN chmod -R a+rwx ${WORKDIR} | ||
|
||
# Create a program variable | ||
ENV PROJECT_DIR=/seqsender | ||
|
||
# Set up a volume directory | ||
VOLUME ${PROJECT_DIR} | ||
|
||
# Copy all files to project directory | ||
COPY . ${PROJECT_DIR} | ||
|
||
############ Set-up micromamba environment ################## | ||
|
||
# Copy requirement files to program directory | ||
COPY env.yaml "${PROJECT_DIR}/env.yaml" | ||
|
||
# Set up environments | ||
RUN micromamba install --yes --name base -f "${PROJECT_DIR}/env.yaml" \ | ||
&& micromamba clean --all --yes | ||
|
||
############# Launch PROGRAM ################## | ||
|
||
# Copy bash script to run PROGRAM to docker image | ||
COPY seqsender-kickoff "${PROJECT_DIR}/seqsender-kickoff" | ||
|
||
# Convert bash script from Windows style line endings to Unix-like control characters | ||
RUN dos2unix "${PROJECT_DIR}/seqsender-kickoff" | ||
|
||
# Allow permission to excute the bash script | ||
RUN chmod a+x "${PROJECT_DIR}/seqsender-kickoff" | ||
|
||
# Allow permission to read and write to program directory | ||
RUN chmod a+rwx ${PROJECT_DIR} | ||
|
||
# Export bash script to path | ||
ENV PATH="$PATH:${PROJECT_DIR}" | ||
|
||
# Activate conda environment | ||
ENV PATH="$PATH:${MAMBA_ROOT_PREFIX}/bin" | ||
|
||
# Execute the pipeline | ||
ENTRYPOINT ["tail", "-f", "/dev/null"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# MIRA 1.0.0 | ||
* Github Repo: https://github.com/CDCgov/MIRA | ||
* Documentation: https://cdcgov.github.io/MIRA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
output: rmarkdown::github_document | ||
--- | ||
|
||
```{r, include=FALSE, echo=FALSE, message=FALSE, warning=FALSE} | ||
# R libraries | ||
library(yaml) # for yaml file | ||
# Read in the DESCRIPTION file | ||
description <- yaml::read_yaml("DESCRIPTION") | ||
# Define variables | ||
program <- description$Package | ||
version <- description$Version | ||
# Define github repo | ||
github_repo <- description$URL | ||
# Define github pages URL | ||
github_pages_url <- description$GITHUB_PAGES | ||
``` | ||
|
||
<!-- ![build](https://github.com/montilab/cadra/workflows/rcmdcheck/badge.svg) --> | ||
<!-- ![GitHub issues](https://img.shields.io/github/issues/montilab/cadra) --> | ||
<!-- ![GitHub last commit](https://img.shields.io/github/last-commit/montilab/cadra) --> | ||
|
||
<p style="font-size: 16px;"><em>Public Database Submission Pipeline</em></p> | ||
|
||
**Beta Version**: `r version`. This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome! | ||
|
||
**General Disclaimer**: This repository was created for use by CDC programs to collaborate on public health related projects in support of the [CDC mission](https://www.cdc.gov/about/organization/mission.htm). GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise. | ||
|
||
## Overview | ||
|
||
``r program`` is a Python program that is developed to automate the process of generating necessary submission files and batch uploading them to <ins>NCBI archives</ins> (such as **BioSample**, **SRA**, and **Genbank**) and <ins>GISAID databases</ins> (e.g. **EpiFlu** and **EpiCoV**). Presently, the pipeline is capable of uploading **Influenza A Virus** (FLU) and **SARS-COV-2** (COV) data. However, the dynamic nature of this pipeline can allow for additional uploads of other organisms in future updates or requests. | ||
|
||
## Prerequisites | ||
|
||
- **NCBI Submissions** | ||
|
||
``r program`` utilizes an UI-Less Data Submission Protocol to bulk upload submission files (e.g., *submission.xml*, *submission.zip*, etc.) to NCBI archives. The submission files are uploaded to the NCBI server via FTP on the command line. Before attempting to submit a submission using ``r program``, submitter will need to | ||
|
||
1. Have a NCBI account. To sign up, visit [NCBI website](https://account.ncbi.nlm.nih.gov/). | ||
|
||
2. Required for CDC users and highly recommended for others is creating a center account for your institution/lab [NCBI Center Account Instructions](https://submit.ncbi.nlm.nih.gov/sarscov2/sra/#step6). Center accounts allow you to perform submissions UI-less submissions as your institution/lab. | ||
|
||
3. Required for CDC users and also recommended is creating a submission group in [NCBI Submission Portal](https://submit.ncbi.nlm.nih.gov). A group should include all individuals who need access to UI-less submissions through the web interface with your center account. Each member of the group must also have an individual NCBI account. [NCBI website](https://account.ncbi.nlm.nih.gov/). | ||
|
||
4. Refer to this page for information regarding requirements for GenBank submissions via FTP only. This page applies only for COVID and Influenza [NCBI GenBank FTP Submissions](https://submit.ncbi.nlm.nih.gov/sarscov2/genbank/#step5) For further questions contact <a href="mailto:gb-admin@ncbi.nlm.nih.gov">gb-admin@ncbi.nlm.nih.gov</a> to discuss requirements for submissions. | ||
|
||
5. Coordinate a NCBI namespace name (**spuid_namespace**) that will be used with Submitter Provided Unique Identifiers (**spuid**) in the submission. The liaison of **spuid_namespace** and **spuid** is used to report back assigned accessions as well as for cross-linking objects within submission. The values of **spuid_namespace** are up to the submitter to decide but they must be unique and well-coordinated prior to make a submission. For more information about these two fields, see [BioSample](`r github_pages_url`/articles/biosample_submission.html#metadata) / [SRA](`r github_pages_url`/articles/sra_submission.html#metadata) / [GENBANK](`r github_pages_url`/articles/genbank_submission.html#metadata) metadata requirements. | ||
|
||
- **GISAID Submissions** | ||
|
||
``r program`` makes use of GISAID's Command Line Interface tools to bulk uploading meta- and sequence-data to GISAID databases. Presently, the pipeline only allows upload to EpiFlu (**Influenza A Virus**) and EpiCoV (**SARS-COV-2**) databases. Before uploading, submitter needs to | ||
|
||
1. Have a GISAID account. To sign up, visit [GISAID Platform](https://gisaid.org/). | ||
|
||
2. Request a client-ID for EpiFlu or EpiCoV database in order to use its CLI tool. The CLI utilizes the client-ID along with the username and password to authenticate the database prior to make a submission. To obtain a client-ID, please email <a href="mailto:clisupport@gisaid.org" >clisupport@gisaid.org</a> to request. _**Important note**: If submitter would like to upload a "test" submission first to familiarize themselves with the submission process prior to make a real submission, one should additionally request a test client-id to perform such submissions._ | ||
|
||
3. Download the <a href="`r github_pages_url`/articles/images/fluCLI_download.png" target="_blank">EpiFlu</a> or <a href="`r github_pages_url`/articles/images/covCLI_download.png" target="_blank">EpiCoV</a> CLI from the **GISAID platform** and stored them in the destination of choice prior to perform a batch upload. | ||
|
||
Here is a quick look of where to store the downloaded **GISAID CLI** package. | ||
|
||
![](man/figures/gisaid_cli_dir.png) | ||
|
||
|
||
|
||
## Requirement Files | ||
|
||
Before submitter can perform a submission using ``r program``, make sure the requirement files (such as *config.yaml*, *metadata.csv*, *sequence.fasta*, *raw reads*, etc.) are already prepared and stored in a submission directory of choice. | ||
|
||
(a) To prep for FLU submissions, select one of the databases below to get started: | ||
|
||
> <a href="`r github_pages_url`/articles/biosample_submission.html" target="_blank">BioSample</a> <br> | ||
> <a href="`r github_pages_url`/articles/sra_submission.html" target="_blank">SRA</a> <br> | ||
> <a href="`r github_pages_url`/articles/genbank_submission.html" target="_blank">Genbank</a> <br> | ||
> <a href="`r github_pages_url`/articles/gisaid_flu_submission.html" target="_blank">GISAID</a> <br> | ||
<!-- > <a href="`r github_pages_url`/articles/multiple_databases_flu_submission.html" target="_blank">Multiple databases</a> --> | ||
(b) To prep for COV submissions, select one of the databases below to get started: | ||
|
||
> <a href="`r github_pages_url`/articles/biosample_submission.html" target="_blank">BioSample</a> <br> | ||
> <a href="`r github_pages_url`/articles/sra_submission.html" target="_blank">SRA</a> <br> | ||
> <a href="`r github_pages_url`/articles/genbank_submission.html" target="_blank">Genbank</a> <br> | ||
> <a href="`r github_pages_url`/articles/gisaid_cov_submission.html" target="_blank">GISAID</a> <br> | ||
<!-- > <a href="`r github_pages_url`/articles/multiple_databases_cov_submission.html" target="_blank">Multiple databases</a> --> | ||
## Quick Start | ||
|
||
- [How to run seqsender locally](`r github_pages_url`/articles/local_installation.html) | ||
- [How to run seqsender with Docker](`r github_pages_url`/articles/docker_installation.html) | ||
- [How to run seqsender with Compose](`r github_pages_url`/articles/compose_installation.html) | ||
- [How to run seqsender with Singularity](`r github_pages_url`/articles/singularity_installation.html) | ||
|
||
## Public Domain Standard Notice | ||
|
||
This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/). All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest. | ||
|
||
## License Standard Notice | ||
|
||
The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later. | ||
|
||
This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version. | ||
|
||
This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details. | ||
|
||
You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html | ||
|
||
The source code forked from other open source projects will inherit its license. | ||
|
||
## Privacy Standard Notice | ||
|
||
This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the [Disclaimer](https://github.com/CDCgov/template/blob/master/DISCLAIMER.md) and [Code of Conduct](https://github.com/CDCgov/template/blob/master/code-of-conduct.md). For more information about CDC's privacy policy, please visit [http://www.cdc.gov/other/privacy.html](https://www.cdc.gov/other/privacy.html). | ||
|
||
## Contributing Standard Notice | ||
|
||
Anyone is encouraged to contribute to the repository by [forking](https://help.github.com/articles/fork-a-repo) and submitting a pull request. (If you are new to GitHub, you might start with a [basic tutorial](https://help.github.com/articles/set-up-git).) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the [Apache Software License v2](http://www.apache.org/licenses/LICENSE-2.0.html) or later. | ||
|
||
All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at [http://www.cdc.gov/other/privacy.html](http://www.cdc.gov/other/privacy.html). | ||
|
||
## Records Management Standard Notice | ||
|
||
This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the [CDC web site](http://www.cdc.gov). | ||
|
||
## Additional Standard Notices | ||
|
||
Please refer to [CDC's Template Repository](https://github.com/CDCgov/template) for more information about [contributing to this repository](https://github.com/CDCgov/template/blob/master/CONTRIBUTING.md), [public domain notices and disclaimers](https://github.com/CDCgov/template/blob/master/DISCLAIMER.md), and [code of conduct](https://github.com/CDCgov/template/blob/master/code-of-conduct.md). | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.