Hi, I was trying to trying counts reads mapped onto a bed file,
I checked the workflow of "DESeq2" ,
gtffile <- ("mm9genes.gtf") library("GenomicFeatures") (txdb <- makeTxDbFromGFF(gtffile, format="gtf", circ_seqs=character())) (ebg <- exonsBy(txdb, by="gene")) library("GenomicAlignments") library("BiocParallel") register(MulticoreParam()) se <- summarizeOverlaps(features=ebg, reads=bamfiles, mode="Union", singleEnd=TRUE, ignore.strand=TRUE, fragments=FALSE )
I am not sure I understood the code completely, but my understanding is that they extract the exons locations grouped by genes (by using GenomicFeatures packages), and do the counting.
but what if I want to count the reads overlap with genomic features described in a bed file or gtf converted from the bed file? the counterpart of "ebg" in the example.