Help me to find out the reason of this error in RnBeads...
1
0
Entering edit mode
6.9 years ago

Hello,

I am a beginner who start to study bioinformatics.

Now I am trying to run RnBeads (R package) to analyze bisulfite sequencing data. I have beed used this package for several times and had successful results without any error.

But this time I tried for 3 times, but still getting an same error, and cannot guess what the problem is.

Is there any one who can help me to solve or fix this error?

I used "bismarkcov" format files, which are results of bismark and want to get result of differential methylation analysis.

My code is like this :

rnb.options(
identifiers.column="sampleID",
import.bed.style="bismarkCov",
assembly="hg38",
differential.report.sites=FALSE
)

report.dir <- file.path(getwd(), "results_diffMethyl_3")

data.dir <- file.path(getwd())

sample.annotation <- file.path(getwd(), "sample_annotation.csv")

data.source <- c(data.dir, sample.annotation)

rnb.set <- rnb.execute.import(data.source=data.source, data.type="bs.bed.dir")

rnb.set.unfiltered <- rnb.set

result_preprocessing <- rnb.run.preprocessing(rnb.set.unfiltered, dir.reports=report.dir)

rnb2.set <- result_preprocessing$rnb.set

rnb.run.differential(rnb2.set, report.dir)

And the error is like...

2018-01-17 23:38:37    11.2  STATUS                             COMPLETED Adding volcano plots

2018-01-17 23:38:37    11.2  STATUS                             STARTED Adding tables

Error in data.frame(..., check.names = FALSE) :

  arguments imply differing number of rows: 583340, 218725

In addition: There were 12 warnings (use warnings() to see them)

I would be really grateful if you help to find out the reason or fix this error...

I am working on this for 7days...

software error rnbeads • 3.9k views
ADD COMMENT
0
Entering edit mode

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

ADD REPLY
0
Entering edit mode

can you show the result of str(rnb2.set)?

