The only difference would be the annotations, instead of using bedframes from data(genes.hg19) and data(exons.hg19) in ExomeDepth, I got them from the UCSC Table Browser for hg38 (http://genome.ucsc.edu/cgi-bin/hgTables).
The only info they contain are: chromosome start end name
..and then run as before. Change bed.frame = exons.hg19 to the exon data you downloaded.
I called the exon data "geneid":
my.counts <- getBamCounts(bed.frame = geneid,
bam.files = my.bam,
include.chr = F)
In the end you can annotate also with genes from UCSC:
Annotate Genes
genes.hg38 <- read.csv("Genes.csv", header=TRUE, sep = ";")
genes.hg38.GRanges <- GenomicRanges::GRanges(seqnames = genes.hg38$chromosome,
IRanges::IRanges(start=genes.hg38$start,end=genes.hg38$end),
names = genes.hg38$geneName)
all.exons <- AnnotateExtra(x = all.exons,
reference.annotation = genes.hg38.GRanges,
min.overlap = 0.1,
column.name = 'genes.hg38')
Although someone may have decided to solve this issue and hopefully would like to share his experience here, I just wanted to let you know that the author unfortunately hasn't answered such question for almost a year now.