Obtaining .bed list of exons of chr17
1
0
Entering edit mode
6.9 years ago
marghe08 ▴ 10

I would like to download/build a simple .bed file with all the exon regions oh chr17. Can anyone help me with that?

Thank you in advance.

bed exon • 2.1k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
1
Entering edit mode
6.7 years ago

Via BEDOPS convert2bed:

$ wget -qO- ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_26/GRCh37_mapping/gencode.v26lift37.annotation.gff3.gz \
    | gunzip --stdout - \
    | awk '$3 == "exon"' - \
    | convert2bed -i gff - \
    > exons.bed

Then you can use BEDOPS bedextract to quickly get a subset:

$ bedextract chr17 exons.bed > exons.chr17.bed

This does a binary search through the sorted exons.bed file to get the chromosome you want, and will work much faster than a naive, linear walk through the file.

If you really just want chr17 and don't care about the rest:

$ wget -qO- ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_26/GRCh37_mapping/gencode.v26lift37.annotation.gff3.gz \
    | gunzip --stdout - \
    | awk '($3 == "exon") && ($1 == "chr17")' - \
    | convert2bed -i gff - \
    > exons.chr17.bed
ADD COMMENT

Login before adding your answer.

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