Closed MiriamRiquelmeP closed 4 years ago
Hi Miriam,
This is not happen before!
Frist you need to check if you can reproduce data in usage example.. see if you can get the same outputs!
Second, you need to each counts
, featureLength
, meanFragmentLength
, all should be numeric!
For example try to check the structure your input counts after you convert it to matrix:
cuentas <-read.csv('Counts.csv', row.names=1)
counts <- as.matrix(cuentas)
str(counts)
You should see all the columns in your matrix as numeric. if NOT then you need to convert it into numeric!
Please let me now if this work with you?
Thanks for answering, Ahmed
Apparently my matrix of featureLength has some NAs that were making the fpkm_matrix fail in every value. That was the problem. I solve it by filtering and removing the NAs.
Apart of that, it works pretty good. Thank you again, Miriam
I am trying to run the fpkm function on my data and I can only obtain an empty matrix with NA in every rows and columns.
Also, the size of the fpkm matrix is smaller than the initial counting matrix (it has less rows). Why is this happening ?
Here is the code I am using:
cuentas <-read.csv('Counts.csv', row.names=1) counts <- as.matrix(cuentas)
featureLength_GC <- read.csv('featureLength.csv') featureLength <- featureLength_GC$length
meanFragments <- read.csv('meanFragmentLength/meanFragments.csv') meanFragmentLength <- meanFragments$MEAN
fpkm_matrix <- fpkm (counts = counts, featureLength = featureLength, meanFragmentLength = meanFragmentLength )
Thank you in advance.