lineagespot_hits: lineagespot_hits

Description Usage Arguments Value Examples

View source: R/lineagespot_hits.R

Description

Find overlapping variants with SARS-CoV-2 reference lineages coming from outbreak.info reports

Usage

1
2
3
4
5
6
7
lineagespot_hits(
  vcf_table = NULL,
  ref_folder = NULL,
  voc = c("B.1.617.2", "B.1.1.7", "B.1.351", "P.1"),
  file.out = paste0("lineage_hits_", Sys.Date(), ".txt"),
  print.out = FALSE
)

Arguments

vcf_table

A tab-delimited table containing all variants for all samples

ref_folder

A path to lineages' reports

voc

A character vector containing the names of the lineages of interest

file.out

Given name for the output file

print.out

Logical value indicating if the produced table should be printed

Value

A data table containing all identified SARS-CoV-2 variants based on the provided reference files

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
variants_table = merge_vcf(vcf_folder = system.file("extdata",
                                                    "vcf-files",
                                                    package = "lineagespot"),

                           gff3_path = system.file("extdata",
                                                   "NC_045512.2_annot.gff3",
                                                   package = "lineagespot"))

# retrieve lineage reports using outbreak.info's API

lineage_hits_table = lineagespot_hits(vcf_table = variants_table,
                                      voc = c("B.1.1.7", "B.1.617.2"))


# use user-specified references
lineage_hits_table.2 = lineagespot_hits(vcf_table = variants_table,
                                        ref_folder = system.file("extdata", "ref",
                                                                 package = "lineagespot"))

nikopech/lineagespot documentation built on Dec. 28, 2021, 12:15 a.m.