Learn R Programming

customProDB (version 1.12.0)

OutputsharedPro: Output the sequences of proteins with high expressions in multiple samples.

Description

Output a FASTA file containing shared proteins with expression above cutoff in multiple samples

Usage

OutputsharedPro(RPKMs, cutoff = "30%", share_sample = "50%", proteinseq, outfile, ids, ...)

Arguments

RPKMs
RPKM matrix; row name (protein name) is required.
cutoff
a percentage format cutoff (e.g. '30 a vector with each element as a vlaue cutoff referring to one sample
share_sample
the minimum share sample numbers for proteins which pass the cutoff.
proteinseq
a dataframe containing protein ids and protein sequences
outfile
output file name
ids
a dataframe containing gene/transcript/protein id mapping information.
...
additional arguments

Value

a FASTA file containing proteins with RPKM above the cutoff in at least certain number of samples

Details

this function takes RPKM matrix as input, users can set two paramteters,cutoff and shared, to generated a consensus expressed database

Examples

Run this code
path <- system.file("extdata/bams", package="customProDB")
load(system.file("extdata/refseq", "exon_anno.RData", package="customProDB"))
load(system.file("extdata/refseq", "proseq.RData", package="customProDB"))
load(system.file("extdata/refseq", "ids.RData", package="customProDB"))
bamFile<- paste(path, '/', list.files(path, pattern="*bam$"), sep='')
rpkms <- sapply(bamFile,function(x)
            calculateRPKM(x, exon, proteincodingonly=TRUE, ids))
outfile <- paste(tempdir(), '/test_rpkm_share.fasta', sep='')
OutputsharedPro(rpkms, cutoff=1, share_sample=2, proteinseq,
            outfile, ids)

Run the code above in your browser using DataLab