Hi All
I'm getting the following error when trying to run DEXSeq's estimateDispersions() and I can't see how I may have got something the wrong length, though I'm not sure what 'condition' is. Could someone help me sort it out please?
the error...
how I got there...
I can run the exapmle data though I do get some warnings...
sessionInfo()
I'm getting the following error when trying to run DEXSeq's estimateDispersions() and I can't see how I may have got something the wrong length, though I'm not sure what 'condition' is. Could someone help me sort it out please?
the error...
Code:
> cds.exons<-estimateDispersions(cds.exons) Error in model.frame.default(object, data, xlev = xlev) : variable lengths differ (found for 'condition')
Code:
[ann@y90-ln-bioinf5 20140627_Shafiq_Ahmed_Gel_vs_Ml]$ R
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> library(DEXSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following object is masked from ‘package:stats’:
xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, as.vector, cbind, colnames,
duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted,
lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames,
sapply, setdiff, sort, table, tapply, union, unique, unlist
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
> list.files(recursive=T,pattern="dexseq_count.out")
[1] "E2_GEL_CGATGT_L001_L002_R1/dexseq_count.out"
[2] "E2_ML_ATCACG_L001_L002_R1/dexseq_count.out"
[3] "G7_GEL_TGACCA_L001_L002_R1/dexseq_count.out"
[4] "G7_ML_TTAGGC_L001_L002_R1/dexseq_count.out"
[5] "R10_GEL_######_L001_L002_R1/dexseq_count.out"
[6] "R10_ML_CAGATC_L001_L002_R1/dexseq_count.out"
[7] "R15_GEL_GCCAAT_L001_L002_R1/dexseq_count.out"
[8] "R15_ML_ACAGTG_L001_L002_R1/dexseq_count.out"
[9] "R24_GEL_TAGCTT_L003_L004_R1/dexseq_count.out"
[10] "R24_ML_GATCAG_L003_L004_R1/dexseq_count.out"
[11] "R9_GEL_CTTGTA_L003_L004_R1/dexseq_count.out"
[12] "R9_ML_GGCTAC_L003_L004_R1/dexseq_count.out"
[13] "S2_GEL_AGTTCC_L003_L004_R1/dexseq_count.out"
[14] "S2_ML_AGTCAA_L003_L004_R1/dexseq_count.out"
> dexseq.input<-list.files(recursive=T,pattern="dexseq_count.out")
> patient<-factor(c(1,1,2,2,3,3,4,4,5,5,6,6,7,7))
> treat<-factor(c(rep(c("GEL","ML"),7)), levels=c("GEL","ML"))
> metadata<-data.frame(patient,treat)
> metadata
patient treat
1 1 GEL
2 1 ML
3 2 GEL
4 2 ML
5 3 GEL
6 3 ML
7 4 GEL
8 4 ML
9 5 GEL
10 5 ML
11 6 GEL
12 6 ML
13 7 GEL
14 7 ML
> cds.exons<-read.HTSeqCounts(dexseq.input,metadata,flattenedfile="/usr/local/db/Homo_sapiens.GRCh37.70.dexseq.gff")
> cds.exons<-estimateSizeFactors(cds.exons)
> sizeFactors(cds.exons)
E2_GEL_CGATGT_L001_L002_R1/dexseq_count.out
1.2077521
E2_ML_ATCACG_L001_L002_R1/dexseq_count.out
1.0615008
G7_GEL_TGACCA_L001_L002_R1/dexseq_count.out
1.1879558
G7_ML_TTAGGC_L001_L002_R1/dexseq_count.out
1.1544027
R10_GEL_######_L001_L002_R1/dexseq_count.out
1.0404924
R10_ML_CAGATC_L001_L002_R1/dexseq_count.out
0.7823007
R15_GEL_GCCAAT_L001_L002_R1/dexseq_count.out
0.9656107
R15_ML_ACAGTG_L001_L002_R1/dexseq_count.out
1.0358146
R24_GEL_TAGCTT_L003_L004_R1/dexseq_count.out
1.0007947
R24_ML_GATCAG_L003_L004_R1/dexseq_count.out
0.8065910
R9_GEL_CTTGTA_L003_L004_R1/dexseq_count.out
0.9446503
R9_ML_GGCTAC_L003_L004_R1/dexseq_count.out
1.1146453
S2_GEL_AGTTCC_L003_L004_R1/dexseq_count.out
1.1618312
S2_ML_AGTCAA_L003_L004_R1/dexseq_count.out
0.9371032
> cds.exons<-estimateDispersions(cds.exons)
Error in model.frame.default(object, data, xlev = xlev) :
variable lengths differ (found for 'condition')
> dim(counts(cds.exons))
[1] 643455 14
> dim(metadata)
[1] 14 2
Code:
> if(suppressWarnings(require("pasilla", quietly=TRUE, character.only=TRUE))){
+
+ data("pasillaExons", package="pasilla")
+ pasillaExons <- estimateSizeFactors( pasillaExons )
+ pasillaExons <- estimateDispersions( pasillaExons )
+ head( fData(pasillaExons)$dispBeforeSharing )
+
+ }
....
Done
[1] NA NA NA NA NA NA
There were 50 or more warnings (use warnings() to see the first 50)
Code:
> sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-redhat-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] pasilla_0.2.19 DEXSeq_1.8.0 Biobase_2.22.0 BiocGenerics_0.8.0 loaded via a namespace (and not attached): [1] annotate_1.40.1 AnnotationDbi_1.24.0 biomaRt_2.18.0 [4] Biostrings_2.30.1 bitops_1.0-6 DBI_0.3.0 [7] DESeq_1.14.0 genefilter_1.44.0 geneplotter_1.40.0 [10] GenomicRanges_1.14.4 grid_3.0.2 hwriter_1.3.1 [13] IRanges_1.20.7 lattice_0.20-29 RColorBrewer_1.0-5 [16] RCurl_1.95-4.3 Rsamtools_1.14.3 RSQLite_0.11.4 [19] splines_3.0.2 statmod_1.4.20 stats4_3.0.2 [22] stringr_0.6.2 survival_2.37-7 tcltk_3.0.2 [25] tools_3.0.2 XML_3.98-1.1 xtable_1.7-3 [28] XVector_0.2.0 zlibbioc_1.8.0 > ?estimateDispersions Help on topic ‘estimateDispersions’ was found in the following packages: Package Library DEXSeq /usr/lib64/R/library BiocGenerics /usr/lib64/R/library