Question: vegdist for beta diversity
0
gravatar for nabiyogesh
4 months ago by
nabiyogesh0
nabiyogesh0 wrote:

Hi,

I am trying to use vegan bioconducter package for beta diversity and permutation analysis for amplicon data but it is giving distance according to ASV instead of sample names, please help me with it.

> werra_sp <- read.table("convent.fert.root.count.txt",header=T,sep='\t',check.names=F,row.names=1)
    > werra_env <- read.table("werra.env.txt",header=T,sep='\t',check.names=F,row.names=1)
    > str(werra_sp)
    'data.frame':   1327 obs. of  18 variables:

     $ Root-19.S46.L001: int  44 0 52 16 13 0 0 32 7 0 ...

     $ Root-22.S56.L001: int  0 0 114 0 0 0 0 40 7 0 ...

     $ Root-24.S66.L001: int  43 0 484 24 0 6 0 17 0 0 ...

     $ Root-25.S76.L001: int  22 0 82 19 0 0 0 31 0 22 ...

     $ Root-26.S6.L001 : int  0 14 0 0 0 0 0 10 0 0 ...


    > str(werra_env)

    'data.frame':   18 obs. of  2 variables:

     $ Treatment: Factor w/ 1 level "convent.fert.": 1 1 1 1 1 1 1 1 1 1 ...

     $ Region   : Factor w/ 2 levels "Mymensingh","Rajshahi": 1 1 1 1 1 1 1 1 1 2

    > dist_werra <- vegdist(werra_sp^0.25, method= 'bray')
    > dis

    > dist_werra
                                     270d52396ceaab2f1506f5a6c6100c10
    d644684b08ae9b136307d9d2ce8975c0                       0.89217116
    aed34f36d535976c247278bec289fd12                       0.36933629
    731354d360c13253dfe2ad2d2b0cd971                       0.41469186
    030329dbd6777daa2f0a75400b60b583                       0.59543568

Thanks

vegan • 94 views
ADD COMMENTlink written 4 months ago by nabiyogesh0

thanks, it is resolved, I just need to transpose the count data.

ADD REPLYlink written 4 months ago by nabiyogesh0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 140 users visited in the last hour