mergeEvents: Merge neighboring events of single nucleotide polymorphism...

Description Usage Arguments Value Examples

View source: R/mergeEvents.R

Description

The first step for handling the nucmer object, then effects of mutations can be analysed using "indelSNP" function.

Usage

1

Arguments

nucmer

An object called "nucmer", mutation information derived from "nucmer.snp" variant file by "seqkit" software and "nucmer SNP-calling" scripts.

Value

An updated "nucmer" object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#The example data:
data("nucmer")
#options(stringsAsFactors = FALSE)

#The input nucmer object can be made by the comment below:
#nucmer<-read.delim("nucmer.snps",as.is=TRUE,skip=4,header=FALSE)
#colnames(nucmer)<-c("rpos","rvar","qvar","qpos","","","","",
#"rlength","qlength","","","rname","qname")
#rownames(nucmer)<-paste0("var",1:nrow(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

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