knitr::opts_chunk$set( collapse = TRUE, comment = "#>", echo = TRUE, include = TRUE, eval = FALSE )
These are preliminary notes on using the Variant Explorer object
library(brentlabRnaSeqTools) #devtools::load_all("../R")
gff = rtracklayer::import("~/ref/KN99/current_htcf_genome/KN99_stranded_annotations_fungidb_augment.gff") snpeff_files = Sys.glob("/mnt/scratch/variant_calling_pipeline/genotype_check/run_6023/variant_annote/bwamem2/snpeff/*txt") names(snpeff_files) = ifelse(str_extract(snpeff_files, "tiddit|dusted") == 'tiddit', 'tiddit', 'freebayes') snpeff_files = snpeff_files[names(snpeff_files)=='freebayes'] bam_list = Sys.glob("/mnt/scratch/share_genotype_results/run_6023_results/alignment/*bam") names(bam_list) = str_extract(bam_list, "sample_\\d+") sample_meta = tibble(sample_id = str_extract(snpeff_files, "sample_\\d+"), snpeff = snpeff_files, variant_caller = names(snpeff_files)) %>% left_join(tibble(sample_id = names(bam_list), bam = bam_list))
ve = create_variant_explorer(sample_meta, gff, igv_genome = "~/ref/KN99/current_htcf_genome/kn99_stranded.genome", BSgenome.CneoformansVarGrubiiKN99.NCBI.ASM221672v1)
summary(ve) #ve = rank_results(ve)
view_variants(ve@variants) visualize(ve,'CKF44_01599', "sample_5", 'pileup') igv_script(ve, "CKF44_02980")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.