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
1
vote
1 answer

Using a for loop with bcftools

I have a folder with 900 files named like this: chr1_643632542_63643636.vcf.gz chr1_23634521_626356.vcf.gz chr2_363643262346_234324.vcf.gz chr2_1345_21346.vcf.gz .... chr22_134545_3245145.vcf.gz I was trying to index each file with the loop: for…
tacrolimus
  • 500
  • 2
  • 12
1
vote
2 answers

Is it possible to partially unzip a .vcf file?

I have a ~300 GB zipped vcf file (.vcf.gz) which contains the genomes of about 700 dogs. I am only interested in a few of these dogs and I do not have enough space to unzip the whole file at this time, although I am in the process of getting a…
Sean
  • 145
  • 2
  • 12
1
vote
1 answer

vcf files modification before converting to BCF

I am adding new vcf files to a previously made bcf file in which the ID field in the VCF had been set to CHR:POS:POS:REF:ALT ? How do I set the ID field in the VCF to CHR:POS:POS:REF:ALT ?
1
vote
1 answer

Best way to run same rule twice with different params

I'm using bcftools consensus to extract haplotypes from a vcf file. Given the input files: A.sorted.bam B.sorted.bam The following output files are created: A.hap1.fna A.hap2.fna B.hap1.fna B.hap2.fna I currently have two rules to do this. They…
1
vote
2 answers

Escape backslash with sed command when the next character is "t"

I'm using this sed command to replace the string "##INFO=
TheBral
  • 59
  • 1
  • 1
  • 7
1
vote
1 answer

A command line that works in a prompt and not in a script

Here is the exact command bcftools norm -f /path/hg19/ucsc.hg19.fasta -c s ./user1.vcf -o ../fixed/user2.vcf When I run it in the shell directly it works fine. When i put it into a bash script it fails The error message comes from bcftools…
0
votes
0 answers

How to sort entries with the same ID based off their allele frequency (AF) in a vcf file

I have a vcf file whose multiallelic variants are expressed as multiple biallelic records. I am trying to convert the file into a plink bed file, and thus each entry in the vcf must have a unique ID. Here is an example : [-----.-----@hydra1 data]$…
pooch
  • 1
  • 1
0
votes
0 answers

Extracting ITS Region from Paired-end FASTQ Data Using a Reference Genome: Guidance Needed

I have 20 isolates labeled as A_1 to A_50. For each isolate, I have paired-end FASTQ files. I also have a reference genome file available. I would like to extract the sequences of ITS (Internal Transcribed Spacer) region from each isolate using the…
kolom
  • 1
0
votes
2 answers

how to modify individual codes in a vcf file

I have genotypes of over 20k individuals in a vcf file got after imputation. I'll give you an example of the aspect of this vcf file, with only 7 samples: #CHROM POS ID REF ALT QUAL FILTER FORMAT INFO …
Khaleesi95
  • 89
  • 5
0
votes
1 answer

Globbing a filename and then saving to a variable

I've got some files in a directory with a standard format, I'm looking to use a txt file with part of the filenames to extend them through * then finally add on a .gz tag as an output For example, a file called 1.SNV.111-T.vcf in my directory, I…
Liam
  • 3
  • 2
0
votes
0 answers

Filtering and sorting of multiallelic sites

since splitting of multiallelic sites the way bcftools does it, doesn't really work for me, I am looking for a good way to sort and/or filter multiallelic sites by allele frequency. bcftools view --min-af 0.05:alt1 will filter all variants of…
gernophil
  • 177
  • 2
  • 6
0
votes
1 answer

bcftools mpileup failed, format error of index

I'm trying to generate bcf files with bcftools with the following general code bcftools mpileup -Ou -f ref.fai file.bam Index was built with samtools faidx index.fna Sorted and markduped bam was by samtools sort file.bam -o…
Mauro
  • 47
  • 6
0
votes
1 answer

Extract variant positions from VCF dependent on contents of other columns

I have a vcf file, I am trying to extract the information from these columns: #CHROM POS REF ALT However I would like to extract these only if the SAMPLE-1 column contains the string DeNovo (Not DeNovoSV) and that SAMPLE-1, SAMPLE-2, and…
hdjc90
  • 77
  • 6
0
votes
1 answer

how can I transform a view from three.js camera and scene to a bcf cameraview

I'm trying to create a bcf file out of the ifc.js viewer. The ifc.js viewer is using a three.js webglrenderer with a camera and scene. Here is an…
Sebastian
  • 315
  • 1
  • 10
0
votes
1 answer

creating a per sample table from a vcf using bcftools

I have a multi-sample vcf file and I want to get a table of IDs on the left column with the variants in which they have an alternate allele in. It should look like this: ID1 chr2:87432:A:T_0/1 chr10:43234:C:G_1/1 ID2 chr2:87432_A:T_1/1 ID3…
tacrolimus
  • 500
  • 2
  • 12