Hi. On Tue, Oct 21, 2008 at 8:48 AM, yupu <[EMAIL PROTECTED]> wrote: > > Henrik: > > Hi, thanks for the response! > > Is there any way for me to find out all available APIs ( or functions) > that come with the package? > > I tried ?getUnitsOnChromosome but there is not much information > there :-S
I don't have the time to write detailed Rd help pages for end users (and keep them up to date, which is the time-consuming part). I do not know how many functions and methods there are, but we're talking about more than 1000 pages of code. However, you can trust that the usage/synopsis and the arguments are correct for Rd files. The Rd help for a lot of the methods/functions are directed to a common page (explaining it is still to be documented). The ones that exists are mostly intended for developers, but developers tend to look at/follow the source code instead. Instead, my strategy is to document the package online. Some features are also revealed in replies on the mailing list itself - so it's worth skimming through message from others too. When a feature discussed in the forum becomes frequently used, I try to write up a page or add it to a vignette. What is there you can trust. I am very conservative about what parts of the API I make "public" this way, because for each new method/feature I expose I will also have to keep backward compatible which takes time. The design of classes in aroma.affymetrix can be though of as classic object-oriented programming as seem in C++, Java etc. This means that you have an object of a certain class and there exist methods coupled to that class. If you know the class, you can quickly get a list of methods available, e.g. > cdf <- AffymetrixCdfFile$byChipType("GenomeWideSNP_6") > class(cdf)[1] [1] "AffymetrixCdfFile" # The Rd files for classes show an automatically generated list of all (non-private) methods. > help(AffymetrixCdfFile) # You can get the same list by > AffymetrixCdfFile AffymetrixCdfFile extends UnitNamesFile, AromaChipTypeAnnotationFile, Affymetrix File, AromaPlatformInterface, AromaMicroarrayDataFile, GenericDataFile, Object { public convert(chipType=getChipType(this), suffix=NULL, sep="-", path="cdf", . .., verbose=FALSE) public createMonoCell(...) public getCellIndices(units=NULL, ..., useNames=TRUE, unlist=FALSE, force=FALS E, cache=TRUE, verbose=FALSE) public getChipType(fullname=TRUE, ...) public getDimension(...) ...[snip] That may or not may be useful for advanced users. As you work with the packages and maybe look at/follow the code occasionally, you well learn the overall structure, design and sprit of the package, which I hope will help out too. Posting questions like yours is also a good for finding out about non-documented features. If I see there are common use cases, I will not only try to add methods to simplify them, but also document them online. Conclusion: Use the aroma.affymetrix webpage/forum for documentation/help. /Henrik > > Thanks! > Yupu > > > > On Oct 20, 8:12 pm, "Henrik Bengtsson" <[EMAIL PROTECTED]> wrote: >> Forgot one thing below: >> >> >> >> On Mon, Oct 20, 2008 at 5:02 PM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: >> > Hi, >> >> > On Mon, Oct 20, 2008 at 3:51 PM, yupu <[EMAIL PROTECTED]> wrote: >> >> >> Hi, >> >> >> I am using aroma.affymetrix to do copy number estimation on >> >> affymetrix's SNP6.0 data. >> >> >> I followed the instructions from >> >>http://groups.google.com/group/aroma-affymetrix/web/total-copy-number... >> >> >> Things went smoothly, untill I realized there is no data point for at >> >> position 51598 on Chr1 that is corresponding to probe id CN_473963. >> >> >>>units <- getUnitsOnChromosome(gi,chromosome=1) >> >>>pos<- getPositions(gi,units=units) >> >>>bool <- pos == 51598 >> >>> pos[bool] >> >> integer(0) >> >> >> Did I do anything wrong? Or aroma is now dealing with these probes yet >> >> for the moment? >> >> > Don't rely on exact genomic position in order to identify/refer to a >> > CN variant/probe, because this information tend to get updated >> > whenever the human genome annotation data is updated. Doing that is >> > also error prone to differences in how positions are defined, e.g. if >> > the first position of a chromsome is 0 or 1 (which might be issue in >> > this case). >> >> > Instead, use the unit name to identify the position and not the other >> > way around, e.g. >> >> >> cdf <- AffymetrixCdfFile$byChipType("GenomeWideSNP_6", tags="Full"); >> >> gi <- getGenomeInformation(cdf); >> >> unit <- indexOf(cdf, name="CN_473963"); >> >> unit >> > [1] 935591 >> >> pos <- getPositions(gi, units=unit); >> >> pos >> > [1] 51599 >> >> > If you really want to identify a unit name given a position, allow for >> > some shift, say +/-5 nucleotides, e.g. >> >> >> units <- getUnitsOnChromosome(gi, chromosome=1); >> >> pos <- getPositions(gi, units=units); >> >> idxs <- which(51598-5 <= pos & pos <= 51598+5); >> >> units[idxs]; >> > [1] 935591 >> >> pos[idxs]; >> > [1] 51599 >> >> A better way to identify units in a specific region on a given chromosome is: >> >> >> >> > units <- getUnitsOnChromosome(gi, chromosome=1, region=c(51598-5, >> > 51598+5)); >> > units >> [1] 935591 >> > pos <- getPositions(gi, units=units); >> > pos >> > [1] 51599 >> >> I forgot about the 'region' arguments. >> >> /Henrik >> >> >> >> > Cheers >> >> > /Henrik >> >> >> Thanks, >> >> Yupu > > > --~--~---------~--~----~------------~-------~--~----~ 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. To post to this group, send email to aroma-affymetrix@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/aroma-affymetrix?hl=en -~----------~----~----~----~------~----~------~--~---