R: Single nucleotide variant (SNV) to peptide workflow
snvToPepFasta
R Documentation
Single nucleotide variant (SNV) to peptide workflow
Description
This is a wrapper for the whole computing of SNV mutations into transcripts, digest these transcripts into
small peptides and write the result into a FASTA file, that can be used for further analysis
(e.g. compare to mass spectrometry results).
The header of the FASTA file will look like this:
>ENST|description| originalAminoacid->mutatedAminoacid_positionAminoacid ...
If the annotated change does not fit to the ENST it will look like:
wrong: originalAminoacid->mutatedAminoacid_positionAminoacid
If the ENST matches two or more NM_IDs, there will be a counter in the header:
>ENSTxcounter|...
Trypsination rule: cut after K and R except when followed by P
You can use target and exception to set other rules for digestion.
The patterns for target and exception are restricted to one aminoacid.
Aminoacids: ARNDCQEGHILKMFPSTWYV
valid patterns: A|R|W|H, P|S
invalid patterns: Z|F|A|D, AR|NDC|STW
#load data and set arguments
#data.frame with SNVs
tbl <- system.file("extdata", "ExampleData.RData", package="PepPrep")
load(tbl)
glst <- data.frame(Genes="CAP1", stringsAsFactors=FALSE)
#peptide sequence
spath <- system.file("extdata", "ExampleHomo_sapiens.GRCh37.70.pep.all.fa", package="PepPrep")
#where to write the result and how to write
tpath <- paste0(getwd(), "/myTest_snvToPep.fasta")
width <- 60
#biomaRt settings
mymart <- "ensembl"
myarchive <- FALSE
#call workflow
## Not run:
test <- snvToPepFasta(testtbl, glst, mymart, myarchive, spath, tpath,width)
test2 <- snvToPepFasta(testtbl, glst, mymart, myarchive, spath, tpath, width, intermediat= TRUE)
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PepPrep)
Loading required package: biomaRt
Loading required package: stringr
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PepPrep/snvToPepFasta.Rd_%03d_medium.png", width=480, height=480)
> ### Name: snvToPepFasta
> ### Title: Single nucleotide variant (SNV) to peptide workflow
> ### Aliases: snvToPepFasta
>
> ### ** Examples
>
> #load data and set arguments
>
> #data.frame with SNVs
> tbl <- system.file("extdata", "ExampleData.RData", package="PepPrep")
> load(tbl)
>
> glst <- data.frame(Genes="CAP1", stringsAsFactors=FALSE)
>
> #peptide sequence
> spath <- system.file("extdata", "ExampleHomo_sapiens.GRCh37.70.pep.all.fa", package="PepPrep")
>
> #where to write the result and how to write
> tpath <- paste0(getwd(), "/myTest_snvToPep.fasta")
> width <- 60
>
> #biomaRt settings
> mymart <- "ensembl"
> myarchive <- FALSE
>
> #call workflow
> ## Not run:
> ##D test <- snvToPepFasta(testtbl, glst, mymart, myarchive, spath, tpath,width)
> ##D test2 <- snvToPepFasta(testtbl, glst, mymart, myarchive, spath, tpath, width, intermediat= TRUE)
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>