xinhe-lab / ctwas

package for the causal TWAS project
https://xinhe-lab.github.io/ctwas/
MIT License
32 stars 12 forks source link

Error in { : task 1 failed - "'length = 4' in coercion to 'logical(1)'" in ctwas_rss #10

Closed yuanzhongshang closed 6 months ago

yuanzhongshang commented 10 months ago

Hi,

I am sorry to bother you.

When I run the code below following the tutorial, I got the error:

starting worker pid=3276557 on localhost:11580 at 14:30:57.803 Loading required package: ctwas loaded ctwas and set parent environment Error in { : task 1 failed - "'length = 4' in coercion to 'logical(1)'"

library(ctwas)

data(z_snp)

ld_pgenfs <- system.file("extdata/example_genotype_files", paste0("example_chr", 1:22, ".pgen"), package = "ctwas")

ld_R_dir <- system.file("extdata/example_ld_R", package = "ctwas")

weight.fusion <- system.file("extdata/example_fusion_weights", "Tissue", package = "ctwas")

regionsfile <- system.file("extdata", "example_regions.bed", package = "ctwas")

outputdir <- "~/temp"
res <- impute_expr_z(z_snp = z_snp,  weight = weight.fusion, method = "lasso",ld_pgenfs = ld_pgenfs,
                          outputdir = outputdir,
                           outname = "test_ss")     
z_gene <- res$z_gene
ld_exprfs <- res$ld_exprfs

pars <- ctwas_rss(z_gene = z_gene, z_snp = z_snp, ld_exprfs = ld_exprfs, ld_pgenfs = ld_pgenfs, ld_regions_custom = regionsfile, thin = 0.9, max_snp_region = 20, outputdir = outputdir, outname = "test_ss", ncore = 1)

I guess there may be a dimensions mismatch of "prior_variance/V".

Btw, if I used my own data, especially with regard the plink file of reference panel as inputs, there also exist some issues, such as the missing definition of the colnames of "snps" if I set harmonize_wgt=F in ctwas_read_data.R.

I have tried many times and could not solve these problems. Could you give me some suggestions?

Thank you very much.

Best regards, Zhongshang

sq-96 commented 9 months ago

Hi Zhongshan,

It might be an R version issue. Could you try to run it with R/4.1.0?

Sheng

Orion-qx commented 7 months ago

Hello,

I got the same error as Zhongshang: "Error in { : task 1 failed - "'length = 10975' in coercion to 'logical(1)'" when running _ctwasrss function.

I did some research but not sure if I have fixed it completely. I guess there might be some issues with if (!is.numeric(scaled_prior_variance) || scaled_prior_variance < 0) and if (scaled_prior_variance > 1 && standardize) in the _initsetup function in _susieinitialize.R.

Thank you, Qiaoxue

sq-96 commented 7 months ago

@Orion-qx Hi Qiaoxue,

Thanks for your input and we will look into this issue! What R version are you using to run ctwas? It might be a version issue and we suggest to try R/4.1 or 4.2. People have solved this issue before when switching to 4.1/4.2. Let me know if you have any problems.

Best, Sheng

Orion-qx commented 7 months ago

Hi Sheng,

I am using R/4.3.2. I can try a different R version. Thank you for the suggestions! I really appreciate it.

Best Regards, Qiaoxue

yuanzhongshang commented 6 months ago

Hi Sheng,

I followed your suggestion to use R 4.1.0. I no longer get the Error in { : task 1 failed - "'length = 4' in coercion to 'logical(1)'" error.

However, a new error has emerged: Error in ctwas_rss(z_gene = z_gene, z_snp = z_snp, ld_exprfs = ld_exprfs, : unused argument (ld_exprfs = ld_exprfs). I noticed that ld_exprfs is NULL and no .expr.gz files are generated by impute_expr_z.

In addition, I am unable to attach the example data z_snp in the package version '0.1.36'.

Do you know what might be causing this error?

Best, Zhongshang

sq-96 commented 6 months ago

@yuanzhongshang Hi Zhongshan,

We made a few updates to the ctwas package. z_snp has been removed and ld_exprfs has been replaced by ld_exprvarfs. You can check our latest tutorial: https://xinhe-lab.github.io/ctwas/articles/ctwas_summary_statistics.html. Let me know if there is any problems.

Best, Sheng

yuanzhongshang commented 6 months ago

Hi Sheng,

Thank you for your quick response. I still have the problem in ctwas_rss. When I run the code:

library(ctwas)
outputdir <- "/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/tmp/"
outname <- "genome"
ld_pgenfs  <- paste0("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/ld_pgenfs/chr_",1:22,".bed")
load(paste0(outputdir, "/", outname, "_z_gene.Rd"))
load(paste0(outputdir, "/", outname, "_z_snp.Rd"))
ld_exprvarfs <- paste0(outputdir, outname, "_chr", 1:22, ".exprvar")

thin <- 0.1
max_snp_region <- 20000
ncore <- 10

ctwas_rss(z_gene = z_gene,
          z_snp = z_snp,
          ld_exprvarfs = ld_exprvarfs,
          ld_pgenfs  = ld_pgenfs,
          ld_regions = "EUR",
          ld_regions_version = "b37",
          outputdir = outputdir,
          outname = outname,
          thin = thin,
          max_snp_region = max_snp_region,
          ncore = ncore,
          merge = F)
2024-02-19 12:00:51 INFO::ctwas started ...
2024-02-19 12:00:53 INFO::LD region file: /net/mulan/home/zhongshy/R-4.2/lib/R/library/ctwas/extdata/ldetect/EUR.b37.bed
the 2024-02-19 12:00:55 INFO::No. LD regions: 1703
2024-02-19 12:00:58 INFO::No. regions with at least one SNP/gene for chr1: 1
2024-02-19 12:00:58 INFO::No. regions with at least one SNP/gene for chr1 after merging: 1
2024-02-19 12:00:58 INFO::No. regions with at least one SNP/gene for chr2: 0
2024-02-19 12:00:58 INFO::No. regions with at least one SNP/gene for chr2 after merging: 0
2024-02-19 12:00:59 INFO::No. regions with at least one SNP/gene for chr3: 0
2024-02-19 12:00:59 INFO::No. regions with at least one SNP/gene for chr3 after merging: 0
2024-02-19 12:01:00 INFO::No. regions with at least one SNP/gene for chr4: 0
2024-02-19 12:01:00 INFO::No. regions with at least one SNP/gene for chr4 after merging: 0
2024-02-19 12:01:00 INFO::No. regions with at least one SNP/gene for chr5: 0
2024-02-19 12:01:00 INFO::No. regions with at least one SNP/gene for chr5 after merging: 0
2024-02-19 12:01:01 INFO::No. regions with at least one SNP/gene for chr6: 0
2024-02-19 12:01:01 INFO::No. regions with at least one SNP/gene for chr6 after merging: 0
2024-02-19 12:01:01 INFO::No. regions with at least one SNP/gene for chr7: 0
2024-02-19 12:01:01 INFO::No. regions with at least one SNP/gene for chr7 after merging: 0
2024-02-19 12:01:02 INFO::No. regions with at least one SNP/gene for chr8: 0
2024-02-19 12:01:02 INFO::No. regions with at least one SNP/gene for chr8 after merging: 0
2024-02-19 12:01:03 INFO::No. regions with at least one SNP/gene for chr9: 0
2024-02-19 12:01:03 INFO::No. regions with at least one SNP/gene for chr9 after merging: 0
2024-02-19 12:01:03 INFO::No. regions with at least one SNP/gene for chr10: 0
2024-02-19 12:01:03 INFO::No. regions with at least one SNP/gene for chr10 after merging: 0
2024-02-19 12:01:04 INFO::No. regions with at least one SNP/gene for chr11: 0
2024-02-19 12:01:04 INFO::No. regions with at least one SNP/gene for chr11 after merging: 0
2024-02-19 12:01:04 INFO::No. regions with at least one SNP/gene for chr12: 0
2024-02-19 12:01:04 INFO::No. regions with at least one SNP/gene for chr12 after merging: 0
2024-02-19 12:01:05 INFO::No. regions with at least one SNP/gene for chr13: 0
2024-02-19 12:01:05 INFO::No. regions with at least one SNP/gene for chr13 after merging: 0
2024-02-19 12:01:05 INFO::No. regions with at least one SNP/gene for chr14: 0
2024-02-19 12:01:05 INFO::No. regions with at least one SNP/gene for chr14 after merging: 0
2024-02-19 12:01:06 INFO::No. regions with at least one SNP/gene for chr15: 0
2024-02-19 12:01:06 INFO::No. regions with at least one SNP/gene for chr15 after merging: 0
2024-02-19 12:01:06 INFO::No. regions with at least one SNP/gene for chr16: 0
2024-02-19 12:01:06 INFO::No. regions with at least one SNP/gene for chr16 after merging: 0
2024-02-19 12:01:07 INFO::No. regions with at least one SNP/gene for chr17: 0
2024-02-19 12:01:07 INFO::No. regions with at least one SNP/gene for chr17 after merging: 0
2024-02-19 12:01:07 INFO::No. regions with at least one SNP/gene for chr18: 0
2024-02-19 12:01:07 INFO::No. regions with at least one SNP/gene for chr18 after merging: 0
2024-02-19 12:01:08 INFO::No. regions with at least one SNP/gene for chr19: 0
2024-02-19 12:01:08 INFO::No. regions with at least one SNP/gene for chr19 after merging: 0
2024-02-19 12:01:08 INFO::No. regions with at least one SNP/gene for chr20: 0
2024-02-19 12:01:08 INFO::No. regions with at least one SNP/gene for chr20 after merging: 0
2024-02-19 12:01:09 INFO::No. regions with at least one SNP/gene for chr21: 0
2024-02-19 12:01:09 INFO::No. regions with at least one SNP/gene for chr21 after merging: 0
2024-02-19 12:01:09 INFO::No. regions with at least one SNP/gene for chr22: 0
2024-02-19 12:01:09 INFO::No. regions with at least one SNP/gene for chr22 after merging: 0
2024-02-19 12:01:09 INFO::Trim regions with SNPs more than Inf
2024-02-19 12:01:09 INFO::Run susie iteratively, getting rough estimate ...
2024-02-19 12:01:09 INFO::run iteration 1
starting worker pid=2091348 on localhost:11402 at 12:01:10.305
starting worker pid=2091355 on localhost:11402 at 12:01:10.306
starting worker pid=2091351 on localhost:11402 at 12:01:10.312
starting worker pid=2091356 on localhost:11402 at 12:01:10.314
starting worker pid=2091350 on localhost:11402 at 12:01:10.316
starting worker pid=2091353 on localhost:11402 at 12:01:10.319
starting worker pid=2091347 on localhost:11402 at 12:01:10.321
starting worker pid=2091354 on localhost:11402 at 12:01:10.329
starting worker pid=2091352 on localhost:11402 at 12:01:10.343
starting worker pid=2091349 on localhost:11402 at 12:01:10.347
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Loading required package: ctwas
loaded ctwas and set parent environment
Error in { : task 1 failed - "object 'ld_exprfs' not found"
In addition: There were 21 warnings (use warnings() to see them)

It seems ld_exprfs still used in susieI_rss. I also provide my example data.

Thank you.

Best, Zhongshang

yuanzhongshang commented 6 months ago

@sq-96 Hi Sheng,

I wonder if you've had a chance to read my comment above. I have the plink file as the ld_pgenfs, the susieI_rss still need ld_exprfs, which you deleted in the new version. Look forward to your reply.

Thank you!

Best, Zhongshang

sq-96 commented 6 months ago

@yuanzhongshang Hi Zhongshang,

We have noticed this tissue and are working on it. Are you using the individual genotype level data to run cTWAS? To better test the code, I wonder if you could also share with us the script and example data of the impute expression part. Thanks!

Best, Sheng

yuanzhongshang commented 6 months ago

@sq-96 Hi Sheng,

Thank you for your reply. Here is my script:

library(ctwas)

setwd("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/R")
source("ctwas_impute_expr_z.R")

outputdir <- "/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/temp/"
outname <- "genome"
ld_pgenfs  <- paste0("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/ld_pgenfs/chr_",1:22,".bed")
z_snp=readRDS("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/gwas_summ.RDS")
weight="/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/weight/EA"

res <- impute_expr_z(z_snp = z_snp,
                     weight = weight,
                     ld_pgenfs  = ld_pgenfs,
             method = "bslmm",
                     outputdir = outputdir,
                     outname = outname,
                     harmonize_z = T,
                     harmonize_wgt = T,
                     strand_ambig_action_z = "none",
                     recover_strand_ambig_wgt = F)

Note that, my genotype data including the missing value, so I have to add the imputation step between line 114 and line 115 in the impute_expr_z. It would be useful to add this step or delete the missing samples in impute_expr_z. The imputation step is as following:

process_geno <- function(geno_data) {
    apply(geno_data, 2, function(x) {
    x[is.na(x)] <- mean(x, na.rm = TRUE)
    x <- scale(x - mean(x))
    return(x)
        })
}
X.g <- process_geno(X.g)

The example data used is provided here.

Best, Zhongshang

sq-96 commented 6 months ago

@yuanzhongshang Hi Zhongshang,

We have updated the package. The impute_expr_z will write .expr.gz files which contain the imputed gene expression. And it will be passed to the argument called ld_exprfs in ctwas_rss function. Try the code below.

library(ctwas)
outputdir <- "/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/tmp/"
outname <- "genome"
ld_pgenfs  <- paste0("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/ld_pgenfs/chr_",1:22,".bed")
load(paste0(outputdir, "/", outname, "_z_gene.Rd"))
load(paste0(outputdir, "/", outname, "_z_snp.Rd"))
ld_exprvarfs <- paste0(outputdir, outname, "_chr", 1:22, ".exprvar")
ld_exprfs <- paste0(outputdir, outname, "_chr", 1:22, ".expr.gz")

thin <- 0.1
max_snp_region <- 20000
ncore <- 10

ctwas_rss(z_gene = z_gene,
          z_snp = z_snp,
          ld_exprvarfs = ld_exprvarfs,
          ld_exprfs = ld_exprfs,
          ld_pgenfs  = ld_pgenfs,
          ld_regions = "EUR",
          ld_regions_version = "b37",
          outputdir = outputdir,
          outname = outname,
          thin = thin,
          max_snp_region = max_snp_region,
          ncore = ncore,
          merge = F)

We haven't decided how to handle missing values in genotype files, so you will need to add your imputation step in susieI_rss (ctwas_susieI_rss.R) in line 173. The X.s will have missing values.

I notice your test data only has two genes. You will see an error when running ctwas_rss because no gene will pass a filtering step when estimating parameters. You can play with a larger dataset or use pre-specified parameters to run the fine-mapping step directly. Let me know if you have more questions.

Best, Sheng

yuanzhongshang commented 6 months ago

@sq-96 Hi Sheng,

Thank you. I will try it. I am curious why ctwas filters out these two genes when estimating parameters. Is it due to this region having p_sigma_effect < 0.8?

Best, Zhongshang

sq-96 commented 6 months ago

Yeah, this region does not show enough evidence of having causal effects.

yuanzhongshang commented 6 months ago

@sq-96 Hi Sheng,

Thank you. I just want to confirm it that correct if I face this error using only two genes in my example data. And my code is below:

library(ctwas)

setwd("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/R")
source("ctwas_susieI_rss.R")

outputdir <- "/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/tmp/"
outname <- "genome"
ld_pgenfs  <- paste0("/net/mulan/disk2/zhongshy/project4/realdata/data/LDL/susiec/ctwas/try/ld_pgenfs/chr_",1:22,".bed")
load(paste0(outputdir, "/", outname, "_z_gene.Rd"))
load(paste0(outputdir, "/", outname, "_z_snp.Rd"))
ld_exprvarfs <- paste0(outputdir, outname, "_chr", 1:22, ".exprvar")
ld_exprfs <- paste0(outputdir, outname, "_chr", 1:22, ".expr.gz")

thin <- 0.1
max_snp_region <- 20000
ncore <- 10

ctwas_rss(z_gene = z_gene,
          z_snp = z_snp,
          ld_exprvarfs = ld_exprvarfs,
          ld_exprfs = ld_exprfs,
          ld_pgenfs  = ld_pgenfs,
          ld_regions = "EUR",
          ld_regions_version = "b37",
          outputdir = outputdir,
          outname = outname,
          thin = thin,
          max_snp_region = max_snp_region,
          ncore = ncore,
          merge = F)
2024-02-29 14:38:14 INFO::ctwas started ...
2024-02-29 14:38:14 INFO::LD region file: /net/mulan/home/zhongshy/R-4.2/lib/R/library/ctwas/extdata/ldetect/EUR.b37.bed
2024-02-29 15:27:52 INFO::ctwas started ...
2024-02-29 15:27:52 INFO::LD region file: /net/mulan/home/zhongshy/R-4.2/lib/R/library/ctwas/extdata/ldetect/EUR.b37.bed
2024-02-29 15:27:52 INFO::No. LD regions: 1703
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr1: 1
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr1 after merging: 1
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr2: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr2 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr3: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr3 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr4: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr4 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr5: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr5 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr6: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr6 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr7: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr7 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr8: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr8 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr9: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr9 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr10: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr10 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr11: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr11 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr12: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr12 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr13: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr13 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr14: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr14 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr15: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr15 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr16: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr16 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr17: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr17 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr18: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr18 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr19: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr19 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr20: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr20 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr21: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr21 after merging: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr22: 0
2024-02-29 15:27:52 INFO::No. regions with at least one SNP/gene for chr22 after merging: 0
2024-02-29 15:27:52 INFO::Trim regions with SNPs more than Inf
2024-02-29 15:27:53 INFO::Run susie iteratively, getting rough estimate ...
2024-02-29 15:27:53 INFO::run iteration 1
starting worker pid=3117581 on localhost:11419 at 15:27:53.505
starting worker pid=3117586 on localhost:11419 at 15:27:53.507
starting worker pid=3117583 on localhost:11419 at 15:27:53.507
starting worker pid=3117589 on localhost:11419 at 15:27:53.508
starting worker pid=3117585 on localhost:11419 at 15:27:53.508
starting worker pid=3117587 on localhost:11419 at 15:27:53.509
starting worker pid=3117584 on localhost:11419 at 15:27:53.510
starting worker pid=3117582 on localhost:11419 at 15:27:53.510
starting worker pid=3117590 on localhost:11419 at 15:27:53.525
starting worker pid=3117588 on localhost:11419 at 15:27:53.529
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
2024-02-29 15:27:58 INFO::After iteration 1, gene prior 0.00332381058815739:, SNP prior:0.0084901912719973
2024-02-29 15:27:58 INFO::run iteration 2
starting worker pid=3117728 on localhost:11419 at 15:27:59.128
starting worker pid=3117733 on localhost:11419 at 15:27:59.128
starting worker pid=3117730 on localhost:11419 at 15:27:59.131
starting worker pid=3117731 on localhost:11419 at 15:27:59.132
starting worker pid=3117734 on localhost:11419 at 15:27:59.132
starting worker pid=3117726 on localhost:11419 at 15:27:59.134
starting worker pid=3117732 on localhost:11419 at 15:27:59.138
starting worker pid=3117725 on localhost:11419 at 15:27:59.138
starting worker pid=3117727 on localhost:11419 at 15:27:59.143
starting worker pid=3117729 on localhost:11419 at 15:27:59.143
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
2024-02-29 15:28:04 INFO::After iteration 2, gene prior 0.00235766944956167:, SNP prior:0.0085067065051357
2024-02-29 15:28:04 INFO::run iteration 3
starting worker pid=3117870 on localhost:11419 at 15:28:04.617
starting worker pid=3117873 on localhost:11419 at 15:28:04.618
starting worker pid=3117872 on localhost:11419 at 15:28:04.621
starting worker pid=3117875 on localhost:11419 at 15:28:04.621
starting worker pid=3117874 on localhost:11419 at 15:28:04.622
starting worker pid=3117876 on localhost:11419 at 15:28:04.624
starting worker pid=3117869 on localhost:11419 at 15:28:04.625
starting worker pid=3117878 on localhost:11419 at 15:28:04.630
starting worker pid=3117877 on localhost:11419 at 15:28:04.632
starting worker pid=3117871 on localhost:11419 at 15:28:04.634
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
2024-02-29 15:28:09 INFO::After iteration 3, gene prior 0.00180327723379436:, SNP prior:0.00851618329514882
2024-02-29 15:28:10 INFO::Blocks are filtered: 0 blocks left
2024-02-29 15:28:10 INFO::Run susie iteratively, getting accurate estimate ...
2024-02-29 15:28:10 INFO::run iteration 1
starting worker pid=3118022 on localhost:11419 at 15:28:10.257
starting worker pid=3118017 on localhost:11419 at 15:28:10.257
starting worker pid=3118016 on localhost:11419 at 15:28:10.257
starting worker pid=3118020 on localhost:11419 at 15:28:10.264
starting worker pid=3118018 on localhost:11419 at 15:28:10.272
starting worker pid=3118024 on localhost:11419 at 15:28:10.272
starting worker pid=3118021 on localhost:11419 at 15:28:10.272
starting worker pid=3118015 on localhost:11419 at 15:28:10.272
starting worker pid=3118023 on localhost:11419 at 15:28:10.273
starting worker pid=3118019 on localhost:11419 at 15:28:10.275
Error in 1:nrow(df) : argument of length 0
In addition: There were 21 warnings (use warnings() to see them)

Best, Zhongshang

sq-96 commented 6 months ago

@yuanzhongshang Hi Zhongshang, that's correct. I got the same error before.

yuanzhongshang commented 6 months ago

@sq-96 Many thanks for your reply.