.axt formats for pairwise alignments and how to convert to paml
0
0
Entering edit mode
4.9 years ago
spiral01 ▴ 110

I am currently trying to calculate rates of substitution in humans, using the human-chimpanzee pairwise alignment found here: http://hgdownload.soe.ucsc.edu/goldenPath/hg38/vsPanTro6/

My problem is that the alignment is in the .axt format (explained here: https://genome.ucsc.edu/goldenPath/help/axt.html), and I need to use PAML's baseml to conduct analysis on substitution rates. PAML requires the .nuc format and I have no idea how to convert .axt to any other format. Are there any tools out there to convert to .fasta for example? Extensive searching has lead only to a discontinued tool on Galaxy. Any other suggestions would be appreciated.

alignment • 1.4k views
ADD COMMENT
0
Entering edit mode

You can try this one - https://github.com/bxlab/bx-python/blob/master/scripts/axt_to_fasta.py:

$ cat test.axt
0 chr19 3001012 3001075 chr11 70568380 70568443 - 3500
TCAGCTCATAAATCACCTCCTGCCACAAGCCTGGCCTGGTCCCAGGAGAGTGTCCAGGCTCAGA
TCTGTTCATAAACCACCTGCCATGACAAGCCTGGCCTGTTCCCAAGACAATGTCCAGGCTCAGA

1 chr19 3008279 3008357 chr11 70573976 70574054 - 3900
CACAATCTTCACATTGAGATCCTGAGTTGCTGATCAGAATGGAAGGCTGAGCTAAGATGAGCGACGAGGCAATGTCACA
CACAGTCTTCGCATTGAGGTACCAAGTTGTGGATCAGAATGGAAAGCTAGGCTATGATGAGGGACAGTGCGCTGTCACA

$ python axt_to_fasta.py < test.axt
>chr19_3001011_3001075
TCAGCTCATAAATCACCTCCTGCCACAAGCCTGGCCTGGTCCCAGGAGAGTGTCCAGGCTCAGA
>chr11_70568379_70568443
TCTGTTCATAAACCACCTGCCATGACAAGCCTGGCCTGTTCCCAAGACAATGTCCAGGCTCAGA

>chr19_3008278_3008357
CACAATCTTCACATTGAGATCCTGAGTTGCTGATCAGAATGGAAGGCTGAGCTAAGATGAGCGACGAGGCAATGTCACA
>chr11_70573975_70574054
CACAGTCTTCGCATTGAGGTACCAAGTTGTGGATCAGAATGGAAAGCTAGGCTATGATGAGGGACAGTGCGCTGTCACA
ADD REPLY

Login before adding your answer.

Traffic: 2017 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6