Thanks for pointing this out. I've updated the vignette to: a <- fit$fitValleys$x[1]; b <- fit$fitValleys$x[2];
/H On Mon, Mar 7, 2011 at 5:28 AM, Oscar Rueda <oscar.ru...@cancer.org.uk> wrote: > Thanks a lot, Henrik! > > This has solved my problem. > One more thing about the vignette: the code to call for confidence scores > does not work for me: > >> a <- fit$x[1]; >> b <- fit$x[2]; >> cs[isDiploid] <- rowMins(abs(cbind(betaN[isDiploid]-a, betaN[isDiploid]-b))); > >> > Error in cs[isDiploid] <- rowMins(abs(cbind(betaN[isDiploid] - a, > betaN[isDiploid] - : > replacement has length zero > > The object fit I get looks like this: > >> fit > [[1]] > [[1]]$cn > [1] 2 > > [[1]]$nbrOfGenotypeGroups > [1] 3 > > [[1]]$fit > type x density > 1 peak 0.1228705 1.5184897 > 2 valley 0.3286780 0.5909177 > 3 peak 0.4792689 1.1727220 > 4 valley 0.6348794 0.5681927 > 5 peak 0.8356672 1.4166525 > > [[1]]$fitValleys > type x density > 2 valley 0.3286780 0.5909177 > 4 valley 0.6348794 0.5681927 > > [[1]]$n > [1] 934063 > > > attr(,"class") > [1] "NaiveGenotypeModelFit" "list" > > So there is no fit$x element. Anyway, I don't think I need these confidence > scores for TumourBoost. > > Cheers, > Oscar > > > On 4/3/11 05:05, "Henrik Bengtsson" <henrik.bengts...@aroma-project.org> > wrote: > >> Hi again, >> >> after receiving your data I could (i) reproduce the problem, and more >> importantly (ii) fix the bug causing it. The reason was, as you >> concluded, that in findPeaksAndValleys(x, to), when 'x' is a numeric, >> argument 'to' was interpreted via partial argument matching as the >> 'tol' argument instead of being passed on to density() via arguments >> '...'. This was easily corrected by changing the order of 'tol' and >> '...' from: >> >> findPeaksAndValleys.numeric <- function(x, tol=0, ..., na.rm=TRUE) >> >> to >> >> findPeaksAndValleys.numeric <- function(x, ..., tol=0, na.rm=TRUE) >> >> With your data, this simple fix will give the correct gender call with >> and without argument 'to', i.e. >> >>> callXXorXY(betaN[is23], betaN[is24]) >> [1] "XX" >>> callXXorXY(betaN[is23], betaN[is24], from=0, to=1) >> [1] "XX" >> >> >> I've committed the bug fix to aroma.light v1.18.4 (BioC release) as >> well as aroma.light v1.19.4 (BioC devel). Until it's available there, >> you can also install it from source by: >> >> source("http://aroma-project.org/hbLite.R"); >> installPackages("http://www.braju.com/R/repos/aroma.light_1.18.4.tar.gz") ; >> >> >> Thanks. >> >> /Henrik >> >> On Mon, Feb 28, 2011 at 12:07 PM, Henrik Bengtsson >> <henrik.bengts...@aroma-project.org> wrote: >>> Y8l >>> >>> On Mon, Feb 28, 2011 at 4:09 AM, Oscar Rueda <oscar.ru...@cancer.org.uk> >>> wrote: >>>> HI, >>>> Thanks for your answer. >>>> I¹ve updated the packages, and I don¹t get the error in callXXorXY() >>>> anymore. >>> >>> Good. >>> >>>> But I guess the problem with the arguments Ofrom¹ and Oto¹ is still >>>> there: >>>> >>>>> callXXorXY(betaN[is23], betaN[is24], adjust=adjust, from=0, to=1); >>>> [1] "XY" >>>>> callXXorXY(betaN[is23], betaN[is24], adjust=adjust) >>>> [1] "XX" >>>> >>>> When I try to run >>>> >>>>> isDiploid <- (!(is23 | is24)); >>>>> >>>>> use <- which(isDiploid); >>>>> >>>>> muT <- callNaiveGenotypes(betaN[use], cn=2, adjust=adjust, from=0, to=1, >>>>> >>>>> verbose=less(verbose,10)); >>>>> >>>> >>>> I get >>>> >>>>>> + Error: nbrOfGenotypeGroups == 3 is not TRUE >>>>>> >>>> >>>> >>>> I know that this sample is female, so my guess is that Oto=1¹ gets a >>>> partial >>>> match with Otol¹ when passed to findPeaksAndValleys.density() and deletes >>>> any peaks and valleys with density smaller than 1. >>> >>> Sorry, I missed your important point that arguments 'to' and 'tol' get >>> mixed up; that's not good. Thanks for bringing it up again. I'll >>> look into it. I'd also like to be able to reproduce exactly what >>> you're getting. Would you mind fwd your data to me (you can do it >>> offline)? The following should do: >>> >>> saveObject(list(betaN=betaN, is23=is23, is24=is24), >>> "RuedaO_20110228,callXXorXY.RData"); >>> >>> FYI, censoring/setting the range of the density estimate with 'to=0' >>> and 'from=1' is slightly controversial because the BAFs can indeed be >>> slightly outside [0,1] as well. This is because we allow for >>> (slightly) negative (CA,CB) estimates. However, since the BAFs will >>> only be slightly outside [0,1] I don't think this is a big issue (but >>> it hasn't been fully investigated). >>> >>> Thxs >>> >>> /Henrik >>> >>>> >>>> Thanks, >>>> Oscar >>>> >>>> On 27/2/11 23:41, "Henrik Bengtsson" <henrik.bengts...@aroma-project.org> >>>> wrote: >>>> >>>> Hi, >>>> >>>> thanks for reporting on this. Before doing anything else, try with >>>> aroma.cn to v0.5.2; >>>> >>>> source("http://aroma-project.org/hbLite.R"); >>>> hbInstall("aroma.cn"); >>>> >>>> >>>> From its NEWS file: >>>> >>>> Version: 0.5.2 [2010-08-04] >>>> o Added option 'preserveScale' to TumorBoostNormalization for >>>> correcting for signal compression in heterozygous SNPs. >>>> The defaults is to do this correction. >>>> >>>> Version: 0.5.1 [2010-07-25] >>>> o callXXorXY() no longer calls gender from chr Y when gender is >>>> estimated as 'XX' from chr X. >>>> >>>> So, we actually made a change to the internal callXXorXY() that should >>>> address the problems you are experiencing. >>>> >>>> Try to see if the above version solves your problem - if not, please >>>> let us know again. >>>> >>>> /Henrik >>>> >>>> PS. aroma.cn v0.5.2 is actually a version from Aug 2010 that I forgot >>>> to make publicly available; I've just uploaded to CRAN too. >>>> >>>> >>>> >>>> >>>> On Wed, Feb 23, 2011 at 9:34 AM, Oscar Rueda <oscar.ru...@cancer.org.uk> >>>> wrote: >>>>> Dear all, >>>>> >>>>> I'm trying to run TumorBoost on a set of matched pairs. Like the vignette >>>>> suggests, I have first run >>>>> >>>>> ds <- doASCRMAv2("TCGA,GBM", chipType="GenomeWideSNP_6,Full"); >>>>> >>>>> Then I'm doing the naïve genotyping following all the steps in the >>>>> vignette. >>>>> But when I try to get the gender I get the following error >>>>> >>>>>> gender <- callXXorXY(betaN[is23], betaN[is24], adjust=adjust, from=0, >>>>>> to=1); >>>>> Error in list(`callXXorXY(betaN[is23], betaN[is24], adjust = adjust, from >>>>> = >>>>> 0, >>>>> to = 1)` = <environment>, : >>>>> >>>>> [2011-02-23 16:22:05] Exception: Allele B fractions for ChrX and ChrY are >>>>> inconsistent. >>>>> at throw(Exception(...)) >>>>> at throw.default("Allele B fractions for ChrX and ChrY are >>>>> inconsistent.") >>>>> at throw("Allele B fractions for ChrX and ChrY are inconsistent.") >>>>> at callXXorXY.numeric(betaN[is23], betaN[is24], adjust = adjust, from = >>>>> 0, >>>>> to >>>>> at callXXorXY(betaN[is23], betaN[is24], adjust = adjust, from = 0, to = >>>>> 1) >>>>> >>>>> I know that my samples are female, so I can set manually >>>>>> gender <- "XX" >>>>> >>>>> But then I try to run the naïve genotyping and get another error: >>>>> >>>>>> muT <- callNaiveGenotypes(betaN[use], cn=2, adjust=adjust, from=0, to=1, >>>>> verbose=less(verbose,10)); >>>>> >>>>>>> + Error: nbrOfGenotypeGroups == 3 is not TRUE >>>>> >>>>> >>>>> Taking a look at both errors I've seen that they come from the same >>>>> function, >>>>> >>>>> fit <- findPeaksAndValleys(yT, adjust = adjust, ...) >>>>> >>>>> This function works OK if run directly on the BAFs of chromosome X (finds >>>>> 3 >>>>> valleys and their peaks) but when we pass the argument 'from' and 'to', >>>>> the >>>>> argument 'to' is mistaken with argument 'tol', and as >>>>> findPeaksAndValleys.density() does at the end >>>>> >>>>>> if (tol > 0) { >>>>>> res <- subset(res, density >= tol) >>>>>> } >>>>> >>>>> >>>>> I don't get 3 peaks and 2 valleys anymore, but just 2 peaks (the ones with >>>>> density values larger than 1). And the function returns the aforementioned >>>>> error. >>>>> >>>>> So my question is; is it OK to run callXXorXY() and callNaiveGenotypes() >>>>> removing the arguments 'from' and 'to'? >>>>> >>>>> My sessionInfo is: >>>>> >>>>>> sessionInfo() >>>>> R version 2.12.0 (2010-10-15) >>>>> Platform: x86_64-pc-linux-gnu (64-bit) >>>>> >>>>> locale: >>>>> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >>>>> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >>>>> [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 >>>>> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C >>>>> [9] LC_ADDRESS=C LC_TELEPHONE=C >>>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C >>>>> >>>>> attached base packages: >>>>> [1] stats graphics grDevices utils datasets methods base >>>>> >>>>> other attached packages: >>>>> [1] aroma.cn_0.5.0 aroma.core_2.0.0 aroma.light_1.18.3 >>>>> matrixStats_0.2.2 >>>>> [5] R.rsp_0.4.2 R.filesets_0.9.2 digest_0.4.2 >>>>> R.cache_0.4.0 >>>>> [9] R.utils_1.6.2 R.oo_1.7.5 R.methodsS3_1.2.1 >>>>> >>>>> loaded via a namespace (and not attached): >>>>> [1] affxparser_1.22.0 >>>>>> >>>>> >>>>> Thanks a lot, >>>>> Oscar >>>>> >>>>> >>>>> Oscar M. Rueda, PhD. >>>>> Postdoctoral Research Fellow, Breast Cancer Functional Genomics. >>>>> Cancer Research UK Cambridge Research Institute. >>>>> Li Ka Shing Centre, Robinson Way. >>>>> Cambridge CB2 0RE >>>>> England >>>>> >>>>> >>>>> >>>>> >>>>> This communication is from Cancer Research UK. Our website is at >>>>> www.cancerresearchuk.org. We are a registered charity in England and Wales >>>>> (1089464) and in Scotland (SC041666) and a company limited by guarantee >>>>> registered in England and Wales under number 4325234. Our registered >>>>> address >>>>> is Angel Building, 407 St John Street, London, EC1V 4AD. Our central >>>>> telephone number is 020 7242 0200. >>>>> >>>>> This communication and any attachments contain information which is >>>>> confidential and may also be privileged. It is for the exclusive use of >>>>> the intended recipient(s). If you are not the intended recipient(s) >>>>> please >>>>> note that any form of disclosure, distribution, copying or use of this >>>>> communication or the information in it or in any attachments is strictly >>>>> prohibited and may be unlawful. If you have received this communication >>>>> in >>>>> error, please notify the sender and delete the email and destroy any >>>>> copies >>>>> of it. >>>>> >>>>> E-mail communications cannot be guaranteed to be secure or error free, as >>>>> information could be intercepted, corrupted, amended, lost, destroyed, >>>>> arrive late or incomplete, or contain viruses. We do not accept liability >>>>> for any such matters or their consequences. Anyone who communicates with >>>>> us >>>>> by e-mail is taken to accept the risks in doing so. >>>>> >>>>> -- >>>>> When reporting problems on aroma.affymetrix, make sure 1) to run the >>>>> latest >>>>> version of the package, 2) to report the output of sessionInfo() and >>>>> traceback(), and 3) to post a complete code example. >>>>> >>>>> >>>>> You received this message because you are subscribed to the Google Groups >>>>> "aroma.affymetrix" group with website http://www.aroma-project.org/. >>>>> To post to this group, send email to aroma-affymetrix@googlegroups.com >>>>> To unsubscribe and other options, go to >>>>> http://www.aroma-project.org/forum/ >>>>> >>>> >>>> >>>> >>>> Oscar M. Rueda, PhD. >>>> Postdoctoral Research Fellow, Breast Cancer Functional Genomics. >>>> Cancer Research UK Cambridge Research Institute. >>>> Li Ka Shing Centre, Robinson Way. >>>> Cambridge CB2 0RE >>>> England >>>> >>>> >>>> >>>> This communication is from Cancer Research UK. Our website is at >>>> www.cancerresearchuk.org. We are a registered charity in England and Wales >>>> (1089464) and in Scotland (SC041666) and a company limited by guarantee >>>> registered in England and Wales under number 4325234. Our registered >>>> address >>>> is Angel Building, 407 St John Street, London, EC1V 4AD. Our central >>>> telephone number is 020 7242 0200. >>>> >>>> This communication and any attachments contain information which is >>>> confidential and may also be privileged. It is for the exclusive use of the >>>> intended recipient(s). If you are not the intended recipient(s) please note >>>> that any form of disclosure, distribution, copying or use of this >>>> communication or the information in it or in any attachments is strictly >>>> prohibited and may be unlawful. If you have received this communication in >>>> error, please notify the sender and delete the email and destroy any copies >>>> of it. >>>> >>>> E-mail communications cannot be guaranteed to be secure or error free, as >>>> information could be intercepted, corrupted, amended, lost, destroyed, >>>> arrive late or incomplete, or contain viruses. We do not accept liability >>>> for any such matters or their consequences. Anyone who communicates with us >>>> by e-mail is taken to accept the risks in doing so. >>>> >>>> -- >>>> When reporting problems on aroma.affymetrix, make sure 1) to run the latest >>>> version of the package, 2) to report the output of sessionInfo() and >>>> traceback(), and 3) to post a complete code example. >>>> >>>> >>>> You received this message because you are subscribed to the Google Groups >>>> "aroma.affymetrix" group with website http://www.aroma-project.org/. >>>> To post to this group, send email to aroma-affymetrix@googlegroups.com >>>> To unsubscribe and other options, go to http://www.aroma-project.org/forum/ >>>> >>> >> > > > Oscar M. Rueda, PhD. > Postdoctoral Research Fellow, Breast Cancer Functional Genomics. > Cancer Research UK Cambridge Research Institute. > Li Ka Shing Centre, Robinson Way. > Cambridge CB2 0RE > England > > > > > This communication is from Cancer Research UK. Our website is at > www.cancerresearchuk.org. We are a registered charity in England and Wales > (1089464) and in Scotland (SC041666) and a company limited by guarantee > registered in England and Wales under number 4325234. Our registered address > is Angel Building, 407 St John Street, London, EC1V 4AD. Our central > telephone number is 020 7242 0200. > > This communication and any attachments contain information which is > confidential and may also be privileged. It is for the exclusive use of the > intended recipient(s). If you are not the intended recipient(s) please note > that any form of disclosure, distribution, copying or use of this > communication or the information in it or in any attachments is strictly > prohibited and may be unlawful. If you have received this communication in > error, please notify the sender and delete the email and destroy any copies > of it. > > E-mail communications cannot be guaranteed to be secure or error free, as > information could be intercepted, corrupted, amended, lost, destroyed, arrive > late or incomplete, or contain viruses. We do not accept liability for any > such matters or their consequences. Anyone who communicates with us by > e-mail is taken to accept the risks in doing so. > -- When reporting problems on aroma.affymetrix, make sure 1) to run the latest version of the package, 2) to report the output of sessionInfo() and traceback(), and 3) to post a complete code example. You received this message because you are subscribed to the Google Groups "aroma.affymetrix" group with website http://www.aroma-project.org/. To post to this group, send email to aroma-affymetrix@googlegroups.com To unsubscribe and other options, go to http://www.aroma-project.org/forum/