bed file with indels and SNVs
2
0
Entering edit mode
5.6 years ago
joselu ▴ 110

Hello. How can I get a bed file with IDs of indels and SNVs from chromosome 6 of hg38? I need it to use it in IGV.

SNP bed • 2.7k views
ADD COMMENT
0
Entering edit mode

Hello joselu ,

and where should these data come from? Do you have a vcf of your sample and want to convert it to a bed? You like to take data from a (public) database like dbSNP?

Please add some more information to your question.

And BTW: IGV can visualize vcf as well.

fin swimmer

ADD REPLY
0
Entering edit mode
  1. Down load dbsnp chromosome 6 records
  2. Use bedops vcf2bed function to convert vcf to bed
ADD REPLY
0
Entering edit mode

ok. Please, Can you specify how I download all records of chromosome 6 in dbSNP? Than you.

ADD REPLY
0
Entering edit mode

ok. Solved. Thanks everybody.

ADD REPLY
0
Entering edit mode

Hello joselu ,

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.
Upvote|Bookmark|Accept

Please do the same for your previous posts as well.

ADD REPLY
2
Entering edit mode
5.6 years ago

One way to get common SNPs, assuming sufficient disk space:

$ wget -qO- ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606_b151_GRCh38p7/VCF/common_all_20180418.vcf.gz | gunzip -c - > snps.vcf

Or all SNPs:

$ wget -qO- ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606_b151_GRCh38p7/VCF/All_20180418.vcf.gz | gunzip -c - > snps.vcf

Either option will likely need a fair bit of disk space. The common subset will use less space.

Convert the VCF to BED, separating by variant classes, assuming 8GB of available system memory for sorting:

$ vcf2bed --insertions --max-mem=8G --sort-tmpdir=${PWD} < snps.vcf > snps.insertions.bed
$ vcf2bed --deletions --max-mem=8G --sort-tmpdir=${PWD} < snps.vcf > snps.deletions.bed
$ vcf2bed --snvs --max-mem=8G --sort-tmpdir=${PWD} < snps.vcf > snps.snvs.bed

Then extract a chromosome of interest from the BED files via a fast binary search:

$ bedextract chr6 snps.insertions.bed > snps.insertions.chr6.bed
$ bedextract chr6 snps.deletions.bed > snps.deletions.chr6.bed
$ bedextract chr6 snps.snvs.bed > snps.snvs.chr6.bed

This assumes UCSC chromosome naming scheme. This may or may not be the case depending on where you get your SNPs from. Replace chr6 with plain ole 6 if using NCBI as the source, as in the example wget calls shown above.

ADD COMMENT
1
Entering edit mode
5.6 years ago

You can get a bed file of dbSNP for each chromosome directly on the ftp server.

ADD COMMENT
0
Entering edit mode

Please move it to answer finswimmer.

ADD REPLY
0
Entering edit mode

OK. Thank you very much!!

ADD REPLY

Login before adding your answer.

Traffic: 2773 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