Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

Can I use a subset of results from DESeq2 to calculate Bray-Curtis dissimilarity and then plot a PCoA?

$
0
0

I am having trouble using my results from DESeq2 when comparing the differential expression of bacterial genes between disease and control to then calculate the Bray-Curtis dissimilarity and subsequently plot a PCoA.

My output from DESeq2 I have saved as a data frame. It consists of 6000 rows which are the gene names, and two columns, one for p value ( all are <0.05) and one for log2FOldChange > 1. The data frame is called siggenes1. Do I need to normalize my data before running the Bray-Curtis and PCoA? I thought that this was already done through DESEq2, but looking at my code which I can provide, I haven't included normalisation=T when carrying out the DESeq2.

Or would I need to normalise using the sweep function the initial data prior to using DESeq2?

My code for Bray-Curtis Dissimilarity

 vegDistOut=vegdist(t(siggenes1),"bray")

The above gets 1 value which is 0.995. Now I am a bit lost as to how I would devise code for plotting a PCoA with this, as my next bit of code is wrong.

pcoaOut=pcoa(vegDistOut)

Error in array(STATS, dims[perm]) : 'dims' cannot be of length 0

I cannot proceed anymore because of the above steps.

If anybody could please help, I would be really grateful. Thank-you


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>