make_corLong: Create Long Correlation Tables

View source: R/make_corLong.R

make_corLongR Documentation

Create Long Correlation Tables

Description

Compute pairwise correlations between one or two snp arrays, then convert to long format

Usage

make_corLong(
  snps1,
  snps2 = snps1,
  BrainTable1,
  BrainTable2 = BrainTable1,
  ID_col1 = "ID",
  ID_col2 = ID_col1
)

Arguments

snps1

Table of snps, RNA or DNA,

snps2

Table of snps, RNA or DNA, if NA snps1 will be compared to its self

BrainTable1

Table containing ID info for samples in snps1

BrainTable2

Table containing ID info for samples in snps2

ID_col1

Name of column containing Samples names in BrainTable1

ID_col2

Name of column containing Samples names in BrainTable2

Value

Data frame with correlation between samples in snps1 (or between snps1 and snps2) and ID info from BrainTables (at least BrNums for samples)

Examples

snpsGeno <- make_snpsGeno(snpsGeno_VCF)
snpsGeno[1:5, 1:5]
corLong <- make_corLong(snpsGeno, BrainTable1 = brain_sentrix)

LieberInstitute/brainstorm documentation built on Dec. 14, 2024, 10:29 p.m.