OneStep_PRC_Mayer: Generate precision recall curve and related statistics...

Description Usage Arguments Value Examples

View source: R/OneStep_PRC_Mayer.R

Description

Generate precision recall curve and related statistics directly from bam files in mayer's method.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
OneStep_PRC_Mayer(
  bam_ip,
  bam_input,
  txdb,
  bsgenome = NULL,
  paired_end = FALSE,
  ground_truce_gr,
  exp_label = "MeRIP_experiment_1",
  N = 200
)

Arguments

bam_ip

a vector containing the BAM files for IP samples.

bam_input

a vector containing the BAM files for input samples.

txdb

a TxDb object for the transcript annotation.

bsgenome

a BSgenome object for the genome sequence.

paired_end

a logical value indicating wheather the data is paired end sequencing; default = FALSE.

ground_truce_gr

a GRanges for the ground truce of positive methylation sites, recommended to be in single based resolution.

exp_label

a character for the label of the experiment; default = "MeRIP_experiment_1".

N

number of points sampled for each PRC curve; default = 200.

Value

The table for AUPRC and the AUROC curve will be saved on the disc under a folder named by exp_label.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(exomePeak2Test)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(exomePeak2)
library(BSgenome.Hsapiens.UCSC.hg19)

whistle_predict <- readRDS("predictedResults.rds")
whistle_gr <- readRDS("exon_DRACH.rds")
whistle_gr$prob <- whistle_predict

OneStep_PRC_Mayer(bam_ip = c("bam_local/SRR1035214_sorted.bam",
                       "bam_local/SRR1035216_sorted.bam",
                       "bam_local/SRR1035222_sorted.bam",
                       "bam_local/SRR1035224_sorted.bam"),
            bam_input = c("bam_local/SRR1035213_sorted.bam",
                          "bam_local/SRR1035215_sorted.bam",
                          "bam_local/SRR1035221_sorted.bam",
                          "bam_local/SRR1035223_sorted.bam"),
            txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
            bsgenome = Hsapiens,
            paired_end = FALSE,
            ground_truce_gr = whistle_gr[whistle_gr$prob > 0.5],
            exp_label = "MeRIP_experiment_1",
            N = 200)

ZW-xjtlu/exomePeak2Test documentation built on Jan. 6, 2020, 3:36 p.m.