How to get geneIDs from XLOCs?
0
0
Entering edit mode
3.3 years ago
sarai • 0

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 • 890 views
ADD COMMENT
0
Entering edit mode

it did not work for me

What exactly did you try?

ADD REPLY
0
Entering edit mode

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")
ADD REPLY
0
Entering edit mode

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)

ADD REPLY

Login before adding your answer.

Traffic: 1830 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