combined_header: Create a combined .bam header

Description Usage Arguments Value Examples

Description

This function generates a combined header from multiple .bam files from different reference libraries (e.g. a split bacterial library)

Usage

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

Arguments

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'.

bamfiles

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

Value

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

Examples

1
2
3
4
5
6
7
download_refseq('viral', compress = FALSE)
mk_subread_index('viral.fasta', split = .0005)
readPath <- system.file("extdata", "virus_example.fastq", package = "animalcules.preprocess")
Rsubread::align(index = "viral_1", readfile1 = readPath, output_file = "virus_example1.bam")
Rsubread::align(index = "viral_2", readfile1 = readPath, output_file = "virus_example2.bam")
bam_files <- c('virus_example1.bam','virus_example2.bam')
com_head <- combined_header(bam_files)

wevanjohnson/animalcules.preprocess documentation built on May 11, 2019, 8:26 p.m.