reshape.DEswan.Rd
Reshape DE-SWAN output
reshape.DEswan(res.DEswan, parameter, factor)
res.DEswan: | a data Frame - output from DEswan |
---|---|
parameter: | an optional numeric - 1 for pvalue or 2 for coefficients. Default is 1 |
factor: | an optional character string - qt or covariates in DEswan. Default is qt. |
res.DEswan=DEswan(data.df = agingplasmaproteome[,-c(1:3)], qt = agingplasmaproteome[,1], window.center = seq(40,100,10), buckets.size = 10, covariates = agingplasmaproteome[,c(2:3)])#> [1] "window.center 1/7" #> [1] "window.center 2/7" #> [1] "window.center 3/7" #> [1] "window.center 4/7" #> [1] "window.center 5/7" #> [1] "window.center 6/7" #> [1] "window.center 7/7"#> variable window.center factor pvalue #> 1 Feature_1 40 qt 0.479188190 #> 2 Feature_1 40 Sex 0.064129958 #> 3 Feature_1 40 Cohort 0.002082943 #> 4 Feature_2 40 qt 0.818757036 #> 5 Feature_2 40 Sex 0.106665375 #> 6 Feature_2 40 Cohort 0.116499806#> variable window.center factor coefficient #> (Intercept) Feature_1 40 (Intercept) 3.482908497 #> qt.tmp1 Feature_1 40 qt 0.035679739 #> covariates$SexMale Feature_1 40 SexMale 0.103411765 #> covariates$CohortSeattle Feature_1 40 CohortSeattle -0.310418301 #> (Intercept)1 Feature_2 40 (Intercept) 2.723666667 #> qt.tmp11 Feature_2 40 qt -0.006666667res.DEswan.wide.p=reshape.DEswan(res.DEswan) res.DEswan.wide.p=reshape.DEswan(res.DEswan,parameter = 1,factor = "qt") head(res.DEswan.wide.p)#> variable X40 X50 X60 X70 X80 X90 #> 1 Feature_1 0.4791882 0.3541882 0.8709966 0.29133843 0.74820898 0.01970705 #> 2 Feature_10 0.1162009 0.7176725 0.2721085 0.91346294 0.95392551 0.52132819 #> 3 Feature_100 0.7319143 0.3916739 0.4446613 0.02942558 0.92130404 0.23809419 #> 4 Feature_1000 0.5580754 0.6749681 0.9434219 0.08057361 0.06311563 0.67770017 #> 5 Feature_1001 0.4504957 0.3772323 0.9570524 0.16085845 0.14049569 0.16085304 #> 6 Feature_1002 0.4394018 0.5707327 0.6723199 0.88106601 0.19342936 0.02351984 #> X100 #> 1 0.06799034 #> 2 0.27758491 #> 3 0.72850088 #> 4 0.04381452 #> 5 0.24115589 #> 6 0.72922219res.DEswan.wide.coeff=reshape.DEswan(res.DEswan,parameter = 2,factor = "qt") head(res.DEswan.wide.coeff)#> variable X40 X50 X60 X70 X80 #> 1 Feature_1 0.03567974 -0.03608333 0.005070894 0.027445010 0.010427003 #> 2 Feature_10 -0.15054902 -0.01551075 -0.024238119 0.002680289 0.001652225 #> 3 Feature_100 0.01695425 0.04031452 0.023230858 0.064358827 -0.003223627 #> 4 Feature_1000 0.12998693 -0.06021237 0.007353487 -0.190922080 0.307072058 #> 5 Feature_1001 -0.23228758 -0.10303226 0.001522927 0.126873135 -0.210616030 #> 6 Feature_1002 0.13012418 -0.05818280 0.026896544 -0.009067305 0.080272994 #> X90 X100 #> 1 -0.09822113 -0.07817499 #> 2 0.02253488 0.05498679 #> 3 0.07810322 -0.02613265 #> 4 0.05848103 -0.29391676 #> 5 0.12023256 -0.11623561 #> 6 -0.15629294 -0.01380438