idxstats
.R/process_reads.R
sort_index_idxstats_bam.Rd
Sorts and indexes the BAM file, and
retrieves the idxstats
(summary of
the number of mapped reads on every chromosome) using Rsamtools
package.
sort_index_idxstats_bam(
bam_file,
sorted_bam_file,
sort = TRUE,
index = TRUE,
idxstats = TRUE
)
Input BAM file.
Output file name for sorted BAM file if sort=TRUE
.
Logical. If TRUE, sorts the BAM file.
Logical. If TRUE, indexes the BAM file.
Logical. If TRUE, retrieves idxstats
summary of
the number of mapped reads in each chromosome.
if (FALSE) {
# Sorts, indexes the BAM file, and retrieves the idxstats.
sort_index_idxstats_bam('example.bam', sort=TRUE, index=TRUE, idxstats=TRUE)
# Indexes the BAM file, and retrieves the idxstats, using sorted BAM file.
sort_index_idxstats_bam('example.sorted.bam', sort=FALSE, index=TRUE, idxstats=TRUE)
}