This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get geneIDs from XLOCs?

Hi everyone, I need your help with this: After Cuffdiff analysis I got XLOCs identifiers but I want to get also the gene IDs. I have seen some other post with the same concern (for example Question: How to get Ensembl ids in cuffdiff output?) and possible solution (XLOC gene id) but it did not work for me. I get a file with these columns:

gene_id    sample_1 sample_2    status  value_1 value_2 log2_fold_change    test_stat   p_value q_value significant

In the column gene _id I got the XLOC identifier.

Someone has an idea? Thank in advance

rna-seq

it did not work for me

What exactly did you try?

I wrote this:

library(cummeRbund)
cuff <- readCufflinks('diff_out')

#Retrive significant gene IDs (XLOC) with a pre-specified alpha
diffGeneIDs <- getSig(cuff,level="genes",alpha=0.05)

#Use returned identifiers to create a CuffGeneSet object with all relevant info for given genes
diffGenes<-getGenes(cuff,diffGeneIDs)

#gene_short_name values (and corresponding XLOC_* values) can be retrieved from the CuffGeneSet by using:
names<-featureNames(diffGenes)
row.names(names)=names$tracking_id
diffGenesNames<-as.matrix(names)
diffGenesNames<-diffGenesNames[,-1]

# get the data for the significant genes
diffGenesData<-diffData(diffGenes)
row.names(diffGenesData)=diffGenesData$gene_id
diffGenesData<-diffGenesData[,-1]

# merge the two matrices by row names
diffGenesOutput<-merge(diffGenesNames,diffGenesData,by="row.names")

Disclaimer: I have never used CuffDiff.

What does featureNames(diffGenes) get you? Can you supply the result of head(featureNames(diffGenes))?

Btw, I strongly recommend to NOT assign the output to an object named "names" as that is the name of a base R function (type ?names)

0 answers

No answers yet.

Log in to answer this question.