OutputVarproseq_single: Output the variant(SNVs) protein sequences into FASTA format

Description Usage Arguments Details Value Author(s) Examples

View source: R/OutputVarproseq_single.R

Description

Output the non-synonymous SNVs into FASTA file, one SNV per sequence.

Usage

1
2
  OutputVarproseq_single(vartable, proteinseq, outfile,
    ids, lablersid = FALSE, RPKM = NULL, ...)

Arguments

vartable

A data frame which is the output of aaVariation().

proteinseq

A dataframe containing protein ids and the protein sequence.

outfile

Output file name.

ids

A dataframe containing gene/transcript/protein id mapping information.

lablersid

If includes the dbSNP rsid in the header of each sequence, default is FALSE. Must provide dbSNP information in function Positionincoding() if put TRUE here.

RPKM

If includes the RPKM value in the header of each sequence. default is NULL.

...

Additional arguments

Details

This function uses the output of aaVariation() as input, introduces the nonsynonymous variation into the protein database. If a protein have more than one SNVs, introduce one SNV each time, end up with equal number of sequences.

Value

FASTA file containing proteins with single nucleotide variation.

Author(s)

Xiaojing Wang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
vcffile <- system.file("extdata/vcfs", "test1.vcf", package="customProDB")
vcf <- InputVcf(vcffile)
table(values(vcf[[1]])[['INDEL']])
index <- which(values(vcf[[1]])[['INDEL']] == FALSE)
SNVvcf <- vcf[[1]][index]
load(system.file("extdata/refseq", "exon_anno.RData",
package="customProDB"))
load(system.file("extdata/refseq", "dbsnpinCoding.RData",
    package="customProDB"))
load(system.file("extdata/refseq", "procodingseq.RData",
    package="customProDB"))
load(system.file("extdata/refseq", "ids.RData", package="customProDB"))
load(system.file("extdata/refseq", "proseq.RData", package="customProDB"))
postable_snv <- Positionincoding(SNVvcf, exon, dbsnpinCoding)
txlist <- unique(postable_snv[, 'txid'])
codingseq <- procodingseq[procodingseq[, 'tx_id'] %in% txlist, ]
mtab <- aaVariation (postable_snv, codingseq)
outfile <- paste(tempdir(), '/test_snv_single.fasta',sep='')
OutputVarproseq_single(mtab, proteinseq, outfile, ids, lablersid=TRUE)

customProDB documentation built on Nov. 8, 2020, 8:06 p.m.