bedtools intersect -abam path/to/input.bam -b path/to/regions.bed > out.bam
vcftools --gzvcf /archive/runs/BSset1_bwamem_freebayes/ILL1EX1G6/S1/aln/freebayes_prim.vcf.gz --chr 6 --out fb_test --from-bp 29910200 --to-bp 29920000 --recode --recode-INFO-all
Missing out the --recode-INFO-all
will remove all of the info from the filtered file
vcftools --gzvcf /archive/runs/BSset1_bwamem_freebayes/ILL1EX1G6/S1/aln/freebayes_prim.vcf.gz --bed example.bed --out fb_test --recode --recode-INFO-all
CAUTION: This seems to miss the first line of a bed file! Maybe it expects a header.
if you have big dataframes, with a lot of columns, just writing:
import pandas as pd
pd.options.display.width = 180
and than you can see all your column in one line (handy if your script is big)