- Fork of the KaKs_Calculator-3.0 project https://ngdc.cncb.ac.cn/biocode/tools/BT000001.
- Calculating selective pressure on coding and non-coding sequences
git clone https://github.com/Chenglin20170390/KaKs_Calculator-3.0.git
cd KaKs_Calculator-3.0/bin;make
- for coding aligned sequences
./KaKs_Calculator-3.0/bin/KaKs -h
- for non-coding aligned sequences
./KaKs_Calculator-3.0/bin/KnKs -h
./bin/KaKs -i examples/coding.axt -o test.kaks
- mafft alignment
sample=ID
mafft --auto test.pep.fa > $sample.pep.mafft.fa
- check alignment from pep and convert alignment to axt format (https://github.com/liaochenlanruo/PAL2NAL/blob/master/pal2nal.pl)
pal2nal.pl -nogap -nomismatch $sample.pep.mafft.fa cds.list.$sample.fa -output clustal > cds.$sample.aln.clustal.fa
AXTConvertor cds.$sample.aln.clustal.fa cds.$sample.aln.clustal.aux
- Ka/Ks analysis
KaKs -i cds.$sample.aln.clustal.aux -o cds.$sample.aln.clustal.aux.kaka.txt
##format to R
python 22.1.kaks.matrix.py cds.$sample.aln.clustal.aux.kaka.txt $sample.kaka.txt
library(ggplot2)
library(pheatmap)
dat <-read.table('$sample.kaks.txt',header=T) ## read input file
### heatmap figure
p<-pheatmap(dat, color = colorRampPalette(c( "white","blue"))(10),
legend_labels = c("low", "median", "high"),
border=T,display_numbers = F,
clustering_distance_rows = "euclidean",
cluster_cols=T,
cluster_rows=T,
clustering_method="ward.D")
p
ggsave(p, filename= "Kaks.heatmap.pdf" , width=30, height=30, units =c( "cm" ),colormodel= "srgb" ) ##save pdf figure
Zhang Z. KaKs_Calculator 3.0: calculating selective pressure on coding and non-coding sequences[J]. Genomics, Proteomics and Bioinformatics, 2022, 20(3): 536-540. https://doi.org/10.1016/j.gpb.2021.12.002