how to give name of genes instead of unique ID created by "lcpm" ?
0
0
Entering edit mode
6.0 years ago
Björn ▴ 110

after converting raw counts to cpm from data file using command

lcpm<-cpm(y, log=T)

head(lcpm)

gives first row with unique numeric ID which denotes gene names from data file. How to export name of genes into *.csv file but with name of genes ?

write.csv(highly_variable_lcpm, row.names=y2$genes, file = "highly_variable_lcpm_genes.csv")

I get error message as below

Error in write.table(highly_variable_lcpm, row.names = y2$genes, file = "highly_variable_lcpm_genes.csv", : invalid 'row.names' specification

lcpm edgeR software error write.csv • 2.1k views
ADD COMMENT
0
Entering edit mode

Could you give us the result of head(y2, 5) and head(highly_variable_lcpm, 5) please

ADD REPLY
0
Entering edit mode
head(y2, 5)

Error: Two subscripts required

head(highly_variable_lcpm, 5)

LCPM

The numbers that is present here are in fact numbers given by lcpm for genes!

ADD REPLY
0
Entering edit mode

I link you this to insert an image to a Biostars post : How to add images to a Biostars post

I got that your highly_variable_lcpm indexes are your genes.

What do you have in y2 ? Is it the correlation between highly_variable_lcpm index and gene names ?

Could you give the result of typeof(y2)

ADD REPLY
0
Entering edit mode

y is DGElist created after

y2<-DGEList(data, genes = genes,group = diagroup, remove.zeros = T)

I followed following weblink for my rnaseq analysis reference
You find first heatmap for "Top 500 most variable genes across samples". I just need a csv file with list of those 500 genes. I get numbers which comes from lcpm. data is matrix with gene names as row and sample name as column. genes is a table with sample name and other patient data such as diagroup. Hope this helps Thanks for sharing how to add images in biostars. I will follow it in my next posts.

ADD REPLY
0
Entering edit mode

If you just want the lcpm's numbers for genes

write.csv(highly_variable_lcpm, row.names=TRUE, file = "highly_variable_lcpm_genes.csv")

If you have gene names in your y2 and you want to export them too. You need to join y2 and highly_variable_lcpm.

Then make your gene names column as rownames() and export with the command above.

ADD REPLY

Login before adding your answer.

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