% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeChrTable.R
\name{makeChrTable}
\alias{makeChrTable}
\title{makeChrTable -- Pulls out chromosome and length data from the header of a bam file}
\usage{
makeChrTable(bamFile, splitFile = NULL, splitBy = NULL, verbose = TRUE)
}
\arguments{
\item{bamFile}{string of location of a bam file to extract header data from}

\item{splitFile}{GRanges object (of type chr, start and end: no strand or meta columns) of locations in which to split
the assembly, such as previously determined locations of contig chimerism}

\item{splitBy}{integer determining the average size contigs should be split by}

\item{verbose}{if FALSE, no messages appear on terminal}
}
\value{
a GRanges object of class ChrTable, containing information on the organism's chromosomes as extracted from the BAM file header.
}
\description{
makeChrTable -- Pulls out chromosome and length data from the header of a bam file
}
\details{
makeChrTable creates a table with chromosome name and chromosome length by extracting 
header data from the supplied bam file.
}
\examples{
#Get an example BAM file and generate a chromosome table featuring fragment names and lengths

example.bam <- list.files(file.path(system.file(package='contiBAIT'), 'extdata'), full.names=TRUE)[1]

chrTable <- makeChrTable(example.bam) 

show(chrTable)

dividedChr <- makeChrTable(example.bam, splitBy=1000000)

show(dividedChr)
}
