1
$\begingroup$

I have RNA seq data of raw gene counts that I want to transform for linear modelling. I am trying to voom transform, to do a weighted analysis.

Data frame: prac_count_10

gene         S1     S2    S3   S4    S5 
ENG0000456   0      1     10   145   24
ENG0000458   7      2     9    0     0
ENG0000657   76     12    56   10    2 
ENG0000689   0      0     0    3     5

Code:

prac_prac_10 <- voom(prac_count_10[,2:5], design=NULL, lib.size=NULL, 
  normalize.method = "none", span = 0.5

However this doesn't give an output with the gene sample names and logCPM values. Would like an output with gene id's and logCPM values for linear modelling.

Also tried:

cpm <- cpm(prac_count_10)
lcpm <- cpm(prac_count_10, log=TRUE)


````````````
$\endgroup$

1 Answer 1

1
$\begingroup$

Try to use DElist() function before you transform, and also make rownames first.

counts <- prac_count_10[,-1]

rownames(counts) <- prac_count_10[,1]

DGE1 <- DGEList(counts)

And then continue with your voom...

$\endgroup$
5
  • $\begingroup$ Thank you. what package is DElist in? $\endgroup$
    – holly
    Apr 9, 2019 at 8:21
  • $\begingroup$ That would be edgeR. $\endgroup$
    – benn
    Apr 9, 2019 at 8:23
  • $\begingroup$ If I do: prac_count <- data.frame(prac_count, row.names=1), counts<- prac_count[,1], rownames(counts) <- prac_count[,1], DGE1 <-DGEList(counts) If doesn't work... have I missed a step? Thank you so much $\endgroup$
    – holly
    Apr 9, 2019 at 8:31
  • 1
    $\begingroup$ That's not the code I gave in my answer, is it? $\endgroup$
    – benn
    Apr 9, 2019 at 8:48
  • $\begingroup$ Don't mention it! Good luck with it. $\endgroup$
    – benn
    Apr 9, 2019 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.