This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to give name of genes instead of unique ID created by "lcpm" ?

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

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

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!

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)

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.

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.

0 answers

No answers yet.

Log in to answer this question.