Skip to content

Commit 9dce2ea

Browse files
authored
Merge pull request #70 from immunomind/dev
0.6.5 CRAN release
2 parents 4f1c467 + 9235c5d commit 9dce2ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1206
-846
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
^.gitlab-ci.yml$
1414
^CONTRIBUTION.md$
1515
^_pkgdown.yml$
16+
^pkgdown$
1617
^code-of-conduct.md$
1718
^LICENSE$
1819
^immunarch-citation.xml$

CONTRIBUTION.md

+78-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# Contributing to immunarch
22

3-
This outlines how to propose a change to immunarch.
3+
This document outlines how to propose a change to immunarch.
44

5-
### Fixing typos
65

7-
Small typos or grammatical errors in documentation may be edited directly using
8-
the GitLab web IDE functionality / GitHub web interface, so long as the changes are made in the _source_ file.
6+
## How to contribute?
97

10-
* YES: you edit a roxygen comment in a `.R` file below `R/`.
11-
* NO: you edit an `.Rd` file below `man/`.
8+
There are three general ways to contribute to the package.
9+
10+
1. Code contribution via pull requests. Helps us improve the codebase of the package, add new features or fix bugs and typos in the documentation.
11+
12+
2. Bug reports and feature requests via GitHub issues. Helps us notice important issues and improvements to address.
13+
14+
3. Helping others by answering tickets in GitHub issues. Greatly helps build the community and accelerates the immune repertoire research progress.
15+
16+
## Code contribution via pull requests
1217

1318
### Prerequisites
1419

@@ -20,23 +25,79 @@ that via GitHub, please note it in the issue.
2025

2126
### Pull request process
2227

