Skip to content

Commit

Permalink
[typos] Proof-reading
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Blagoev Topolsky <[email protected]>
Co-authored-by: Jonathan Waehrer <[email protected]>
  • Loading branch information
DrYak and Jonathan Waehrer committed Sep 4, 2023
1 parent 135bd9e commit abf895c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Here are the available command-line tools:
| `cojac cooc-colourmut` | display a JSON or YAML file as a coloured output on the terminal |
| `cojac cooc-pubmut` | render a JSON or YAML file to a table as in the publication |
| `cojac cooc-tabmut` | export a JSON or YAML file as a CSV/TSV table for downstream analysis (e.g.: RStudio) |
| `cojac cooc-curate` | an (experimental) tool to assist evaluating the quality of variant definitions by looking at mutations' or cooccurences' frequencies from [covSPECTRUM](https://cov-spectrum.org) |
| `cojac cooc-curate` | an (experimental) tool to assist evaluating the quality of variant definitions by looking at mutations' or cooccurrences' frequencies from [covSPECTRUM](https://cov-spectrum.org) |
| `cojac phe2cojac` | a tool to generate new variant definition YAMLs for cojac using YMLs available at [UK Health Security Agency (UKHSA) _Standardised Variant Definitions_](https://github.com/ukhsa-collaboration/variant_definitions/) |
| `cojac sig-generate` | a tool to generate list of mutations by querying [covSPECTRUM](https://lapis.cov-spectrum.org/) and assist writing variant definition YAMLs for cojac |
| `cojac sig-generate` | a tool to generate a list of mutations by querying [covSPECTRUM](https://lapis.cov-spectrum.org/) and assist writing variant definition YAMLs for cojac |

Use option `-h` / `--help` to see available command-line options:

Expand Down Expand Up @@ -58,7 +58,7 @@ Options:
ref\tstart\tstop\tamp_num\tpool\tstrand
--sort / --no-sort sort the bedfile by 'reference name' and
'start position' (default: sorted)
-#, --cooc COOC minimum number of cooccurences to search for
-#, --cooc COOC minimum number of cooccurrences to search for
-Q, --amplicons, --in-amp, --in-amplicons YAML
use the supplied YAML file to query
amplicons instead of building it from BED +
Expand All @@ -68,9 +68,9 @@ Options:
--comment / --no-comment add comments in the out amplicon YAML with
names from BED file (default: comment the
YAML)
-j, --json JSON output results to as JSON file
-y, --yaml YAML output results to as yaml file
-t, --tsv TSV output results to as (raw) tsv file
-j, --json JSON output results to a JSON file
-y, --yaml YAML output results to a yaml file
-t, --tsv TSV output results to a (raw) tsv file
-d, --dump dump the python object to the terminal
--help Show this message and exit.

Expand Down Expand Up @@ -143,11 +143,11 @@ Options:
$ cojac cooc-curate --help
Usage: cojac cooc-curate [OPTIONS] [VOC]...

Helps determining specific mutations and cooccurences by querying CoV-
Helps determining specific mutations and cooccurrences by querying CoV-
Spectrum

Options:
-u, --url URL url to use when contact covspectrum (e.g.
-u, --url URL url to use when querying covspectrum (e.g.
https://lapis.cov-spectrum.org/open/v1,
https://lapis.cov-spectrum.org/gisaid/v1, etc.)
-a, --amplicons YAML use the YAML file generated by mutbamscan to
Expand All @@ -159,10 +159,10 @@ Options:
-l, --low FLOAT Fraction under which a mutation must be found
among other lineages
--collapse / --no-collapse combine counts of all sublineages together and
consider a signle value that corresponds to a
consider a single value that corresponds to a
lineages family (e.g.: count all B.1.612.2*
together). This is especially useful for
assessing signature of old variants that have
assessing signatures of old variants that have
branched out by now.
--colour / --no-colour use coloured output
--help Show this message and exit.
Expand Down Expand Up @@ -192,7 +192,7 @@ Usage: cojac sig-generate [OPTIONS]
querying covSPECTRUM

Options:
-u, --url URL url to use when contact covspectrum (e.g.
-u, --url URL url to use when querying covspectrum (e.g.
https://lapis.cov-spectrum.org/open/v1,
https://lapis.cov-spectrum.org/gisaid/v1, etc.)
--var, --variant PANGO Pangolineage of the root variant to list [required]
Expand Down Expand Up @@ -237,9 +237,9 @@ curl -o SARS-CoV-2.v532.primer.bed 'https://raw.githubusercontent.com/artic-netw
# convert it into an *insert* BED file
scheme-convert SARS-CoV-2.v532.primer.bed --to bed --bed-type cojac -o SARS-CoV-2.v532.cojac_insert.bed
```
> - for an useful application of *primer* BED files to searching for possible drop-outs, see [section _Mutations affecting primers_ below](#mutations-affecting-primers).
> - for a useful application of *primer* BED files to searching for possible drop-outs, see [section _Mutations affecting primers_ below](#mutations-affecting-primers).
These protocols produces ~400bp long amplicons, and thus needs to be sequenced with, e.g., paired end sequencing with read length 250.
These protocols produce ~400bp long amplicons, and thus needs to be sequenced with, e.g., paired end sequencing with read length 250.

Select the desired bedfile using the `-b` / `--bedfile` option.

Expand All @@ -265,7 +265,7 @@ cojac phe2cojac --shortname 'om2' --yaml voc/omicron_ba2_mutations.yaml variant_
cojac cooc-curate voc/omicron_ba2_mutations.yaml
# adjust the content of the YAML files to your needs
```
> - Another possibility is obtaining an exhausive list of mutations from covSpectrum or [covariants.org's repository](https://github.com/hodcroftlab/covariants/tree/master/defining_mutations)
> - Another possibility is obtaining an exhaustive list of mutations from covSpectrum or [covariants.org's repository](https://github.com/hodcroftlab/covariants/tree/master/defining_mutations)
```bash
# display the exhaustive list of all mutations known to appear on Omicron BA.1 on covSPECTRUM:
cojac sig-generate --url https://lapis.cov-spectrum.org/open/v1 --variant BA.1 | tee list_ba1.yaml
Expand Down Expand Up @@ -319,11 +319,11 @@ cojac cooc-mutbamscan -b nCoV-2019.insert.V3.bed -m voc/ -t work/samples.tsv -p

> ***Note:** Warning, it is much slower as each alignment is analyzed sequentially.
#### Number of cooccurences
#### Number of cooccurrences

By default `cooc-mutbamscan` will look for cooccurrences of at least 2 mutations on the same amplicon. You can change that number using option `-#`/`--cooc`:

- you can increase it to e.g.: 3 if the variants you study requires more stringent identification
- you can increase it to e.g.: 3 if the variants you study require more stringent identification
- you can set it to 1, to also count isolated occurrences - in this case `cooc-mutbamscan` will also double as a generic (non coorcurrence-aware) variant caller, so you can get all counts with a single tool.

#### Store the amplicon query
Expand All @@ -337,7 +337,7 @@ This is useful for sharing the exact same request accross multiple parallel COJA
cojac cooc-mutbamscan -b nCoV-2019.insert.V3.bed -m voc/ -A amplicons.v3.yaml
# adjust the content of amplicons.v3.yaml

# now have a look at the frequencies of mutation cooccurences using covSPECTRUM
# now have a look at the frequencies of mutation cooccurrences using covSPECTRUM
cojac cooc-curate -a amplicons.v3.yaml voc/omicron_ba2_mutations.yaml voc/omicron_ba1_mutations.yaml voc/delta_mutations.yaml
# reuse the amplicon
cojac cooc-mutbamscan -Q amplicons.v3.yaml -a sam1.bam -y cooc-sam1.yaml
Expand Down Expand Up @@ -457,7 +457,7 @@ cojac cooc-mutbamscan --voc omicron_ba286_mutations_full.yaml --bedfile SARS-CoV
```


This will yields entries like:
This will yield entries like:
```yaml
50_ombba286: [7819, 7850, 7512, 7738, {7842: G}] # SARS-CoV-2_25_RIGHT
```
Expand Down
8 changes: 4 additions & 4 deletions cojac/cooc_curate.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def freqperlineage(mutations, lineages):


def rank(sublineages, freqs, limit=0.05):
"""find ranks of occurence of:
"""find ranks of occurrence of:
- last sublineages still part of the seeked lineages
- first other lineages which is not part of the seeked one
- last member still above the limit
Expand Down Expand Up @@ -275,7 +275,7 @@ def curate_muts(


@click.command(
help="Helps determining specific mutations and cooccurences by querying covSPECTRUM",
help="Helps determining specific mutations and cooccurrences by querying covSPECTRUM",
epilog="This tool queries LAPIS, see https://lapis-docs.readthedocs.io/en/latest/",
)
@click.option(
Expand All @@ -285,7 +285,7 @@ def curate_muts(
required=False,
default=None,
type=str,
help="url to use when contact covspectrum (e.g. https://lapis.cov-spectrum.org/open/v1, https://lapis.cov-spectrum.org/gisaid/v1, etc.)",
help="url to use when querying covspectrum (e.g. https://lapis.cov-spectrum.org/open/v1, https://lapis.cov-spectrum.org/gisaid/v1, etc.)",
)
@click.option(
"-a",
Expand Down Expand Up @@ -325,7 +325,7 @@ def curate_muts(
"--collapse/--no-collapse",
required=False,
default=True,
help="combine counts of all sublineages together and consider a signle value that corresponds to a lineages family (e.g.: count all B.1.612.2* together). This is especially useful for assessing signature of old variants that have branched out by now.",
help="combine counts of all sublineages together and consider a single value that corresponds to a lineages family (e.g.: count all B.1.612.2* together). This is especially useful for assessing signatures of old variants that have branched out by now.",
)
@click.option(
"--colour/--no-colour",
Expand Down
10 changes: 5 additions & 5 deletions cojac/cooc_mutbamscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def make_amplicons_dict(amp_bed, mut_dict, voc_name="", cooc=2):
Returns:
amplicons_dict: dict() with entries of the form:
*amplicon_number*_*voc_name* : [start, stop, {position1 : mutation1, position2 : mutation2 , ...}]
for each amplicon where cooccurences could be found
for each amplicon where cooccurrences could be found
"""
mut_df = pd.DataFrame({"position": mut_dict.keys(), "mutation": mut_dict.values()})
amplicons_dict = {}
Expand Down Expand Up @@ -490,7 +490,7 @@ def flowseq_rep(dumper, data):
required=False,
default=2,
type=int,
help="minimum number of cooccurences to search for",
help="minimum number of cooccurrences to search for",
)
# TODO: use mutually exclusive groups
@click.option(
Expand Down Expand Up @@ -530,7 +530,7 @@ def flowseq_rep(dumper, data):
required=False,
default=None,
type=str,
help="output results to as JSON file",
help="output results to a JSON file",
)
@click.option(
"-y",
Expand All @@ -540,7 +540,7 @@ def flowseq_rep(dumper, data):
required=False,
default=None,
type=str,
help="output results to as yaml file",
help="output results to a yaml file",
)
@click.option(
"-t",
Expand All @@ -549,7 +549,7 @@ def flowseq_rep(dumper, data):
required=False,
default=None,
type=str,
help="output results to as (raw) tsv file",
help="output results to a (raw) tsv file",
)
@click.option(
"-d",
Expand Down
4 changes: 2 additions & 2 deletions cojac/sig_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
required=False,
default=None,
type=str,
help="url to use when contact covspectrum (e.g. https://lapis.cov-spectrum.org/open/v1, https://lapis.cov-spectrum.org/gisaid/v1, etc.)",
help="url to use when querying covspectrum (e.g. https://lapis.cov-spectrum.org/open/v1, https://lapis.cov-spectrum.org/gisaid/v1, etc.)",
)
@click.option(
"--var",
Expand Down Expand Up @@ -64,7 +64,7 @@
metavar="FREQ",
default=None,
type=float,
help="Use a different minimum frequency for deletions (useful early on when there are few sequences and some of those were produced by pipeline that don't handle deletions)",
help="Use a different minimum frequency for deletions (useful early on when there are few sequences and some of those were produced by pipelines that don't handle deletions)",
)
@click.option(
"-s",
Expand Down

0 comments on commit abf895c

Please sign in to comment.