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

Quilt2 Impute #42

Open
PMuchina opened this issue Sep 30, 2024 · 7 comments
Open

Quilt2 Impute #42

PMuchina opened this issue Sep 30, 2024 · 7 comments

Comments

@PMuchina
Copy link

I am trying out Quilt2 and I ran into this.

[2024-09-30 11:38:12] i_gibbs=1, i_it = 1 full
Error in sample.int(x, size, replace, prob) :
cannot take a sample larger than the population when 'replace = FALSE'
Calls: QUILT ... select_new_haps_mspbwt_v3 -> unique -> sample -> sample.int
Execution halted

@Zilong-Li
Copy link
Collaborator

Thanks for reporting this.

Can you provide more information? say the command line, the reference panel and samples as well as the R environment by sessionInfo()

@PMuchina
Copy link
Author

I want to impute 30 samples

QUILT2.R
--prepared_reference_filename=QUILT_prepared_reference.Chr1.104936818.109936793.RData
--bamlist=/1x/bamlist
--method=diploid
--chr=Chr1
--regionStart=104936818
--regionEnd=109936793
--buffer=500000
--output_filename=quilt2_output/quilt2.Chr1.104936818.109936793.vcf.gz

sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Debian GNU/Linux 12 (bookworm)

Matrix products: default
BLAS/LAPACK: /usr/home/qgg/pekmu/miniconda3/envs/Impute/lib/libopenblasp-r0.3.27.so; LAPACK version 3.12.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Europe/Copenhagen
tzcode source: system (glibc)

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.3.3

@Zilong-Li
Copy link
Collaborator

Zilong-Li commented Sep 30, 2024

may I ask how many haplotypes in the referencce panel? and could you do library(QUILT) first and then show sessionInfo()

@PMuchina
Copy link
Author

274 haplotypes

[2024-09-30 13:51:38] Auto-set n_burn_in_seek_its to 2 i.e. only sample one dosage per Gibbs sample
[2024-09-30 13:51:38] Overriding default parameters for small reference panel
[2024-09-30 13:51:38] Observing number of reference haplotypes K=274
[2024-09-30 13:51:38] Reset n_seek_its from 3 to 1
[2024-09-30 13:51:38] Reset n_burn_in_seek_its from 2 to 0
[2024-09-30 13:51:38] Set Ksubset to 274 (no longer necessary)
[2024-09-30 13:51:38] Set Knew to 274 (no longer necessary)
[2024-09-30 13:51:38] Get BAM sample names
[2024-09-30 13:51:39] Done getting BAM sample names
[2024-09-30 13:51:39] There are 171352 common SNPs and 186842 SNPs overall in this region
[2024-09-30 13:51:40] There are 0 regions out of 5838 below minimum recombination rate, setting them to minimum rate
[2024-09-30 13:51:40] There are 0 regions out of 5838 above maximum recombination rate, setting them to maximum rate
[2024-09-30 13:51:40] Imputing sample: 1
[2024-09-30 13:51:41] The average depth of this sample is:0.970354809598658
[2024-09-30 13:51:41] There are 12257 reads under consideration
[2024-09-30 13:51:41] i_gibbs=1, i_it = 1 small gibbs
[2024-09-30 13:51:42] i_gibbs=1, i_it = 1 full

@PMuchina
Copy link
Author

library(QUILT)
sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Debian GNU/Linux 12 (bookworm)

Matrix products: default
BLAS/LAPACK: /usr/home/qgg/pekmu/miniconda3/envs/Impute/lib/libopenblasp-r0.3.27.so; LAPACK version 3.12.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Europe/Copenhagen
tzcode source: system (glibc)

attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] QUILT_2.0.0 data.table_1.16.0 mspbwt_0.1.0 STITCH_1.7.1

loaded via a namespace (and not attached):
[1] compiler_4.3.3 Rcpp_1.0.13

@Zilong-Li
Copy link
Collaborator

Zilong-Li commented Sep 30, 2024

Thanks. I see two issues:

  1. the number of haplotypes (274) is smaller than the default (600). Can you try explicitly setting --Ksubset=274 and --Knew=274. We'll fix this in the near future.
  2. QUILT has some issues with Rcpp==1.0.13. It's recommended to use Rcpp==1.0.12 or the bioconda.

@PMuchina
Copy link
Author

I am still facing the same error.

But I just faced this with Quilt2. Quilt 1 runs well.

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