Skip to content

Commit

Permalink
fix website deploy and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ji committed Aug 31, 2023
1 parent d06c598 commit ea49c30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 54 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
56 changes: 2 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,3 @@
# ViralConsensus
ViralConsensus is a fast and memory-efficient tool for calling viral consensus genome sequences directly from read alignment data. ViralConsensus is orders of magnitude faster and more memory-efficient than existing methods. Further, unlike existing methods, ViralConsensus can pipe data directly from a read mapper via standard input and performs viral consensus calling on-the-fly, making it an ideal tool for viral sequencing pipelines.
## ViralWasm-Consensus

# Installation
ViralConsensus is written in C++ and depends on htslib. You can simply download the latest release tarball (or clone the repo) and compile with `make`:

```bash
# install dependencies
sudo apt-get install libbz2-dev libcurl4-openssl-dev liblzma-dev

# install ViralConsensus
git clone https://github.com/niemasd/ViralConsensus.git
cd ViralConsensus
make
sudo mv viral_consensus /usr/local/bin/ # optional; install NGG executables globally
```

You can also find a Docker container of ViralConsensus on DockerHub: [niemasd/viral_consensus](https://hub.docker.com/r/niemasd/viral_consensus)

# Usage
```
viral_consensus -i IN_READS -r REF_GENOME -o OUT_CONSENSUS [-op OUT_POS_COUNTS] [-oi OUT_INS_COUNTS] [-q MIN_QUAL] [-d MIN_DEPTH] [-f MIN_FREQ] [-a AMBIG] [-p PRIMER_BED] [-po PRIMER_OFFSET]
-i/--in_reads IN_READS Input reads file (CRAM/BAM/SAM), or '-' for standard input
-r/--ref_genome REF_GENOME Input reference genome (FASTA)
-o/--out_consensus OUT_CONSENSUS Output consensus genome (FASTA), or '-' for standard output
-op/--out_pos_counts OUT_POS_COUNTS Output position counts (TSV), or '-' for standard output (default: don't output)
-oi/--out_ins_counts OUT_INS_COUNTS Output insertion counts (JSON), or '-' for standard output (default: don't output)
-q/--min_qual MIN_QUAL Minimum base quality to count base in counts (default: 20)
-d/--min_depth MIN_DEPTH Minimum depth to call base/insertion in consensus (default: 10)
-f/--min_freq MIN_FREQ Minimum frequency to call base/insertion in consensus (default: 0.5)
-a/--ambig AMBIG Ambiguous symbol (default: N)
-p/--primer_bed PRIMER_BED Primer file (BED)
-po/--primer_offset PRIMER_OFFSET Number of bases after primer to also trim (default: 0)
-v/--version Print version number
-h/--help Print this usage message
```

## Piping from Read Mapper
Because ViralConsensus does not require reads to be sorted, data can be piped directly from the read mapper to ViralConsensus to avoid unnecessary disk I/O (and thus improve speed):

```bash
# ViralConsensus is single-threaded, so if running many samples, best to run mapper single-threaded as well and parallelize across samples
minimap2 -t 1 -a -x sr reference.fas reads.fastq.gz | viral_consensus -i - -r reference.fas -o consensus.fas
```

Users will likely want to keep the output of the read mapper (e.g. as a compressed BAM file) for other downstream analyses, but rather than writing the output SAM/BAM/CRAM to disk and *then* having ViralConsensus read from that file, `tee` should be used instead to send the stream down two (or more) paths:

```bash
minimap2 -t 1 -a -x sr reference.fas reads.fastq.gz | tee >(viral_consensus -i - -r reference.fas -o consensus.fas) | samtools view -b -@ 1 > reads.bam
```

# Citing ViralConsensus
If you use ViralConsensus in your work, please cite:

> Moshiri N (2023). "ViralConsensus: A fast and memory-efficient tool for calling viral consensus genome sequences directly from read alignment data." *Bioinformatics*. btad317. [doi:10.1093/bioinformatics/btad317](https://doi.org/10.1093/bioinformatics/btad317)
A client-side WebAssembly pipeline for viral consensus sequence calling. For an offline version of this site, please see the offline-mode branch: https://github.com/Niema-Lab/ViralWasm-Consensus/tree/offline-mode

0 comments on commit ea49c30

Please sign in to comment.