Hi Harry,
To map your SNPs (dartseq data) to the dolphin reference genome and check where they fall along the chromosomes and whether they’re in coding or non-coding regions, you’ll need to download the following files:
- Latest reference genome: GCF_011762595.2_mTurTru1.mat.Y_genomic.fna.gz
- GFF file: GCF_011762595.2_mTurTru1.mat.Y_genomic.gff.gz
You can find both files here:
https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/011/762/595/GCF_011762595.2_mTurTru1.mat.Y/
# Install the development version of dartR.base and dartR.popgen from GitHub
# (only needs to be run once, or whenever you want to update)
devtools::install_github("green-striped-gecko/dartR.base@dev")
devtools::install_github("green-striped-gecko/dartR.popgen@dev")
# Load the dartRverse package (which includes dartR.base)
library(dartRverse)
# Specify the path to your reference genome FASTA file
RefGenome <- "GCF_011762595.2_mTurTru1.mat.Y_genomic.fna.gz"
# Load your input genlight object
t1 <- your_genlight
# if necessary, rename your Trimmed sequence filed
t1$other$loc.metrics$TrimmedSequence <- t1$other$loc.metrics$TrimmedSequenceSnp
# Perform BLAST of each locus in t1 against the reference genome
# This annotates each locus with alignment metrics in t2$other$loc.metrics
t2 <- gl.blast(t1, ref_genome = RefGenome)
# Extract the chromosome accession (sacc) from the BLAST results
# and store it as a factor in a new column ‘chromosome’
t2$chromosome <- as.factor(t2$other$loc.metrics$sacc)
# Compute the absolute SNP position by adding the BLAST start coordinate (sstart)
# to the original relative position in the locus object
t2$position <- t2$other$loc.metrics$sstart + t2$position
# SNP density plot
p1 <- gl.plot.snp.density(
x = t2,
bin.size = 1e+06,
min.snps = 50,
min.length = 1e+06,
color.palette = viridis::viridis,
chr.info = TRUE,
plot.title = "SNP density"
)
gff_file <- "GCF_011762595.2_mTurTru1.mat.Y_genomic.gff"
# returns any overlapping gene(s) for each SNP
r2 <- gl.find.genes.for.loci(
x = t2,
gff.file = gff_file,
loci = locNames(t2)
)
Cheers,
Luis