Trouble making a ggmsa alignment plot
1
0
Entering edit mode
11 months ago

I'm having trouble making an ggmsa alignment plot. I want to do a figure just like this: enter image description here

I already have my alignment in .fasta. Here's part of it

> At5g01950 |626-899 
FSSSTLVGRGGYGKVYRGVLSDN-TVAAIKRAD--EGSLQ-GEKEFLNEIELLSRLHHRN
LVSLIGYCDEESE-QMLVYEFMSNGTLRDWLSAK--GKESLSFGMRIRVALGAAKGILYL
HTEANPPVFHRDIKASNILLDPNFNAKVADFGLSRLAPVLEDEEDVPKHVSTVVRGTPGY
LDPEYFLTHKLTDKSDVYSIGVVFLELLTGMHAISHGK---------NIVREVKTAEQRD
-------MMVSLIDKRME-PW----SMESVEKFAALALRCSHDSPEMRPGMAEVVKELES
L---------L
> HPCA1 |631-905 
FSEANDVGGGGYGKVYRGILPNG-QLIAIKRAQ--QGSLQ-GGLEFKTEIELLSRVHHKN
VVRLLGFCFDRNE-QMLVYEYISNGSLKDSLSGK--SGIRLDWTRRLKIALGSGKGLAYL
HELADPPIIHRDIKSNNILLDENLTAKVADFGLSKLVGDPEK-----THVTTQVKGTMGY
LDPEYYMTNQLTEKSDVYGFGVVLLELLTGRSPIERGKYVVREVK--TKMNKSRSLYD--
--------LQELLDTTIIASSG---NLKGFEKYVDLALRCVEEEGVNRPSMGEVVKEIEN
I---------M
> THE1 |510-783 
FDESSLLGVGGFGRVYKGTLEDG-TKVAVKRGN--PRSEQ-GMAEFRTEIEMLSKLRHRH
LVSLIGYCDERSE-MILVYEYMANGPLRSHLYGA--DLPPLSWKQRLEICIGAARGLHYL
HTGASQSIIHRDVKTTNILLDENLVAKVADFGLSKTGPSLDQ-----THVSTAVKGSFGY
LDPEYFRRQQLTEKSDVYSFGVVLMEVLCCRPALN--PVLPREQV--NIAEWAMAWQKKG
-------LLDQIMDSNLTGKV----NPASLKKFGETAEKCLAEYGVDRPSMGDVLWNLEY
A----------

I think I was able to import it to R with

fasta_file_path <- "path/to/your/file.fasta"

, since fasta_file_path appears in Enviroment.

But now I dont know how to go on. If I follow the steps as specified in this site http://yulab-smu.top/ggmsa/articles/ggmsa.html

I get this error:

Error in if (freq1 > 0.9 && freq2 > 0) { : 


 absent value where TRUE/FALSE is necessary (free translation here)

Please help me solving this problem.

Thank you

R ggmsa • 603 views
ADD COMMENT
0
Entering edit mode
9 months ago
alslonik ▴ 320

To make ggmsa work you need to upload your fasta as BioStrings object:

lbrary(BioStrings)
llibrary(ggmsa)

your_fasta = readAAStringSet("path/to/your/file.fasta")
ggmsa(your_fasta, 300, 350, color = "Clustal", font = "DroidSansMono", char_width = 0.5, seq_name = TRUE )`

They somehow skipped the BioStrings step on their "Getting started" page.

ADD COMMENT

Login before adding your answer.

Traffic: 861 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