Nimblegen CGH ringo to snapCGH
1
0
Entering edit mode
Chris Fenton ▴ 80
@chris-fenton-3854
Last seen 10.1 years ago
Norway
Has anyone gotten nimblegen CGH data from Ringo into snapCGH. I have looked at https://stat.ethz.ch/pipermail/bioconductor/2006-October/014724.html but it seems that Nimblegen has yet again changed format. For instance I find no file remotely named ORDER_ID3051_SampleKey.txt. I do have a file sample_key.txt """ ARRAY_ID CY3_SAMPLE_NAME CY5_SAMPLE_NAME 39450A01_290310 patient_f male_ref """ but I doubt looking at the code this is the right file. I tried a small hack with little luck below. Any help greatly appreciated. Chris """" library('Ringo') library('snapCGH') exRG <- readNimblegen('samples.txt', 'spots.txt') ma <- preprocess(exRG, method='nimblegen', returnMAList=TRUE) ma$design <- c(-1, -1) # remove non chromosomal probes probes <- grep('CHR', ma$genes[,'ID']) ma$genes <- ma$genes[probes,] ma$M <- ma$M[probes,] ma$A <- ma$A[probes,] #parse chromosomes from gene name Chr <- gsub('CHR','', ma$genes[,'ID']) Chr <- gsub('FS.*','', Chr) # stolen from read.clonesinfor indX <- which(Chr == "X" | Chr == "x") indY <- which(Chr == "Y" | Chr == "y") Chr[indX] <- 23 Chr[indY] <- 24 rg1 <- RG.MA(ma) rg1$genes <- data.frame(rg1$genes, 'Position'=rg1$genes[, 'POSITION'], 'Chr'=as.numeric(Chr)) ma2 <- processCGH(rg1) """" I get Error: subscript out of bounds on the processCGH. sessionInfo() R version 2.10.1 (2009-12-14) i686-pc-linux-gnu locale: [1] C attached base packages: [1] splines grid stats graphics grDevices utils datasets [8] methods base other attached packages: [1] snapCGH_1.16.0 aCGH_1.22.0 multtest_2.2.0 survival_2.35-7 [5] cluster_1.12.1 GLAD_2.6.0 DNAcopy_1.20.0 tilingArray_1.24.0 [9] pixmap_0.4-10 Ringo_1.10.0 Matrix_0.999375-33 lattice_0.17-26 [13] limma_3.2.1 RColorBrewer_1.0-2 Biobase_2.6.1 loaded via a namespace (and not attached): [1] AnnotationDbi_1.8.1 DBI_0.2-5 MASS_7.3-4 [4] RSQLite_0.8-2 affy_1.24.2 affyio_1.14.0 [7] annotate_1.24.1 genefilter_1.28.2 preprocessCore_1.8.0 [10] strucchange_1.4-0 tools_2.10.1 vsn_3.14.0 [13] xtable_1.5-6
CGH snapCGH Ringo CGH snapCGH Ringo • 1.7k views
ADD COMMENT
0
Entering edit mode
@joern-toedling-3465
Last seen 10.2 years ago
Hello, I am not familiar with snapCGH, but looking at your code excerpt and the function processCGH I see a few likely candidates for generating that, admittedly non-informative, error message. If you type the name of the function without brackets like that > processCGH you can check in R what it does. Also look at its manual page to see possible problems. So for example, your call RG.MA is not necessary as the first thing the function does in the case that the input is an RGList is to call MA.RG. And your input objects seems to require a data.frame 'genes' with a column called 'ID'. Furthermore, you may need to adjust the argument 'maxChromThreshold' of the function processCGH for your call. In general, if you want to find out at exactly what position a function call breaks, you can use the 'debug' method: > debug(processCGH) > ma2 <- processCGH(rg1) ### and when you are done > undebug(processCGH) This way, pressing Enter, you go step by step through the function to find out at which point it breaks. My guess is that there still could be a problem with the chromosome names, you may want to check the output of > table(as.integer(Chr)) And a last remark: MAList objects can be subsetted like matrices, which allows to you write the part "removal of non-chromosome probes" in a much shorter way: > ma <- ma[ grep('CHR', ma$genes[,'ID']) , ] Sorry for the slightly generic response. I am sure that the authors of snapCGH will be able to provide more detailed help. Regards, Joern On Tue, 20 Apr 2010 15:42:21 +0200, Chris Fenton wrote > Has anyone gotten nimblegen CGH data from Ringo into snapCGH. > > I have looked at > https://stat.ethz.ch/pipermail/bioconductor/2006-October/014724.html > > but it seems that Nimblegen has yet again changed format. For > instance I find no file remotely named ORDER_ID3051_SampleKey.txt. I > do have a file sample_key.txt """ ARRAY_ID CY3_SAMPLE_NAME CY5_SAMPLE_NAME > 39450A01_290310 patient_f male_ref > """ > > but I doubt looking at the code this is the right file. > I tried a small hack with little luck below. > > Any help greatly appreciated. > > Chris > > """" > > library('Ringo') > library('snapCGH') > exRG <- readNimblegen('samples.txt', 'spots.txt') > ma <- preprocess(exRG, method='nimblegen', returnMAList=TRUE) > ma$design <- c(-1, -1) > > # remove non chromosomal probes > probes <- grep('CHR', ma$genes[,'ID']) > ma$genes <- ma$genes[probes,] > ma$M <- ma$M[probes,] > ma$A <- ma$A[probes,] > > #parse chromosomes from gene name > Chr <- gsub('CHR','', ma$genes[,'ID']) > Chr <- gsub('FS.*','', Chr) > > # stolen from read.clonesinfor > indX <- which(Chr == "X" | Chr == "x") > indY <- which(Chr == "Y" | Chr == "y") > Chr[indX] <- 23 > Chr[indY] <- 24 > rg1 <- RG.MA(ma) > rg1$genes <- data.frame(rg1$genes, 'Position'=rg1$genes[, > 'POSITION'], 'Chr'=as.numeric(Chr)) > > ma2 <- processCGH(rg1) > > """" > > I get > > Error: subscript out of bounds > > on the processCGH. > > sessionInfo() > R version 2.10.1 (2009-12-14) > i686-pc-linux-gnu > > locale: > [1] C > > attached base packages: > [1] splines grid stats graphics grDevices utils > datasets > [8] methods base > > other attached packages: > [1] snapCGH_1.16.0 aCGH_1.22.0 multtest_2.2.0 > survival_2.35-7 > [5] cluster_1.12.1 GLAD_2.6.0 DNAcopy_1.20.0 > tilingArray_1.24.0 > [9] pixmap_0.4-10 Ringo_1.10.0 Matrix_0.999375-33 > lattice_0.17-26 > [13] limma_3.2.1 RColorBrewer_1.0-2 Biobase_2.6.1 > > loaded via a namespace (and not attached): > [1] AnnotationDbi_1.8.1 DBI_0.2-5 MASS_7.3-4 > [4] RSQLite_0.8-2 affy_1.24.2 affyio_1.14.0 > [7] annotate_1.24.1 genefilter_1.28.2 preprocessCore_1.8.0 > [10] strucchange_1.4-0 tools_2.10.1 vsn_3.14.0 > [13] xtable_1.5-6 > --- Joern Toedling Institut Curie -- U900 26 rue d'Ulm, 75005 Paris, FRANCE Tel. +33 (0)156246927
ADD COMMENT
0
Entering edit mode
Hi Chris, I tend to agree with Joern - it sounds like you might be having a problem with the chromosome names. For example, are the chromosome names numeric? If they are strings, that might be the problem. Please let me know how you are getting on. Cheers, John On Thu, Apr 22, 2010 at 3:45 AM, Joern Toedling <joern.toedling@curie.fr>wrote: > Hello, > > I am not familiar with snapCGH, but looking at your code excerpt and the > function processCGH I see a few likely candidates for generating that, > admittedly non-informative, error message. > > If you type the name of the function without brackets like that > > processCGH > you can check in R what it does. Also look at its manual page to see > possible > problems. So for example, your call RG.MA is not necessary as the first > thing > the function does in the case that the input is an RGList is to call MA.RG. > And your input objects seems to require a data.frame 'genes' with a column > called 'ID'. Furthermore, you may need to adjust the argument > 'maxChromThreshold' of the function processCGH for your call. > > In general, if you want to find out at exactly what position a function > call > breaks, you can use the 'debug' method: > > debug(processCGH) > > ma2 <- processCGH(rg1) > ### and when you are done > > undebug(processCGH) > > This way, pressing Enter, you go step by step through the function to find > out > at which point it breaks. > > My guess is that there still could be a problem with the chromosome names, > you > may want to check the output of > > table(as.integer(Chr)) > > And a last remark: > MAList objects can be subsetted like matrices, which allows to you write > the > part "removal of non-chromosome probes" in a much shorter way: > > > ma <- ma[ grep('CHR', ma$genes[,'ID']) , ] > > Sorry for the slightly generic response. I am sure that the authors of > snapCGH > will be able to provide more detailed help. > > Regards, > Joern > > > > On Tue, 20 Apr 2010 15:42:21 +0200, Chris Fenton wrote > > Has anyone gotten nimblegen CGH data from Ringo into snapCGH. > > > > I have looked at > > https://stat.ethz.ch/pipermail/bioconductor/2006-October/014724.html > > > > but it seems that Nimblegen has yet again changed format. For > > instance I find no file remotely named ORDER_ID3051_SampleKey.txt. I > > do have a file sample_key.txt """ ARRAY_ID CY3_SAMPLE_NAME > CY5_SAMPLE_NAME > > 39450A01_290310 patient_f male_ref > > """ > > > > but I doubt looking at the code this is the right file. > > I tried a small hack with little luck below. > > > > Any help greatly appreciated. > > > > Chris > > > > """" > > > > library('Ringo') > > library('snapCGH') > > exRG <- readNimblegen('samples.txt', 'spots.txt') > > ma <- preprocess(exRG, method='nimblegen', returnMAList=TRUE) > > ma$design <- c(-1, -1) > > > > # remove non chromosomal probes > > probes <- grep('CHR', ma$genes[,'ID']) > > ma$genes <- ma$genes[probes,] > > ma$M <- ma$M[probes,] > > ma$A <- ma$A[probes,] > > > > #parse chromosomes from gene name > > Chr <- gsub('CHR','', ma$genes[,'ID']) > > Chr <- gsub('FS.*','', Chr) > > > > # stolen from read.clonesinfor > > indX <- which(Chr == "X" | Chr == "x") > > indY <- which(Chr == "Y" | Chr == "y") > > Chr[indX] <- 23 > > Chr[indY] <- 24 > > rg1 <- RG.MA(ma) > > rg1$genes <- data.frame(rg1$genes, 'Position'=rg1$genes[, > > 'POSITION'], 'Chr'=as.numeric(Chr)) > > > > ma2 <- processCGH(rg1) > > > > """" > > > > I get > > > > Error: subscript out of bounds > > > > on the processCGH. > > > > sessionInfo() > > R version 2.10.1 (2009-12-14) > > i686-pc-linux-gnu > > > > locale: > > [1] C > > > > attached base packages: > > [1] splines grid stats graphics grDevices utils > > datasets > > [8] methods base > > > > other attached packages: > > [1] snapCGH_1.16.0 aCGH_1.22.0 multtest_2.2.0 > > survival_2.35-7 > > [5] cluster_1.12.1 GLAD_2.6.0 DNAcopy_1.20.0 > > tilingArray_1.24.0 > > [9] pixmap_0.4-10 Ringo_1.10.0 Matrix_0.999375-33 > > lattice_0.17-26 > > [13] limma_3.2.1 RColorBrewer_1.0-2 Biobase_2.6.1 > > > > loaded via a namespace (and not attached): > > [1] AnnotationDbi_1.8.1 DBI_0.2-5 MASS_7.3-4 > > [4] RSQLite_0.8-2 affy_1.24.2 affyio_1.14.0 > > [7] annotate_1.24.1 genefilter_1.28.2 preprocessCore_1.8.0 > > [10] strucchange_1.4-0 tools_2.10.1 vsn_3.14.0 > > [13] xtable_1.5-6 > > > > --- > Joern Toedling > Institut Curie -- U900 > 26 rue d'Ulm, 75005 Paris, FRANCE > Tel. +33 (0)156246927 > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- John Marioni, PhD Postdoctoral Scholar Department of Human Genetics University of Chicago [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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