可以使用工具 bcftools 中的 view 命令结合选项 -r 和 -s 来挑选特定的 SNP 位点。 选择感兴趣的样本,使用 -s 选项,比如选取样本 A、B、C: bcftools view -s A,B,C input.vcf.gz -o output.vcf.gz 选择特定的区域,使用 -r 选项,比如选择染色体 1 上的某一区域: bcftools view -r 1:100000-20000...
I am using bcftools view -R regions.bed input.vcf.gz to extract only those variants present in regions.bed. However, I get only those variants not present in regions.bed, so exactly the opposite. I really don't know what is going on... Any help? Thanks! Anna I noticed something simi...
bcftools view -r chr20,chr21,chr22 NA12878.vcf.gz -o NA12878.vcf.chr20_22.gz -O z 解释: 提取金标准变异NA12878.vcf.gz中20、21和22染色体的变异,保存到NA12878.vcf.chr20_22.gz文件中 -O z:表示使用压缩形式保存文件 提取之后的文件作为其它软件输入时经常需要索引,可按如下建立索引: bcftools ...
bcftools view -R id.list snp.vcf.gz >snp.pos.vcf #提取子集 4. 最后就会得到想要(基因)位置的snp/indel信息
bgzip -d view.vcf.gz # 构建索引 bcftools index view.vcf.gz 可能会遇到老版本samtools转化的bcf1文件没法适配(mpileup是samtools的一个命令,用来生存bcf1文件),可用老版本vcftools转化为vcf文件后再用新版本bcftools 操作。 (1)工具列表 (2)公共参数 ...
-r STR only output reads in read group STR [null] -s FLOAT fraction of templates to subsample; integer part as seed [-1] -? longer help 例子: 将sam文件转换成bam文件 $ samtools view -bS abc.sam > abc.bam $ samtools view -b -S abc.sam -o abc.bam ...
bcftools也可以进行SNP calling。...在之前的版本中,通常都是和samtools的mpileup命令结合使用, 命令如下 samtools mpileup -uf ref.fa aln.bam | bcftools view -bvcg -...> var.raw.bcf 由于samtools和bcftools更新得都很快,只要有一个版本不对,采用上面的pipeline就会报错。...为了减少版本不合适带来的问题,...
bcftools --write-index creates sometimes indexes older than the data file. # Create BCF files from VCF files and create index on the fly. for i in $(seq 1 200); do sample=$(printf '%03d' "$i"); echo ${sample}; bcftools view --threads 2 -...
/* vcfview.c -- VCF/BCF conversion, view, subset and filter VCF/BCF files.Copyright (C) 2013-2018 Genome Research Ltd.Author: Shane McCarthy <sm15@sanger.ac.uk> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
bcftools view --region chr1,chr5,chr8 input.vcf.gz bcftools query -f "%CHROM\t%POS\n" 提取指定区域 zcat input.vcf.zg |awk '/^[^#]/{print $1"\t"$2}' > file.pos bcftools view -R file.pos -Oz -o output.vcf.gz input.vcf.gz ...