Skip to content

Generate nucleotide alignment statistics from various file types

License

Notifications You must be signed in to change notification settings

microbemarsh/aln_stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aln_stats

Generate alignment statistics from alignment files (sam, bam or paf files)

Dependencies

Installation

Please make sure to have a working conda installation first. If you don't, please select the appropriate version found here.

# Clone the respository
git clone https://github.com/microbemarsh/aln_stats.git

# Go to repo
cd aln_stats

# Create conda environment
conda env create -n aln_stats -f aln_stats.yml

# Activate conda environment
conda activate aln_stats

Usage

SAMs

# Activate the conda environment
conda activate aln_stats

# Run minimap2 and output the paf file of interest
minimap2 -ax map-ont -t $nproc --cs=long --secondary=no tests/emu_reference.fasta tests/full_length.fa > tests/test.sam

# Run aln_stats (make sure to use the correct order of files)
aln_stats tests/test.sam tests/emu_reference.fasta tests/full_length.fa

# Extract the aligned sequences
samtools fasta -F 4 tests/test.sam > tests/test_sam_queries.fasta

BAMs

# Activate the conda environment
conda activate aln_stats

# Run minimap2 and output the paf file of interest
minimap2 -ax map-ont -t $nproc --cs=long --secondary=no tests/emu_reference.fasta tests/full_length.fa | samtools view -b -o tests/test.bam

# Run aln_stats (make sure to use the correct order of files)
aln_stats tests/test.bam tests/emu_reference.fasta tests/full_length.fa

# Extract the aligned sequences
samtools fasta -F 4 tests/test.bam > tests/test_bam_queries.fasta

PAFs

# Activate the conda environment
conda activate aln_stats

# Run minimap2 and output the paf file of interest
minimap2 -x map-ont -t $nproc -c --cs=long --secondary=no tests/emu_reference.fasta tests/full_length.fa > tests/test.paf

# Run aln_stats (make sure to use the correct order of files)
aln_stats tests/test.paf tests/emu_reference.fasta tests/full_length.fa

# Extract the aligned sequences
paftools.js longcs2seq tests/test.paf tests/full_length.fa

About

Generate nucleotide alignment statistics from various file types

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages