Question: How to convert .tsv file to the VCF format using bcftools --tsv2vcf correctly?
0
gravatar for england_genomics_team
10 months ago by
england_genomics_team0 wrote:

How to convert .tsv file to the VCF format correctly? Is it possible with bcftools --tsv2vcf or should I use CrossMap or whatever you can advise?

Here is a Linux Shell code with some error (produces empty VCF):

bcftools convert -s SampleName -f H37Rv_reference.fasta --tsv2vcf TuberculosisSampleDrugResistanceReport.tsv  -o DrugResistanceReportVCF.vcf

Here is an input .tsv file (TuberculosisSampleDrugResistanceReport.tsv ):

AL123456    4246514 4249810 embB    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    1416181 1417347 embR    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    3489506 3490375 Rv3124  .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    3490476 3491651 Rv3125c .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    3491808 3492122 Rv3126  .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    408634  409173  Rv0340  AL123456    408722  408723  .   590 C   T   PASS    DP=15;TD=19;BQ=39;MQ=53;QD=39;BC=0,0,0,15;QP=0,0,0,100;PC=57;IC=0;DC=0;XC=0;AC=2;AF=1.00    GT  1/1 1
AL123456    409362  410801  iniB    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    412757  414238  iniC    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    398658  399524  rmlA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    3646895 3647809 rmlD    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    4326004 4327473 ethA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    7302    9818    gyrA    AL123456    7361    7362    .   742 G   C   PASS    DP=21;TD=23;BQ=38;MQ=59;QD=35;BC=1,20,0,0;QP=2,98,0,0;PC=43;IC=0;DC=0;XC=2;AC=2;AF=0.98 GT  1/1 1
AL123456    7302    9818    gyrA    AL123456    7584    7585    .   1042    G   C   PASS    DP=27;TD=31;BQ=39;MQ=47;QD=38;BC=0,27,0,0;QP=0,100,0,0;PC=54;IC=0;DC=0;XC=2;AC=2;AF=1.00    GT  1/1 1
AL123456    7302    9818    gyrA    AL123456    8039    8040    .   1018    G   A   PASS    DP=29;TD=38;BQ=37;MQ=52;QD=35;BC=28,0,1,0;QP=99,0,1,0;PC=49;IC=0;DC=0;XC=1;AC=2;AF=0.99 GT  1/1 1
AL123456    7302    9818    gyrA    AL123456    9303    9304    .   910 G   A   PASS    DP=23;TD=26;BQ=40;MQ=56;QD=39;BC=23,0,0,0;QP=100,0,0,0;PC=51;IC=0;DC=0;XC=1;AC=2;AF=1.00    GT  1/1 1
AL123456    5123    7267    gyrB    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    1917940 1918746 tlyA    AL123456    1917971 1917972 .   636 A   G   PASS    DP=16;TD=20;BQ=40;MQ=56;QD=39;BC=0,0,16,0;QP=0,0,100,0;PC=111;IC=0;DC=0;XC=4;AC=2;AF=1.00   GT  1/1 1
AL123456    3073680 3074471 thyA    AL123456    3073867 3073868 .   716 T   C   PASS    DP=18;TD=27;BQ=40;MQ=52;QD=39;BC=0,18,0,0;QP=0,100,0,0;PC=137;IC=0;DC=0;XC=2;AC=2;AF=1.00   GT  1/1 1
AL123456    2518115 2519365 kasA    AL123456    2518918 2518919 .   596 G   A   PASS    DP=15;TD=19;BQ=40;MQ=57;QD=39;BC=15,0,0,0;QP=100,0,0,0;PC=102;IC=0;DC=0;XC=1;AC=2;AF=1.00   GT  1/1 1
AL123456    2101651 2103042 ndh .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    2725571 2726087 oxyR    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    2726193 2726780 ahpC    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    1673440 1674183 mabA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    1674202 1675011 inhA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    408634  409173  furA    AL123456    408722  408723  .   590 C   T   PASS    DP=15;TD=19;BQ=39;MQ=53;QD=39;BC=0,0,0,15;QP=0,0,0,100;PC=57;IC=0;DC=0;XC=0;AC=2;AF=1.00    GT  1/1 1
AL123456    408634  409173  Rv0340  AL123456    408722  408723  .   590 C   T   PASS    DP=15;TD=19;BQ=39;MQ=53;QD=39;BC=0,0,0,15;QP=0,0,0,100;PC=57;IC=0;DC=0;XC=0;AC=2;AF=1.00    GT  1/1 1
AL123456    1792400 1793740 Rv1592c .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    2006636 2006947 Rv1772  .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    2516787 2517695 fabD    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    2520743 2522164 accD6   AL123456    2521341 2521342 .   755 T   C   PASS    DP=19;TD=20;BQ=40;MQ=52;QD=39;BC=0,19,0,0;QP=0,100,0,0;PC=104;IC=0;DC=0;XC=0;AC=2;AF=1.00   GT  1/1 1
AL123456    156578  157600  fbpC    AL123456    157291  157292  .   1608    C   T   PASS    DP=41;TD=47;BQ=39;MQ=49;QD=39;BC=0,0,0,41;QP=0,0,0,100;PC=59;IC=0;DC=0;XC=0;AC=2;AF=1.00    GT  1/1 1
AL123456    3505363 3506769 fadE24  .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    3153039 3154631 efpA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    4007331 4008182 nhoA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    4407528 4408202 gid AL123456    4407719 4407720 .   612 G   C   PASS    DP=16;TD=17;BQ=38;MQ=58;QD=38;BC=0,16,0,0;QP=0,100,0,0;PC=38;IC=0;DC=0;XC=1;AC=2;AF=1.00    GT  1/1 1
AL123456    4407528 4408202 gid AL123456    4408155 4408156 .   848 A   C   PASS    DP=22;TD=27;BQ=39;MQ=58;QD=38;BC=0,22,0,0;QP=0,100,0,0;PC=43;IC=0;DC=0;XC=1;AC=2;AF=1.00    GT  1/1 1
AL123456    781560  781934  rpsL    AL123456    781686  781687  .   1353    A   G   PASS    DP=34;TD=38;BQ=40;MQ=54;QD=39;BC=0,0,34,0;QP=0,0,100,0;PC=125;IC=0;DC=0;XC=0;AC=2;AF=1.00   GT  1/1 1
AL123456    2288681 2289241 pncA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    4239863 4243147 embC    AL123456    4242642 4242643 .   841 C   T   PASS    DP=25;TD=28;BQ=40;MQ=55;QD=33;BC=0,1,0,24;QP=0,4,0,96;PC=52;IC=0;DC=0;XC=1;AC=2;AF=0.96 GT  1/1 1
AL123456    4246514 4249810 embB    AL123456    4247430 4247431 .   1329    G   C   PASS    DP=35;TD=47;BQ=38;MQ=57;QD=37;BC=0,35,0,0;QP=0,100,0,0;PC=63;IC=0;DC=0;XC=0;AC=2;AF=1.00    GT  1/1 1
AL123456    4243233 4246517 embA    .   -1  -1  .   .   .   .   .   .   .   .   0
AL123456    759807  763325  rpoB    AL123456    761154  761155  .   712 C   T   PASS    DP=18;TD=23;BQ=40;MQ=59;QD=39;BC=0,0,0,18;QP=0,0,0,100;PC=110;IC=0;DC=0;XC=1;AC=2;AF=1.00   GT  1/1 1
AL123456    2153889 2156111 katG    AL123456    2155167 2155168 .   550 C   G   PASS    DP=14;TD=21;BQ=39;MQ=60;QD=39;BC=0,0,14,0;QP=0,0,100,0;PC=107;IC=0;DC=0;XC=1;AC=2;AF=1.00   GT  1/1 1
conversion tsv2vcf • 650 views
ADD COMMENTlink modified 10 months ago by RamRS20k • written 10 months ago by england_genomics_team0
2

It's like creating a cow from a steak. This 'tsv' file was most certainly a VCF file. How about getting this original VCF file ?

ADD REPLYlink modified 10 months ago • written 10 months ago by Pierre Lindenbaum116k

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time. Formatting bar

ADD REPLYlink written 10 months ago by RamRS20k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1779 users visited in the last hour