indelSNP: Provide effects of each single nucleotide polymorphism (SNP),...

Description Usage Arguments Value Examples

View source: R/indelSNP.R

Description

This function is to annotate the mutational events and indicate their potential effects on the proteins. Mutational events include SNP, insertion and deletion.

Usage

1
2
3
4
5
6
7
8
indelSNP(
  nucmer = nucmer,
  saveRda = FALSE,
  refseq = refseq,
  gff3 = gff3,
  annot = annot,
  outdir = NULL
)

Arguments

nucmer

An object called "nucmer", mutation information derived from "nucmer.snp" variant file by "seqkit" software and "nucmer SNP-calling" scripts. To be processed by "indelSNP" function, The nucmer object should be first transformed by "mergeEvents" function.

saveRda

Whether to save the results as ".rda" file.

refseq

SARS-Cov-2 genomic reference sequence.

gff3

"GFF3" format annotation data for SARS-Cov-2.

annot

Annotation of genes(corresponding proteins) list from "GFF3" file by "setNames(gff3[,10],gff3[,9])".

outdir

The output directory.

Value

Write the result as ".csv" file to the specified directory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("nucmer")
# Fix IUPAC codes
nucmer<-nucmer[!nucmer$qvar%in%c("B","D","H","K","M","N","R","S","V","W","Y"),]
nucmer<- mergeEvents(nucmer = nucmer)## This will update the nucmer object
data("refseq")
data("gff3")
annot <- setNames(gff3[,10],gff3[,9])
#outdir <- tempdir()
nucmer<- indelSNP(nucmer = nucmer,
                  saveRda = FALSE,
                  refseq = refseq,
                  gff3 = gff3,
                  annot = annot,
                  outdir = NULL)

CovidMutations documentation built on Sept. 18, 2020, 5:06 p.m.