sam2bed: Convert a SAM Format File to a BED File

Description Usage Arguments Details Value Author(s)

View source: R/sam2bed.R

Description

This function performs SAM to BED conversion. Each read in the SAM input is converted into an interval in the BED file.

Usage

1
2
3
4
5
sam2bed(

    samfile,
    bedfile,
    readlen)

Arguments

samfile

a character string giving the name of input file. Input format should be in SAM format.

bedfile

a character string giving the name of output file. Output file is in BED format.

readlen

a numeric value giving the length of reads included in the input file.

Details

This function converts a SAM format file to a BED format file, which can then be displayed in a genome browser like UCSC genome browser, IGB, IGV. This function does not find the read length from the SAM file, but requires the user to specify the read length.

Value

No value is produced but a BED format file is written to the current working directory. This file contains six columns including chromosomal name, start position, end position, name(‘.’), mapping quality score and strandness.

Author(s)

Wei Shi


Rsubread documentation built on March 17, 2021, 6:01 p.m.