HELP with GenomicFeatures
1
0
Entering edit mode
@9207deb7
Last seen 2.4 years ago
Italy

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 • 946 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day 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
ADD COMMENT
0
Entering edit mode

oh thank you so much James W. MacDonald...it 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.

ADD REPLY

Login before adding your answer.

Traffic: 666 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6