Compute pairwise correlations between one or two snp arrays, then convert to long format
make_corLong(
snps1,
snps2 = snps1,
BrainTable1,
BrainTable2 = BrainTable1,
ID_col1 = "ID",
ID_col2 = ID_col1
)
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 |
Data frame with correlation between samples in snps1 (or between snps1 and snps2) and ID info from BrainTables (at least BrNums for samples)
snpsGeno <- make_snpsGeno(snpsGeno_VCF)
snpsGeno[1:5, 1:5]
#> 4463344375_R01C01 4463344375_R01C02 4572348848_R01C02
#> chr1:4712657_G/A 2 2 2
#> chr1:7853370_G/A 2 0 1
#> chr1:8949385_A/C 1 2 1
#> chr1:8974362_G/A 1 0 1
#> chr1:9263851_G/A 1 1 1
#> 4572348855_R01C02 5535549043_R01C01
#> chr1:4712657_G/A 1 0
#> chr1:7853370_G/A 1 1
#> chr1:8949385_A/C 1 1
#> chr1:8974362_G/A 2 0
#> chr1:9263851_G/A 0 1
corLong <- make_corLong(snpsGeno, BrainTable1 = brain_sentrix)