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

Consensus of ALTs only without genotypes in file #2315

Open
schorlton-bugseq opened this issue Nov 9, 2024 · 2 comments
Open

Consensus of ALTs only without genotypes in file #2315

schorlton-bugseq opened this issue Nov 9, 2024 · 2 comments

Comments

@schorlton-bugseq
Copy link

I have a VCF without genotypes or FORMAT column. The ALT field can have multiple alleles. Example:

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
test	1478	.	C	T,A	3232	PASS	DP=36715;AF=0.120142;SB=132;DP4=103,159,2782,1629

Is it possible to apply all ALT alleles but not the REF allele to a consensus with IUPAC? I tried bcftools consensus -f ref.fna --iupac-codes test.vcf.gz but I'm getting an H at this position instead of W. I also tried --haplotype but it did not appear to impact behaviour as missing the sample info.

Thanks!

@pd3
Copy link
Member

pd3 commented Nov 16, 2024

Currently not. An easy workaround would be to add the FORMAT/GT column referring to the alternate alleles and run with -H I. I'll mark it as enhancement

@schorlton-bugseq
Copy link
Author

Awesome. Thank you 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants