diff --git a/DESCRIPTION b/DESCRIPTION index cf1f452..013e33f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,21 +1,21 @@ Package: humarray Type: Package Title: Simplify Analysis and Annotation of Human Microarray Datasets -Version: 1.0.2 -Date: 2016-07-12 +Version: 1.1 +Date: 2017-01-02 Author: Nicholas Cooper Maintainer: Nicholas Cooper Depends: R (>= 3.2), NCmisc (>= 1.1.4), IRanges (>= 1.22.10), GenomicRanges (>= 1.16.4) -Imports: utils, stats, graphics, BiocGenerics (>= 0.10.0), S4Vectors, - Rcpp, methods, parallel, GenomicFeatures (>= 1.22.10), - GenomeInfoDb, rtracklayer, biomaRt, BiocInstaller (>= 1.20.1), - reader (>= 1.0.1), genoset (>= 1.16.2) +Imports: utils, stats, graphics, S4Vectors, Rcpp, methods, parallel, + BiocGenerics, GenomicFeatures (>= 1.22.10), GenomeInfoDb, + rtracklayer, biomaRt, BiocInstaller (>= 1.20.1), reader (>= + 1.0.1), genoset (>= 1.16.2) Description: Utilises GRanges, data.frame or IRanges objects. Integrates gene annotation for ImmunoChip (or your custom chip) with function calls. Intuitive wrappers for annotation lookup (gene lists, exon ranges, etc) and conversion (e.g, between build 36 and 37 coordinates). Conversion between ensembl and HGNC gene ids, chip ids to rs-ids for SNP-arrays. Retrieval of chromosome and position for gene, band or SNP-ids, or reverse lookup. Simulation functions for ranges objects. LazyData: true License: GPL (>= 2) Collate: 'humarray.R' 'humarray_datasets.R' NeedsCompilation: no -Packaged: 2016-07-13 10:08:09 UTC; ncooper +Packaged: 2017-01-09 00:09:58 UTC; ncooper Repository: CRAN -Date/Publication: 2016-07-15 14:37:12 +Date/Publication: 2017-01-09 09:49:50 diff --git a/MD5 b/MD5 index 8da9b17..42b9334 100644 --- a/MD5 +++ b/MD5 @@ -1,6 +1,6 @@ -a7cc383f305ad4bb17b450a2f0643785 *DESCRIPTION -3daf20ea6bd3cfacfb09dfea8860dd21 *NAMESPACE -4a4238952046b8d634cd51cede0bb4e3 *R/humarray.R +5428b69cd2ec16b59b6d5e37e3ac9d1c *DESCRIPTION +764f8bf3dc594da93ae020a95f4e1611 *NAMESPACE +7b5b6e43b6be1d66e84c8dc7ef0f9efb *R/humarray.R 1c23f124368079ce53386f6b51c9a479 *R/humarray_datasets.R dfa8cc54e6dbdff5ef50555b708be261 *data/ImmunoChipB37.rda bd64c224db5db564d08bfea84d8d44a5 *data/datalist @@ -62,15 +62,15 @@ e3e861177bebfbb9e9953861779dd3f9 *man/get.centromere.locs.Rd ec6f579fa36cc9f784f659420e80f14b *man/get.exon.annot.Rd 099f8921477376160120fb3b9cacc114 *man/get.gene.annot.Rd a14ce04c423353fc8db493b3405c275e *man/get.genic.subset.Rd -a9f1e76a5f993c308519600a4a975bbf *man/get.immunobase.snps.Rd +5a04701235195b0e14124fa60707d19e *man/get.immunobase.snps.Rd 738bc8dbdf17ff907279c3e6c9a77efb *man/get.immunog.locs.Rd b01474ad9881d7997fd8864d553a8280 *man/get.nearby.snp.lists.Rd 461651ea721ca6217c48201bea5ef03a *man/get.recombination.map.Rd -505deccc8140d7ba3744cda641c53102 *man/get.t1d.regions.Rd +70aba4d824bc9365bb503c3af17a4482 *man/get.t1d.regions.Rd 511300b9a602c0faf531629394585f25 *man/get.t1d.subset.Rd 2ca4732a14d376c6e388885791d148ad *man/get.telomere.locs.Rd -6872433732b6702c15bd264d9c5a891b *man/humarray-internal.Rd -eaccbd26166ab5b9d0b4ebbb8f76fae3 *man/humarray-package.Rd +213ee6cf4a7dda84474fb9f33076fd0f *man/humarray-internal.Rd +33b7f958f75fd2fdefde4eb8d4e30a01 *man/humarray-package.Rd 9e57b4b88ea14b68e8fa8bd168774c3f *man/iChipRegionsB36.Rd c2831238ed007b691d429030309ccb7f *man/id.to.rs.Rd aa01623b6f9aef1dcf10afff3c5ca8a3 *man/ids.by.pos.Rd diff --git a/NAMESPACE b/NAMESPACE index e50db1f..ccab804 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -111,7 +111,6 @@ exportMethods(rownames) exportMethods(rs.id) exportMethods(show) exportMethods(ucsc) -import(BiocGenerics) import(NCmisc) import(Rcpp) importClassesFrom("biomaRt",Mart) @@ -134,6 +133,7 @@ importFrom("genoset","chrNames<-") importFrom("genoset",chrIndices) importFrom("genoset",chrInfo) importFrom("genoset",chrNames) +importFrom(BiocGenerics,relist) importFrom(BiocInstaller,biocVersion) importFrom(GenomicRanges,GRanges) importFrom(GenomicRanges,GRangesList) @@ -160,6 +160,7 @@ importFrom(graphics,plot) importFrom(graphics,points) importFrom(graphics,rect) importFrom(graphics,text) +importFrom(methods,"slot<-") importFrom(methods,as) importFrom(methods,callNextMethod) importFrom(methods,is) @@ -171,6 +172,7 @@ importFrom(methods,setClass) importFrom(methods,setGeneric) importFrom(methods,setMethod) importFrom(methods,setValidity) +importFrom(methods,slot) importFrom(parallel,mclapply) importFrom(reader,cat.path) importFrom(reader,reader) diff --git a/R/humarray.R b/R/humarray.R index 5f40e6a..20f50eb 100644 --- a/R/humarray.R +++ b/R/humarray.R @@ -1,6 +1,6 @@ ###NAMESPACE ADDITIONS### -#' @import Rcpp NCmisc BiocGenerics -#' @importFrom BiocInstaller biocVersion +#' @import Rcpp NCmisc +#' @importFrom BiocInstaller biocVersion #' @importFrom stats family pnorm pt qnorm rchisq rnorm runif median cor sd #' @importFrom reader cat.path reader shift.rownames #' @importFrom grDevices dev.off pdf @@ -32,13 +32,15 @@ #' @importFrom utils capture.output download.file read.table write.table read.delim #' @importFrom graphics par #' @importFrom "genoset" chrIndices chrInfo chrNames "chrNames<-" - +#' @importFrom methods slot "slot<-" +#' @importFrom BiocGenerics relist ###END NAMESPACE### #DataFrame #seqlevels #seqlevels<- #genome<- +# BiocGenerics # , genoset (>= 1.16.2) # took from DESCRIPTION file # importFrom "genoset" chr chrIndices chrInfo chrNames chrOrder "chrNames<-" @@ -57,7 +59,7 @@ # importNoClassesFrom "GenomicFeatures" TranscriptDb .onAttach <- function(libname, pkgname) { - packageStartupMessage("humarray version 1.0.0\n") + packageStartupMessage("humarray version 1.1\n") } .onLoad <- function(libname, pkgname) { @@ -79,6 +81,22 @@ ## internal functions ## ######################## +# immunobase doesn't allow regions to be downloaded automatically anymore :( +immunobase.has.changed <- function(type=c("message","text","warning","error"),ret.val=NULL) { + msg <- "Unfortunately this table can no longer be downloaded programmatically. Please obtain manually from: https://www.immunobase.org/disease/T1D/" + type <- type[1] + if(type=="error") { + stop(msg) + } else if(type=="warning") { + warnings(msg) + } else if(type=="text") { + print(msg) + } else { + message(msg) + } + return(ret.val) +} + finitize <- function(X) { if(is.data.frame(X)) { X <- as.matrix(X) } return(X[is.finite(X)]) @@ -1937,8 +1955,11 @@ setMethod("plot", "RangedData", function(x,y,...) { ################################## + + #' Download GWAS hits from t1dbase.org #' +#' Deprecated as this data is no longer available online #' Retrieve human disease top GWAS hits from t1dbase in build hg19 coords (37). #' 28 Diseases currently available #' @param disease integer (1-28), or character (abbreviation), or full name of one of the listed @@ -1951,11 +1972,13 @@ setMethod("plot", "RangedData", function(x,y,...) { #' @author Nicholas Cooper \email{nick.cooper@@cimr.cam.ac.uk} #' @references PMID: 20937630 #' @examples +#' get.immunobase.snps(show.codes=TRUE) # show codes/diseases available to download +#' \donttest{ #' get.immunobase.snps(disease="CEL") # get SNP ids for celiac disease #' get.immunobase.snps(disease="AS") # get SNP ids for Ankylosing Spondylitis in build-37/hg19 -#' get.immunobase.snps(show.codes=TRUE) # show codes/diseases available to download #' get.immunobase.snps(disease=27) # get SNP ids for Alopecia Areata #' get.immunobase.snps("Vitiligo") +#' } get.immunobase.snps <- function(disease="T1D",snps.only=TRUE,show.codes=FALSE) { disease.codes <- c("Type 1 Diabetes", "Crohns Disease","Rheumatoid Arthritis", "Systemic Scleroderma", "Ulcerative Colitis","Inflammatory Bowel Disease", "Multiple Sclerosis", @@ -1985,6 +2008,10 @@ get.immunobase.snps <- function(disease="T1D",snps.only=TRUE,show.codes=FALSE) { } } } + + # unfortunately must add this as immunobase will no longer allow autodownload + immunobase.has.changed("error") + #if(is.null(build)) { build <- getOption("ucsc") } build <- "hg19" # ucsc.sanitizer(build) if(!build %in% c("hg18","hg19")) { stop("only hg18 and hg19 are supported for this function") } @@ -3156,6 +3183,7 @@ get.chr.lens <- function(dir=NULL,build=NULL,autosomes=FALSE,len.fn="humanChrLen #' Obtain a listing of known T1D associated genomic regions #' +#' Deprecated as this data is no longer available online #' This function uses a full list of ichip dense regions combined with a list of t1d #' SNPs to get the t1d regions. For type 1 diabetes researchers. #' @param dense.reg GRanges or RangedData object, only use if you need to provide for a diff --git a/man/get.immunobase.snps.Rd b/man/get.immunobase.snps.Rd index 580fd19..6f1e248 100644 --- a/man/get.immunobase.snps.Rd +++ b/man/get.immunobase.snps.Rd @@ -19,16 +19,19 @@ a table of available diseases with their index numbers and abbreviations.} A character vector of SNP rs-ids } \description{ +Deprecated as this data is no longer available online Retrieve human disease top GWAS hits from t1dbase in build hg19 coords (37). 28 Diseases currently available } \examples{ +get.immunobase.snps(show.codes=TRUE) # show codes/diseases available to download +\donttest{ get.immunobase.snps(disease="CEL") # get SNP ids for celiac disease get.immunobase.snps(disease="AS") # get SNP ids for Ankylosing Spondylitis in build-37/hg19 -get.immunobase.snps(show.codes=TRUE) # show codes/diseases available to download get.immunobase.snps(disease=27) # get SNP ids for Alopecia Areata get.immunobase.snps("Vitiligo") } +} \author{ Nicholas Cooper \email{nick.cooper@cimr.cam.ac.uk} } diff --git a/man/get.t1d.regions.Rd b/man/get.t1d.regions.Rd index 4638101..2954e1e 100644 --- a/man/get.t1d.regions.Rd +++ b/man/get.t1d.regions.Rd @@ -19,6 +19,7 @@ be used.} a GRanges object with the specified type 1 diabetes (or inverse) ranges } \description{ +Deprecated as this data is no longer available online This function uses a full list of ichip dense regions combined with a list of t1d SNPs to get the t1d regions. For type 1 diabetes researchers. } diff --git a/man/humarray-internal.Rd b/man/humarray-internal.Rd index 4dad9c8..e620b13 100644 --- a/man/humarray-internal.Rd +++ b/man/humarray-internal.Rd @@ -1,6 +1,7 @@ \name{humarray-internal} \alias{do.cw} +\alias{immunobase.has.changed} \alias{.rownames3} \alias{makePrettyMatrixForCompactPrinting2} \alias{.makeNakedMatFromChipInfo} diff --git a/man/humarray-package.Rd b/man/humarray-package.Rd index 9721283..87ada26 100644 --- a/man/humarray-package.Rd +++ b/man/humarray-package.Rd @@ -12,8 +12,8 @@ Utilises GRanges, data.frame or IRanges objects. Integrates gene annotation for \tabular{ll}{ Package: \tab humarray\cr Type: \tab humarray\cr -Version: \tab 1.0.2\cr -Date: \tab 2016-07-12\cr +Version: \tab 1.1\cr +Date: \tab 2017-01-02\cr License: \tab GPL (>= 2)\cr } This package helps to simplify common tasks in human genetics research, such as annotation lookup, conversion and labelling for GWAS analysis. Functions are provided that utilise GRanges, IRanges and data.frame (snpStats) objects for input and output.