TSV with multi-allelic sites to VCF
0
1
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

bcftools • 793 views
ADD COMMENT
0
Entering edit mode

it's not clear whether you want to remove multi-allelic sites first from your TSV file or something else.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2117 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6