This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert RPKM data to read count data matrix

I have RNA seq data for each sample in the following format : enter image description here

Each sample has data in this format for 22 chromosomes, in their respective csv files.

I require it count matrix format (gene in rows, samples in columns or vice-versa)

enter image description here

Is there are package in R or python that will allow me to achieve this? Please help.

rpkm count data rna-seq r python

Difficult as you would need the exact code that was used for the RPKM conversion including the effective total library size and gene length to reverse the actions. Even then it is difficult because this table is a non-standard format and you would need a custom approach. Is there any chance you get your hands on the raw data (fastq or at least aligned BAM) so that you can align or quantify from scratch? That would be the best and safest option. Is tag_count the raw counts?

There are sample wise fastq files. But it would be computation intensive, since there are many samples.

Take a look at salmon, that should be fairly light.

Yep, and even if it takes time, it will make your life a lot easier. Salmon is really fast, and barely requires memory. I strongly recommend it over any back-conversion of what you have as table.

They are accessable for download. The relevant information is the BioProject PRJNA274751. Use this one to get files directly from the ENA, see my tutorial on how to do that efficiently: Fast download of FASTQ files from the European Nucleotide Archive (ENA)

All relevant files are here: https://www.ebi.ac.uk/ena/data/view/PRJNA274751 You can download them one-by-one or as batch if you use the code in the linked tutorial.

The problem with back-conversion of table-like data is that you need 100% the code which created the table plus exact gene / feature length that were used for the size correction. Otherwise you create flawed raw counts that totally skew your analysis. It really should only be the absolute last option to do something like that.

chtrgswm : You appear to have posted a link for netflix in your latest post. I deleted that post.

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized. SUBMIT ANSWER is for new answers to original question.

I have changed it to the correct link.

No problem. I will delete my comment.

1 answer

Ok. Thank you. I have similar case from another study in which fastq files are not available - https://www.netflix.com/watch/80074981?trackId=155573560. What might I do in this case?

Log in to answer this question.