Function counts the reads mapped to each chromosome and plots a bar graph. It uses the function idxstatsBam() from the Rsamtools R package. Run help("idxstatsBam") for more information.
chromReads(bamfile, bamindex = NULL, chr.filt = "", main = NULL, main.size = 13, subtitle = NULL, sub.size = 11, xlab = "Mapped reads", ylab = "Chromosome", axis.size = 9, percent.label = T, percent.size = 3)
Character of lenght 1. Path to the BAM file whose reads are to be mapped.
Character of length 1 or NULL. Path to the index of the BAM file in 'bamfile'. If null, it will search a file with the same base name as the 'bamfile' and extension '.bam.bai'. Default: NULL
Character. Vector of undefined length with strings to filter chromosomes (i.e. "Un" would filter all chromosomes containing "Un" in their name). Default: c("Un", "random", "GL", "JH", "\*").
Character of lenght 1. Title of the plot. Default: NULL.
Numeric of length 1. Font size of the title. It works only if main is not NULL. Default: 13.
Character of lenght 1. Subtitle of the bar plot. It works only if main is not NULL. Default: NULL.
Numeric of length 1. Font size of the subtitle. It works only if main is not NULL. Default: 11.
Character of lenght 1. Title of the X axis. Default: "Mapped reads".
Character of lenght 1. Title of the Y axis. Default: "Chromosome".
Numeric of length 1. Size of the axis labels. Default: 9
Logical of lenght 1. If TRUE, it draws the percentage of reads in each chromosome.
Character of lenght 1. Size of the percentage drawn in the plot.