Skip to main content

The anasfv project focuses on analyzing nanopore-sequenced data of PCR-amplified African Swine Fever Virus (ASFV).

Project description

The anasfv project focuses on analyzing nanopore-sequenced data of PCR-amplified African Swine Fever Virus (ASFV).

PyPI

The workflow consists of 4 parts:

Part 1: Using nanopore-sequenced data of PCR-amplified ASFV to assemble a genome.

Part 2: Analyzing the completeness of the assembled ASFV genome.

Part 3: Checking for any evidence of recombination between genotypes I and II.

Part 4: Constructing a phylogenetic tree.

Requirements:

  1. python: 3.11 (tested). Most Python 3 versions should work.
  2. Software versions tested: - Medaka: 1.11.3 - Samtools: 1.17 - BEDTools: 2.26.0 - Minimap2: 2.17-r941 - NanoFilt: 2.8.0 - Homopolish: 0.4.1 - Prodigal: 2.6.3 - Exonerate: 2.4.0 - blast: 2.12.0 - MUSCLE: 5.1

Install requirements:

conda install -c bioconda medaka samtools bedtools minimap2 nanofilt prodigal exonerate blast muscle
conda install -c conda-forge -c bioconda homopolish=0.4.1=pyhdfd78af_1

Install ANASFV:

pip install anasfv

Workflow Example:

Get the number of available processors.

NPROC=$(nproc)

Part 1 (Assembling a genome):

  1. Download all ASFV genomes from NCBI to the "./single_fasta" directory.
download_asfv_genome.py
  1. Trimming.
NanoFilt your_asfv_reads.fastq -q 10 -l 1000 --maxlength 200000 --headcrop 50 > all_trimmed.fq
  1. Find nearest genome as ref.
find_near_ref.py -r single_fasta -f all_trimmed.fq > near.fasta
  1. Use near.fasta as ref to generate sam file.
minimap2 -a near.fasta ./all_trimmed.fq > all-alignment.sam
  1. Generate consensus file.
samtools view -b -F 4 all-alignment.sam > all-alignment.bam
samtools sort -@ ${NPROC} -o all-sorted_alignment.bam all-alignment.bam
samtools consensus -f fasta all-sorted_alignment.bam -o all-assembled.fa
  1. Polish with medaka (For model selection, please refer to medaka ).
medaka_consensus -i all_trimmed.fq -d all-assembled.fa -o all-assembly_medaka_result -m <suitable_model> -t ${NPROC} > medaka.log
  1. Polish with homopolish (model selection: R9.4.pkl/R10.3.pkl).
homopolish polish -a ./all-assembly_medaka_result/consensus.fasta -l ./near.fasta -m <suitable_model> -o homopolish-output
  1. Rename final genome file and move it to the "./single_fasta" directory for Part 2 analysis.
#Rename final genome file and move it to the "./single_fasta" directory
cp ./homopolish_output/consensus_homopolished.fasta ./single_fasta/strain_name.fasta
#Change sequence ID
sed -i '1s/.*/>strain_name/' ./single_fasta/strain_name.fasta

Part 2 (Genome completeness evaluation):

We only established consensus gene sets for genotype I and genotype II. Using -c to assign consensus gene sets. Using OQ504956.1 as example:

completeness.py ./single_fasta/OQ504956.1.fasta -c II > OQ504956.1_completeness.tsv

Part 3 (Recombination test):

Using OQ504956.1 as example:

recombination_test.py ./single_fasta/OQ504956.1.fasta > OQ504956.1_recombination_test.tsv

Part 4 (Constructing a tree):

  1. Download all ASFV genomes from NCBI to the "./single_fasta" directory (If it has already been downloaded in Part 1, please ignore this step).
download_asfv_genome.py
  1. Get aligenments for uDance. ( find cds in all genome files from "./single_fasta" and get a "./aligenments" directory as input for uDance )
get_cds_alignments.py -f single_fasta
  1. Build a tree using uDance.

Perform a tree construction in de-novo mode and an iterative tree construction in tree mode. Refer to uDance

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

anasfv-0.0.3.tar.gz (447.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ANASFV-0.0.3-py2.py3-none-any.whl (452.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file anasfv-0.0.3.tar.gz.

File metadata

  • Download URL: anasfv-0.0.3.tar.gz
  • Upload date:
  • Size: 447.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for anasfv-0.0.3.tar.gz
Algorithm Hash digest
SHA256 36c28734977ea55d357ee999bd5c2aa2f04c96bc52ee56b8807813beb773272e
MD5 605901cbd2407aace31ae8c9729e7236
BLAKE2b-256 bc4fcd5cb4d142df9ebd9b0de887f8ec393b63ea231b0ace4d04ed51908b41e6

See more details on using hashes here.

File details

Details for the file ANASFV-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: ANASFV-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 452.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for ANASFV-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 388a90f6d06607cf74750e6b236dd12aa7a93dd331fcbc95accf46c83bcb417e
MD5 c06e9b87cede608a295f030715887ef4
BLAKE2b-256 cc704b432e863f026802093acb2ad0791ff078be08a91810d960f2712fadbaf7

See more details on using hashes here.

Supported by

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