Entering edit mode
20 months ago
Christian
▴
40
Dear all,
I am trying to convert a TSV output of some tools to a valid VCF. This is what a sample of the file looks like:
mutID Chr Position Ref Alt nANNO N_eps N_PSI tAD
474 chr2 50282084 GT G mappable 0.293935566 0 11
551 chr2 128180742 A C mappable 0.293935566 0 141
2406 chr12 49426729 AGCTGCT A mappable 0.174180946 0 24
Bcftools convert has utilities for tsv2vcf conversion (here), but "insertions and deletions are not supported yet". Clearly, I should either discard or preferably break multi-allelic sites first. The preferred way to do this, bcftools norm -m-both
only accepts VCF files as input.
I was not able to find any other utilities or code snippets that can address this problem. As always, I would appreciate any insight.
Best
Christian
it's not clear whether you want to remove multi-allelic sites first from your TSV file or something else.
Apologies. In short, I want to convert a TSV file with multi-allelic sites to VCF.
If possible, I would prefer to split multi-allelic sites in the TSV (as bcftools norm would do for VCF) instead of removing them. If that's not possible, I would want to remove multi-allelic sites first from my TSV file, yes.
I have created a tutorial about converting tsv to vcf a few months earlier that might be used as a guide. Converting TSV file to VCF You can do other manipulations after converting to vcf file with bcftools.