HELP with GenomicFeatures
Entering edit mode
Last seen 3 months ago

Enter the body of text here Hi, I need to run this comand to generate the exonic.gene.sizes for a DGE analysis with DESeq2. For each gene I want to reduce all the exons to a set of non overlapping exons, then calculate their lenghts and sum them. My R session is 4.2.0 and the version of the package "GenomicFeatures" is 1.48.3 and the GenomicRanges is 1.48.0

exonic.gene.sizes <- sapply(exons.list.per.gene, function(x) {sum(width(reduce(x)))})

Error in h(simpleError(msg, call)) : 
errore durante la valutazione dell'argomento 'x' nella selezione di un metodo per la funzione 'width': GRanges objects don't support [[, as.list(), lapply(), or unlist() at the moment
exonslength • 230 views
Entering edit mode
Last seen 43 minutes ago
United States

You probably don't want a GRanges for that, but instead a GRangesList (how do you plan to attribute exons to genes?). And you also don't want to use base functions like sapply with a GRangesList. It works OK with an IntegerList however.

> library(TxDb.Hsapiens.UCSC.hg19.knownGene)
> ex <- exonsBy(TxDb.Hsapiens.UCSC.hg19.knownGene, "gene")
> z <- sapply(width(reduce(ex)), sum)
> head(z)
        1        10       100      1000     10000 100008586 
     4027      1317      1532      4473      7341       466
Entering edit mode

oh thank you so much James W. worked!! I have been struggling for so long. May I still ask for your help? I am trying to see the clustering of my samples based on gene expression. It seems that the method bcv (biological coefficient of variation) has been replaced somehow! Is there something else I don't know about? It doesn't allow me to see any plot. Thanks again for your help

plotMDS(dge, method = "bcv") Note: the bcv method is now scheduled to be removed in a future release of edgeR.


Login before adding your answer.

Traffic: 484 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6