Hello, I am trying to get the counts of my experiment from the .bam files by using summarized experiment function in R.
My reads are single ends, not strand specific. Here is some R code:
gtffile <- file.path(dir2,"Homo_sapiens.GRCh38.91.gtf") (txdb <- makeTxDbFromGFF(gtffile, format="gtf")) (genes <- exonsBy(txdb, by="gene")) library("GenomicAlignments") se <- summarizeOverlaps(features=genes, reads=bamfiles, mode="Union", singleEnd=FALSE, ignore.strand=FALSE, fragments=FALSE )
I am getting 0 counts as the output for every sample and every gene. Anyone knows if it could be the .gtf file or if my .bam files are not correct? Ive done it many times. Any alternatives?