lindsayrutter / bigPint

Bioconductor package that makes BIG data pint-sized.
https://lindsayrutter.github.io/bigPint/
20 stars 7 forks source link

Correlation values from scatter plot matrix #14

Open sambo988 opened 1 year ago

sambo988 commented 1 year ago

Hi there!

I'm using bigPint for some RNAseq analysis (3 groups, 9-11 samples per group). I generated scatter plot matrices comparing conditions but was wondering if there was anyway to extract just the correlation values for each comparison?

Thank you!

Danielle

lindsayrutter commented 1 year ago

Hello Danielle:

Sorry for my (very) slow reply.

If you are looking to simply extract correlation values, you can likely do this with the cor() function in base R. As a MWE using some of the toy data from bigPint:

library(bigPint)
library(dplyr)

data("soybean_cn_sub")
data = soybean_cn_sub %>% select(ID, starts_with("S1"), starts_with("S3"))
cor(data[,2:7])

This should return a matrix of correlation values for the six variables of the data.

Is this what you were looking for?

Lindsay