diff --git a/R/cyto_ranger.R b/R/cyto_ranger.R index 9fa8ca1..8ef9326 100644 --- a/R/cyto_ranger.R +++ b/R/cyto_ranger.R @@ -34,23 +34,23 @@ #' #' @examples #' #' #Example 1 - Give the function one region as a string -#' my_region = cyto_ranger(these_regions = "chr8:127735434-127742951") +#' cyto_ranger(these_regions = "chr8:127735434-127742951") #' #' #Example 2 - Give the function multiple regions as a string -#' my_regions = cyto_ranger(these_regions = c("chr8:128747680-128753674", -#' "chr18:60790579-60987361"), -#' projection = "grch37") +#' cyto_ranger(these_regions = c("chr8:128747680-128753674", +#' "chr18:60790579-60987361"), +#' projection = "grch37") #' #' #Example 3 - Individually specify the chromosome, start and end coordinates -#' this_region = cyto_ranger(qchrom = "chr8", -#' qstart = 127735434, -#' qend = 127742951) +#' cyto_ranger(qchrom = "chr8", +#' qstart = 127735434, +#' qend = 127742951) #' #' #Example 4 - Individually specify multiple regions with the query parameters -#' these_regions = cyto_ranger(qchrom = c("chr8", "chr18"), -#' qstart = c(128747680, 60790579), -#' qend = c(128753674, 60987361), -#' projection = "grch37") +#' cyto_ranger(qchrom = c("chr8", "chr18"), +#' qstart = c(128747680, 60790579), +#' qend = c(128753674, 60987361), +#' projection = "grch37") #' cyto_ranger <- function(these_regions = NULL, qchrom = NULL, diff --git a/R/gene_ranger.R b/R/gene_ranger.R index 45e58ee..c84a0b8 100644 --- a/R/gene_ranger.R +++ b/R/gene_ranger.R @@ -43,19 +43,19 @@ #' #' @examples #' #Example 1 - Request one gene (in Hugo format) and with default parameters -#' hugo_myc = gene_ranger(these_genes = "MYC") +#' gene_ranger(these_genes = "MYC") #' #' #Example 2 - Same as example one but MYC is here specified as Ensembl ID -#' ensembl_myc = gene_ranger(these_genes = "ENSG00000136997") +#' gene_ranger(these_genes = "ENSG00000136997") #' #' #Example 3 - Request multiple genes with non-default parameters -#' my_genes = gene_ranger(these_genes = c("MYC", "BCL2"), +#' gene_ranger(these_genes = c("MYC", "BCL2"), #' projection = "grch37", #' return_as = "region") #' #' #Example 4 - Request multiple Ensembl IDs and return in bed format -#' my_bed = gene_ranger(these_genes = c("ENSG00000136997", "ENSG00000171791"), -#' return_as = "bed") +#' gene_ranger(these_genes = c("ENSG00000136997", "ENSG00000171791"), +#' return_as = "bed") #' #' #Example 5 - Write to bed file #' gene_ranger(these_genes = c("BCL2", "MYC"), diff --git a/R/get_gene_info.R b/R/get_gene_info.R index 044f3f6..3557466 100644 --- a/R/get_gene_info.R +++ b/R/get_gene_info.R @@ -22,18 +22,18 @@ #' #' @examples #' #Example 1 - Query one gene (in Hugo format) and with default parameters. -#' hugo_myc = get_gene_info(these_genes = "MYC") +#' get_gene_info(these_genes = "MYC") #' #' #Example 2 - Same as example 1 but MYC is here specified as Ensembl ID. -#' ensembl_myc = get_gene_info(these_genes = "ENSG00000136997") +#' get_gene_info(these_genes = "ENSG00000136997") #' #' #Example 3 - Request multiple genes with non-default parameters -#' hugo_genes = get_gene_info(these_genes = c("MYC", "BCL2"), -#' projection = "grch37") +#' get_gene_info(these_genes = c("MYC", "BCL2"), +#' projection = "grch37") #' #' #Example 4 - Request multiple Ensembl IDs and return all columns. -#' ensembl_genes = get_gene_info(these_genes = c("ENSG00000136997", "ENSG00000171791"), -#' raw = TRUE) +#' get_gene_info(these_genes = c("ENSG00000136997", "ENSG00000171791"), +#' raw = TRUE) #' get_gene_info <- function(these_genes = NULL, projection = "hg38", diff --git a/R/purify_chr.R b/R/purify_chr.R index 9af6ad4..bdb5458 100644 --- a/R/purify_chr.R +++ b/R/purify_chr.R @@ -22,7 +22,9 @@ #' @examples #' #Example 1 - Add prefixes to a data frame #' my_data = data.frame(chrom = c("1", "2", "3")) -#' my_data = purify_chr(projection = "hg38", incoming_table = my_data) +#' +#' purify_chr(projection = "hg38", +#' incoming_table = my_data) #' purify_chr <- function(projection = NULL, incoming_table = NULL) { diff --git a/R/purify_regions.R b/R/purify_regions.R index b322daa..38e3fa7 100644 --- a/R/purify_regions.R +++ b/R/purify_regions.R @@ -35,22 +35,22 @@ #' #' @examples #' #Example 1 - Give the function one region as a string -#' my_region = purify_regions(these_regions = "chr1:100-500") +#' purify_regions(these_regions = "chr1:100-500") #' #' #Example 2 - Give the function multiple regions as a string -#' my_regions = purify_regions(these_regions = c("chr1:100-500", "chr2:100-500"), -#' projection = "grch37") +#' purify_regions(these_regions = c("chr1:100-500", "chr2:100-500"), +#' projection = "grch37") #' #' #Example 3 - Individually specify the chromosome, start and end coordinates -#' this_region = purify_regions(qchrom = "chr1", -#' qstart = 100, -#' qend = 500) +#' purify_regions(qchrom = "chr1", +#' qstart = 100, +#' qend = 500) #' #' #Example 4 - Individually specify multiple regions with the query parameters -#' these_regions = purify_regions(qchrom = c("chr1", "chr2"), -#' qstart = c(100, 200), -#' qend = c(500, 600), -#' projection = "grch37") +#' purify_regions(qchrom = c("chr1", "chr2"), +#' qstart = c(100, 200), +#' qend = c(500, 600), +#' projection = "grch37") #' purify_regions <- function(these_regions = NULL, qchrom = NULL, diff --git a/R/region_ranger.R b/R/region_ranger.R index 3130abc..a1c1d82 100644 --- a/R/region_ranger.R +++ b/R/region_ranger.R @@ -34,24 +34,23 @@ #' #' @examples #' #Example 1 - Give the function one region as a string -#' my_region = region_ranger(these_regions = "chr8:127735434-127742951") +#' region_ranger(these_regions = "chr8:127735434-127742951") #' #' #Example 2 - Give the function multiple regions as a string -#' my_regions = region_ranger(these_regions = c("chr8:128747680-128753674", -#' "chr18:60790579-60987361"), -#' projection = "grch37") -#' +#' region_ranger(these_regions = c("chr8:128747680-128753674", +#' "chr18:60790579-60987361"), +#' projection = "grch37") +#' #' #Example 3 - Individually specify the chromosome, start and end coordinates -#' this_region = region_ranger(qchrom = "chr8", -#' qstart = 127735434, -#' qend = 127742951) +#' region_ranger(qchrom = "chr8", +#' qstart = 127735434, +#' qend = 127742951) #' #' #Example 4 - Individually specify multiple regions with the query parameters -#' these_regions = region_ranger(qchrom = c("chr8", "chr18"), -#' qstart = c(128747680, 60790579), -#' qend = c(128753674, 60987361), -#' projection = "grch37") -#' +#' region_ranger(qchrom = c("chr8", "chr18"), +#' qstart = c(128747680, 60790579), +#' qend = c(128753674, 60987361), +#' projection = "grch37") #' region_ranger <- function(these_regions = NULL, qchrom = NULL,