Closed limin321 closed 3 years ago
Hi, Limin
The input FASTA file dispenses with the need for system.file()
function.
nt_sequence <- system.file("extdata","/Users/dklabuser/limin/Dissertation_papers/dissertation/chapter4_genetic_diversity/RB_aln.fasta", package = "ggmsa")
just specify the path directly, like this:
nt_sequence <- "/Users/dklabuser/limin/Dissertation_papers/dissertation/chapter4_genetic_diversity/RB_aln.fasta"
Best, Lang
Hi, Limin
The input FASTA file dispenses with the need for
system.file()
function.
nt_sequence <- system.file("extdata","/Users/dklabuser/limin/Dissertation_papers/dissertation/chapter4_genetic_diversity/RB_aln.fasta", package = "ggmsa")
just specify the path directly, like this:
nt_sequence <- "/Users/dklabuser/limin/Dissertation_papers/dissertation/chapter4_genetic_diversity/RB_aln.fasta"
Best, Lang
Hi, Lang,
Thank you so much! It works now. I actually follow the codes in the tutorial here https://github.com/YuLab-SMU/ggmsa
Now I want to graph the alignment with the tree, there is an error again, I follow the tutorial codes,
# to combine the above two trees into one
nt_sequence <- "/Users/dklabuser/limin/Dissertation_papers/dissertation/chapter4_genetic_diversity/RB_aln.fasta"
x <- readDNAStringSet(nt_sequence)
data1 = tidy_msa(nt_sequence)
p1 + geom_facet(geom = geom_msa, data = data1, panel = "msa", font = Null, color = "Chemistry_AA") +
xlim_tree(1)
And there is an error again,
Any suggestion on what may cause this error?
Thank you so much! Best, Limin
p1 + geom_facet(geom = geom_msa, data = data1, panel = "msa", font = Null, color = "Chemistry_AA") + xlim_tree(1)
Null
is illegal in R, pls using NULL
instead of it.
Besides,we recommend the NT color scheme (color = "Chemistry_NT"
) when the input is DNA alignment.
p1 + geom_facet(geom = geom_msa, data = data1, panel = "msa", font = Null, color = "Chemistry_AA") + xlim_tree(1)
Null
is illegal in R, pls usingNULL
instead of it. Besides,we recommend the NT color scheme (color = "Chemistry_NT"
) when the input is DNA alignment.
Hi Lang,
Thank you so much. Everything works now. The graph is so beautiful!
Best, Limin
Hi all,
I want to create a graph combing the phylogenetic tree, fasta sequence, and some phenotypic traits. When I first tried msaplot() to align the fasta sequence with the tree., there is no issue. Now I use ggmsa to align the tree with corresponding fasta file, it generates the following error message: "Error in if (freq > 0.9) { : missing value where TRUE/FALSE needed"
Here is my r code:
Here is the error message of the previous code:
Does anyone know what goes wrong with my codes? and how to solve this issue Your help is greatly appreciated!
Best, Limin