# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Analysis of one study according to metaCCA+ algorithm. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Default single-SNP--multi-trait analysis.
# Here, we will test each of 10 SNPs for an association with a set of 10 traits.
result1 = metaCcaPlusGp( nr_studies = 1,
S_XY = list( S_XY_study1 ),
std_info = 0,
S_YY = list( estimateSyy(S_XY_full_study1 ) ),
N = N1 )
# Viewing association results
print( result1, digits = 3 )
# Single-SNP--multi-trait analysis of one selected SNP.
# Here, we will test one of 10 SNPs for an association with a set of 10 traits.
result2 = metaCcaPlusGp( nr_studies = 1,
S_XY = list( S_XY_study1 ),
std_info = 0,
S_YY = list( estimateSyy(S_XY_full_study1) ),
N = N1,
analysis_type = 1,
SNP_id = 'rs80' )
# Viewing association results
print( result2, digits = 3 )
# Multi-SNP--multi-trait analysis.
# Here, we will test a set of 5 SNPs for an association with a set of 10 traits.
result3 = metaCcaPlusGp( nr_studies = 1,
S_XY = list( S_XY_study1 ),
std_info = 0,
S_YY = list( estimateSyy(S_XY_full_study1) ),
N = N1,
analysis_type = 2,
SNP_id = c( 'rs10', 'rs80', 'rs140', 'rs170', 'rs172' ),
S_XX = list( S_XX_study1 ) )
# Viewing association results
print( result3, digits = 3 )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Meta-analysis of two studies according to metaCCA+ algorithm. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Default single-SNP--multi-trait analysis.
# Here, we will test each of 10 SNPs for an association with a set of 10 traits.
meta_result1 = metaCcaPlusGp( nr_studies = 2,
S_XY = list( S_XY_study1, S_XY_study2 ),
std_info = c( 0, 0 ),
S_YY = list( estimateSyy(S_XY_full_study1),
estimateSyy(S_XY_full_study2) ),
N = c( N1, N2 ) )
# Viewing association results
print( meta_result1, digits = 3 )
# Single-SNP--multi-trait analysis of one selected SNP.
# Here, we will test one of 10 SNPs for an association with a set of 10 traits.
meta_result2 = metaCcaPlusGp( nr_studies = 2,
S_XY = list( S_XY_study1, S_XY_study2 ),
std_info = c( 0, 0 ),
S_YY = list( estimateSyy(S_XY_full_study1),
estimateSyy(S_XY_full_study2) ),
N = c( N1, N2 ),
analysis_type = 1,
SNP_id = 'rs80' )
# Viewing association results
print( meta_result2, digits = 3 )
# Multi-SNP--multi-trait analysis.
# Here, we will test a set of 5 SNPs for an association with a set of 10 traits.
meta_result3 = metaCcaPlusGp( nr_studies = 2,
S_XY = list( S_XY_study1, S_XY_study2 ),
std_info = c( 0, 0 ),
S_YY = list( estimateSyy(S_XY_full_study1),
estimateSyy(S_XY_full_study2) ),
N = c( N1, N2 ),
analysis_type = 2,
SNP_id = c( 'rs10', 'rs80', 'rs140', 'rs170', 'rs172' ),
S_XX = list( S_XX_study1, S_XX_study2 ) )
# Viewing association results
print( meta_result3, digits = 3 )
Run the code above in your browser using DataLab