Error in champ.load (v. 2.8.3)
1
0
Entering edit mode
@rasmusrydbirk-12534
Last seen 5.6 years ago

I'm not able to import data with champ.load. I don't know if it's a minfi error?

> myLoad <- champ.load(arraytype = "EPIC")
[===========================]
[<<<< ChAMP.LOAD START >>>>>]
-----------------------------

[ Loading Data with ChAMP Method ]
----------------------------------
Note that ChAMP method will NOT return rgSet or mset, they object defined by minfi. Which means, if you use ChAMP method to load data, you can not use SWAN or FunctionNormliazation method in champ.norm() (you can use BMIQ or PBC still). But All other function should not be influenced.

[===========================]
[<<<< ChAMP.IMPORT START >>>>>]
-----------------------------

[ Section 1: Read PD Files Start ]
  CSV Directory: %MyDir%/Sample_setup.csv
  Find CSV Success
  Reading CSV File
Error in if (skip > 0L) readLines(file, skip) : 
  argument is of length zero

> traceback()


6: read.table(file = file, header = header, sep = sep, quote = quote, 
       dec = dec, fill = fill, comment.char = comment.char, ...)
5: read.csv(csvfile, skip = which(substr(readLines(csvfile), 1, 
       6) == "[Data]"), stringsAsFactor = FALSE, header = TRUE)
4: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
3: suppressWarnings(pd <- read.csv(csvfile, skip = which(substr(readLines(csvfile), 
       1, 6) == "[Data]"), stringsAsFactor = FALSE, header = TRUE))
2: champ.import(directory, arraytype = arraytype)
1: champ.load(arraytype = "EPIC")

> sessionInfo()

R version 3.4.0 (2017-04-21)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

attached base packages:

 [1] splines   stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] ggplot2_2.2.1                              ChAMP_2.8.3                               
 [3] IlluminaHumanMethylationEPICmanifest_0.3.0 Illumina450ProbeVariants.db_1.12.0        
 [5] DMRcate_1.12.1                             DMRcatedata_1.12.0                        
 [7] DSS_2.16.0                                 bsseq_1.12.1                              
 [9] FEM_3.4.0                                  graph_1.54.0                              
[11] org.Hs.eg.db_3.4.1                         impute_1.50.1                             
[13] igraph_1.0.1                               corrplot_0.77                             
[15] marray_1.54.0                              limma_3.32.2                              
[17] Matrix_1.2-10                              AnnotationDbi_1.38.1                      
[19] ChAMPdata_2.8.1                            minfi_1.22.1                              
[21] bumphunter_1.16.0                          locfit_1.5-9.1                            
[23] iterators_1.0.8                            foreach_1.4.3                             
[25] Biostrings_2.44.1                          XVector_0.16.0                            
[27] SummarizedExperiment_1.6.3                 DelayedArray_0.2.7                        
[29] matrixStats_0.52.2                         Biobase_2.36.2                            
[31] GenomicRanges_1.28.3                       GenomeInfoDb_1.12.2                       
[33] IRanges_2.10.2                             S4Vectors_0.14.3                          
[35] BiocGenerics_0.22.0                        BiocInstaller_1.26.0                      

champ ChAMP • 2.6k views
ADD COMMENT
2
Entering edit mode
Yuan Tian ▴ 90
@yuan-tian-9598
Last seen 4.9 years ago

Hello Rasmus:

 

Could you show me your csv file? Normally, CSV file for DNA methylation data would have some extra lines ahead. So I firstly detected those lines and skipped them. I guess your csv file is not very typical. By checking your csv file, I may modify the code better. Because I can use new ChAMP to load all my data sets.

 

Best

Yuan Tian

ADD COMMENT
0
Entering edit mode

I just tried with ChAMP v. 2.6.x, no problem loading here.

My CSV-files look something like this, I of course save them with commas as separators:

Sample_Name Real_Name Sample_Group Conversion Sample_Plate Sample_Well Array Slide Basename
1 s1 CTRL 1 1 F3 R06C01 201247480020 201247480020_R06C01
2 s2 CTRL 1 1 H3 R08C01 201247480020 201247480020_R08C01
3 s3 CTRL 1 1 F4 R06C01 201247480021 201247480021_R06C01
4 s4 CTRL 1 1 H4 R08C01 201247480021 201247480021_R08C01
5 s5 DIS 1 1 B3 R02C01 201247480020 201247480020_R02C01
6 s6 DIS 1 1 D3 R04C01 201247480020 201247480020_R04C01
7 s7 DIS 1 1 B4 R02C01 201247480021 201247480021_R02C01
8 s8 DIS 1 1 D4 R04C01 201247480021 201247480021_R04C01
ADD REPLY
0
Entering edit mode

Hello Rasmus:

 

I think the reason is champ.import() read .csv file from illumina machine, normally those csv files contain some additional information ahead, like date or producer's name. So champ.import() would filter them ahead, then read data. I think your data have been modified before, because the first line is already information of samples.

It's easy to fix, just open your .csv file, and add one line "[Data]" ahead of it, then champ.import() should be able to recognize it. like:

[Data]

Sample_Name

Real_Name

Sample_Group

Conversion

Sample_Plate

Sample_Well

Array

Slide

Basename

1

s1

CTRL

1

1

F3

R06C01

201247480020

201247480020_R06C01

2

s2

CTRL

1

1

H3

R08C01

201247480020

201247480020_R08C01

 

Then it should work.

 

Note that for Chinese users or other special language users, I don't recommend you use Excel to do this, because based on my experience, if you open .csv file with Excel, then close it with saving, the format would be changed. I am not sure if it's related to lauguage or Excel, but it never works for me.

Best

Yuan Tian

 
ADD REPLY

Login before adding your answer.

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