Questions tagged [bcftools]

BCFtools - Reading/writing BCF2/VCF/gVCF files and calling/filtering/summarising SNP and short indel sequence variants

BCFtools - Reading/writing BCF2/VCF/gVCF files and calling/filtering/summarising SNP and short indel sequence variants

Part of programs suite .

Links:

44 questions
5
votes
4 answers

How do I remove duplicated SNPs using PLink?

I am working with PLINK to analyse genome-wide data. Does anyone know how to remove duplicated SNPs?
user1236418
  • 163
  • 2
  • 2
  • 9
2
votes
1 answer

Cannot sort VCF with bcftools due to invalid input

I am trying to compress & index a VCF file and am facing several issues. When I use bgzip/tabix, it throws an error saying it cannot be indexed due to some unsorted values. # code used to bgzip and tabix bgzip -c fn.vcf > fn.vcf.gz tabix -p vcf…
srd
  • 21
  • 2
2
votes
2 answers

How to continue a while loop in bash if certain message printed by program?

I'm running a bash script using some software which follows the basic pattern below. while read sample; do software ${sample} > output.txt done
2
votes
1 answer

Running a loop over multiple file types using bcftools and awk to subdivide files

Dear stack overflow community, I have 100 .VCF files (a type of txt file). In the "ID" column there are different structural variant calls: MantaINS MantaINV MantaDEL MantaBND MantaDUP Canvas:REF Canvas:GAIN Canvas:LOSS (alongside a number e.g.…
tacrolimus
  • 500
  • 2
  • 12
2
votes
1 answer

Makefile - samtools installation failed

I'm trying to install samtools on openSUSE, I did this: cd htslib-1.2.1 ./configure make install Worked fine. bcftools-1.2 ./configure make install Worked fine. And for samtools: cd samtools-1.2 make install Produces this output: …
1
vote
1 answer

Bcftools 1.16 able to add F_MISSING tag?

List item I tried adding the F_MISSING tag using bcftools 1.16. When I run this command: bcftools +fill-tags input.vcf.gz -- -t 'F_MISSING' | bcftools view -i 'INFO/F_MISSING<0.25' -Oz -o output.vcf.gz I get the following error: Error parsing…
ra23mik
  • 11
  • 2
1
vote
1 answer

Better splitting of mutliallelic sites then bcftools norm --m-any

I am trying to split the multiallelic sites of my VCF. I used bcftools norm --m-any. However, the result is not really reasonable to me. Here's an example. Let's say, I have this multiallelic site: REF ALT GT1 GT2 GT3 A C,G …
gernophil
  • 177
  • 2
  • 6
1
vote
1 answer

Replace 2nd and 3rd occurrence of a character with another character, for each line, Bash

I am trying to reformat the reference legend files to make them compatible with bcftools. Essentially, I need to go from this: id position a0 a1 TYPE AFR AMR EAS EUR SAS ALL 1:123:A:T 123 A T SNP 0.01 0.01 0 0 0 0.01 1:679:A:T 123 A T SNP 0.01 0.01…
FranjoIM
  • 93
  • 11
1
vote
1 answer

Dependencies plot-vcfstats in conda environment

I have a conda environment where I have packages including bcftools installed. I am using bcftools stats to generate some stats on my VCF files. Then, I want to plot the generated stats using plot-vcfstats, also from bcftools. However, this command…
Egelbets
  • 175
  • 2
  • 11
1
vote
1 answer

match 1,2,5 columns of file1 with 1,2,3 columns of file2 respectively and output should have matched rows from file 2. second file is zipped file .gz

file1 3 1234581 A C rs123456 file2 zipped file .gz 1 1256781 rs987656 T C 3 1234581 rs123456 A C 22 1792471 rs928376 G T output 3 1234581 rs123456 A C I tried zcat file2.gz | awk 'NR==FNR{a[$1,$2,$5]++;next}…
rij
  • 159
  • 7
1
vote
2 answers

Bash script using gzip and bcftools running out of memory with large files

This bash script is meant to be part of a pipeline that processes zipped .vcf file that contain genomes from multiple patients (which means the files are huge even when zipped, like 3-5GB). My problem is that I keep running out of memory when…
NHellmann
  • 25
  • 6
1
vote
1 answer

What would be the reason that I can't make the ElementIDs of these objects in Revit match ones in a Revit file?

I am creating a plugin that makes use of the code available from BCFier to select elements from an external server version of the file and highlight them in a Revit view, except the elements are clearly not found in Revit as all elements appear and…
Tom Paganuzzi
  • 45
  • 1
  • 4
1
vote
1 answer

Combine multiple VCF files into one large VCF file

I have a list of VCF files from specific ethnicity such as American Indian, Chinese, European, etc Under each ethnicity, I have around 100+ files. Currently, I computed the VARIANT QC metrics such as call_rate, n_het etc for one file as shown…
The Great
  • 7,215
  • 7
  • 40
  • 128
1
vote
0 answers

Using SnpSift, only 0.52% of VCF is annotated by dbsnp database

I generated a coordinate sorted vcf file from a cram using the following commands: samtools sort -@ 10 -o /output/sorted.cram samtools index -@ 10 /output/sorted.cram bcftools mpileup -f reference.fa -r chrz:zzzz-zzzzx -a INFO/AD,FORMAT/DP --threads…
1
vote
1 answer

How to use plugin commands in bcftools?

My goal is to use bcftools to check that the reference alleles in my dataset (vcf file) match with a reference genome (fasta file) using the fixref plugin. Working on command line, I first set the following environment: export…
Bot75
  • 179
  • 8
1
2 3