ORF finder script
0
0
Entering edit mode
5.4 years ago
ahm3dhany ▴ 10

I wrote a basic bash script to find the ORF (i.e. open reading frame) in a given nucleotide sequence and I need to know if I done it right.

ORF_finder.sh :

#!/bin/bash

var=$1
grep -Eo --color=auto 'ATG(...)*T(A(A|G)|GA)' $1

an example for the usage:

~$ sequence="CTGGATGATCCTCTAACCGCGCAAACGAGG"
~$ echo $sequence | ./ORF_finder.sh
ATGATCCTCTAA

another example:

~$ sequence="ATAATCGGCCTCGACATCCTCCGCCACGAAAGGACTGTCCCCAATCCCGAAGGCCGCAGAGCGCTGCACATACTAGGGTCAGCTAAGGTACCTCTCATGCGAGGACACGCGATGTGGCATCTAGGCGGCGTTAGAAAATTATTCGAGGCGGCCTACCGTCTTAACCGTTAAATACAAGCATGGGAAGGCAGAGCGAAAATAAAATTGCCCGCGCCTCACTACCTGCCGTCTCGTAACACTTAGCTCTAAAATAGAGTAAGCTCGGCCCCCAGTCCAAGGCACGTAAGGATGTATCGAGGCTCAAAAGACTCGCTGATCGTACCGGTCTCGTGCGTAAAAAGGCAGCAGAACTATGCTTGACTATCCATACGTCTCCATCGTTCCTGCTGATTCGTCGCGAATTGGCGCGGTTACTTAGTCTCCGGGCTGTCCGGTCGGGCTAGGTGATGCCTGTCCCTAAGGTGAATCAAGAAATCCTCAAAACTGCATAATCACGTGTT"
~$ echo $sequence | ./ORF_finder.sh
ATGCGAGGACACGCGATGTGGCATCTAGGCGGCGTTAGAAAATTATTCGAGGCGGCCTACCGTCTTAACCGTTAAATACAAGCATGGGAAGGCAGAGCGAAAATAAAATTGCCCGCGCCTCACTACCTGCCGTCTCGTAACACTTAGCTCTAAAATAGAGTAAGCTCGGCCCCCAGTCCAAGGCACGTAAGGATGTATCGAGGCTCAAAAGACTCGCTGATCGTACCGGTCTCGTGCGTAAAAAGGCAGCAGAACTATGCTTGACTATCCATACGTCTCCATCGTTCCTGCTGATTCGTCGCGAATTGGCGCGGTTACTTAGTCTCCGGGCTGTCCGGTCGGGCTAGGTGATGCCTGTCCCTAAGGTGA

Is finding ORF that simple? or it's more complicated than that.

orf open reading frame bash shell sequencing • 3.3k views
ADD COMMENT
2
Entering edit mode

If you only want ORFs from the forward frames and which are not supported by any evidence, then, yes, it is that simple.

ADD REPLY
2
Entering edit mode

Yup, if your definition of ORF is sufficient that all you care about is it starts with an ATG (they don't always) and ends with one of the stop codons some multiple of 3 away, then yeah, it's as simple as that.

More sophisticated ORF finders will consider the 6 possible reading frames (forward and reverse), as well as possibly include a minimum length, and some filtering for sequence complexity etc.

It looks like this will only work if you chomp the newlines in a fasta too beforehand - I think...

ADD REPLY
0
Entering edit mode

thanks.. could you please provide me with an article or paper or anything that elaborate the other details I neglected.

ADD REPLY
2
Entering edit mode

One of the most sophisticated tools for ORF detection is GLIMMER: https://ccb.jhu.edu/papers/glimmer2.pdf

That is even more complex than just the things I mentioned though. It implements Markov models. NCBI's ORF finder is slightly more complex than basic string searching, however I don't know exactly what the code is doing. You might be able to find it on the web somewhere to download:https://www.ncbi.nlm.nih.gov/orffinder

ADD REPLY
0
Entering edit mode

In addition, only one ORF per fragment...

ADD REPLY
0
Entering edit mode

First of all, thank you for your answer.. do you mean by "forward frames" that if each nucleotide of the sequence flipped (i.e. A->T, T->A, C->G and G->C) ?

ADD REPLY
1
Entering edit mode

The reverse complement of the sequence.

ADD REPLY

Login before adding your answer.

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