baoxingsong / AnchorWave

Sensitive alignment of genomes with high sequence diversity, extensive structural polymorphism and whole-genome duplication variation
MIT License
145 stars 19 forks source link

How to transfer the maf to fasta by msa_view? #67

Closed zhangzhiyangcs closed 5 months ago

zhangzhiyangcs commented 6 months ago

Hi,

I encountered an issue when using the command below:

~/miniconda3/bin/msa_view/msa_view ${prefix}.alignment.f.maf> ${prefix}.fa The error message I received is as follows: ############## /lib64/libc.so.6(+0x82c86)[0x2b31aea43c86] /lib64/libc.so.6(__libc_malloc+0x4c)[0x2b31aea4684c] /home/miniconda3/bin/msa_view(+0x8999)[0x560a54b87999] /home/miniconda3/bin/msa_view(+0x7453)[0x560a54b86453] /home/miniconda3/bin/msa_view(+0x4ae2a)[0x560a54bc9e2a] /home/miniconda3/bin/msa_view(+0xf6af)[0x560a54b8e6af] /home/miniconda3/bin/msa_view(+0x1274e)[0x560a54b9174e] ############# I'm certain that msa_view can convert MAF to FASTA effectively, as I've successfully used it with output from the Cactus software. However, I noticed that the order of entries in the MAF from AnchorWave software seems to be disorganized. Should I sort the MAF entries first? Do you have any advice on this?

Best regards, Zhiyang

baoxingsong commented 6 months ago

I am not the developer of msa_view, but looks like you are having memory management problem. An custom script could be written easily and used to reformat a MAF file into FASTA.

zhangzhiyangcs commented 5 months ago

Hi, Thanks Song, I find a custom shell script that could deal with this problem perfectly. If anyone meet the same question. Try this https://github.com/UCSantaCruzComputationalGenomicsLab/last/blob/master/scripts/maf-sort.sh.

sh maf-sort.sh sample.maf >sampe.maf