data import into bioconductor
2
0
Entering edit mode
@sow19872003-7527
Last seen 9.7 years ago
European Union

 

A beginner here, I am trying to use Bioconductor cellHTS2 package to analyse data from my HTS. I created mock files just like the ones that are described in the cellHTS2 manual. I had created the data in excel first and saved it as tab delimited text file and saved all the files in one folder. I would like to import this folder to bioconductor to further continue with the analysis procedure. But I get the following output when I try to set the path

> experimentName<-ermitoscreenHTS
Error: object 'ermitoscreenHTS' not found
> experimentName <-"ermitoscreenHTS"
> datapath<-system.file(experimentName, package="cellHTS2")
> datapath
[1] ""

Why is it not showing the data path? Should I have R readable files (.rnw or something of this sort) in my folder to get it recognised? Pls help me with this.

Session info 

sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.8.5 (Mountain Lion)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grid      parallel  stats     graphics  grDevices utils    
[7] datasets  methods   base     

other attached packages:
 [1] cellHTS2_2.30.0      locfit_1.5-9.1       hwriter_1.3.2       
 [4] vsn_3.34.0           splots_1.32.0        genefilter_1.48.1   
 [7] Biobase_2.26.0       BiocGenerics_0.12.1  RColorBrewer_1.1-2  
[10] BiocInstaller_1.16.2

loaded via a namespace (and not attached):
 [1] affy_1.44.0           affyio_1.34.0         annotate_1.44.0      
 [4] AnnotationDbi_1.28.2  Category_2.32.0       cluster_2.0.1        
 [7] DBI_0.3.1             DEoptimR_1.0-2        GenomeInfoDb_1.2.4   
[10] graph_1.44.1          GSEABase_1.28.0       IRanges_2.0.1        
[13] KernSmooth_2.23-14    lattice_0.20-30       limma_3.22.7         
[16] MASS_7.3-40           Matrix_1.1-5          mvtnorm_1.0-2        
[19] pcaPP_1.9-60          prada_1.42.0          preprocessCore_1.28.0
[22] RBGL_1.42.0           robustbase_0.92-3     rrcov_1.3-8          
[25] RSQLite_1.0.0         S4Vectors_0.4.0       splines_3.1.3        
[28] stats4_3.1.3          survival_2.38-1       tools_3.1.3          
[31] XML_3.98-1.1          xtable_1.7-4          zlibbioc_1.12.0    

 

 

 

 

data import • 1.5k views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 1 hour ago
EMBL Heidelberg

You're seeing this behaviour because the function system.file() is used for locating files that are installed with a package.  It's really helpful for accessing example data in vignettes, but it's not appropriate for use with your own data.

I suspect that if you run the command with the argument mustWork = TRUE you'll get an error saying the file can't be found.

datapath <- system.file(experimentName, package="cellHTS2", mustWork = TRUE)

What you need to do instead is specify the location of your files directly.  This will look something like:

datapath <- "/PATH/TO/YOUR/DATA"

You can check that you've got this right by running the following command.  This should print out the names of the files you're working with.

list.files( datapath )
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 16 hours ago
United States

The function system.file() is intended to find files that are in the package directory of your R installation. This is normally used by package developers who include certain data that can then be used for vignettes or examples. There is usually no reason for an end user to be calling system.file(). Instead, you are usually reading files from the current working directory.

What you would normally do is have your files that you want to read in your working directory, and then you would also have a 'PlateList' file that has all the required columns, as listed in the cellHTS2 vignette, on page 3 (and in table 1 on p. 4). You then read in the data using readPlateList().

dat <- readPlateList("Platelistfile.txt", "My_sweet_experiment", path = ".")

ADD COMMENT

Login before adding your answer.

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