diff --git a/docs/1_install.md b/docs/1_install.md index 9eadcf0..687b04e 100644 --- a/docs/1_install.md +++ b/docs/1_install.md @@ -5,22 +5,17 @@ permalink: /installation # Installation -## Pre-compiled binaries - -Pre-compiled binaries are the fastest and easiest way to get _qax_. To get the latest version, -use the following command, otherwise check the -[stable releases](https://github.com/telatin/bamtocov/releases). ## Install via Miniconda -```note -Miniconda installation has been tested on MacOS and Linux, -but being _qax_ a single binary, if the precompiled works for you we recommend it. -``` - -Alternatively, you can install _bamtocov_ from BioConda, if you have _conda_ installed: +You can install _bamtocov_ from BioConda, if you have [_conda_](https://docs.conda.io/en/latest/miniconda.html) installed: ``` conda install -c conda-forge -c bioconda bamtocov ``` + +## Pre-compiled binaries + +We release pre-compiled binaries for Linux, that can be downloaded from the +[GitHub releases page](https://github.com/telatin/bamtocov/releases). diff --git a/docs/2_usage.md b/docs/2_usage.md index c70cf65..b3b4014 100644 --- a/docs/2_usage.md +++ b/docs/2_usage.md @@ -2,98 +2,33 @@ sort: 2 permalink: /usage --- -# General usage -`qax` is composed by five subprogram, and the general syntax is: +# bamtocov -``` -qax [program] parameters -``` +```text +BamToCov 2.0.2 -The programs are: -- **list** (it's the default action and can be omitteed) -- **extract** or **x** -- **citations** or **c** -- **provenance** or **p** -- **view** or **v** + Usage: bamtocov [options] [] -## list +Arguments: + the alignment file for which to calculate depth (default: STDIN) +Core options: + -p, --physical Calculate physical coverage + -s, --stranded Report coverage separate by strand + -w, --wig Output in wig format (using fixed ) +Target files: + -r, --regions Target file in BED or GFF format (detected with the extension) + -t, --type GFF feature type to parse [default: CDS] + -i, --id GFF identifier [default: ID] -This is the default module, and can be used to list the properties of one or more artifacts. +BAM reading options: + -T, --threads BAM decompression threads [default: 0] + -F, --flag Exclude reads with any of the bits in FLAG set [default: 1796] + -Q, --mapq Mapping quality threshold [default: 0] -Some features: -* Supports multiple files at once -* 100X times faster than Qiime2 -* Can be used to find an artifact given the ID - -Example: -``` -qax_mac -b -u input/*.* -┌───────────────────────────┬────────────────┬─────────────────────────┬─────────────────────────────┐ -│ ID │ Basename │ Type │ Format │ -├───────────────────────────┼────────────────┼─────────────────────────┼─────────────────────────────┤ -│ bb1b2e93-...-2afa2110b5fb │ rep-seqs.qza │ FeatureData[Sequence] │ DNASequencesDirectoryFormat │ -│ 313a0cf3-...-befad4ebf2f3 │ table.qza │ FeatureTable[Frequency] │ BIOMV210DirFmt │ -│ 35c32fe7-...-85ef27545f00 │ taxonomy.qzv │ Visualization │ HTML │ -└───────────────────────────┴────────────────┴─────────────────────────┴─────────────────────────────┘ -``` - -## extract - - - -This program extract the content of an artifact. By default, if a single file is present it will be extracted in the specified path. If multiple files are present, a directory containing them will be created instead. - -_Example:_ -``` -# Extract representative sequences (will be called rep-seqs.fasta) -qax x -o ./ rep-seqs.qza - -# Extract a visualization (a folder called "taxonomy" will be created) -qax x -o ./ taxonomy.qzv -``` - -## citations - -Each Qiime module provides the citations for the software and resources that it uses, storing the citations in BibTeX format inside the artifacts. The cite module allows to extract all the citations from a list of artifacts, removing the duplicates, thus effectively allowing to prepare the bibliography for a complete Qiime2 analysis. - -_Example:_ -``` -qax c files/*.qza > bibliography.bib -``` - -## provenance - -This program allows to print the provenance of an artifact, or to produce a [publication grade graph](docs/qax-provenance.png) of the provenance. - -_Example:_ -``` -# To view a summary -qax p taxonomy.qzv - -# To save the plot -qax p -o graph.dot taxonomy.qza -``` - - -## view - -This program allows to print the content of an artifact data file to the terminal. -If the artifact contains a single file, it will be printed. Otherwise the user can specify one or multiple files to be printed, and if none -is specified, a list of files will be printed. - -``` -# Example: count the number of representative sequences -qax view rep-seqs.qza | grep -c '>' -``` - -## make - -This program converts a directory containing a website (index.html) into a -_visualization_ artifact. - -``` -qax make -o report.qzv /path/to/webpage/ -``` +Other options: + --debug Enable diagnostics + -h, --help Show help +``` \ No newline at end of file diff --git a/docs/3_examples.md b/docs/4_examples.md similarity index 91% rename from docs/3_examples.md rename to docs/4_examples.md index 0cdd04a..5e1ffee 100644 --- a/docs/3_examples.md +++ b/docs/4_examples.md @@ -1,5 +1,5 @@ --- -sort: 3 +sort: 4 permalink: /examples --- # Usage examples diff --git a/docs/readme.md b/docs/readme.md index 9b23df7..25fc21c 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -2,3 +2,23 @@ - :book: Documentation: - :package: Github: + +**BamToCov** is a suite of tools for coverage analysis written in Nim and built upon the +memory efficient algorithm of [**covtobed**](https://github.com/telatin/covtobed). + +The program uses [_htslib_](https://www.htslib.org) to parse BAM/CRAM files, and specifically the Nim-wrapper +[_hts-nim_](https://github.com/brentp/hts-nim). + + + +We designed **BamToCov** to fill some gaps in coverage analysis: +1. Accepting input streams (i.e. not requiring the BAM index, at the expense of speed) +1. Enabling _per strand_ coverage analysis +1. Enabling the _physical coverage_ analysis +1. Using a minimum amount of memory (minimum memory usage) + +This makes **BamToCov** a useful companion especially when testing pipelines on small datasets. + +For coverage analysis of large datasets it can be useful to consider [Mosdepth](https://github.com/brentp/mosdepth), +that uses indexed BAM/CRAM files as input and is - to our knowledge - the fastest tool for coverage +analyses. \ No newline at end of file