% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import.R
\name{.readTwoBams}
\alias{.readTwoBams}
\title{Function to read in interaction-data stored in a pair of BAM files}
\usage{
.readTwoBams(fn)
}
\arguments{
\item{fn}{Character vector of two BAM files with aligned reads.}
}
\value{
list of two GRanges, storing the anchor information for each interaction
}
\description{
Reads in interactions stored in a a pair of BAM files, e.g. from independent
alignment of paired-end reads. Assumes that each interaction is represented
by pair of PETs with the same qname (this may not always be true. Depending
on data origin read qnames may end in '/1' or '/2' to denote first or second
read in the pair). The function reads in files, removes unpaired reads, and
pairs reads based on macthing qnames.
}
