combined_header: Create a combined .bam header

View source: R/align_target.R

combined_headerR Documentation

Create a combined .bam header

Description

This function generates a combined header from multiple .bam files from different reference libraries (e.g. a split bacterial library). It is not intended for use by users.

Usage

combined_header(bam_files, header_file = "header_tmp.sam")

Arguments

bam_files

A list of the locations/file names of .bam files from which to combine the headers.

header_file

A file name and location for the output file for the combined header. This will be a .sam format file without any reads. Defaults to 'header_tmp.sam'.

Value

This function will return a combined header from all the supplied .bam files.

Examples


# refPath <- system.file("extdata","target.fasta", package = "MetaScope")
# file.copy(from = refPath, to = file.path(".", "target.fasta"))
# mk_subread_index('target.fasta', split = .02)

# readPath <- system.file("extdata", "reads.fastq", package = "MetaScope")
# Rsubread::align(index = "target_1", readfile1 = readPath,
# output_file = "example1.bam")
# Rsubread::align(index = "target_2", readfile1 = readPath,
# output_file = "example2.bam")

# bam_files <- c('example1.bam','example2.bam')
# com_head <- combined_header(bam_files)


compbiomed/MetaScope documentation built on Aug. 9, 2022, 10:41 a.m.