RPKM values for mapped miRNA reads
0
0
Entering edit mode
6.0 years ago
glady ▴ 320

Hello all, I had some miRNA samples, I performed the mapping of the miRNA reads to miRBase mature file by BWA. And the raw counts were generated by the following command:

samtools view -F 260 sample_1.sam | \
  cut -f 3 | sort | uniq -c | \
  awk '{printf("%s\t%s\n", $2, $1)}' > sample_1-counts.txt

How can I obtain the RPKM values from these raw counts? I mean, how can I normalize these raw counts? Or is there any other way like some tools which can be used for performing quantification on the mirna.sam file?

Thank you.

RNA-Seq • 1.4k views
ADD COMMENT
1
Entering edit mode

I think you are mistakenly mentioned as mRNA samples. I hope that is miRNA, am i corrrect? If i am, here is the code for RPKM.

    #Call library
    library(reshape2)
    #Import the input file
    sample_1-counts <- read.csv("~/Documents/sample_1-counts.csv")
    #Use melt and dcast 
    RPKM <- melt(sample_1-counts, measure.vars=c("sample1","sample2","sample3"))
    #Calculate the RPKM
    RPKM$RPKM <- with(RPKM, value*1e6 / (Total*miRNA_Length))
ADD REPLY
0
Entering edit mode

Yes, you are correct. It is miRNA. Thank you for the reply.

ADD REPLY
0
Entering edit mode

I'm getting an error in the above code:

Error in eval(substitute(expr), data, enclos = parent.frame()) : 
  object 'Total' not found
ADD REPLY
0
Entering edit mode

This normalisation which i have mentioned is fully intrasample based. So, you should calculate the tota readcountl of perticular miRNA from across all the samples. Ex: If you have 5 samples, you should calculate the total readcount of perticular miRNA from all 5 samples. Do like this for all miRNAs and add in the separate column titled as Total in your sample_1-counts file.

ADD REPLY
0
Entering edit mode

Is it correct that you have mRNA samples but quantify miRNAs? Does the library prep or rather RNA extraction properly capture the miRNAs? For RPKM, please check this video. Tools that can do that can be found on google.

ADD REPLY
0
Entering edit mode

Its miRNA and not MRNA, my typing mistake. Sorry, I have edited the post. Thank you

ADD REPLY

Login before adding your answer.

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