From 03708a143dedbe9303d740f776bfc892c392503f Mon Sep 17 00:00:00 2001 From: jahn Date: Mon, 13 Jan 2025 17:21:29 +0100 Subject: [PATCH 1/3] fix: changed maintainer email --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9f30a29..7e997a7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,7 +7,7 @@ Authors@R: c( person("Michael", "Jahn", , "jahn@mpusp.mpg.de", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-3913-153X")) ) -Maintainer: Michael Jahn +Maintainer: Yabing Song Description: The goal of `ggcoverage` is to visualize coverage tracks from genomics, transcriptomics or proteomics data. It contains functions to load data from BAM, BigWig, BedGraph, txt, or xlsx files, create From efc18c6fcc701a7b2b6dd64f885f82a647ff6ab6 Mon Sep 17 00:00:00 2001 From: jahn Date: Mon, 13 Jan 2025 17:22:07 +0100 Subject: [PATCH 2/3] fix: added missing package links --- R/FormatInput.R | 2 +- R/LoadTrack.R | 2 +- R/geom_base.R | 8 ++++---- R/geom_gene.R | 2 +- R/geom_transcript.R | 2 +- man/FormatTrack.Rd | 2 +- man/LoadTrackFile.Rd | 2 +- man/geom_base.Rd | 8 ++++---- man/geom_gene.Rd | 2 +- man/geom_transcript.Rd | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/R/FormatInput.R b/R/FormatInput.R index f3fe35d..a9cf809 100644 --- a/R/FormatInput.R +++ b/R/FormatInput.R @@ -34,7 +34,7 @@ GetRegion <- function(df, chr, start, end = NULL) { #' #' @param data Track dataframe loaded by \code{\link{LoadTrackFile}}. #' @param region Region used to create coverage plot, eg: chr14:21,677,306-21,737,601 or chr14:21,677,306. -#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}. Default: NULL. +#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL. #' @param gene.name The name of gene. Default: HNRNPC. #' @param gene.name.type Gene name type (filed of \code{gtf.gr}), chosen from gene_name and gene_id. #' Default: gene_name. diff --git a/R/LoadTrack.R b/R/LoadTrack.R index f8d4756..f9da658 100644 --- a/R/LoadTrack.R +++ b/R/LoadTrack.R @@ -6,7 +6,7 @@ #' @param region Region to extract coverage for, eg: chr14:21,677,306-21,737,601 or chr14:21,677,306. #' Default: NULL, coverage is extracted from the first annotated chromosome/sequence. #' @param extend Extend length of \code{region}. Default: 2000. -#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}. Default: NULL. +#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL. #' @param gene.name The name of gene. Default: HNRNPC. #' @param gene.name.type Gene name type (filed of \code{gtf.gr}), chosen from gene_name and gene_id. #' Default: gene_name. diff --git a/R/geom_base.R b/R/geom_base.R index 4bc56f1..7b57158 100644 --- a/R/geom_base.R +++ b/R/geom_base.R @@ -18,13 +18,13 @@ #' @param star.size The size of star when \code{mark.type} is star. Default: 1. #' @param show.aa Logical value, whether to show amino acid. Default: TRUE. #' @param sens Sense to translate: F for forward sense and R for reverse sense. -#' Parameter of \code{\link{translate}}. Default: F. +#' Parameter of \code{\link[Biostrings]{translate}}. Default: F. #' @param numcode The ncbi genetic code number for translation. -#' Parameter of \code{\link{translate}}. By default the standard genetic code is used. +#' Parameter of \code{\link[Biostrings]{translate}}. By default the standard genetic code is used. #' @param NAstring How to translate amino-acids when there are ambiguous bases in codons. -#' Parameter of \code{\link{translate}}. Default: X. +#' Parameter of \code{\link[Biostrings]{translate}}. Default: X. #' @param ambiguous If TRUE, ambiguous bases are taken into account so that for instance GGN is -#' translated to Gly in the standard genetic code. Parameter of \code{\link{translate}}. Default: FALSE. +#' translated to Gly in the standard genetic code. Parameter of \code{\link[Biostrings]{translate}}. Default: FALSE. #' @param aa.color Color scheme for amino acids. #' @param aa.border.color The border color of amino acid. Default: white. #' @param aa.size The size of amino acid text. Default: 4. diff --git a/R/geom_gene.R b/R/geom_gene.R index 1dfd4ff..e707819 100644 --- a/R/geom_gene.R +++ b/R/geom_gene.R @@ -1,6 +1,6 @@ #' Add Gene Annotation to Coverage Plot. #' -#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}. +#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. #' Default: NULL. #' @param overlap.gene.gap The gap between gene groups. Default: 0.1. #' @param overlap.style The style of gene groups, choose from loose (each gene diff --git a/R/geom_transcript.R b/R/geom_transcript.R index d877402..7e89e07 100644 --- a/R/geom_transcript.R +++ b/R/geom_transcript.R @@ -1,6 +1,6 @@ #' Add Transcript Annotation to Coverage Plot. #' -#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}. +#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. #' Default: NULL. #' @param gene.name Gene name of all transcripts. Default: HNRNPC. #' @param overlap.tx.gap The gap between transcript groups. Default: 0.1. diff --git a/man/FormatTrack.Rd b/man/FormatTrack.Rd index a2db63d..544a8ce 100644 --- a/man/FormatTrack.Rd +++ b/man/FormatTrack.Rd @@ -18,7 +18,7 @@ FormatTrack( \item{region}{Region used to create coverage plot, eg: chr14:21,677,306-21,737,601 or chr14:21,677,306.} -\item{gtf.gr}{Granges object of GTF, created with \code{\link{import.gff}}. Default: NULL.} +\item{gtf.gr}{Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL.} \item{gene.name}{The name of gene. Default: HNRNPC.} diff --git a/man/LoadTrackFile.Rd b/man/LoadTrackFile.Rd index 0032b8d..b0db872 100644 --- a/man/LoadTrackFile.Rd +++ b/man/LoadTrackFile.Rd @@ -36,7 +36,7 @@ Default: NULL, coverage is extracted from the first annotated chromosome/sequenc \item{extend}{Extend length of \code{region}. Default: 2000.} -\item{gtf.gr}{Granges object of GTF, created with \code{\link{import.gff}}. Default: NULL.} +\item{gtf.gr}{Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL.} \item{gene.name}{The name of gene. Default: HNRNPC.} diff --git a/man/geom_base.Rd b/man/geom_base.Rd index 6e71552..273abf2 100644 --- a/man/geom_base.Rd +++ b/man/geom_base.Rd @@ -70,16 +70,16 @@ star (add star mark to position with SNV), and highlight (position without SNV i \item{show.aa}{Logical value, whether to show amino acid. Default: TRUE.} \item{sens}{Sense to translate: F for forward sense and R for reverse sense. -Parameter of \code{\link{translate}}. Default: F.} +Parameter of \code{\link[Biostrings]{translate}}. Default: F.} \item{numcode}{The ncbi genetic code number for translation. -Parameter of \code{\link{translate}}. By default the standard genetic code is used.} +Parameter of \code{\link[Biostrings]{translate}}. By default the standard genetic code is used.} \item{NAstring}{How to translate amino-acids when there are ambiguous bases in codons. -Parameter of \code{\link{translate}}. Default: X.} +Parameter of \code{\link[Biostrings]{translate}}. Default: X.} \item{ambiguous}{If TRUE, ambiguous bases are taken into account so that for instance GGN is -translated to Gly in the standard genetic code. Parameter of \code{\link{translate}}. Default: FALSE.} +translated to Gly in the standard genetic code. Parameter of \code{\link[Biostrings]{translate}}. Default: FALSE.} \item{aa.color}{Color scheme for amino acids.} diff --git a/man/geom_gene.Rd b/man/geom_gene.Rd index 79c5495..5d7e6ac 100644 --- a/man/geom_gene.Rd +++ b/man/geom_gene.Rd @@ -30,7 +30,7 @@ geom_gene( ) } \arguments{ -\item{gtf.gr}{Granges object of GTF, created with \code{\link{import.gff}}. +\item{gtf.gr}{Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL.} \item{overlap.gene.gap}{The gap between gene groups. Default: 0.1.} diff --git a/man/geom_transcript.Rd b/man/geom_transcript.Rd index f2d8be6..8697862 100644 --- a/man/geom_transcript.Rd +++ b/man/geom_transcript.Rd @@ -30,7 +30,7 @@ geom_transcript( ) } \arguments{ -\item{gtf.gr}{Granges object of GTF, created with \code{\link{import.gff}}. +\item{gtf.gr}{Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL.} \item{gene.name}{Gene name of all transcripts. Default: HNRNPC.} From 5ea4f11176a9fa19535f87b224230c8052b5e356 Mon Sep 17 00:00:00 2001 From: jahn Date: Mon, 13 Jan 2025 17:30:41 +0100 Subject: [PATCH 3/3] fix: dead URLs in docs --- README.Rmd | 6 +++--- README.md | 24 +++--------------------- vignettes/ggcoverage.Rmd | 6 +++--- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/README.Rmd b/README.Rmd index d5a45fb..6e329ea 100644 --- a/README.Rmd +++ b/README.Rmd @@ -471,7 +471,7 @@ graphics::mtext( graphics::par(opar) ``` -Default color scheme for amino acid annotation is from [Residual colours: a proposal for aminochromography](https://academic.oup.com/peds/article/10/7/743/1593029?login=false): +Default color scheme for amino acid annotation is from [Residual colours: a proposal for aminochromography](https://pubmed.ncbi.nlm.nih.gov/9342138/): ```{r aa_color_scheme, warning = FALSE, fig.height = 9, fig.width = 10, fig.align = "center"} aa_color <- c( @@ -678,7 +678,7 @@ The Hi-C method maps chromosome contacts in eukaryotic cells. For this purpose, DNA and protein complexes are cross-linked and DNA fragments then purified. As a result, even distant chromatin fragments can be found to interact due to the spatial organization of the DNA and histones in the cell. Hi-C data shows these interactions for example as a contact map. -The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic datasets](https://academic.oup.com/bioinformatics/article/37/3/422/5879987?login=false). +The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic datasets](https://pubmed.ncbi.nlm.nih.gov/32745185/). The Hi-C matrix visualization is implemented by [`HiCBricks`](https://github.com/koustav-pal/HiCBricks). This package needs to be installed separately (it is only 'Suggested' by `ggcoverage`). @@ -788,7 +788,7 @@ basic_coverage + ### Load coverage -The exported coverage from [Proteome Discoverer](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8006021/): +The exported coverage from [Proteome Discoverer](https://doi.org/10.3390/proteomes9010015): ```{r ms_coverage_data} library(openxlsx) diff --git a/README.md b/README.md index 4fa4178..ee272f1 100644 --- a/README.md +++ b/README.md @@ -337,9 +337,6 @@ library(ggbio) #> #> geom_bar, geom_rect, geom_segment, ggsave, stat_bin, stat_identity, #> xlim -``` - -``` r basic_coverage + geom_gene(gtf.gr = gtf_gr) + @@ -459,9 +456,6 @@ library("BSgenome.Hsapiens.UCSC.hg19") #> The following object is masked from 'package:BiocIO': #> #> FileForFormat -``` - -``` r # create plot basic_coverage + @@ -497,9 +491,6 @@ track_df <- LoadTrackFile( region = "4:1-160000000" ) #> No metadata provided, returning coverage as is. -``` - -``` r # add chr prefix track_df$seqnames <- paste0("chr", track_df$seqnames) @@ -606,9 +597,6 @@ track_df <- LoadTrackFile( #> No 'region' specified; extracting coverage for an example range #> (<=100,000 bases, first annotated sequence) #> Coverage extracted from sequence/chromosome: chr10 -``` - -``` r head(track_df) #> seqnames start end width strand score Type Group @@ -669,7 +657,7 @@ graphics::par(opar) Default color scheme for amino acid annotation is from [Residual colours: a proposal for -aminochromography](https://academic.oup.com/peds/article/10/7/743/1593029?login=false): +aminochromography](https://doi.org/10.1093/protein/10.7.743): ``` r aa_color <- c( @@ -910,7 +898,7 @@ a contact map. The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic -datasets](https://academic.oup.com/bioinformatics/article/37/3/422/5879987?login=false). +datasets](https://doi.org/10.1093/bioinformatics/btaa692). The Hi-C matrix visualization is implemented by [`HiCBricks`](https://github.com/koustav-pal/HiCBricks). This package @@ -931,9 +919,6 @@ track_df <- LoadTrackFile( extend = 0 ) #> No metadata provided, returning coverage as is. -``` - -``` r track_df$score <- ifelse(track_df$score < 0, 0, track_df$score) @@ -1021,9 +1006,6 @@ library(HiCBricks) #> The following object is masked from 'package:Biostrings': #> #> pattern -``` - -``` r basic_coverage + geom_tad( @@ -1066,7 +1048,7 @@ quality of the data. ### Load coverage The exported coverage from [Proteome -Discoverer](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8006021/): +Discoverer](https://doi.org/10.3390/proteomes9010015): ``` r library(openxlsx) diff --git a/vignettes/ggcoverage.Rmd b/vignettes/ggcoverage.Rmd index 0fc5c41..62ad8ac 100644 --- a/vignettes/ggcoverage.Rmd +++ b/vignettes/ggcoverage.Rmd @@ -500,7 +500,7 @@ graphics::mtext( graphics::par(opar) ``` -Default color scheme for amino acid annotation is from [Residual colours: a proposal for aminochromography](https://academic.oup.com/peds/article/10/7/743/1593029?login=false): +Default color scheme for amino acid annotation is from [Residual colours: a proposal for aminochromography](https://pubmed.ncbi.nlm.nih.gov/9342138/): ```{r aa_color_scheme, warning = FALSE, fig.height = 9, fig.width = 10, fig.align = "center"} aa_color <- c( @@ -705,7 +705,7 @@ The Hi-C method maps chromosome contacts in eukaryotic cells. For this purpose, DNA and protein complexes are cross-linked and DNA fragments then purified. As a result, even distant chromatin fragments can be found to interact due to the spatial organization of the DNA and histones in the cell. Hi-C data shows these interactions for example as a contact map. -The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic datasets](https://academic.oup.com/bioinformatics/article/37/3/422/5879987?login=false). +The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic datasets](https://pubmed.ncbi.nlm.nih.gov/32745185/). The Hi-C matrix visualization is implemented by [`HiCBricks`](https://github.com/koustav-pal/HiCBricks). This package needs to be installed separately (it is only 'Suggested' by `ggcoverage`). @@ -819,7 +819,7 @@ knitr::include_graphics("../man/figures/README-hic_coverage-1.png") ### Load coverage -The exported coverage from [Proteome Discoverer](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8006021/): +The exported coverage from [Proteome Discoverer](https://pmc.ncbi.nlm.nih.gov/articles/PMC8006021/): ```{r ms_coverage_data, eval = FALSE} library(openxlsx)