### Install G4SNVHunter from GitHub Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Install the G4SNVHunter package directly from GitHub using the devtools package. Ensure devtools is installed first. ```r # install.packages("devtools") devtools::install_github("rongxinzh/G4SNVHunter") ``` -------------------------------- ### Install G4SNVHunter from GitHub with Dependencies Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Install the G4SNVHunter package from GitHub, including all necessary dependencies for running vignette examples. Ensure devtools is installed first. ```r # install.packages("devtools") devtools::install_github("rongxinzh/G4SNVHunter", dependencies = TRUE) ``` -------------------------------- ### Install G4SNVHunter from Bioconductor Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Install the G4SNVHunter package from Bioconductor's development version. This requires BiocManager to be installed and the devel version to be initialized. ```r if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install(version = 'devel') BiocManager::install("G4SNVHunter") ``` -------------------------------- ### Install G4SNVHunter from Bioconductor with Dependencies Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Install the G4SNVHunter package from Bioconductor's development version, including dependencies. Ensure BiocManager is installed and the devel version is initialized. ```r BiocManager::install("G4SNVHunter", dependencies = TRUE) ``` -------------------------------- ### Load Human Genome Sequence Data Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Load the human genome sequence for chromosome 16 (hg19 version) using the BSgenome.Hsapiens.UCSC.hg19 package. Install the package if it's not already present. The sequence is then converted to a DNAStringSet and chromosome names are assigned. ```r if (!requireNamespace("BSgenome.Hsapiens.UCSC.hg19", quietly = TRUE)) { BiocManager::install("BSgenome.Hsapiens.UCSC.hg19") } library(BSgenome.Hsapiens.UCSC.hg19) # Load sequence for chromosome 16 (hg19) hg19 <- BSgenome.Hsapiens.UCSC.hg19 chr16_seq <- DNAStringSet(hg19$chr16) # Chromosome names are needed for analysis names(chr16_seq) <- "chr16" ``` -------------------------------- ### Load G4SNVHunter Package Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Load the G4SNVHunter package into the R session to make its functions available for use. ```r library(G4SNVHunter) ``` -------------------------------- ### Load Variant Data Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Load variant data from a VCF file using the loadVariant function. The file path is obtained using system.file. Chromosome levels of the loaded variants are then updated to match the expected format. ```r vcf_file <- system.file("extdata", "example_variants_chr16.vcf", package = "G4SNVHunter") variants <- loadVariant(vcf_file, file_type = "vcf") seqlevels(variants) <- paste0("chr", seqlevels(variants)) ``` -------------------------------- ### Evaluate Variant Impact on G4 Formation Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Evaluate the impact of variants on G4 structure formation using the G4VarImpact function. This requires the detected G4 regions and the variant data, specifying the reference and alternative allele columns. ```r result <- G4VarImpact(G4 = chr16_G4, variants = variants, ref_col = "REF", alt_col = "ALT") ``` -------------------------------- ### Detect G4-Prone Regions Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Detect G-quadruplex (G4)-prone regions in the provided DNA sequence using the G4HunterDetect function. ```r chr16_G4 <- G4HunterDetect(chr16_seq) ``` -------------------------------- ### Filter Variant Impact Results Source: https://github.com/rongxinzh/g4snvhunter/blob/main/README.md Filter the results of variant impact evaluation based on raw score and mutation score thresholds. The filtered results are then printed. ```r filtered_var_eff <- filterVarImpact(result, raw_score_threshold = 1.5, mut_score_threshold = 1.2) print(filtered_var_eff) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.