ADD REPLY
0
Entering edit mode
> str(rnb2.set)
Formal class 'RnBiseqSet' [package "RnBeads"] with 12 slots
  ..@ status             :List of 2
  .. ..$ disk.dump      : logi TRUE
  .. ..$ disk.dump.bigff: logi FALSE
  ..@ pheno              :'data.frame': 18 obs. of  3 variables:
  .. ..$ sampleID    : Factor w/ 18 levels "Bcell_1000_D1_R1",..: 2 3 1 5 6 4 8 9 7 11 ...
  .. ..$ filename_bed: Factor w/ 18 levels "GSM2324434_Bcell_1000_D2_R1.cov",..: 1 2 3 4 5 6 7 8 9 10 ...
  .. ..$ cell_type   : Factor w/ 6 levels "B_cell","CD4",..: 1 1 1 2 2 2 3 3 3 4 ...
  ..@ sites              : num [1:27865223, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : NULL
  .. .. ..$ : chr [1:3] "" "" "regInd"
  ..@ meth.sites         : list()
  .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. ..- attr(*, "vmode")= chr "double"
  .. .. ..- attr(*, "maxlength")= int 501574014
  .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a574e9ac280.ff"
  .. .. ..- attr(*, "pagesize")= int 65536
  .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. ..- attr(*, "virtual")= list()
  .. .. ..- attr(*, "Length")= int 501574014
  .. .. ..- attr(*, "Dim")= int [1:2] 27865223 18
  .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
 .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  ..@ covg.sites         : list()
  .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. ..- attr(*, "vmode")= chr "integer"
  .. .. ..- attr(*, "maxlength")= int 501574014
  .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a57465c2735.ff"
  .. .. ..- attr(*, "pagesize")= int 65536
  .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. ..- attr(*, "virtual")= list()
  .. .. ..- attr(*, "Length")= int 501574014
  .. .. ..- attr(*, "Dim")= int [1:2] 27865223 18
  .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
 .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
ADD REPLY
0
Entering edit mode
  ..@ regions            :List of 4
  .. ..$ tiling    : num [1:583340, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
  .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:3] "" "" "regInd"
  .. ..$ genes     : num [1:55774, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
  .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:3] "" "" "regInd"
  .. ..$ promoters : num [1:59451, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
  .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:3] "" "" "regInd"
  .. ..$ cpgislands: num [1:27541, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
  .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. ..$ : NULL
  .. .. .. ..$ : chr [1:3] "" "" "regInd"
  ..@ meth.regions       :List of 4
  .. ..$ tiling    : list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "double"
  .. .. .. ..- attr(*, "maxlength")= int 10500120
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a576fd3fec0.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 10500120
  .. .. .. ..- attr(*, "Dim")= int [1:2] 583340 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
  .. .. ..- attr(*, "aggregation")= Named chr "mean"
  .. .. .. ..- attr(*, "names")= chr "tiling"
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
ADD REPLY
0
Entering edit mode
  .. ..$ genes     : list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "double"
  .. .. .. ..- attr(*, "maxlength")= int 1003932
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a5740f6c639.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 1003932
  .. .. .. ..- attr(*, "Dim")= int [1:2] 55774 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
  .. .. ..- attr(*, "aggregation")= Named chr "mean"
  .. .. .. ..- attr(*, "names")= chr "genes"
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  .. ..$ promoters : list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "double"
  .. .. .. ..- attr(*, "maxlength")= int 1070118
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a57298541b1.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 1070118
  .. .. .. ..- attr(*, "Dim")= int [1:2] 59451 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
  .. .. ..- attr(*, "aggregation")= Named chr "mean"
  .. .. .. ..- attr(*, "names")= chr "promoters"
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  .. ..$ cpgislands: list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "double"
  .. .. .. ..- attr(*, "maxlength")= int 495738
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a576d890e62.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 495738
  .. .. .. ..- attr(*, "Dim")= int [1:2] 27541 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
  .. .. ..- attr(*, "aggregation")= Named chr "mean"
  .. .. .. ..- attr(*, "names")= chr "cpgislands"
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
ADD REPLY
0
Entering edit mode
 ..@ covg.regions       :List of 4
  .. ..$ tiling    : list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "integer"
  .. .. .. ..- attr(*, "maxlength")= int 10500120
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a57726f73fb.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 10500120
  .. .. .. ..- attr(*, "Dim")= int [1:2] 583340 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  .. ..$ genes     : list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "integer"
  .. .. .. ..- attr(*, "maxlength")= int 1003932
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a574b9c79dd.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 1003932
  .. .. .. ..- attr(*, "Dim")= int [1:2] 55774 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  .. ..$ promoters : list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "integer"
  .. .. .. ..- attr(*, "maxlength")= int 1070118
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a57587e7bc.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 1070118
  .. .. .. ..- attr(*, "Dim")= int [1:2] 59451 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  .. ..$ cpgislands: list()
  .. .. ..- attr(*, "physical")=Class 'ff_pointer' <externalptr> 
  .. .. .. ..- attr(*, "vmode")= chr "integer"
  .. .. .. ..- attr(*, "maxlength")= int 495738
  .. .. .. ..- attr(*, "pattern")= chr "ff"
  .. .. .. ..- attr(*, "filename")= chr "/data1/project/Xeno/project_jm/tempfiles/Rtmp2dRiI8/ff7a57e4f5554.ff"
  .. .. .. ..- attr(*, "pagesize")= int 65536
  .. .. .. ..- attr(*, "finalizer")= chr "delete"
  .. .. .. ..- attr(*, "finonexit")= logi TRUE
  .. .. .. ..- attr(*, "readonly")= logi FALSE
  .. .. .. ..- attr(*, "caching")= chr "mmnoflush"
  .. .. ..- attr(*, "virtual")= list()
  .. .. .. ..- attr(*, "Length")= int 495738
  .. .. .. ..- attr(*, "Dim")= int [1:2] 27541 18
  .. .. .. ..- attr(*, "Dimorder")= int [1:2] 1 2
  .. .. .. ..- attr(*, "Symmetric")= logi FALSE
  .. .. .. ..- attr(*, "Dimnames")=List of 2
  .. .. .. .. ..$ : NULL
  .. .. .. .. ..$ : chr [1:18] "Bcell_1000_D2_R1" "Bcell_1000_D3_R1" "Bcell_1000_D1_R1" "CD4_1000_D2_R1" ...
 .. .. .. - attr(*, "class") =  chr [1:3] "ff_matrix" "ff_array" "ff"
  ..@ assembly           : chr "hg38"
  ..@ target             : chr "CpG"
  ..@ inferred.covariates: list()
  ..@ version            : chr "1.6.1"

Thank you for giving me a comment! I would be very appreciate if you keep helping me to solve the problem..

ADD REPLY
0
Entering edit mode

in your working directory, do you have any results from the differential analysis? I'm just trying to understand at what point it's failing

ADD REPLY
0
Entering edit mode

In differential methylation analysis html page, I got regional level - scatter plots & volcano plots, but "Differential Methylation Tables" subsection is totally missing.

It only has :

    A tabular overview of measures for differential methylation on the region level for the individual comparisons are provided in this section.

id: region id
Chromosome: chromosome of the region
Start: start coordinate of the region
End: end coordinate of the region
[symbol]: associated gene symbol to the given region [only valid for gene associated regions]
[entrezID]: Entrez ID of the gene associated with the region [only valid for gene associated regions]
mean.mean.g1,mean.mean.g2: (where g1 and g2 is replaced by the respective group names in the table) mean of mean methylation levels for group 1 and 2 across all sites in a region
mean.mean.diff: Mean difference in means across all sites in a region
mean.mean.quot.log2: log2 of the mean quotient in means across all sites in a region
comb.p.val: Combined p-value aggregating p-values of all sites in the region using a generalization of Fisher's method [1]
comb.p.adj.fdr: FDR adjusted combined p-value
combinedRank: mean.mean.diff, mean.mean.quot.log2 and comb.p.val are ranked for all regions. This column aggregates them using the maximum, i.e. worst rank of a site among the three measures
num.sites: number of sites associated with the region
mean.num.na.g1,mean.num.na.g2: Mean number of NA methylation values accross all sites in group 1 and group 2 respectively
mean.mean.covg.g1,mean.mean.covg.g2: Mean value of mean coverage values (across all samples in a group) across all sites in a region
mean.nsamples.covg.thresh.g1,mean.nsamples.covg.thresh.g2: mean number of samples (accross all considered sites) that have a coverage larger than 5 for the site in group 1 and group 2 respectively
The tables for the individual comparisons can be found here:

and after this, there is nothing...

ADD REPLY
0
Entering edit mode
6.1 years ago
fmueller ▴ 50

Hi, sorry for being late to the game. If you shoot us an email (to rnbeads@mpi-inf.mpg.de) we are typically faster. The problem you describe occurs sometimes when the disk-based files that we use to store the (differential) methylation data (using the ff package) are corrupted. In our experience this happens sometimes, e.g. when the I/O on the filesystem is high. Typically rerunning the analysis helps in resolving this issue. Hope that helps.

ADD COMMENT

Login before adding your answer.

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