Questions tagged [bcftools]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

How can I filter variants in a VCF file based on size?

I have a filtered VCF file with indels (no SNPs). Does anyone know of a easy way to use bcftools/vcftools to filter out small or large indels (I'm interested in indels between 50-100bp in size)? ...
bioinformaticsuser9074's user avatar
2 votes
1 answer
34 views

How should multi allelic sites be handled in calculation per site Fst?

I'd like to calculate per site Fst(fixation index) to investigate genomic differentiation between two populations(haploid). I did SNP calling and got vcf file. In the vcf file, multi allelic sites ...
uri's user avatar
  • 21
3 votes
1 answer
34 views

How to extract all variant alleles that do not match "./." from the GT column of a vcf file?

For the two vcf files linked below, I cannot find any variants in the GT column other than "./.". Is it possible to confirm if the GT column of vcf files have been annotated (i.e variants ...
CoderQ's user avatar
  • 33
4 votes
1 answer
80 views

Can not launch bcftools using python's subprocess module, as it only accepts first command of commands list

I am trying to remove samples from a chromosome vcf file. I wrote a function that takes chromosome number and a list of samples to remove. When I try to run bcftools using subprocess module it only ...
YKY's user avatar
  • 171
2 votes
0 answers
32 views

bcftool merge of 5K samples makes ID a large string

I am using bcftools to merge 5000+ vcf files using this command bcftools merge -l list_of_vcfs.txt I am getting the following error ...
bioinfo_comp's user avatar
3 votes
3 answers
344 views

How can I retrieve the GRCh38 coordinates of a list of rsids?

I have a list of about 100,000 rsids and I want to get their genomic coordinates on the GRCh38 genome build. Is there a command line tool that allows me to do this? If yes, which one? I have tried ...
Cristian Riccio's user avatar
3 votes
3 answers
2k views

Strategy for merging many VCFs

Can anyone suggest a strategy for speeding up VCF merging? I have ~44,000 single-sample VCFs that I am trying to merge into a multi-sample VCF with bcftools merge, ...
Michael Hall's user avatar
3 votes
2 answers
285 views

Non-ACGTN alternate alleles in VCF

I was trying to left normalize my vcf file using following command: bcftools norm -f reference.fasta -m -any input.vcf > output.norm.vcf However this gives the ...
Macintosh's user avatar
  • 160
1 vote
1 answer
193 views

Bcftools 1.16 able to add F_MISSING tag?

I tried adding the F_MISSING tag using bcftools 1.16. When I run this command: ...
ra23mik's user avatar
  • 11
1 vote
2 answers
471 views

Large amount of REF prefix differences after lifting

I lifted some unmerged trio files from hg19 to hg38 using liftOverPlink. It looks like that several houndred allels on each chromosome of one file shifted/switched to non-standard alleles. I recorded ...
mugdi's user avatar
  • 145
3 votes
1 answer
483 views

Filter with bcftools

I want to filter a SNP, specifically CHROM1:POS:630128. I tried to use bcftools for this. I came up with the following variant ...
mugdi's user avatar
  • 145
2 votes
1 answer
100 views

Can I discard missing alleles?

I am converting a biallelic VCF into a SQL table and one of my tables will be something like: ...
glycoaddict's user avatar
2 votes
0 answers
145 views

BAF and LRR calculation and usage

I'm working with a vcf file, in particular I'm trying to identify a gene duplication in a sequenced genome. I studied bcftools cnv command, but for this tool is needed a vcf file containing a BAF and ...
Manu_sab's user avatar
2 votes
1 answer
827 views

Compare VCF files

I have two strains, X and Y, and I would like to compare the variants found in both. I have my own parent strain, Z, that was sequenced and assembled to be used as the reference genome. I first ...
rimo's user avatar
  • 963
4 votes
0 answers
146 views

Error occurrence after merging files with bcftools: wrong number of fields?

This question was also asked on Biostars I have multiple vcf of CASES and CONTROLS variations annotated by VEP, SNPEff and SnpSift. First pair vcf -> only variations| CASES and CONTROLS Second ...
L.Diago's user avatar
  • 141
1 vote
1 answer
475 views

bcftools mpileup "Failed to open the file" questions

When I trying to use bcftools mpileup to convert bam to vcf files, I try to use: ...
Scott XU's user avatar
  • 135
1 vote
1 answer
1k views

Filtering a vcf with a text file of SNP rsIDs

I have a vcf file containing an ID field with a snps and a list of human SNPs from dbSNP.I want to remove whatever in dbSNP from vcf file. The text file is like this: ...
Zizogolu's user avatar
  • 2,148
0 votes
0 answers
75 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 ...
R S's user avatar
  • 101
0 votes
1 answer
192 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 ...
Andrew Judell's user avatar
1 vote
2 answers
611 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 <...
PPrasai's user avatar
  • 133
0 votes
1 answer
89 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 ...
RAHenriksen's user avatar
2 votes
0 answers
584 views

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

This question was also asked on Biostars Consider this minimal VCF file which contains a multi-allelic call made by a somatic variant caller on a human tumor sample: ...
terdon's user avatar
  • 10.1k
1 vote
3 answers
904 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 ...
John's user avatar
  • 115
0 votes
0 answers
2k 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 ...
shbrainard's user avatar
2 votes
1 answer
2k 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 ...
teaelleceecee's user avatar
1 vote
0 answers
328 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 ...
SmallChess's user avatar
  • 2,699
2 votes
0 answers
339 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 ...
Alex Cull's user avatar
1 vote
0 answers
801 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 ...
Jonathan's user avatar
  • 341
1 vote
2 answers
808 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, ...
user3329732's user avatar
1 vote
1 answer
82 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.
hiddenhospitalresearch's user avatar
2 votes
2 answers
735 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 ...
719016's user avatar
  • 2,324
5 votes
3 answers
5k 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 ...
Ahmed Abdullah's user avatar
5 votes
3 answers
730 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: ...
Joanne's user avatar
  • 305