[DESeq2] Little Error in seq_len(nrow(modelMatrix)) while starting DESeq()
1
0
Entering edit mode
9.8 years ago
john ▴ 30

Hello guys,

I am doing some RNA-seq analysis with DESeq2. The following error occurs (I sure it's me causing it). Pls help me out!

Warning messages:
2: In seq_len(nrow(modelMatrix)) :
  first element used of 'length.out' argument
Error in sapply(seq_len(nrow(modelMatrix)), function(i) { :
  error in evaluating the argument 'X' in selecting a method for function 'sapply': Error in seq_len(nrow(modelMatrix)) :
  argument must be coercible to non-negative integer

This is what I did so far:

>ddsfm <- DESeqDataSetFromMatrix(countData = countdata, colData = coldata, design = ~ time)
> head(assay(ddsfm))
         h0_1 h2_2 h4_3 h6_4 h8_5 h10_6 h12_7 h14_8 h24_9 h48_10
A1BG-AS1   17   12   19   47   28     4    12    36    31    114
A1CF        0    1    2    2    4     0     0     5     3     22
A2M         3    4    6   18   11    20    20    18    17     60
A2M-AS1     0    3    1    6    0    10     4     9     2     12
A2ML1       0    0    3    4    6     2     2     2     3      7
A2MP1       9   20   34  144   97     5    35    72    69    112

> coldata
       intercept time
h0_1           1   h0
h2_2           1   h2
h4_3           1   h4
h6_4           1   h6
h8_5           1   h8
h10_6          1  h10
h12_7          1  h12
h14_8          1  h14
h24_9          1  h24
h48_10         1  h48

>dds=DESeq(ddsfm,test="LTR",reduced= ~ 1, fitType='local')

----------------
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing

Warning messages:
2: In seq_len(nrow(modelMatrix)) :
  first element used of 'length.out' argument
Error in sapply(seq_len(nrow(modelMatrix)), function(i) { :
  error in evaluating the argument 'X' in selecting a method for function 'sapply': Error in seq_len(nrow(modelMatrix)) :
  argument must be coercible to non-negative integer

I don't really know where I made a mistake.

Any help is greatly appreciated!

Cheers

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
[1] DESeq2_1.6.3              RcppArmadillo_0.4.600.4.0
[3] Rcpp_0.11.4               GenomicRanges_1.18.4
[5] GenomeInfoDb_1.2.4        IRanges_2.0.1
[7] S4Vectors_0.4.0           BiocGenerics_0.12.1

loaded via a namespace (and not attached):
 [1] acepack_1.3-3.3      annotate_1.44.0      AnnotationDbi_1.28.1
 [4] base64enc_0.1-2      BatchJobs_1.5        BBmisc_1.9
 [7] Biobase_2.26.0       BiocParallel_1.0.3   brew_1.0-6
[10] checkmate_1.5.1      cluster_2.0.1        codetools_0.2-10
[13] colorspace_1.2-4     DBI_0.3.1            digest_0.6.8
[16] fail_1.2             foreach_1.4.2        foreign_0.8-62
[19] Formula_1.2-0        genefilter_1.48.1    geneplotter_1.44.0
[22] ggplot2_1.0.0        grid_3.1.1           gtable_0.1.2
[25] Hmisc_3.14-6         iterators_1.0.7      lattice_0.20-29
[28] latticeExtra_0.6-26  locfit_1.5-9.1       MASS_7.3-37
[31] munsell_0.4.2        nnet_7.3-9           plyr_1.8.1
[34] proto_0.3-10         RColorBrewer_1.1-2   reshape2_1.4.1
[37] rpart_4.1-9          RSQLite_1.0.0        scales_0.2.4
[40] sendmailR_1.2-1      splines_3.1.1        stringr_0.6.2
[43] survival_2.37-7      tools_3.1.1          XML_3.98-1.1
[46] xtable_1.7-4         XVector_0.6.0
DESeq2 RNA-Seq • 4.4k views
ADD COMMENT
2
Entering edit mode
9.8 years ago
Michael Love ★ 2.6k

it should be test="LRT"

I do have match.arg checks now for test but not before version 1.6 went out. In the next release it will give a nicer message :)

ADD COMMENT
0
Entering edit mode

What is it that these little mistakes always get me? :-D

Thanks Michael!

ADD REPLY

Login before adding your answer.

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