pairReads {GOTHiC} | R Documentation |
This function takes bowtie output files, pairs the reads, only keeps those where both ends mapped, filters for perfect duplicates to avoid PCR bias, and saves and returns a GenomicRangesList object that contains the paired_reads_1 and paired_reads_2 GenomicRanges with the paired reads
pairReads(fileName1, fileName2, sampleName, DUPLICATETHRESHOLD = 1, fileType='BAM')
fileName1 |
File containing the mapped reads of the first fragment ends (BAM or Bowtie format) |
fileName2 |
File containing the mapped reads of the second fragment ends (BAM or Bowtie format) |
sampleName |
A character string that will be used to name the exported BedGraph file containing the coverage, and the R object file with paired reads. They will be saved in the current directory. |
DUPLICATETHRESHOLD |
An integer specifying the maximum amount of duplicated paired-end reads allowed, over that value it is expected to be PCR bias. The default is 1. |
fileType |
A character string specifying the format of the aligned reads. The default is 'BAM'. Other accepted format is 'Bowtie'. |
A GenomicRangesList called filtered
paired_reads_1 |
GenomicRanges with the coordinates of where one end of the read mapped |
paired_reads_2 |
GenomicRanges with the coordinates of where the other end of the read mapped |
Borbala Mifsud and Robert Sugar
mapReadsToRestrictionSites
, GOTHiC
library(GOTHiC) dirPath <- system.file("extdata", package="HiCDataLymphoblast") fileName1 <- list.files(dirPath, full.names=TRUE)[1] fileName2 <- list.files(dirPath, full.names=TRUE)[2] paired <- pairReads(fileName1, fileName2, sampleName='lymphoid_chr20', DUPLICATETHRESHOLD = 1, fileType='Table')