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).

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: - Biopython: 1.8.1 - Pandas: 2.0.3 - 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
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.1.tar.gz (13.9 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.1-py2.py3-none-any.whl (25.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: anasfv-0.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for anasfv-0.0.1.tar.gz
Algorithm Hash digest
SHA256 77bce28587a02de8051870830dbfbac764343c173df3a3e9b8bae060363dafba
MD5 eca52b829751ceb3ca01d500ff2db522
BLAKE2b-256 26c24fdcd52e846568a1f144c177fb9f05cc02dfb2aa4a94e8adcf3c14175e35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ANASFV-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for ANASFV-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e910220fcd595546b8f8905c296a11a8d8240931f1000462e4bbfed6ccb329b1
MD5 8dba048d77a47deff12e1dc7a0f7594d
BLAKE2b-256 8e28d694317f6bf3fdc0b5509a1cb48bde46589dd862d5e561b778867a9c1515

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