get.reads: Import aligned reads

Description Usage Arguments Details Value Author(s) Examples

View source: R/DynaMO.R

Description

Read a file containing aligned reads and convert it into a GRanges object.

Usage

1
get.reads(file, seqL, readformat)

Arguments

file

The name of the file where the aligned reads are stored.

seqL

The length to be extended from the 5' ends of reads.

readformat

The format of read files. The format can be a .txt file or a .bam file.

Details

The purpose of this function is to import aligned reads and convert to GRanges objects. Two formats can be recognized by this function, a .txt file or a .bam file. Three columns separated by tabs are expected in a .txt file. The first column stores chromosome name. The second column stores left end coordinates of reads and the third column stores the strands of reads. seqL equals to the size of DNA fragments, and usually ranges from 150 to 300.

Value

A GRanges object.

Author(s)

Zheng Kuang

Examples

1
2
readfile<-system.file("extdata","read1.txt",package="DynaMO",mustWork=TRUE)
read1<-get.reads(readfile,150,"txt")

spo111/DynaMO documentation built on May 30, 2019, 7:59 a.m.