Hi,
I have some mouse strain specific vcf files from ftp://ftp-mouse.sanger.ac.uk/. I've aligned them to the GRCm38_68 reference genome and created chromR objects. Is there a simple way to filter these SNPs (either unlaigned as vcfs or as the Chrom.R objects) using a custom list of mouse emsemble gene ids?
Code that I'm trying to use is below:
# Packages
#install.packages("vcfR")
#BiocManager::install("org.Mm.eg.db")
#BiocManager::install("TxDb.Mmusculus.UCSC.mm10.knownGene")
library(vcfR)
library(org.Mm.eg.db)
library(TxDb.Mmusculus.UCSC.mm10.knownGene)
# Load vcfs and reference seq
bl6_mouse <- read.vcfR("C57BL_6NJ.mgp.v5.snps.dbSNP142.vcf.gz", verbose = FALSE )
C3H_mouse <- read.vcfR("C3H_HeH.mgp.v5.snps.dbSNP142.vcf.gz", verbose = FALSE )
C57BL6J_ref <- ape::read.dna("GRCm38_68.fa", format="fasta")
# TF list from embflow
embflow_tfs <- read.table("all_tfs_list.txt", sep='\t', header = T)
# convert to ensemble mouse IDs
embflow_ensmu <- mapIds(org.Mm.eg.db, embflow_tfs$x,"ENSEMBL","SYMBOL")
# BL6 SNPs
BL6_chrom <- create.chromR(name='Bl6_Supercontig', vcf=bl6_mouse, seq=C57BL6J_ref)
BL6_chrom <- masker(BL6_chrom, min_DP = 0, max_DP = 450)
BL6_chrom <- proc.chromR(BL6_chrom, verbose=TRUE)
chromoqc(BL6_chrom, dp.alpha=20)
# C3H SNPs
C3H_chrom <- create.chromR(name='C3H_Supercontig', vcf=C3H_mouse, seq=C57BL6J_ref)
C3H_chrom <- masker(C3H_chrom, min_DP = 0, max_DP = 27)
C3H_chrom <- proc.chromR(C3H_chrom, verbose=TRUE)
chromoqc(C3H_chrom, dp.alpha=20)
Kind Regards,
Kyle Drover