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

Contig not in reference FASTA or position out of range (generate_str) #28

Closed
mbhall88 opened this issue May 10, 2024 · 2 comments
Closed

Comments

@mbhall88
Copy link

I have hit this error

ERROR("Contig '%s' not in reference FASTA or position out of range (generate_str)", ctg.data());

Specifically, I get

[ERROR vcfdist 12:14:06] Contig 'plasmid_2' not in reference FASTA or position out of range (generate_str)

plasmid_2 is definitely in the reference FASTA, so my only assumption is there some out of range/indexing problem.

Here is a tarball with the files used. They were run with v2.5.2 with the command

vcfdist BPH2947__202310.10x.bcftools.filter.vcf.gz truth.vcf.gz mutreference.fna --largest-variant 50 --credit-threshold 1.0 --realign-truth --realign-query -p BPH2947__202310.without_repetitive_regions. -b BPH2947__202310.unique_regions.bed -mx 234.985

test_data.tar.gz

@TimD1 TimD1 closed this as completed in 7ba7ed4 Jun 10, 2024
@TimD1
Copy link
Owner

TimD1 commented Jun 10, 2024

Thanks for raising an issue and providing test data!

Sorry for the month delay it took me to get around to this. In the meantime, I finished my PhD requirements, got engaged, and started a new job :)

The error was caused by a variant at position 17 on plasmid_2. When clustering variants, vcfdist tried searching for nearby dependent variants and went off the end of the contig. A simple boundary check fixed it. I hadn't run into this yet since I'm working with human genomes (which don't report variants near chromosome ends due to the telomeres).

@mbhall88
Copy link
Author

Oh wow triple congratulations! That's wonderful news. And absolutely no need to apologise.

Oh cool, glad it was a good bug to find. And thanks for the quick fix. I will test it out in the next week or two.

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