Bookmark Topic Watch Topic
  • New Topic

any one knows how to add the two prime keys to the DNA sequence such as AGTCATG ect.  RSS feed

 
sam tomy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
String[][] DNASeq = {{"A","00"},{"T","01"},{"G","10"},{"C","11"}};
String inputString = null;

{

int[] inputAscii = new int[inputString.length()];
String[] inputBinary = new String[inputString.length()];

//Convert the input string into ASCII numbers...
for (int i = 0; i < inputString.length(); i++) {
char character = inputString.charAt(i);
inputAscii[i] = (int) character;
}

//Convert the ASCII Numbers to 8 bit Binary numbers...
for (int i = 0; i < inputAscii.length; i++) {
String bs = String.valueOf(Integer.toBinaryString(0x100 +
inputAscii[i]).substring(2));
 
Rob Camick
Ranch Hand
Posts: 2756
12
  • Mark post as helpful
  • send pies
  • Report post to moderator
How is this different from your last question: http://www.coderanch.com/t/659708/GUI/java/fix-jTextField-convert-automatically-character ?

Other than you didn't use the "code tags" so your code is not readable.

I don't think people understood the question last time and this doesn't make the question any clearer (at least not to me).

Quit reposting the same question and keep all the information in one question so everybody knows what has already been discussed.
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Report post to moderator
Agree: please continue all discussion on the link RC posted.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!