Package: bh20-seq-uploader
COVID-19 PubSeq: Public Sequence uploaderThis repository provides a sequence uploader for the COVID-19 Virtual
Biohackathon's Public Sequence Resource project. There are two
versions, one that runs on the command line and another that acts as
web interface. You can use it to upload the genomes of SARS-CoV-2
samples to make them publicly and freely available to other
researchers. For more information see thepaper.To get started, firstinstall the uploader, and use thebh20-seq-uploadercommand toupload your data.InstallationThere are several ways to install the uploader. The most portable is with avirtualenv.Installation withvirtualenvPrepare your system.You need to make sure you have Python, and the ability to install modules such aspycurlandpyopenssl. On Ubuntu 18.04, you can run:sudoaptupdate
sudoaptinstall-yvirtualenvgitlibcurl4-openssl-devbuild-essentialpython3-devlibssl-devCreate and enter your virtualenv.Go to some memorable directory and make and enter a virtualenv:virtualenv--pythonpython3venv
.venv/bin/activateNote that you will need to repeat the. venv/bin/activatestep from this directory to enter your virtualenv whenever you want to use the installed tool.Install the tool.Once in your virtualenv, install this project:Install from PyPi:pip3bh20-seq-uploaderInstall from git:pip3installgit+https://github.com/arvados/bh20-seq-resource.git@masterTest the tool.Try running:bh20-seq-uploader--helpIt should print some instructions about how to use the uploader.Make sure you are in your virtualenv whenever you run the tool!If you ever can't run the tool, and your prompt doesn't say(venv), try going to the directory where you put the virtualenv and running. venv/bin/activate. It only works for the current terminal window; you will need to run it again if you open a new terminal.Installation withpip3 --userIf you don't want to have to enter a virtualenv every time you use the uploader, you can use the--userfeature ofpip3to install the tool for your user.Prepare your system.Just as for thevirtualenvmethod, you need to install some dependencies. On Ubuntu 18.04, you can run:sudoaptupdate
sudoaptinstall-yvirtualenvgitlibcurl4-openssl-devbuild-essentialpython3-devlibssl-devInstall the tool.You can run:pip3install--usergit+https://github.com/arvados/bh20-seq-resource.git@masterMake sure the tool is on yourPATH.Thepip3command will install the uploader in.local/bininside your home directory. Your shell may not know to look for commands there by default. To fix this for the terminal you currently have open, run:exportPATH=$PATH:$HOME/.local/binTo make this change permanent, assuming your shell is Bash, run:echo'export PATH=$PATH:$HOME/.local/bin'>>~/.bashrcTest the tool.Try running:bh20-seq-uploader--helpIt should print some instructions about how to use the uploader.Installation from Source for DevelopmentIf you plan to contribute to the project, you may want to install an editable copy from source. With this method, changes to the source code are automatically reflected in the installed copy of the tool.Prepare your system.On Ubuntu 18.04, you can run:sudoaptupdate
sudoaptinstall-yvirtualenvgitlibcurl4-openssl-devbuild-essentialpython3-devlibssl-devClone and enter the repository.You can run:gitclonehttps://github.com/arvados/bh20-seq-resource.gitcdbh20-seq-resourceCreate and enter a virtualenv.Go to some memorable directory and make and enter a virtualenv:virtualenv--pythonpython3venv
.venv/bin/activateNote that you will need to repeat the. venv/bin/activatestep from this directory to enter your virtualenv whenever you want to use the installed tool.Install the checked-out repository in editable mode.Once in your virtualenv, install with this special pip command:pip3install-e.Test the tool.Try running:bh20-seq-uploader--helpIt should print some instructions about how to use the uploader.Installation with GNU GuixFor running/developing the uploader with GNU Guix seeINSTALL.mdUsageRun the uploader with a FASTA or FASTQ file and accompanying metadata file in JSON or YAML:bh20-seq-uploaderexample/sequence.fastaexample/metadata.yamlWorkflow for Generating a PangenomeAll these uploaded sequences are being fed into a workflow to generate apangenomefor the virus. You can replicate this workflow yourself.An example is to get your SARS-CoV-2 sequences from GenBank inseqs.fa, and then run a series of commandsminimap2-cxasm20-Xseqs.faseqs.fa>seqs.paf
seqwish-sseqs.fa-pseqs.paf-gseqs.gfa
odgibuild-gseqs.gfa-s-oseqs.odgi
odgiviz-iseqs.odgi-oseqs.png-x4000-y500-R-P5Here we convert such a pipeline into the Common Workflow Language (CWL) and
sources can be foundhere.For more information on building pangenome models,see this wiki page.Web InterfaceThis project comes with a simple web server that lets you use the sequence uploader from a browser. It will work as long as you install the packager with thewebextra.To run it locally:virtualenv --python python3 venv
. venv/bin/activate
pip install -e ".[web]"
env FLASK_APP=bh20simplewebuploader/main.py flask runThen visithttp://127.0.0.1:5000/.ProductionFor production deployment, you can usegunicorn:pip3 install gunicorn
gunicorn bh20simplewebuploader.main:appThis runs onhttp://127.0.0.1:8000/by default, but can be adjusted with variousgunicorn options.