Questions tagged [bcftools]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Combine all alternate alleles

I have a vcf with multi-allelic SNPs, e.g. REF: A and ALT: G, C. I would like to combine all reference alleles to the most ...
0
votes
1answer
30 views

Convert VCF file to mpileup.txt

I am working on an iterative analysis that uses orthologous pipelines that require mpileup.txt files as input for a visualization step. This requires me to convert VCF files to mpileup.txt. This ...
1
vote
2answers
66 views

How do I call variants using BCFTools without piping mpileup file?

I need to call variants on a large number of reads using both VarScan2 and BCFTools. Both of these variant calling tools use <...
0
votes
1answer
35 views

Snakemake rule issue with bcftools view filtering

I am creating a bioinformatics pipeline using Snakemake doing everying from adapter trimming of raw sequencing data in .fq to mapping, SNP calling and SNP filtering. The issue i am having is when i ...
2
votes
0answers
110 views

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
104 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
54 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
267 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
398 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
65 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
47 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
352 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
266 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
39 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
358 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
3k 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
296 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: ...