28+
* Always start by forking the `dev` branch [from here](https://github.com/immunomind/immunarch/tree/dev) to make sure you have the latest pre-release version of `immunarch`. Name it accordingly to your contributions. `repClonality refactor` or `fix-issue-12` would work.
2329
* We recommend that you create a Git branch for each pull request (PR).
24-
* Look at the CI (Continuous Integration) build status before and after making changes.
25-
The `README` should contain badges for any continuous integration services used
26-
by the package.
27-
* New code should follow our style guide that is the tidyverse [style guide](http://style.tidyverse.org)
28-
with a very minor addition of using `=` instead of `<-` in variable assignment.
29-
You can use the [styler](https://CRAN.R-project.org/package=styler) package to
30+
* We follow the [following guidelines for commit naming](https://medium.com/@kevinkreuzer/the-way-to-fully-automated-releases-in-open-source-projects-44c015f38fd6).
31+
* New code should follow our style guide that is the tidyverse [style guide](http://style.tidyverse.org) You can use the [styler](https://CRAN.R-project.org/package=styler) package to
3032
apply these styles, but please don't restyle code that has nothing to do with
3133
your PR.
3234
* We use [roxygen2](https://cran.r-project.org/package=roxygen2) for documentation.
3335
* We use [testthat](https://cran.r-project.org/package=testthat). Contributions
34-
with test cases included are easier to accept.
35-
* For user-facing changes, add a bullet to the top of `NEWS.md` below the current
36-
development version header describing the changes made followed by your GitHub
37-
username, and links to relevant issue(s)/PR(s).
36+
with test cases included are easier to accept.
37+
* Look at the CI (Continuous Integration) build status before and after making changes.
38+
The `README` should contain badges for any continuous integration services used
39+
by the package.
40+
41+
### Fixing typos
42+
43+
Small typos or grammatical errors in documentation may be edited directly using
44+
the GitLab web IDE functionality / GitHub web interface, so long as the changes are made in the _source_ file. Please make sure to create a Pull Request instead of commiting directly to the `master` branch.
45+
46+
* YES: you edit a roxygen comment in a `.R` file below `R/`.
47+
* NO: you edit an `.Rd` file below `man/`.
48+
49+
### Version naming
50+
51+
We employ Major.Minor.Patch. E.g., 0.4.0.
52+
53+
Hotfixes: Major.Minor.Patch → Major.Minor.(Patch + 1)
54+
55+
Guidelines: [http://r-pkgs.had.co.nz/release.html](http://r-pkgs.had.co.nz/release.html)
56+
57+
### Commit naming
58+
59+
We follow the [following guidelines for commit naming](https://medium.com/@kevinkreuzer/the-way-to-fully-automated-releases-in-open-source-projects-44c015f38fd6).
60+
61+
#### Commit types
62+
63+
There are eight types of commits: `chore`, `docs`, `feat`, `fix`, `refactor`, `test`, `perf`, `style`. Most used are `feat` for implementation of a new feauture, `docs` for updating the documentation, `fix` for fixing a bug.
64+
65+
Commit name examples: `feat(diversity): added the Chao1 method for diversity estimations`, `fix(clonality): fixed a bug in clonality computations #12`, where `#12` is a link to the issue on the immunarch issue page.
66+
67+
#### Commit scopes
68+
69+
- Changes in analysis- and visualisation-specific functions: `diversity`, `overlap`, `pub-rep`, `clonality`, `gene-usage`, `explore`, `kmers`, `spectratype`, `dynamics`, `tools`, `single-cell`.
70+
71+
- General changes in visualisation functions (e.g., replace one package with another, or change a non-specific visualisation function such as `vis_bar`): `vis`
72+
73+
- Changes in parsing: `io`
74+
75+
- Changes in databases support: `db`
76+
77+
- Changes in additional functions such as general statistics functions: `utility`
78+
79+
- Changes in data: `data`
80+
81+
- Changes in NAMESPACE, DESCRIPTION, citations, ISSUE_TEMPLATE.md, etc., without README: `upkeep`
82+
83+
- Changes in README and vignettes: `vignette`
84+
85+
- Changes in Continuous Integration: `ci`
86+
87+
- Changes in Shiny applications: `shiny`
88+
89+
90+
## Bug reports and feature requests
91+
92+
### How to create an Issue
93+
94+
We have a rich list of templates for Issues [here](https://github.com/immunomind/immunarch/tree/master/.github/ISSUE_TEMPLATE). Go to the [GitHub Issues page](https://github.com/immunomind/immunarch/issues) for `immunarch` and create a new Issue ticket from there.
95+
96+
## Helping others by answering tickets
97+
98+
Got to [GitHub Issues page](https://github.com/immunomind/immunarch/issues) and find Issues that you are familiar with to answer.
3899

39-
### Code of Conduct
100+
## Code of Conduct
40101

41102
Please note that this project is released with a [Contributor Code of
42103
Conduct](code-of-conduct.md). By participating in this project you agree to

DESCRIPTION

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Package: immunarch
22
Type: Package
33
Title: Bioinformatics Analysis of T-Cell and B-Cell Immune Repertoires
4-
Version: 0.6.4
4+
Version: 0.6.5
55
Authors@R: c(
66
person("Vadim I.", "Nazarov", , "[email protected]", c("aut", "cre")),
77
person("Vasily O.", "Tsvetkov", , role = "aut"),
88
person("Eugene", "Rumynskiy", , role = "aut"),
9-
person("Anna", "Lorenc", , role = "aut"),
10-
person("Daniel J.", "Moore", , role = "aut"),
11-
person("Victor", "Greiff", , role = "aut"),
9+
person("Anna", "Lorenc", , role = "ctb"),
10+
person("Daniel J.", "Moore", , role = "ctb"),
11+
person("Victor", "Greiff", , role = "ctb"),
1212
person("ImmunoMind", role = c("cph", "fnd"))
1313
)
1414
15-
Description: A comprehensive framework for bioinformatics analysis of bulk and single-cell
15+
Description: A comprehensive framework for bioinformatics exploratory analysis of bulk and single-cell
1616
T-cell receptor and antibody repertoires. It provides seamless data loading, analysis and
1717
visualisation for AIRR (Adaptive Immune Receptor Repertoire) data, both bulk immunosequencing (RepSeq)
1818
and single-cell sequencing (scRNAseq). It implements most of the widely used AIRR analysis methods,
@@ -24,22 +24,21 @@ License: AGPL-3
2424
URL: https://immunarch.com/, https://github.com/immunomind/immunarch
2525
BugReports: https://github.com/immunomind/immunarch/issues
2626
Imports:
27+
factoextra (>= 1.0.4),
28+
fpc,
29+
UpSetR (>= 1.4.0),
2730
pheatmap (>= 1.0.12),
2831
ggrepel (>= 0.8.0),
2932
reshape2 (>= 1.4.2),
30-
factoextra (>= 1.0.4),
31-
fpc,
3233
circlize,
3334
MASS (>= 7.3),
3435
Rtsne (>= 0.15),
3536
readr (>= 1.3.1),
3637
readxl (>= 1.3.1),
3738
shiny (>= 1.4.0),
3839
shinythemes,
39-
treemap,
4040
airr,
4141
ggseqlogo,
42-
UpSetR (>= 1.4.0),
4342
stringr (>= 1.4.0),
4443
ggalluvial (>= 0.10.0),
4544
Rcpp (>= 1.0),
@@ -57,7 +56,7 @@ Depends:
5756
dplyr (>= 0.8.0),
5857
dtplyr (>= 1.0.0),
5958
data.table (>= 1.12.6),
60-
gridExtra (>= 2.2.1)
59+
patchwork
6160
LinkingTo: Rcpp
6261
Suggests:
6362
knitr (>= 1.8),

NAMESPACE

+6-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export(cross_entropy)
4343
export(dbAnnotate)
4444
export(dbLoad)
4545
export(entropy)
46-
export(filter_barcodes)
4746
export(fixVis)
4847
export(geneUsage)
4948
export(geneUsageAnalysis)
@@ -79,6 +78,8 @@ export(repOverlap)
7978
export(repOverlapAnalysis)
8079
export(repSample)
8180
export(repSave)
81+
export(select_barcodes)
82+
export(select_clusters)
8283
export(spectratype)
8384
export(split_to_kmers)
8485
export(top)
@@ -93,7 +94,6 @@ export(vis_hist)
9394
export(vis_immunr_kmer_profile_main)
9495
export(vis_seqlogo)
9596
export(vis_textlogo)
96-
export(vis_treemap)
9797
import(ggplot2)
9898
importFrom(Rcpp,cppFunction)
9999
importFrom(Rcpp,sourceCpp)
@@ -105,6 +105,7 @@ importFrom(data.table,as.data.table)
105105
importFrom(data.table,data.table)
106106
importFrom(data.table,melt.data.table)
107107
importFrom(data.table,set)
108+
importFrom(data.table,setDF)
108109
importFrom(data.table,setDT)
109110
importFrom(data.table,setcolorder)
110111
importFrom(data.table,setnames)
@@ -115,6 +116,7 @@ importFrom(dplyr,contains)
115116
importFrom(dplyr,desc)
116117
importFrom(dplyr,distinct)
117118
importFrom(dplyr,filter)
119+
importFrom(dplyr,first)
118120
importFrom(dplyr,full_join)
119121
importFrom(dplyr,group_by)
120122
importFrom(dplyr,group_by_at)
@@ -149,10 +151,10 @@ importFrom(grDevices,colorRampPalette)
149151
importFrom(graphics,plot)
150152
importFrom(grid,gpar)
151153
importFrom(grid,rectGrob)
152-
importFrom(gridExtra,arrangeGrob)
153-
importFrom(gridExtra,grid.arrange)
154154
importFrom(magrittr,"%>%")
155155
importFrom(methods,as)
156+
importFrom(patchwork,plot_annotation)
157+
importFrom(patchwork,wrap_plots)
156158
importFrom(pheatmap,pheatmap)
157159
importFrom(plyr,mapvalues)
158160
importFrom(readr,col_character)
@@ -213,7 +215,6 @@ importFrom(stringr,str_replace_all)
213215
importFrom(stringr,str_sort)
214216
importFrom(stringr,str_split)
215217
importFrom(tibble,tibble)
216-
importFrom(treemap,treemap)
217218
importFrom(utils,packageVersion)
218219
importFrom(utils,read.table)
219220
importFrom(utils,setTxtProgressBar)

R/search.R R/annotation.R

File renamed without changes.

R/data.R

-14
This file was deleted.

R/data_docs.R

+35
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,38 @@ AA_TABLE_REVERSED <- sapply(unique(AA_TABLE), function(aa) {
6060
names(AA_TABLE)[AA_TABLE == aa]
6161
})
6262
AA_TABLE_REVERSED <- AA_TABLE_REVERSED[order(names(AA_TABLE_REVERSED))]
63+
64+
65+
#' Single chain immune repertoire dataset
66+
#'
67+
#' @concept data
68+
#'
69+
#' @description A dataset with single chain TCR data for testing and examplatory purposes.
70+
#'
71+
#' @format A list of two elements. First element ("data") is a list with data frames with clonotype tables.
72+
#' Second element ("meta") is a metadata table.
73+
#' \describe{
74+
#' \item{data}{List of immune repertoire data frames.}
75+
#' \item{meta}{Metadata}
76+
#' ...
77+
#' }
78+
"immdata"
79+
80+
81+
#' Paired chain immune repertoire dataset
82+
#'
83+
#' @concept data
84+
#'
85+
#' @description A dataset with paired chain IG data for testing and examplatory purposes.
86+
#'
87+
#' @format A list of four elements.
88+
#' "data" is a list with data frames with clonotype tables.
89+
#' "meta" is a metadata table.
90+
#' "bc_patients" is a list of barcodes corresponding to specific patients.
91+
#' "bc_clusters" is a list of barcodes corresponding to specific cell clusters.
92+
#' \describe{
93+
#' \item{data}{List of immune repertoire data frames.}
94+
#' \item{meta}{Metadata}
95+
#' ...
96+
#' }
97+
"scdata"

R/diversity.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ repDiversity <- function(.data, .method = "chao1", .col = "aa", .max.q = 6, .min
169169
.extrapolation = .extrapolation, .perc = .perc,
170170
.verbose = .verbose, .do.norm = .do.norm, .laplace = .laplace
171171
)
172-
new_class <- tail(class(res[[1]]), 1)
172+
new_class <- head(class(res[[1]]), 1)
173173
res <- do.call(rbind, res)
174174
if (.method == "hill") {
175175
res <- reshape2::melt(res)

R/immunr_data_format.R

+5
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@ IMMCOL$type <- c(
7373
"integer", "integer", "integer", "character"
7474
)
7575

76+
# Additional information
77+
IMMCOL_ADD <- new.env()
78+
# separator for paired chain data
79+
IMMCOL_ADD$scsep <- ";"
80+
7681
IMMUNR_ERROR_NOT_IMPL <- "ERROR: not implemented yet. Please contact us via [email protected] if you need it in your research."

0 commit comments

Comments
 (0)