Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does bedtools operate VCF files

Shulou Source: shulou.com Published: 2022-06-01 04:52:29 10月02日 Update

This article mainly explains "how to operate VCF files with bedtools". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to operate VCF files by bedtools".

A mpileup function

Usage: bcftools mpileup [OPTIONS]-f ref.fa in.bam [in2.bam […]]

Example: bcftools mpileup-C 50-m 2-F 0.002-d 1000-Q 20-Q 20-a DP,DP4,ADR-f hg19.fa A.bam B.bam

Parameter description:

-f: specify the reference genome, followed by the bam file for mutation detection, which can be written directly when there is less bam.

Bcftools mpileup-f hg19.fa A.bam B.bam

-b: followed by a bamlist file

Bcftools mpileup-f hg19.fa-b bamList

-C-- the MQ value corrected by adjust-MQ INT is recommended to be 50

-Q,-min-MQ INT (MQ quality value) # filter MQ quality value

-Q,-- min-BQ INT (base quality value) # filter base quality value

-r,-- regions only call specific chromosomes, or dots, regions

The form is CHR | CHR:POS | CHR:FROM-TO | CHR:FROM- [, …]

Example: bcftools mpileup-r chr1-f hg19.fa A.bam | bcftools call-c-v > A.chr1.vcfbcftools mpileup-r chr1:111111-122222-f hg19.fa A.bam B.bam | bcftools call-c-v > A.chr1_111111-122222.vcf

-R,-- regions-file FILE when there is more than one region, save the region to the file, using the-R parameter. File format: three columns divided by tab, chr start end.

-a,-- annotate LIST adds some information such as DP,DP4,AD to the INFO/FORMAT column, and the group call may need

Comma-separated list of FORMAT and INFO tags to output.

Two bcftools call function

Usage: bcftools call [OPTIONS] FILE

Example: bcftools mpileup-f hg19.fa A.bam B.bam | bcftools call-c-v-r chr1:111111-122222-s A-V indels

The example shows:

Only A sample is detected, and only the SNP information of chr1:111111-122222 area is output, which is saved to test2.vcf file.

Parameter description:

-c-m is two ways of call. The old version uses-c, but now it uses-m by default, which can solve most tasks.

-V,-- skip-variants snps | indels skips SNP or INDEL sites

-v,-- variants-only outputs only the mutation site

-s,-- samples LIST only detects the sample ID given here (general parameter)

-S,-- samples-file FILE detects only the samples listed in this file (common parameters)

-r-R is a general parameter, which is consistent with the above usage

Triple bcftools filter function

Usage: bcftools filter [OPTIONS] FILE

Example: bcftools filter ALL.vcf TYPE= "snp"-e'DP < 20 | | MQ < 20 | |% QUAL

Tags: File parameter sample quality example function detection method usage information site interest content region variation follow gene multiple depth population Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Huawei vpn MariaDB Apple