Skip to content

Associate annotation information - bg_ids NULL #57

@Macdot3

Description

@Macdot3

Hi Federico, thanks for your app which can really make my work a lot easier!
For the first time I am approaching RNAseq data analysis and I am adapting my data to the documentation workflow. Once I get to the re_enrich part, when I create bg_ids it returns me a NULL value. How can I solve this problem?
I tried adding the annotation to the dds object but I get no results. I'll write to you below my code.

colData <- read.table('DATI_GeneTonic/samples_table.txt', sep='\t', row.names = 1,header = T)
files <- file.path('DATI_GeneTonic', colData$seqname_quant, "quant.sf")
names(files) <- rownames(colData)
tx2gene <- readRDS("DATI_GeneTonic/tx2gene.gencode.v38.annotation.RDS")
head(tx2gene)

txi <- tximport(files, type="salmon", tx2gene=tx2gene)
ddsTxi <- DESeqDataSetFromTximport(txi,
colData = colData,
design = ~kit+condition)
dds <- ddsTxi
dds$symbol <- mapIds(org.Hs.eg.db,
keys=gene_ids,
column="SYMBOL",
keytype="ENSEMBL")
rownames(dds) <- substr(rownames(dds), 1, 15)
keep <- rowSums(counts(dds)) > 0
dds <- dds[keep,]
dds <- DESeq(dds)
res_control_mutant <- results(dds, contrast = c("condition", "control", "mutant"), lfcThreshold = 1, alpha = 0.05)
res_control_mutant$symbol <- mapIds(org.Hs.eg.db,
keys=ens.str,
column="SYMBOL",
keytype="ENSEMBL",
multiVals="first")
de_symbols_control_mutant <- deseqresult2df(res_control_mutant, FDR = 0.05)$symbol

bg_ids <- rowData(dds)$symbol[rowSums(counts(dds)) > 0]
NULL

Thanks
Marco

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions