issue with visualising cladogram/phylogenetic tree with multiple sequence alignment data in R?
2
0
Entering edit mode
3.0 years ago
Kumar ▴ 60

I would like to visualize tree with multiple sequence alignment. So, I have followed the following code in R. My din.newick file is shown below,

(org1:0.49999997,org2:0.47298786,org3:28.37858179); My din.fasta alignment file shown below,

>org1
ATGCTA
>org2
TAGCAT
>org3
AGTAGT

I have tried the following code,

library(tidyverse)
library(ggtree) 
library(seqinr)
tree = read.tree("din.newick") 
msaplot(p=ggtree(tree), fasta = "din.fasta")
msaplot(p=ggtree(tree) + geom_tiplab(align=TRUE), fasta = "din.fasta")

The above mentioned code is generating tree with the alignment matrix, but the tree root tip labels are not visible. It is either overlapped with matrix or it is not at all visible.

Kindly help me to fix this issue.

r bioconductor alignment R sequencing • 1.4k views
ADD COMMENT
0
Entering edit mode

Hello Dineshkumar K!

It appears that your post has been cross-posted to another site: https://bioinformatics.stackexchange.com/questions/8817/issue-with-visualising-cladogram-phylogenetic-tree-with-multiple-sequence-alignm

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLY
0
Entering edit mode

@SMK, hereafter I would not repeat this mistake.

ADD REPLY
1
Entering edit mode

No problem, just remember to cross-reference at both sites.

ADD REPLY
2
Entering edit mode
3.0 years ago
AK ★ 2.1k

Something like this?

ggtree

By:

msaplot(p = ggtree(tree) + geom_tiplab(align = TRUE, hjust = 1, vjust = -1), fasta = "din.fasta")
ADD COMMENT
0
Entering edit mode

@SMK, It works fine. Thank you.

ADD REPLY
2
Entering edit mode
12 months ago
Biodeer ▴ 40

Check the ggmsa R package written by Dr. Yu Guangchuang's lab. It may help you. http://yulab-smu.top/ggmsa/articles/ggmsa.html

ADD COMMENT

Login before adding your answer.

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