How do I import a BED file that has genomic coordinates onto a shorter segment of the full genomic sequence?
Open the Target Sequence
Open or create the sequence for the region corresponding to the BED file.
In this example our sequence with coordinates 1..662 is understood to correspond to the original E. coli genomic coordinates 5021..5682.
Open the BED file
Open the BED file that contains features for addition to the target sequence.
In this example the BED file describes two features.
The first "source" feature specifies the genomic coordinates of the E. coli K-12 genomic sequence. The first position corresponds to position 5021 of the genomic sequence.
The second "yaaX CDS" feature specifies the genomic coordinates of the yaaX coding sequence.
Calculate the Track Offset
To correctly map the BED-encoded features onto the target sequence, calculate the track offset using the formula:
Track offset = 1 - (first position of BED file start coordinate)
In this example,
Track offset = 1-5021
Track offset = -5020
Add the Track Offset to the BED file
Edit the BED file in a text editor and add a track offset line specifying the calculated track offset. Save the file.
Import the BED file onto the Target Sequence.
View the target sequence file in SnapGene, then click Features → Import Features → Import Features from a BED file....
Use the file picker to choose the BED file.
Confirm the Features are Correctly mapped to the Target Sequence
Switch to Sequence view, and confirm the features are correctly mapped to the sequence.
In this example, we know the yaaX CDS starts with a GTG start codon, and the gene product starts with amino acids "MKKMQS...".
All features from BED files are imported as MISC feature types. If required, manually edit the imported features and convert them to the appropriate. feature types.
In this example: we edit the yaaX feature to set it as a CDS feature type and show the translated gene product.
To do this, double click the yaaX CDS feature to edit it.
- Set the type to CDS.
- Check the option to "Translate this feature in Sequence view".
- Click the Feature Translation Options button and check the option to "Translate the first codon as Methionine".
The yaaX CDS is now displayed as a translated feature and allows confirmation that the CDS start position is correct and encodes the expected gene product.