Closed pgcudahy closed 4 years ago
The first line of your BED file is not valid. BED does not support a "header" row. Also BED is tab-separated; are you sure you aren't using spaces accidently?
Hi,
I thought I would tag on here because I want to make a BED file to mask repetitive regions in my M tuberculosis SNP analsysis. My question is how do I make a BED file and can someone, possibly @pgcudahy tell me what is the general consensus region of genes to exclude? I'm new to the TB world. I was using MTBseq and tried Snippy today and their is quite a difference between both forms of analysis.
Cheers.
For M.tb we use the regions from this website: https://gph.niid.go.jp/tgs-tb/
I have now added a BED version of that XLSX file to Snippy: https://raw.githubusercontent.com/tseemann/snippy/master/etc/Mtb_NC_000962.3_mask.bed
It's mentioned in the docs here now: https://github.com/tseemann/snippy#options-1
Just do snippy-core --mask Mtb_NC_000962.3_mask.bed ....
But make sure you use the correct reference version (3), and that it's FASTA ID is NC_000962.3
to match the name in column 1 of the BED file.
Thats perfect cheers, I am running version 4.4.3
Thanks so much
You will need to manually get the bed file from github - i have not released a new version yet
Oh ok. This is a stupid question then, the link above with the BED file info, do I copy it into excel and save as an xlxs file? And then change the .xlxs part to .BED before putting it in the snippy/etc/ path?
wget https://raw.githubusercontent.com/tseemann/snippy/master/etc/Mtb_NC_000962.3_mask.bed
You don't need to put it into etc/
folder - you have to put it wherever you need it, and give it to the --mask
option in snippy-core
.
Thanks so much, I really appreciate your help!
I'm have a feeling that this is a silly formatting issue but I keep getting the error from snippy-core
ERROR: BED [Chrom ChromStart ChromEnd locus tag Comment] has CHR that is not in the reference
My command is
snippy-core --prefix core-SNPs --mask /data/pilot_strain_heterogeneity/data/interim/snippy/Locus_to_exclude_Mtb_new.bed --ref /data/pilot_strain_heterogeneity/data/external/NC_000962/NC_000962.3.fasta /data/pilot_strain_heterogeneity/data/interim/snippy/PC12_S41 /data/pilot_strain_heterogeneity/data/interim/snippy/PC13_S20
My BED file looks like this
And the reference is
for comparison, the bed files that snippy has generated from the same data look like this
I'm using snippy-core 4.3.2 and have tried using sed to change the bed file to all kinds of different chrom fields but no success. I've also tried removing the header and the metadata columns, but then get
ERROR: BED [gi|448814763|ref|NC_000962.3| 2356729 2358206] has CHR that is not in the reference