Learn R Programming

proBAMr (version 1.6.0)

PSMtab2SAM: Generate SAM files from PSMs.

Description

Generate SAM files from confident peptide-spectrum-matches (PSMs).

Usage

PSMtab2SAM(passedPSM, XScolumn = "mvh", exon_anno, proteinseq, procodingseq, ...)

Arguments

passedPSM
a data frame of PSMs passed FDR.
XScolumn
specify the column which represents the matching score.
exon_anno
a dataframe of exon annotations.
proteinseq
a dataframe containing protein ids and protein sequences.
procodingseq
a data frame cotaining coding sequence for each protein.
...
additional arguments

Value

a dataframe containing

Examples

Run this code
load(system.file("extdata/GENCODE", "exon_anno.RData", package="proBAMr"))
load(system.file("extdata/GENCODE", "proseq.RData", package="proBAMr"))
load(system.file("extdata/GENCODE", "procodingseq.RData",
    package="proBAMr"))
options(stringsAsFactors=FALSE)
passedPSM <- read.table(system.file("extdata", "passedPSM.tab",
    package="proBAMr"), sep='\t', header=TRUE)
SAM <- PSMtab2SAM(passedPSM, XScolumn='mvh', exon, proteinseq,
    procodingseq)
write.table(SAM, file=paste(tempdir(), '/test.sam', sep=''),
            sep='\t', quote=FALSE, row.names=FALSE, col.names=FALSE)

Run the code above in your browser using DataLab