Question: Bedtools intersect vcf and bed files
0
gravatar for User000
7 months ago by
User000390
User000390 wrote:

Hello,

I am trying to intersect my vcf files with a bed file using bedtools. I divided my genome by chromosomes prior variant calling.

bedtools intersect -a input.vcf -b input.bed -header -wa output.vcf
bcftools annotate -a input.bed -c CHROM,FROM,TO,GENE -h <(echo '##INFO=<ID=GENE,Number=1,Type=String,Description="Gene name">') output.vcf > output.outvcf

I get the following error:

[E::sam_parse1] missing SAM header
[W::sam_read1] Parse error at line 1

What should I worry about?

PS. Nonetheless the error I get and output vcf files, but I want to be sure everything is running OK, and why I get those error.

sam bcftools bedtools • 296 views
ADD COMMENTlink modified 7 months ago • written 7 months ago by User000390

Do your intersection script also contains variant calling commands?

ADD REPLYlink written 7 months ago by Arup Ghosh2.7k

Actually in the header I see variant calling commands.. I guess this is OK, intersection script has only those two commands

ADD REPLYlink modified 7 months ago • written 7 months ago by User000390

Looks like the variant calling tool(mpileup) is throwing the error, just comment out the unnecessary lines.

ADD REPLYlink written 7 months ago by Arup Ghosh2.7k

it is actually commented out in the header no?

##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
##bcftoolsVersion=1.10.2-18-g5774f32+htslib-1.10.2-22-gbfc9f0d
##bcftoolsCommand=mpileup -r chr3:1-5000 --threads 6 -a DP,AD,ADF,ADR,SP,INFO/AD,INFO/ADF,INFO/ADR -f genome.fasta --bam-list bam_list --excl-flags UNMAP,SECONDARY,QCFAIL,DUP --min-MQ 20
##reference=file://genome.fasta
ADD REPLYlink modified 7 months ago • written 7 months ago by User000390

I mean comment out the variant calling commands in your script.

ADD REPLYlink written 7 months ago by Arup Ghosh2.7k

but my script has only the above mentioned commands...intersect and annotate.. sorry I am a bit confused :/

ADD REPLYlink modified 7 months ago • written 7 months ago by User000390
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1338 users visited in the last hour