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

Indexing file error using tabix #1452

Closed
sekhwal opened this issue Mar 25, 2021 · 3 comments
Closed

Indexing file error using tabix #1452

sekhwal opened this issue Mar 25, 2021 · 3 comments
Labels

Comments

@sekhwal
Copy link

sekhwal commented Mar 25, 2021

Hi,
I am trying to make a index of the vcf file using tabix. It shows following error. However, if I index file using "bcftools index", it make index file in .csi. Please help me to figure out the issue since I need to create index file using tabix (.tbi) to run a package.

I am using following command.
bgzip file.vcf
tabix -p vcf file.vcf.gz

error:
[E::hts_idx_check_range] Region 537270101..537270102 cannot be stored in a tbi index. Try using a csi index with min_shift = 14, n_lvls >= 6
tbx_index_build failed: /bcftools-merged-all/index-merged/D.vcf2.gz

bcftools index file.vcf ##It generate the index file in .csi

@valeriuo
Copy link
Contributor

The issue is TBI indices have an upper limit on the chromosome coordinates (229-1), and your region is beyond that. CSI indices have extended this to 231-1. BCFtools can also generate a TBI index by using the -t option, i.e. bcftools index -t file.vcf.gz, but you will likely get the same error.
The question is: what package are you trying to run that strictly requires a TBI index and cannot handle CSI?

@sekhwal
Copy link
Author

sekhwal commented Mar 25, 2021

I am trying to use the following package. And the program won’t run without both a .vcf.gz and a .tbi. Could you please suggest if I can break the vcf file in several files using bcftools, each containing ~10-15 scaffolds? And then try creating the .vcf.gz and .tbi files for each group of scaffolds. Could you suggest any command for that.

https://cran.r-project.org/web/packages/PopGenome/vignettes/Whole_genome_analyses_using_VCF_files.pdf

@pd3
Copy link
Member

pd3 commented May 24, 2021

I've marked this as something that cannot be fixed on our end, large chromosomes must be indexed with csi.

@pd3 pd3 closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants