VCF to BCF conversion with bcftools?
1
0
Entering edit mode
4.8 years ago
curious ▴ 820

Quite a few google searches are giving me this type of command to convert VCF to BCF:

bcftools view -bS -D chr_list.txt My_mapped_reads.raw.vcf > My_mapped_reads.raw.bcf

gives view: invalid option -- 'b'

From looking at the current documentation I tried:

bcftools view My_mapped_reads.raw.vcf -Oz > My_mapped_reads.raw.bcf

Is it really as simple as the second command now or am I missing something?

bcftools • 6.3k views
ADD COMMENT
0
Entering edit mode

please, review and validate your previous question. e.g: I took the time to answer bcftools selest sites with FILTER "PASS" or "." . If it's correct, you should validate to close it . Green mark on the left.

ADD REPLY
0
Entering edit mode

Sorry, I actually didn't know that was the proper workflow, closing out now!

ADD REPLY
5
Entering edit mode
4.8 years ago

Is it really as simple as the second command now or am I missing something?

no the second command is wrong. Look at the help.

About:   VCF/BCF conversion, view, subset and filter VCF/BCF files.
Usage:   bcftools view [options] <in.vcf.gz> [region1 [...]]
Output options:

    -o,   --output-file <file>          output file name [stdout]
    -O,   --output-type <b|u|z|v>       b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]

.

bcftools view  -O b  -o My_mapped_reads.raw.bcf My_mapped_reads.raw.vcf
ADD COMMENT
0
Entering edit mode

Really sorry that was actually a typo on my post, I did:

bcftools view {input_vcf} -Ob > {output_bcf}

ADD REPLY

Login before adding your answer.

Traffic: 1838 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