Question: setting up MArrayLM objects for use in RUnit tests
0
gravatar for russhh
5.3 years ago by
russhh5.5k
UK, U. Glasgow
russhh5.5k wrote:

I have a range of analysed microarray datasets (stored as limma:MArrayLM objects in an R list, fits) and want to make summaries for specific genes across all of the datasets. The hierarchical modelling for the cross-dataset analysis will be done with jags. 

I'm currently setting up the dataset to pass to jags; this will look like:

dataset : gene : probeCoef
1               : 1           : 0.234
1       : 1    : 0.345      # multiple probes for each gene 
1       : 1    : 0.789      #   within a dataset
1       : 2    : -0.1
2       : 1    : 0.33       # A given gene can have different
2       : 1    : 0.79       #   numbers of probes between datasets
2       : 2    : 0.3
2       : 2    : -0.5
....

 

Datasets are numbered from 1 to D, Genes are numbered from 1 to G; only genes that are present in every dataset are considered.

 

The MArrayLM objects, fits[[1]] to fits[[D]], each have a $coefficients table (from where the probeCoef is pulled out) and an entry in $genes giving the entrez.gene id for each row (these are mapped into 1..G so jags can use them as an index).

 

A function to pull out the probe coefficients and map the entrez-ids to gene indices should be pretty straightforward to write but I can't quite work out how to test it. To do this I'd need to be able to create MArrayLM objects containing specific values (preferably without creating an eset and passing this through lmFit, for the sake of speed).

 

limma runit • 1.5k views
ADD COMMENTlink modified 5.2 years ago by Biostar ♦♦ 20 • written 5.3 years ago by russhh5.5k

Please disregard this query. I was able to set up everything I needed using

test.input <- new(Class = 'MArrayLM')
test.input$coefficients <- matrix(...)
test.input$genes <- data.frame(...)
ADD REPLYlink modified 15 months ago by Ram32k • written 5.3 years ago by russhh5.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2447 users visited in the last hour
_