Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
teng-gao committed Mar 17, 2024
2 parents 215e73c + 3448602 commit 4e4f541
Show file tree
Hide file tree
Showing 35 changed files with 120 additions and 1,773 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: rocker/verse:4.2
- image: rocker/verse:4.3
environment:
_R_CHECK_FORCE_SUGGESTS_: false
steps:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Publish Docker image
on:
release:
types: [published]
workflow_dispatch:
# push:
# branches: [main, master]

Expand All @@ -16,22 +17,22 @@ jobs:
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: pkharchenkolab/numbat-rbase

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: numbat
Title: Haplotype-Aware CNV Analysis from scRNA-Seq
URL: https://github.com/kharchenkolab/numbat/, https://kharchenkolab.github.io/numbat/
Version: 1.3.4
Version: 1.4.0
Authors@R: c(person("Teng","Gao", email="[email protected]", role=c("cre", "aut")), person("Ruslan", "Soldatov", email="[email protected]", role="aut"), person("Hirak", "Sarkar", email="[email protected]", role="aut"), person("Evan", "Biederstedt", email="[email protected]", role="aut"), person("Peter", "Kharchenko", email = "[email protected]", role = "aut"))
Description: A computational method that infers copy number variations (CNVs) in cancer scRNA-seq data and reconstructs the tumor phylogeny. 'numbat' integrates signals from gene expression, allelic ratio, and population haplotype structures to accurately infer allele-specific CNVs in single cells and reconstruct their lineage relationship. 'numbat' can be used to: 1. detect allele-specific copy number variations from single-cells; 2. differentiate tumor versus normal cells in the tumor microenvironment; 3. infer the clonal architecture and evolutionary history of profiled tumors. 'numbat' does not require tumor/normal-paired DNA or genotype data, but operates solely on the donor scRNA-data data (for example, 10x Cell Ranger output). Additional examples and documentations are available at <https://kharchenkolab.github.io/numbat/>. For details on the method please see Gao et al. Nature Biotechnology (2022) <doi:10.1038/s41587-022-01468-y>.
License: MIT + file LICENSE
Expand All @@ -21,6 +21,7 @@ Imports:
ggraph,
ggtree,
glue,
hahmmr,
igraph,
IRanges,
logger,
Expand Down
12 changes: 11 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ importFrom(data.table,fread)
importFrom(data.table,fwrite)
importFrom(ggtree,"%<+%")
importFrom(grDevices,colorRampPalette)
importFrom(hahmmr,dbbinom)
importFrom(hahmmr,dpoilog)
importFrom(hahmmr,fit_lnpois_cpp)
importFrom(hahmmr,forward_back_allele)
importFrom(hahmmr,l_bbinom)
importFrom(hahmmr,l_lnpois)
importFrom(hahmmr,likelihood_allele)
importFrom(hahmmr,logSumExp)
importFrom(hahmmr,run_allele_hmm_s5)
importFrom(hahmmr,run_joint_hmm_s15)
importFrom(igraph,"E<-")
importFrom(igraph,"V<-")
importFrom(igraph,E)
Expand Down Expand Up @@ -74,4 +84,4 @@ importFrom(stats,setNames)
importFrom(stats,start)
importFrom(stats,t.test)
importFrom(utils,combn)
useDynLib(numbat)
useDynLib(numbat, .registration=TRUE)
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# numbat 1.4.0 - 02/23/2023

* Integration with hahmmr

* Better input checking for pileup_and_phase

* Fix compatibility with igraph v2.0+ and tidygraph v1.3+ (#150)

* Fix multiallelic CNV state probability reporting (#146)

# numbat 1.3.3 - 08/15/2023

* Fix plotting issue #135
Expand Down
38 changes: 1 addition & 37 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,43 +1,7 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

cppdbbinom <- function(x, size, alpha, beta, log_prob = FALSE) {
.Call('_numbat_cppdbbinom', PACKAGE = 'numbat', x, size, alpha, beta, log_prob)
}

cpp_dgpois <- function(x, alpha, beta, log_prob = FALSE) {
.Call('_numbat_cpp_dgpois', PACKAGE = 'numbat', x, alpha, beta, log_prob)
}

logSumExp <- function(x) {
.Call('_numbat_logSumExp', PACKAGE = 'numbat', x)
}

likelihood_compute <- function(logphi, logprob, logPi, n, m) {
.Call('_numbat_likelihood_compute', PACKAGE = 'numbat', logphi, logprob, logPi, n, m)
}

forward_backward_compute <- function(logphi, logprob, logPi, n, m) {
.Call('_numbat_forward_backward_compute', PACKAGE = 'numbat', logphi, logprob, logPi, n, m)
}

viterbi_compute <- function(log_delta, logprob, logPi, n, m, nu, z) {
.Call('_numbat_viterbi_compute', PACKAGE = 'numbat', log_delta, logprob, logPi, n, m, nu, z)
}

roman2int_internal <- function(letters, nchar) {
.Call('_numbat_roman2int_internal', PACKAGE = 'numbat', letters, nchar)
}

fit_lnpois_cpp <- function(Y_obs, lambda_ref, d) {
.Call('_numbat_fit_lnpois_cpp', PACKAGE = 'numbat', Y_obs, lambda_ref, d)
}

poilog1 <- function(x, my, sig) {
.Call('_numbat_poilog1', PACKAGE = 'numbat', x, my, sig)
}

l_lnpois_cpp <- function(Y_obs, lambda_ref, d, mu, sig, phi = 1.0) {
.Call('_numbat_l_lnpois_cpp', PACKAGE = 'numbat', Y_obs, lambda_ref, d, mu, sig, phi)
.Call(`_numbat_roman2int_internal`, letters, nchar)
}

6 changes: 6 additions & 0 deletions R/diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ check_exp_ref = function(lambdas_ref) {
if (!is.matrix(lambdas_ref)) {
lambdas_ref = as.matrix(lambdas_ref) %>% magrittr::set_colnames('ref')
}

if (any(is.na(lambdas_ref))) {
msg = "The reference expression matrix 'lambdas_ref' should not contain any NA values."
log_error(msg)
stop(msg)
}

# check if all entries in the reference profile are integers
if (all(lambdas_ref == as.integer(lambdas_ref))) {
Expand Down
3 changes: 0 additions & 3 deletions R/genotyping.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ preprocess_allele = function(

# phased VCF
vcf_phased = vcf_phased %>%
mutate(INFO = str_remove_all(INFO, '[:alpha:]|=')) %>%
tidyr::separate(col = 'INFO', into = c('AD', 'DP', 'OTH'), sep = ';') %>%
mutate_at(c('AD', 'DP', 'OTH'), as.integer) %>%
mutate(snp_id = paste(CHROM, POS, REF, ALT, sep = '_')) %>%
mutate(GT = get(sample))

Expand Down
Loading

0 comments on commit 4e4f541

Please sign in to comment.