Questions tagged [bcftools]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
0answers
77 views
+100

What is the correct way of setting the genotype after splitting multi-allelic sites in a VCF file?

Consider this minimal VCF file which contains a multi-allelic call made by a somatic variant caller on a human tumor sample: ...
1
vote
3answers
46 views

Masking sites in a vcf file

I need to mask all sites in a vcf file flagged by the 1000 Genomes Project as being unfit for population genetic analyses. The sites for all chromosomes are available at: 1000Genomes masked sites From ...
0
votes
0answers
46 views

bcftools mpileup double counting for overlapping reads

I have a dataset of paired-end reads, which can overlap. So when i run bcftools mpileup this overlap gives a double count in the depths so we see DP = 2 even though it should be DP = 1. The question ...
0
votes
0answers
31 views

FMT/DP of missing genotypes in bcftools

I have a VCF file where the FMT/DP of missing genotypes has been recorded itself as missing data (".") When I filter ...
0
votes
0answers
99 views

Filtering samples by FORMAT attributes using bcftools

The -e and -i options of the bcftools filter command appear, by default, to only allow for ...
2
votes
1answer
155 views

How to generate a consensus sequence from a multi-reference BAM file?

I am trying to generate a consensus sequence from a BAM file that was generated by mapping reads to a reference FASTA containing multiple sequences. Usually, I generate consensus sequences from BAM ...
1
vote
0answers
57 views

How to filter allele frequency VEP with bcftools?

I have a VEP annotated VCF file, and I wish to use bcftools to filter it. bcftools work very well on standard VCF fields, but I'm not able to make it work on VEP fields. For example, the following ...
2
votes
0answers
41 views

Subsetting SNPs with specific exclusion criteria using bcftools

I am trying to subset SNPs from 32 cultivars. I have the following exclusion criteria: >20% missing data SNPs present in less than 50% of genotypes Each genotype must have at least 50% of included ...
1
vote
0answers
301 views

Create a genotype matrix from VCF file using bcftools

I have a vcf file that contains SNPs from chromosome 2 for 2000 samples. I want to create a genotype matrix from this vcf file. The file is in zipped format as well so that I can use ...
0
votes
2answers
195 views

Generate VCF from different .bam files with different chromosome names

I have two resources of .bam files. One is generated by our lab (1 sample = 1 bam). One is downloaded online (again 1 sample = 1 bam). For the downloaded samples the chromosomes are labelled: chr1, ...
1
vote
1answer
36 views

How to do the reverse of bcf merge?

How can one do the reverse of bcftools merge? To get one sample back out of the merged one. Without holding reference sites.
2
votes
2answers
299 views

extracting last few lines of a growing bgzip compressed .vcf.gz file

I am running bcftools merge to create a single .vcf.gz file out of a collection of chromosomal ...
5
votes
3answers
2k views

How to get fasta alignment file from SAM/BAM file?

I am not talking about consensus sequence, I know how to get consensus sequence using mpileup in samtools/bcftools. As I understand , SAM/BAM files are basically sequence alignment format so it's ...
5
votes
3answers
270 views

bcftools filtering all files in a directory

Probably a silly oversight on my part, but I'm trying to filter all the vcfs in a directory with bcftools using a simple loop. My basic command is working fine: ...