merge_sort_count: Merge and sort counts

View source: R/preprocess.R

merge_sort_countR Documentation

Merge and sort counts

Description

Sort the peak files by end of peak, start of peak, and chr of peak

Usage

merge_sort_count(count_all, gtf)

Arguments

count_all

data.frame, indicating counts of peaks, generated by htseq-count. If you calculate counts for each sample separately, you need to combine these counts firstly through cbind().

gtf

data.frame, indicating gtf file of all peaks, generated by generate_gtf function

Value

return sorted counts

Examples

## Not run: 
SSC_patient1_Counts <- read.delim("SSC_patient1_Counts.txt", header=FALSE)
SSC_patient2_Counts <- read.delim("SSC_patient2_Counts.txt", header=FALSE)
esc_Counts_Counts <- read.delim("esc_Counts.txt", header=FALSE)
peaks_gtf <- read.delim("peak_merged.gtf", header=FALSE)
count_all <- cbind(SSC_patient1_Counts, SSC_patient2_Counts[,2],
             esc_Counts_Counts[,2])
merged_count <- merge_sort_count(count_all, peaks_gtf)

## End(Not run)


jiang-junyao/IReNA documentation built on May 2, 2024, 6:54 a.m.