Skip to content

Commit

Permalink
Merge pull request #70 from immunomind/dev
Browse files Browse the repository at this point in the history
0.6.5 CRAN release
  • Loading branch information
vadimnazarov authored Jun 15, 2020
2 parents 4f1c467 + 9235c5d commit 9dce2ea
Show file tree
Hide file tree
Showing 65 changed files with 1,206 additions and 846 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
^.gitlab-ci.yml$
^CONTRIBUTION.md$
^_pkgdown.yml$
^pkgdown$
^code-of-conduct.md$
^LICENSE$
^immunarch-citation.xml$
Expand Down
95 changes: 78 additions & 17 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Contributing to immunarch

This outlines how to propose a change to immunarch.
This document outlines how to propose a change to immunarch.

### Fixing typos

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

* YES: you edit a roxygen comment in a `.R` file below `R/`.
* NO: you edit an `.Rd` file below `man/`.
There are three general ways to contribute to the package.

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.

2. Bug reports and feature requests via GitHub issues. Helps us notice important issues and improvements to address.

3. Helping others by answering tickets in GitHub issues. Greatly helps build the community and accelerates the immune repertoire research progress.

## Code contribution via pull requests

### Prerequisites

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

### Pull request process

* 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.
* We recommend that you create a Git branch for each pull request (PR).
* Look at the CI (Continuous Integration) build status before and after making changes.
The `README` should contain badges for any continuous integration services used
by the package.
* New code should follow our style guide that is the tidyverse [style guide](http://style.tidyverse.org)
with a very minor addition of using `=` instead of `<-` in variable assignment.
You can use the [styler](https://CRAN.R-project.org/package=styler) package to
* We follow the [following guidelines for commit naming](https://medium.com/@kevinkreuzer/the-way-to-fully-automated-releases-in-open-source-projects-44c015f38fd6).
* 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
apply these styles, but please don't restyle code that has nothing to do with
your PR.
* We use [roxygen2](https://cran.r-project.org/package=roxygen2) for documentation.
* We use [testthat](https://cran.r-project.org/package=testthat). Contributions
with test cases included are easier to accept.
* For user-facing changes, add a bullet to the top of `NEWS.md` below the current
development version header describing the changes made followed by your GitHub
username, and links to relevant issue(s)/PR(s).
with test cases included are easier to accept.
* Look at the CI (Continuous Integration) build status before and after making changes.
The `README` should contain badges for any continuous integration services used
by the package.

### Fixing typos

Small typos or grammatical errors in documentation may be edited directly using
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.

* YES: you edit a roxygen comment in a `.R` file below `R/`.
* NO: you edit an `.Rd` file below `man/`.

### Version naming

We employ Major.Minor.Patch. E.g., 0.4.0.

Hotfixes: Major.Minor.Patch → Major.Minor.(Patch + 1)

Guidelines: [http://r-pkgs.had.co.nz/release.html](http://r-pkgs.had.co.nz/release.html)

### Commit naming

We follow the [following guidelines for commit naming](https://medium.com/@kevinkreuzer/the-way-to-fully-automated-releases-in-open-source-projects-44c015f38fd6).

#### Commit types

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.

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.

#### Commit scopes

- Changes in analysis- and visualisation-specific functions: `diversity`, `overlap`, `pub-rep`, `clonality`, `gene-usage`, `explore`, `kmers`, `spectratype`, `dynamics`, `tools`, `single-cell`.

- General changes in visualisation functions (e.g., replace one package with another, or change a non-specific visualisation function such as `vis_bar`): `vis`

- Changes in parsing: `io`

- Changes in databases support: `db`

- Changes in additional functions such as general statistics functions: `utility`

- Changes in data: `data`

- Changes in NAMESPACE, DESCRIPTION, citations, ISSUE_TEMPLATE.md, etc., without README: `upkeep`

- Changes in README and vignettes: `vignette`

- Changes in Continuous Integration: `ci`

- Changes in Shiny applications: `shiny`


## Bug reports and feature requests

### How to create an Issue

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.

## Helping others by answering tickets

Got to [GitHub Issues page](https://github.com/immunomind/immunarch/issues) and find Issues that you are familiar with to answer.

### Code of Conduct
## Code of Conduct

Please note that this project is released with a [Contributor Code of
Conduct](code-of-conduct.md). By participating in this project you agree to
Expand Down
19 changes: 9 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Package: immunarch
Type: Package
Title: Bioinformatics Analysis of T-Cell and B-Cell Immune Repertoires
Version: 0.6.4
Version: 0.6.5
Authors@R: c(
person("Vadim I.", "Nazarov", , "vdm.nazarov@gmail.com", c("aut", "cre")),
person("Vasily O.", "Tsvetkov", , role = "aut"),
person("Eugene", "Rumynskiy", , role = "aut"),
person("Anna", "Lorenc", , role = "aut"),
person("Daniel J.", "Moore", , role = "aut"),
person("Victor", "Greiff", , role = "aut"),
person("Anna", "Lorenc", , role = "ctb"),
person("Daniel J.", "Moore", , role = "ctb"),
person("Victor", "Greiff", , role = "ctb"),
person("ImmunoMind", role = c("cph", "fnd"))
)
Contact: support@immunomind.io
Description: A comprehensive framework for bioinformatics analysis of bulk and single-cell
Description: A comprehensive framework for bioinformatics exploratory analysis of bulk and single-cell
T-cell receptor and antibody repertoires. It provides seamless data loading, analysis and
visualisation for AIRR (Adaptive Immune Receptor Repertoire) data, both bulk immunosequencing (RepSeq)
and single-cell sequencing (scRNAseq). It implements most of the widely used AIRR analysis methods,
Expand All @@ -24,22 +24,21 @@ License: AGPL-3
URL: https://immunarch.com/, https://github.com/immunomind/immunarch
BugReports: https://github.com/immunomind/immunarch/issues
Imports:
factoextra (>= 1.0.4),
fpc,
UpSetR (>= 1.4.0),
pheatmap (>= 1.0.12),
ggrepel (>= 0.8.0),
reshape2 (>= 1.4.2),
factoextra (>= 1.0.4),
fpc,
circlize,
MASS (>= 7.3),
Rtsne (>= 0.15),
readr (>= 1.3.1),
readxl (>= 1.3.1),
shiny (>= 1.4.0),
shinythemes,
treemap,
airr,
ggseqlogo,
UpSetR (>= 1.4.0),
stringr (>= 1.4.0),
ggalluvial (>= 0.10.0),
Rcpp (>= 1.0),
Expand All @@ -57,7 +56,7 @@ Depends:
dplyr (>= 0.8.0),
dtplyr (>= 1.0.0),
data.table (>= 1.12.6),
gridExtra (>= 2.2.1)
patchwork
LinkingTo: Rcpp
Suggests:
knitr (>= 1.8),
Expand Down
11 changes: 6 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export(cross_entropy)
export(dbAnnotate)
export(dbLoad)
export(entropy)
export(filter_barcodes)
export(fixVis)
export(geneUsage)
export(geneUsageAnalysis)
Expand Down Expand Up @@ -79,6 +78,8 @@ export(repOverlap)
export(repOverlapAnalysis)
export(repSample)
export(repSave)
export(select_barcodes)
export(select_clusters)
export(spectratype)
export(split_to_kmers)
export(top)
Expand All @@ -93,7 +94,6 @@ export(vis_hist)
export(vis_immunr_kmer_profile_main)
export(vis_seqlogo)
export(vis_textlogo)
export(vis_treemap)
import(ggplot2)
importFrom(Rcpp,cppFunction)
importFrom(Rcpp,sourceCpp)
Expand All @@ -105,6 +105,7 @@ importFrom(data.table,as.data.table)
importFrom(data.table,data.table)
importFrom(data.table,melt.data.table)
importFrom(data.table,set)
importFrom(data.table,setDF)
importFrom(data.table,setDT)
importFrom(data.table,setcolorder)
importFrom(data.table,setnames)
Expand All @@ -115,6 +116,7 @@ importFrom(dplyr,contains)
importFrom(dplyr,desc)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
importFrom(dplyr,first)
importFrom(dplyr,full_join)
importFrom(dplyr,group_by)
importFrom(dplyr,group_by_at)
Expand Down Expand Up @@ -149,10 +151,10 @@ importFrom(grDevices,colorRampPalette)
importFrom(graphics,plot)
importFrom(grid,gpar)
importFrom(grid,rectGrob)
importFrom(gridExtra,arrangeGrob)
importFrom(gridExtra,grid.arrange)
importFrom(magrittr,"%>%")
importFrom(methods,as)
importFrom(patchwork,plot_annotation)
importFrom(patchwork,wrap_plots)
importFrom(pheatmap,pheatmap)
importFrom(plyr,mapvalues)
importFrom(readr,col_character)
Expand Down Expand Up @@ -213,7 +215,6 @@ importFrom(stringr,str_replace_all)
importFrom(stringr,str_sort)
importFrom(stringr,str_split)
importFrom(tibble,tibble)
importFrom(treemap,treemap)
importFrom(utils,packageVersion)
importFrom(utils,read.table)
importFrom(utils,setTxtProgressBar)
Expand Down
File renamed without changes.
14 changes: 0 additions & 14 deletions R/data.R

This file was deleted.

35 changes: 35 additions & 0 deletions R/data_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,38 @@ AA_TABLE_REVERSED <- sapply(unique(AA_TABLE), function(aa) {
names(AA_TABLE)[AA_TABLE == aa]
})
AA_TABLE_REVERSED <- AA_TABLE_REVERSED[order(names(AA_TABLE_REVERSED))]


#' Single chain immune repertoire dataset
#'
#' @concept data
#'
#' @description A dataset with single chain TCR data for testing and examplatory purposes.
#'
#' @format A list of two elements. First element ("data") is a list with data frames with clonotype tables.
#' Second element ("meta") is a metadata table.
#' \describe{
#' \item{data}{List of immune repertoire data frames.}
#' \item{meta}{Metadata}
#' ...
#' }
"immdata"


#' Paired chain immune repertoire dataset
#'
#' @concept data
#'
#' @description A dataset with paired chain IG data for testing and examplatory purposes.
#'
#' @format A list of four elements.
#' "data" is a list with data frames with clonotype tables.
#' "meta" is a metadata table.
#' "bc_patients" is a list of barcodes corresponding to specific patients.
#' "bc_clusters" is a list of barcodes corresponding to specific cell clusters.
#' \describe{
#' \item{data}{List of immune repertoire data frames.}
#' \item{meta}{Metadata}
#' ...
#' }
"scdata"
2 changes: 1 addition & 1 deletion R/diversity.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ repDiversity <- function(.data, .method = "chao1", .col = "aa", .max.q = 6, .min
.extrapolation = .extrapolation, .perc = .perc,
.verbose = .verbose, .do.norm = .do.norm, .laplace = .laplace
)
new_class <- tail(class(res[[1]]), 1)
new_class <- head(class(res[[1]]), 1)
res <- do.call(rbind, res)
if (.method == "hill") {
res <- reshape2::melt(res)
Expand Down
5 changes: 5 additions & 0 deletions R/immunr_data_format.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,9 @@ IMMCOL$type <- c(
"integer", "integer", "integer", "character"
)

# Additional information
IMMCOL_ADD <- new.env()
# separator for paired chain data
IMMCOL_ADD$scsep <- ";"

IMMUNR_ERROR_NOT_IMPL <- "ERROR: not implemented yet. Please contact us via support@immunomind.io if you need it in your research."
Loading

0 comments on commit 9dce2ea

Please sign in to comment.