runSeqsumm: Function that generates seqsumm summarized files.

Description Usage Arguments Details Value Author(s) Examples

View source: R/seqCNA_functions.r

Description

The function calls the seqsumm program to summarize aligned reads into genomic windows. The results are output to a file called seqsumm_out.txt.

Usage

1
runSeqsumm(summ.win=50, file=NULL, folder=NULL, output.file="seqsumm_out.txt", samtools.path="samtools")

Arguments

summ.win

The genomic window size, expressed in kilobases as a whole positive number, in which to summarize the reads.

file

Full path to the SAM or BAM file. It is recommended to place it alone in a folder, where analysis output files will be generated.

folder

Only used if folder is not indicated. Path to the folder where the sample SAM or BAM is located. The function first searches for the SAM file and, if not existent, for the BAM file. If several SAM (or BAM) files exist in the folder, only the first one will be used. The summarization results will be written to this same folder.

output.file

The name of the file where the output will be stored (in the same folder as the SAM/BAM file). Be aware, if you choose an alterative name, that function readSeqsumm will look for seqsumm_out.txt.

samtools.path

The program SAMtools is required if your alignment file is in BAM format. In case SAMtools is not in your path variable, you should indicate the path to the executable.

Details

Beware that this is a computationally intensive task, so it might take from a few minutes to several hours depending on the number of reads in the aligned file.

Value

A file called seqsumm_out.txt (or the indicated name), which will be read by the function readSeqsumm, is generated in the indicated folder. Therefore, you only need to call this function once, unless you want to generate a new file with other input/parameters. The output file has chromosome, window, mean GC and mean mapping quality columns, and either a count column for single-end alignments or five count columns for paired-end alignments: - Type 1. Mapped with correct orientation and within insert size. - Type 2. Mapped with correct orientation and uniquely, but wrong insert size. - Type 3. Mapped within the insert size but wrong orientation. - Type 4. Mapped uniquely, but wrong orientation and insert size. - Type 5. One of the mates in unmapped. See seqsumm_HCC1143 for an example table generated by the function. The function does not return anything.

Author(s)

David Mosen-Ansorena

Examples

1
2
3
4
5
6
file.copy(file.path(system.file(package="seqCNA"), "extdata/test.sam"), tempdir())
tempdir() 

window.size = 50

runSeqsumm(window.size, folder=tempdir())

seqCNA documentation built on Nov. 8, 2020, 7:09 p.m.