I'm using "sva" package in R to determine the surrogate variables in my data set. I have a data frame with 60000 rows and 8 columns ( transcripts x samples). Each element in this matrix is a value of "TPM"(Transcript Per Factor, a numerical value) for corresponding transcription and sample. Here is the code I'm running:
   library(sva)
   library(Biobase)
   library(limma)
   data=read.table("mymatrix.txt")
   model  = model.matrix(~Sample_1+Sample_2,data=data)
   # NULL model
   model0 = model.matrix(~1,data=data) # no intercept
   # Run SVA
   svobj = sva(dat=data, mod=model, mod0=model0)
After running the "sav()" function, it gives me this error: Error in H %*% t(dat) : non-conformable arguments
Does any body have an idea what does that mean? it is an example of the .txt file:
                          Sample_1    Sample_2    Sample_3      Sample_4 
    ENSMUST00000060336.4 2.10642e-01 1.29483e-01 2.58036e-01 1.59276e-01
    ENSMUST00000060345.5 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00
    ENSMUST00000060348.2 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00
    ENSMUST00000060356.5 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00
    ENSMUST00000060357.8 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00
in the .txt files all the values are in the "double" format, but when I read the file using "read.table", they are converted to "e" format, so is this the problem?
in the text file:
                           Sample_1" "Sample_2"     "Sample_3"     "Sample_4"
    "ENSMUST00000000001.4" 18.7276    16.9755        12.138        20.0952 
    "ENSMUST00000000003.8" 0           0              0             0 
    "ENSMUST00000000010.8" 0           0              0             0 
    "ENSMUST00000000028.8" 0          0.427772       0.162408       0  
    "ENSMUST00000000033.6" 125.936    17.5017        21.3972        59.4235 
