Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in (function (cond) : error in evaluating the argument 'x' in selecting a method for function 't': subscript out of bounds #56

Closed
ChengHsiangLu opened this issue Nov 8, 2022 · 1 comment

Comments

@ChengHsiangLu
Copy link

Hi,

I've created my 1-column count matrix with featureCounts. However, after creating my count_mat and df_allele, it still shows an error when I try run_numbat.

The code I use is as follows:

library(numbat)
library(Matrix)
library(dplyr)

## count_mat by featureCounts
CPM00000383_count_mat <- as.matrix((read.table("/Users/samuellu/Desktop/Labs/CHLA_Lab/Numbat/CPM00000383-BM-R_20210510/count_mat.csv", sep = ",")))
colnames(CPM00000383_count_mat) <- c('CPM00000383-BM-R_20210510')
CPM00000383_count_mat_dgC <- as(CPM00000383_count_mat, "dgCMatrix") 

## df_allele
CPM00000383_df_allele <- as.data.frame(read.table("/Users/samuellu/Desktop/Labs/CHLA_Lab/Numbat/CPM00000383-BM-R_20210510/CPM00000383-BM-R_20210510_allele_counts.tsv", sep = "\t", header = T))


bulk <- get_bulk(
  count_mat = CPM00000383_count_mat_dgC,
  lambdas_ref = ref_hca,
  df_allele = CPM00000383_df_allele,
  gtf = gtf_hg38)

segs_loh <- bulk %>% detect_clonal_loh(t = 1e-4)


out <- run_numbat(
  CPM00000383_count_mat_dgC, 
  ref_hca, 
  CPM00000383_df_allele, 
  ncores = 4,
  plot = TRUE,
  out_dir = './test/CPM00000383',
  segs_loh = segs_loh
)

This is the error message I got after run_numbat.

Running under parameters:
t = 1e-05
alpha = 1e-04
gamma = 20
min_cells = 50
init_k = 3
max_cost = 0.3
max_iter = 2
max_nni = 100
min_depth = 0
use_loh = auto
multi_allelic = TRUE
min_LLR = 5
min_overlap = 0.45
max_entropy = 0.5
skip_nj = FALSE
diploid_chroms = 
ncores = 4
ncores_nni = 4
common_diploid = TRUE
tau = 0.3
check_convergence = FALSE
plot = TRUE
genome = hg38
Input metrics:
1 cells
Mem used: 0.414Gb
Approximating initial clusters using smoothed expression ..
Mem used: 0.414Gb
number of genes left: 9313
Error in (function (cond)  : 
  error in evaluating the argument 'x' in selecting a method for function 't': subscript out of bounds

Can you share with me where is the problem that causes this error?

Thanks,
Sam

@teng-gao
Copy link
Collaborator

teng-gao commented Nov 8, 2022

Closing this issue as I answered it in the original thread (#53 ).

@teng-gao teng-gao closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants