import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
/**
* Find the Frequency of Codon and Print the combinations of CODONS for the given Word
* @author
*/
class CountCodon {
private static int count;
//private static String file = "C:\\input.txt";
//BufferedReader br = new BufferedReader(new FileReader(new File(file)));
//String[] words = br.readLine().trim().split(" ");
String[] words
= "pelpevettrrrlrplvlgqtlrqvvhrdpgrrlevpelkmdtkkvr ".
trim().
split(" ");
{
count=0;
word=word.trim().toUpperCase();
combinations(hash, word , word.length(),0 ,"");
System.
out.
println("Total Combinations :"+count
); Collection
<String[]> codons
= hash.
values();
while(it.hasNext())
{
{
int freq = getFrequencyCount(code, word,hash);
System.
out.
println("CODON : "+code
+ " ---> " + "FREQ : " +freq
); }
}
}
combinations(hash, word , word.length(),0 ,"");
System.
out.
println("Total Combinations :"+count
);
int freq = getFrequencyCount(codon, word,hash);
System.
out.
println("CODON : "+codon
+ " ---> " + "FREQ : " +freq
); System.
out.
println("######################################"); }*/
/**
* Returns the frequency count of the CODON
* @param codon
* @param word
* @param hash
* @return
*/
int currCount = 1;
int len=word.length();
//count the total combinations
for(int i=0;i<len;i++)
{
if(hash.get(word.charAt(i)) != null)
currCount = currCount * hash.get(word.charAt(i)).length ;
}
//System.out.println("Total Combinations :"+currCount);
//Iterate over map and fetch, the character and size of the codons corresponding to that character
char c = 0;
int size=0;
{
String[] vals
=entry.
getValue(); {
if(v.equalsIgnoreCase(codon)) //if codon is found, get the character
{
c=entry.getKey();
size=vals.length;
break;
}
}
}
//If no charater is found corresponding to the CODON
if(c==0)
return 0;
//No. of times the character appears in the word, tricky
int charCount = word.split(c+"").length-1;
return charCount * (currCount/size);
}
/**
* Prints All combinations of the codons
* @param hash: storage unit of character and corresponding codons
* @param word: the given word , eg:
* @param len: length or 'word'
* @param i: currrent character in 'word'
* @param s: combination formed in intermediate steps
*/
//if currCharacter reaches end of word, print
if(i>=len)
{
count++;
return;
}
//current Character
char c = word.charAt(i);
//Codons corresponding to the character
String[] codons
= hash.
get(c
);
if(codons!=null)
{
for(int j=0;j<codons.length;j++)
{
s=temp; //initialize s , with the value held in temp everytime s gets modified
s = s+":"+codons[j];
combinations(hash,word,len,i+1,s);
}
}
}
/**
* Initialzing Map
* @return: returns map of character and its corresponding Codons
*/
hash.
put('F',
new String[]{"UUU",
"UUC"}); hash.
put('I',
new String[]{"AUU",
"AUC",
"AUA"}); hash.
put('P',
new String[]{"CCU",
"CCC",
"CCA",
"CCG"}); hash.
put('S',
new String[]{"UCU",
"UCC",
"UCA",
"UCG",
"AGU",
"AGC"}); hash.
put('T',
new String[]{"ACU",
"ACC",
"ACA",
"ACG"}); hash.
put('A',
new String[]{"GCU",
"GCC",
"GCA",
"GCG"}); hash.
put('E',
new String[]{"CAA",
"CAG"}); hash.
put('L',
new String[]{"UUA",
"UUG",
"CUU",
"CUC",
"CUA",
"CUG"}); hash.
put('V',
new String[]{"GUU",
"GUC",
"GUA",
"GUG"}); hash.
put('T',
new String[]{"UAU",
"UAC"}); hash.
put('R',
new String[]{"CGU",
"CGC",
"CGA",
"CGG",
"AGA",
"AGG"}); hash.
put('K',
new String[]{"AAA",
"AAG"}); hash.
put('Y',
new String[]{"UAU",
"UAC"}); hash.
put('H',
new String[]{"CAU",
"CAC"}); hash.
put('N',
new String[]{"AAU",
"AAC"}); hash.
put('D',
new String[]{"GAU",
"GAC"}); hash.
put('C',
new String[]{"UGU",
"UGC"}); hash.
put('W',
new String[]{"UGG"}); hash.
put('G',
new String[]{"GGU",
"GGC",
"GGA",
"GGG"}); hash.
put('M',
new String[]{"AUG"}); return hash;
}
}
ICAgIGltcG9ydCBqYXZhLmlvLkJ1ZmZlcmVkUmVhZGVyOwogICAgCiAgICBpbXBvcnQgamF2YS5pby5GaWxlOwogICAgCiAgICBpbXBvcnQgamF2YS5pby5GaWxlUmVhZGVyOwogICAgCiAgICBpbXBvcnQgamF2YS51dGlsLkNvbGxlY3Rpb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loYXNoLnB1dCgnUicsbmV3IFN0cmluZ1tdeyJDR1UiLCJDR0MiLCJDR0EiLCJDR0ciLCJBR0EiLCJBR0cifSk7CiAgICAgICAgICAgIGhhc2gucHV0KCdLJyxuZXcgU3RyaW5nW117IkFBQSIsIkFBRyJ9KTsKICAgICAgICAgICAgaGFzaC5wdXQoJ1knLG5ldyBTdHJpbmdbXXsiVUFVIiwiVUFDIn0pOwogICAgICAgICAgICBoYXNoLnB1dCgnSCcsbmV3IFN0cmluZ1tdeyJDQVUiLCJDQUMifSk7CiAgICAgICAgICAgIGhhc2gucHV0KCdOJyxuZXcgU3RyaW5nW117IkFBVSIsIkFBQyJ9KTsKICAgICAgICAgICAgaGFzaC5wdXQoJ0QnLG5ldyBTdHJpbmdbXXsiR0FVIiwiR0FDIn0pOwogICAgICAgICAgICBoYXNoLnB1dCgnQycsbmV3IFN0cmluZ1tdeyJVR1UiLCJVR0MifSk7CiAgICAgICAgICAgIGhhc2gucHV0KCdXJyxuZXcgU3RyaW5nW117IlVHRyJ9KTsKICAgICAgICAgICAgaGFzaC5wdXQoJ0cnLG5ldyBTdHJpbmdbXXsiR0dVIiwiR0dDIiwiR0dBIiwiR0dHIn0pOwogICAgICAgICAgICBoYXNoLnB1dCgnTScsbmV3IFN0cmluZ1tdeyJBVUcifSk7CiAgICAJCXJldHVybiBoYXNoOwogICAgCX0KICAgIAogICAgfQ==
Main.java:59: error: illegal start of expression
private static void solve(String word, String codon) {
^
Main.java:59: error: illegal start of expression
private static void solve(String word, String codon) {
^
Main.java:59: error: ';' expected
private static void solve(String word, String codon) {
^
Main.java:59: error: ')' expected
private static void solve(String word, String codon) {
^
Main.java:59: error: illegal start of expression
private static void solve(String word, String codon) {
^
Main.java:59: error: ';' expected
private static void solve(String word, String codon) {
^
Main.java:59: error: not a statement
private static void solve(String word, String codon) {
^
Main.java:59: error: ';' expected
private static void solve(String word, String codon) {
^
Main.java:68: error: illegal start of expression
}*/
^
Main.java:68: error: illegal start of expression
}*/
^
Main.java:78: error: illegal start of expression
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: illegal start of expression
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: ';' expected
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: ')' expected
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: illegal start of expression
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: ';' expected
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: not a statement
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: ';' expected
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:78: error: ';' expected
private static int getFrequencyCount(String codon ,String word, Map<Character, String[]> hash) {
^
Main.java:127: error: illegal start of expression
private static void combinations(Map<Character, String[]> hash,
^
Main.java:127: error: illegal start of expression
private static void combinations(Map<Character, String[]> hash,
^
Main.java:127: error: ';' expected
private static void combinations(Map<Character, String[]> hash,
^
Main.java:127: error: '.class' expected
private static void combinations(Map<Character, String[]> hash,
^
Main.java:128: error: ')' expected
String word, int len , int i,String s) {
^
Main.java:128: error: illegal start of expression
String word, int len , int i,String s) {
^
Main.java:128: error: ';' expected
String word, int len , int i,String s) {
^
Main.java:128: error: not a statement
String word, int len , int i,String s) {
^
Main.java:128: error: ';' expected
String word, int len , int i,String s) {
^
Main.java:128: error: ';' expected
String word, int len , int i,String s) {
^
Main.java:128: error: not a statement
String word, int len , int i,String s) {
^
Main.java:128: error: ';' expected
String word, int len , int i,String s) {
^
Main.java:159: error: illegal start of expression
private static Map<Character,String[]> init() {
^
Main.java:159: error: illegal start of expression
private static Map<Character,String[]> init() {
^
Main.java:159: error: ';' expected
private static Map<Character,String[]> init() {
^
Main.java:159: error: illegal start of expression
private static Map<Character,String[]> init() {
^
Main.java:159: error: illegal start of expression
private static Map<Character,String[]> init() {
^
Main.java:159: error: not a statement
private static Map<Character,String[]> init() {
^
Main.java:159: error: ';' expected
private static Map<Character,String[]> init() {
^
Main.java:184: error: reached end of file while parsing
}
^
39 errors