bltest: bltest

Description Usage Arguments Details Value Author(s) References Examples

View source: R/bltest.r

Description

This is the default test for the differential post-transcriptional RNA modification sites. Differential from all existing tests the compare the absolute amount between two conditions, this test compares whether the percentage of modified molecules are the same.

Usage

1
2
3
4
5
bltest(untreated_ip, untreated_input, 
       treated_ip, treated_input, 
       untreated_ip_total, untreated_input_total, 
       treated_ip_total, treated_input_total,
       minimal_count_fdr =10)

Arguments

untreated_ip

a vector of integers of n, which is the number of binding sites tested. Each element represents the number of reads fall into a binding site for the IP sample under untreated condition

untreated_input

a vector of integers of n, which is the number of binding sites tested. Each element represents the number of reads fall into a binding site for the Input control sample under untreated condition

treated_ip

a vector of integers of n, which is the number of binding sites tested. Each element represents the number of reads fall into a binding site for the IP sample under treated condition

treated_input

a vector of integers of n, which is the number of binding sites tested. Each element represents the number of reads fall into a binding site for the Input control sample under treated condition

untreated_ip_total

an integer, total number of reads for the IP sample under untreated condition

untreated_input_total

an integer, total number of reads for the Input control sample under untreated condition

treated_ip_total

an integer, total number of reads for the IP sample under treated condition

treated_input_total

an integer, total number of reads for the Input control sample under treated condition

minimal_count_fdr

an integer threshold, only the loci with reads more than this number are subjected for fdr calculation. default: 10

Details

The comparison of 4 Poisson distributions are firstly collapsed into 2 Binomial distributions, and the function further tests whether the two binomial distributions have the same successful rate with a likelihood ratio test. The number of reads at the same locus for the aligned reads are counted by other packages, such as Rsamtools or HTseq-count.

Value

The function returns a list of length 3, which contains the log(p-value), log(fdr) and log(fold change), respectively, from the test.

Author(s)

Lin Zhang, PhD <[email protected]>

References

Reference coming soon!

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# input reads count of 3 binding sites
untreated_ip = c(10,20,30)
untreated_input = c(20,20,20)
treated_ip = c(30,10,20)
treated_input  = c(20,20,20)
# sequencing depths
untreated_ip_total = 10^7
untreated_input_total = 10^7
treated_ip_total = 10^7
treated_input_total = 10^7
# get the result
result = bltest(untreated_ip, untreated_input, 
	treated_ip, treated_input, 
	untreated_ip_total, untreated_input_total, 
	treated_ip_total, treated_input_total)

exomePeak documentation built on Nov. 1, 2018, 2:26 a.m.