Bedtools intersect vcf and bed files
0
0
Entering edit mode
4.3 years ago
User000 ▴ 700

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.

bedtools bcftools SAM • 3.1k views
ADD COMMENT
0
Entering edit mode

Do your intersection script also contains variant calling commands?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1420 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6