Skip to main content

ANOSPP data analysis

Project description

anospp-analysis

Python package for ANOSPP data analysis

ANOSPP is the multiplexed amplicon sequencing assay for Anopheles mosquito species identification and Plasmodium detection. This repository contains the code for analysis of the sequencing results pre-processed with nf-core ampliseq pipeline.

Installation

For released version

conda install -c bioconda anospp-analysis

For development setup, see instructions below

Usage

Key analysis steps are implemented as standalone scripts:

  • anospp-prep takes DADA2 output files and targets primer sequences, demultiplexes the amplicons and yields haplotypes table
  • anospp-qc takes haplotypes table, DADA2 stats table and samples manifest and produces QC plots
  • anospp-plasm blasts Plasmodium sequences against reference dataset to determine species and infer sample infection status
  • anospp-nn compares k-mer profiles of mosquito targets against a reference dataset and provides probabilistic species calls
  • anospp-vae provides finer scale species prediction for An. gambiae complex with VAE projection

Development

Setup

Installation is hybrid with conda + poetry:

git clone git@github.com:malariagen/anospp-analysis.git
cd anospp-analysis
mamba env create -f environment.yml
conda activate anospp_analysis_dev
poetry install

Usage & testing

The code in this repository can be accessed via wrapper scripts:

anospp-qc \
    --haplotypes test_data/haplotypes.tsv \
    --samples test_data/samples.csv \
    --stats test_data/stats.tsv \
    --outdir test_data/qc

Besides, individual components are available as a python API:

$ python
>>> from anospp_analysis.util import *
>>> PLASM_TARGETS
['P1', 'P2']

TODO Automated testing & CI

Adding Python deps

Introducing python dependencies should be done via poetry:

poetry add package_name

This should update both pyproject.toml and poetry.lock files

If the package should be used in development environment only, use

poetry add package_name --dev

To update environment after changes made to pyproject.toml and/or poetry.lock

poetry install

Adding non-Python deps

Introducing non-python dependencies should be done via conda: edit environment.yml, then re-create the conda environment and poetry deps:

mamba env create -f environment.yml
conda activate anospp_analysis
poetry install

Changes in conda environment might also introduce changes to the python installation, in which case one should update poetry lock file

poetry lock

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anospp_analysis-0.3.0.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

anospp_analysis-0.3.0-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file anospp_analysis-0.3.0.tar.gz.

File metadata

  • Download URL: anospp_analysis-0.3.0.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.11 Darwin/23.5.0

File hashes

Hashes for anospp_analysis-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6a4378afe0315966037fd7f77ec2c4e25761037b34bec07415c0b9c418f9666c
MD5 3f2a36aa734c9c907bac13e35bc48ce9
BLAKE2b-256 48aab3bf5112897cf3b1050dc68388652b53c22e805b3f9b7d29ebc7485de5c0

See more details on using hashes here.

File details

Details for the file anospp_analysis-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: anospp_analysis-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.11 Darwin/23.5.0

File hashes

Hashes for anospp_analysis-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13d8b91105f4e806e19349eb74cefe2bbb7a29fccaf131415fb995a0f400ae45
MD5 181117efcc1aa2240d229616f3b141b1
BLAKE2b-256 cbbefa5d28a50cfafcf9fa2ed2fe41ac8d4312982642da06b664a7081569ac31

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page