Is that possible to draw the gene structure from bed file
1
0
Entering edit mode
6.0 years ago
biologo ▴ 40

Hi, everyone,

I have the bed file in such kind of format:

ENSMUSG00000025925      15805904        15805932        cds
ENSMUSG00000045216      36106069        36106094        utr3
ENSMUSG00000001138      36513045        36513067        cds
ENSMUSG00000065629      39519551        39519648        cds
ENSMUSG00000026074      39997066        39997110        cds
ENSMUSG00000073676      55091153        55091195        utr3
ENSMUSG00000026020      59691944        59692011        intron
ENSMUSG00000077345      59691944        59692011        cds
ENSMUSG00000026020      59692554        59692579        intron

Does there have easily way to graw the region in each gene, like: image
it's not the real gene structure, but the distribution of the peaks above each gene. THX

gene structure • 1.2k views
ADD COMMENT
0
Entering edit mode
6.0 years ago
Joe 21k

You should be able to convert the BED file to a genbank and then run it through any number of browsing/plotting tools is one option.

Edit:

I thought this would be simple but I misread the title of the link I originally posted as Genomax pointed out, so you might have to code up something yourself (unless you/someone finds one!)


Here's a naive and high-level approach that might work:

Using (Bio)Python's index slicing notation you'll be able to pass your bed file coordinates to pull out the relevant sections from the original sequence to which they pertain.

You'll probably need the full sequence to insert in to the genbank (or at least the maximal extents of your features).

You can then build up a custom SeqRecord, adding your pairs of BED coordinates as new features, with the corresponding feature info from your right hand column.

Once that's all done, you can use SeqIO to write out your custom SeqRecord as a Genbank, and then use something like SnapGene/Artemis/JBrowse... or whatever your preferred sequence browsing/visualisation tool is.

ADD COMMENT
0
Entering edit mode

You could possibly also cut out the middleman and use a package like DFV where you can build a 'custom' DNA feature track in a programmatic way purely on coordinate information.

ADD REPLY

Login before adding your answer.

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