Skip to content

Commit fcfe3ec

Browse files
authored
Merge pull request #42 from m-jahn/dev
fix: various issues to comply with CRAN submission
2 parents 36ec796 + 5ea4f11 commit fcfe3ec

14 files changed

+26
-44
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Authors@R: c(
77
person("Michael", "Jahn", , "[email protected]", role = c("aut", "cph"),
88
comment = c(ORCID = "0000-0002-3913-153X"))
99
)
10-
Maintainer: Michael Jahn <[email protected]>
10+
Maintainer: Yabing Song <[email protected]>
1111
Description: The goal of `ggcoverage` is to visualize coverage tracks from
1212
genomics, transcriptomics or proteomics data. It contains functions to
1313
load data from BAM, BigWig, BedGraph, txt, or xlsx files, create

R/FormatInput.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ GetRegion <- function(df, chr, start, end = NULL) {
3434
#'
3535
#' @param data Track dataframe loaded by \code{\link{LoadTrackFile}}.
3636
#' @param region Region used to create coverage plot, eg: chr14:21,677,306-21,737,601 or chr14:21,677,306.
37-
#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}. Default: NULL.
37+
#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL.
3838
#' @param gene.name The name of gene. Default: HNRNPC.
3939
#' @param gene.name.type Gene name type (filed of \code{gtf.gr}), chosen from gene_name and gene_id.
4040
#' Default: gene_name.

R/LoadTrack.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' @param region Region to extract coverage for, eg: chr14:21,677,306-21,737,601 or chr14:21,677,306.
77
#' Default: NULL, coverage is extracted from the first annotated chromosome/sequence.
88
#' @param extend Extend length of \code{region}. Default: 2000.
9-
#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}. Default: NULL.
9+
#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}. Default: NULL.
1010
#' @param gene.name The name of gene. Default: HNRNPC.
1111
#' @param gene.name.type Gene name type (filed of \code{gtf.gr}), chosen from gene_name and gene_id.
1212
#' Default: gene_name.

R/geom_base.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#' @param star.size The size of star when \code{mark.type} is star. Default: 1.
1919
#' @param show.aa Logical value, whether to show amino acid. Default: TRUE.
2020
#' @param sens Sense to translate: F for forward sense and R for reverse sense.
21-
#' Parameter of \code{\link{translate}}. Default: F.
21+
#' Parameter of \code{\link[Biostrings]{translate}}. Default: F.
2222
#' @param numcode The ncbi genetic code number for translation.
23-
#' Parameter of \code{\link{translate}}. By default the standard genetic code is used.
23+
#' Parameter of \code{\link[Biostrings]{translate}}. By default the standard genetic code is used.
2424
#' @param NAstring How to translate amino-acids when there are ambiguous bases in codons.
25-
#' Parameter of \code{\link{translate}}. Default: X.
25+
#' Parameter of \code{\link[Biostrings]{translate}}. Default: X.
2626
#' @param ambiguous If TRUE, ambiguous bases are taken into account so that for instance GGN is
27-
#' translated to Gly in the standard genetic code. Parameter of \code{\link{translate}}. Default: FALSE.
27+
#' translated to Gly in the standard genetic code. Parameter of \code{\link[Biostrings]{translate}}. Default: FALSE.
2828
#' @param aa.color Color scheme for amino acids.
2929
#' @param aa.border.color The border color of amino acid. Default: white.
3030
#' @param aa.size The size of amino acid text. Default: 4.

R/geom_gene.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Add Gene Annotation to Coverage Plot.
22
#'
3-
#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}.
3+
#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}.
44
#' Default: NULL.
55
#' @param overlap.gene.gap The gap between gene groups. Default: 0.1.
66
#' @param overlap.style The style of gene groups, choose from loose (each gene

R/geom_transcript.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Add Transcript Annotation to Coverage Plot.
22
#'
3-
#' @param gtf.gr Granges object of GTF, created with \code{\link{import.gff}}.
3+
#' @param gtf.gr Granges object of GTF, created with \code{\link[rtracklayer]{import.gff}}.
44
#' Default: NULL.
55
#' @param gene.name Gene name of all transcripts. Default: HNRNPC.
66
#' @param overlap.tx.gap The gap between transcript groups. Default: 0.1.

README.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ graphics::mtext(
471471
graphics::par(opar)
472472
```
473473

474-
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):
474+
Default color scheme for amino acid annotation is from [Residual colours: a proposal for aminochromography](https://pubmed.ncbi.nlm.nih.gov/9342138/):
475475

476476
```{r aa_color_scheme, warning = FALSE, fig.height = 9, fig.width = 10, fig.align = "center"}
477477
aa_color <- c(
@@ -678,7 +678,7 @@ The Hi-C method maps chromosome contacts in eukaryotic cells.
678678
For this purpose, DNA and protein complexes are cross-linked and DNA fragments then purified.
679679
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.
680680

681-
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).
681+
The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic datasets](https://pubmed.ncbi.nlm.nih.gov/32745185/).
682682

683683
The Hi-C matrix visualization is implemented by [`HiCBricks`](https://github.com/koustav-pal/HiCBricks).
684684
This package needs to be installed separately (it is only 'Suggested' by `ggcoverage`).
@@ -788,7 +788,7 @@ basic_coverage +
788788

789789
### Load coverage
790790

791-
The exported coverage from [Proteome Discoverer](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8006021/):
791+
The exported coverage from [Proteome Discoverer](https://doi.org/10.3390/proteomes9010015):
792792

793793
```{r ms_coverage_data}
794794
library(openxlsx)

README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,6 @@ library(ggbio)
337337
#>
338338
#> geom_bar, geom_rect, geom_segment, ggsave, stat_bin, stat_identity,
339339
#> xlim
340-
```
341-
342-
``` r
343340

344341
basic_coverage +
345342
geom_gene(gtf.gr = gtf_gr) +
@@ -459,9 +456,6 @@ library("BSgenome.Hsapiens.UCSC.hg19")
459456
#> The following object is masked from 'package:BiocIO':
460457
#>
461458
#> FileForFormat
462-
```
463-
464-
``` r
465459

466460
# create plot
467461
basic_coverage +
@@ -497,9 +491,6 @@ track_df <- LoadTrackFile(
497491
region = "4:1-160000000"
498492
)
499493
#> No metadata provided, returning coverage as is.
500-
```
501-
502-
``` r
503494

504495
# add chr prefix
505496
track_df$seqnames <- paste0("chr", track_df$seqnames)
@@ -606,9 +597,6 @@ track_df <- LoadTrackFile(
606597
#> No 'region' specified; extracting coverage for an example range
607598
#> (<=100,000 bases, first annotated sequence)
608599
#> Coverage extracted from sequence/chromosome: chr10
609-
```
610-
611-
``` r
612600

613601
head(track_df)
614602
#> seqnames start end width strand score Type Group
@@ -669,7 +657,7 @@ graphics::par(opar)
669657

670658
Default color scheme for amino acid annotation is from [Residual
671659
colours: a proposal for
672-
aminochromography](https://academic.oup.com/peds/article/10/7/743/1593029?login=false):
660+
aminochromography](https://doi.org/10.1093/protein/10.7.743):
673661

674662
``` r
675663
aa_color <- c(
@@ -910,7 +898,7 @@ a contact map.
910898

911899
The Hi-C data is taken from [pyGenomeTracks: reproducible plots for
912900
multivariate genomic
913-
datasets](https://academic.oup.com/bioinformatics/article/37/3/422/5879987?login=false).
901+
datasets](https://doi.org/10.1093/bioinformatics/btaa692).
914902

915903
The Hi-C matrix visualization is implemented by
916904
[`HiCBricks`](https://github.com/koustav-pal/HiCBricks). This package
@@ -931,9 +919,6 @@ track_df <- LoadTrackFile(
931919
extend = 0
932920
)
933921
#> No metadata provided, returning coverage as is.
934-
```
935-
936-
``` r
937922

938923
track_df$score <- ifelse(track_df$score < 0, 0, track_df$score)
939924

@@ -1021,9 +1006,6 @@ library(HiCBricks)
10211006
#> The following object is masked from 'package:Biostrings':
10221007
#>
10231008
#> pattern
1024-
```
1025-
1026-
``` r
10271009

10281010
basic_coverage +
10291011
geom_tad(
@@ -1066,7 +1048,7 @@ quality of the data.
10661048
### Load coverage
10671049

10681050
The exported coverage from [Proteome
1069-
Discoverer](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8006021/):
1051+
Discoverer](https://doi.org/10.3390/proteomes9010015):
10701052

10711053
``` r
10721054
library(openxlsx)

man/FormatTrack.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/LoadTrackFile.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/geom_base.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/geom_gene.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/geom_transcript.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/ggcoverage.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ graphics::mtext(
500500
graphics::par(opar)
501501
```
502502

503-
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):
503+
Default color scheme for amino acid annotation is from [Residual colours: a proposal for aminochromography](https://pubmed.ncbi.nlm.nih.gov/9342138/):
504504

505505
```{r aa_color_scheme, warning = FALSE, fig.height = 9, fig.width = 10, fig.align = "center"}
506506
aa_color <- c(
@@ -705,7 +705,7 @@ The Hi-C method maps chromosome contacts in eukaryotic cells.
705705
For this purpose, DNA and protein complexes are cross-linked and DNA fragments then purified.
706706
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.
707707

708-
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).
708+
The Hi-C data is taken from [pyGenomeTracks: reproducible plots for multivariate genomic datasets](https://pubmed.ncbi.nlm.nih.gov/32745185/).
709709

710710
The Hi-C matrix visualization is implemented by [`HiCBricks`](https://github.com/koustav-pal/HiCBricks).
711711
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")
819819

820820
### Load coverage
821821

822-
The exported coverage from [Proteome Discoverer](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8006021/):
822+
The exported coverage from [Proteome Discoverer](https://pmc.ncbi.nlm.nih.gov/articles/PMC8006021/):
823823

824824
```{r ms_coverage_data, eval = FALSE}
825825
library(openxlsx)

0 commit comments

Comments
 (0)