Error while adding gene names
1
0
Entering edit mode
3.7 years ago
Kumar ▴ 170

Hi, I am getting following ERROR. Please correct me in my script.

res$symbol <- mapIds(org.Hs.eg.db, 
                 keys=row.names(res), 
                 column="SYMBOL", 
                 keytype="ENSEMBL",
                 multiVals="first")

ERROR:

Error in .testForValidKeys(x, keys, keytype, fks) : 
  None of the keys entered are valid keys for 'ENSEMBL'. Please use the keys method to see a listing of valid arguments.
rna-seq next-gen genome • 3.3k views
ADD COMMENT
0
Entering edit mode

Provide example of actual input going into this.

ADD REPLY
0
Entering edit mode

Here is the input file.

$head(countdata$counts)
              sample1 sample2 sample3 sample4 sample5 sample6
 ENST00000631435.1       0       0       0       0       0       0
 ENST00000415118.1       0       0       0       0       0       0
 ENST00000434970.2       0       0       0       0       0       0
 ENST00000448914.1       0       0       0       0       0       0
 ENST00000632684.1       0       0       0       0       0       0
 ENST00000632524.1       0       0       0       0       0       0
ADD REPLY
0
Entering edit mode

Here are some initial commands that I using before that process:

dds <- DESeq(dds)
res <- results(dds)
mcols(res, use.names=TRUE)
summary(res)
head(res)

I am using library("AnnotationDbi"), library("org.Hs.eg.db").

ADD REPLY
0
Entering edit mode

these are ENSEMBL IDs. I am converting these into gene id.

ADD REPLY
0
Entering edit mode

ENSEMBL ID is not helpful at all. Do you think you have protein IDs? Gene IDs?

ADD REPLY
0
Entering edit mode

I have no gene IDs. I got these from the output of kallisto pipeline. I am not sure how to convert these ENSEMBL ID to gene ID. Please suggest how I can get gene IDs.

ADD REPLY
0
Entering edit mode

These are transcript ID's based on the list posted above.

ADD REPLY
0
Entering edit mode

Yes! do I need to get gene IDs from these transcript IDs first before converting these to genes name?

ADD REPLY
0
Entering edit mode

You have to understand what you have. Do you understand why your new code works and the old code didn't?

ADD REPLY
0
Entering edit mode

Step1: are you absolutely sure that what you have is really gene names?

ADD REPLY
0
Entering edit mode

I improved the script as following and it works. However, most of ENSEMBL IDs could not find Gene names.

res$symbol <- mapIds(org.Hs.eg.db, 
                 rownames(res)<-gsub("\\..*","",rownames(res)), 
                 column="SYMBOL", 
                 keytype = "ENSEMBLTRANS",
                 multiVals="first")
ADD REPLY
0
Entering edit mode

Can you explain what you think that gsub line of code is doing?

ADD REPLY
0
Entering edit mode

gsub is a function that perform replacement of the first and all matches respectively.

ADD REPLY
1
Entering edit mode

You can't do bioinformatics like this; mindlessly quoting code you do not understand. It is a waste of time for people to help you when you do not understand your own work, and clearly have no interest in expending any energy to do so.

ADD REPLY
0
Entering edit mode

Really! It is ridiculous. You did not give even a single line to solve my question and testing my knowledge. It is really pathetic. I don't know what is your problem for your frustration but this is the great community and people providing consistently support. No matter you are beginner or advance user. If you do not have time just do not reply. I do not know how you are proficient in coding you must be publishing one research paper every month (LOL). By the way, this is not my code I am just following DESeq2 tutorial. I know bioinformatics whatever I am required...

I do not know what do you think about research but I am surprised to know about your thought!

ADD REPLY
0
Entering edit mode

Think we all need to take a moment to cool our heads here - it can be frustrating for both sides. Manoj, it can be frustrating for regular members of the site to see questions that lack critical info. Try to take care to provide reproducible, clear, and complete examples of the issue you're facing prior to posting a question. Often, this process will help you figure out the answer yourself, but if not, it'll make it much easier for the community to help you more quickly. And @swbarnes2 somewhat has a point about using code you don't fully understand if you're just following a tutorial and can't determine why it's not working with your data.

Regardless, consider this a reminder to keep things civil.

ADD REPLY
0
Entering edit mode

The question was - "what is that line of code doing?", not "what does the function gsub do?".

You're modifying an object using the assignment operator while passing it as a parameter to a function. Are you sure that the assignment operation will yield the same type as rownames(res) would have?

If you wish to edit the rownames, do that before the function call.

ADD REPLY
4
Entering edit mode
3.7 years ago

Use keytype = "ENSEMBLTRANS".

ADD COMMENT

Login before adding your answer.

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