cross_lm: cross_lm uses the variables from two data.frame and run...

Description Usage Arguments Value Examples

View source: R/cross_lm.R

Description

cross_lm uses the variables from two data.frame and run pairwise linear regression, out put the pvalues and fdrs

Usage

1
cross_lm(df1, df2, fdr_method = "BH")

Arguments

df1

dataframe of ncol values in nrow samples, sample ID as rowname, independent variables (x), will be lm regressed with df2 in a cross way

df2

dataframe of ncol values in nrow samples, sample ID as rowname, dependent variables (y), will be lm regressed with df1 in a cross way

fdr_method

default BH, see p.adjust()

Value

var1, var2, pval, fdr, coef

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
df1 example:
                1__100024139 1__100024569 1__100038244 1__100147494 1__100150089
TCGA-A4-8517-01            0           -2            0            0            0
TCGA-F9-A7VF-01            0           NA           NA           NA            0
TCGA-G7-A8LB-01           NA           NA           NA          -16            0
TCGA-5P-A9K3-01           -4            4            0           NA            0
TCGA-A4-7828-01            0            0            0           56            0

df2 example:
                   aDC Adipocytes Astrocytes B-cells Basophils
TCGA-V4-A9EE-01 0.05877  1.375e-19 -1.621e-17 0.04805   0.06992
TCGA-VD-AA8N-01 0.11380  3.926e-03 -2.176e-17 0.03549   0.20740
TCGA-V4-A9EI-01 0.04302  3.663e-21 -1.587e-17 0.02253   0.11730
TCGA-VD-AA8O-01 0.08711 -2.367e-21 -2.469e-17 0.03487   0.19780
TCGA-WC-A888-01 0.20790 -5.244e-20 -2.434e-17 0.23040   0.18430

huanglu2018/tSTR documentation built on Feb. 25, 2022, 5:39 a.m.