Created
October 12, 2016 00:04
-
-
Save nathandunn/abc134d5756d2c9183c6104c534b4dcc to your computer and use it in GitHub Desktop.
code to indentify when the 5' end is missing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (the_mRNA.length() > 3) { | |
// Find the first start codon | |
int start_index = the_mRNA.indexOf(standard_start_codon); | |
while (start_index >= 0) { | |
String aa = getTrimmedAA(get_ORF(the_mRNA, start_index, -1), | |
start_index); | |
if (aa.length() > longest_peptide.length()) { | |
longest_peptide = aa; | |
best_start_index = start_index; | |
} | |
start_index = the_mRNA.indexOf(standard_start_codon, start_index + 1); | |
} | |
/* just in case the 5 prime end is missing see if | |
a longer translation can be obtained without looking | |
for the ATG */ | |
start_index = 0; | |
while (start_index < 3) { | |
String orf = get_ORF(the_mRNA, start_index, -1); | |
String aa = getTrimmedAA(orf, start_index); | |
if (aa.length() > longest_peptide.length()) { | |
setMissing5prime(true); | |
longest_peptide = aa; | |
best_start_index = start_index; | |
} | |
start_index++; | |
} | |
} | |
if (best_start_index >= 0) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI @deepakunni3 and @selewis