I hope I can get clear answer, because I didn't come here to ask till I've struggled for few days.
1) I wanted to get the fpkm counts from the DESeqDataSet object I created it from DESeqDataSetFromMatrix,but
a column basepairs is not present in mcols(dds) (mcols of
DESeqDataSet object after applying DESeq() ) so we need to
calculated from the rowRanges of the dds object.. But it doesn't have GRangesList information.
So the question was how to get the the GRangesList.
2) get the GRanges from Genomic Feature package:
gtffile <- file.path("PATH/Mus_musculus.GRCm38.86.gtf") txdb <- makeTxDbFromGFF(gtffile, format="gtf", circ_seqs=character()) ebg <- exonsBy(txdb, by="gene") se <- summarizeOverlaps(features=ebg, bamfiles, mode="Union", singleEnd=FALSE, ignore.strand=TRUE, fragments=TRUE )
How to get the gene symbol instead of the ensemble ID ?
I tried to set use.names = TRUE in exonBy() function but it is not possible to set the use.names to TRUE when grouped by "gene"... I tried to group it by transcript and get the transcript name it didn't work
In the function summarizeOverlaps no argument could be used to get the gene symbol
since I got the GRangesList (ebg) how to add it to dds (which I have) as it recommended in reference Manual
https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf
" If a user wants to store metadata columns about the rows of the countData, but does not have GRanges or GRangesList information, first construct the DESeqDataSet without rowRanges and then add the DataFrame with mcols(dds)"
I created the count matrix from featureCount