Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to use Vegan::capscale to calculate and plot distance based- redundancy analysis (db-RDA) and add correlation cut-offs in the results #380

Open
Tahsin-Khan opened this issue Sep 9, 2020 · 0 comments

Comments

@Tahsin-Khan
Copy link

I am quite new in using R.

I have a dataset with relative abundances of Genomes against their COG-ids. It is a large data frame with 4214 rows (COG-ids) and 1313 columns (Genomes).

https://drive.google.com/file/d/1byXVMMWYcCgVwqRRLTZV6UJf7ejCBucE/view?usp=sharing

I would like to

make a Bray-Curtis distance-based PCoA plot with my data which will show clusters of similar COG-ids based on their relative abundances from the data frame.

do a distance-based redundancy analysis (db-RDA) to find out which COG-ids are driving the main clusters to set apart from each other.

As there are 4213 COG-ids, I want to use some kind of correlation cut-off in my analysis, so that I get top 20% COG-ids responsible for driving the functions rather than all 4213 in the RDA plot, which will make it look very clumsy.

So far, I have tried to use "capscale" function in Vegan using distance bray to do this analysis but have been getting the error "Error in cbind(x$CCA$v, x$CA$v) : number of rows of matrices must match (see arg 2)" when I am trying to plot the RDA.

With my very small knowledge, I cannot comprehend this problem. Would be very grateful with some help on this problem.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant