Results 1 to 4 of 4
- 08-15-2012, 06:28 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 1
- Rep Power
- 0
Hi, I am going crazy I can't figure out what's wrong...
I am using biojava - i have a perl cgi which sends a sequence as an argument to this java code, however for some reason this bit isn't working - as far as I can tell
"SymbolList symL = DNATools.createDNA(userInput);"
any help would be massively appreciated, especially as the biojava framework does not have the best forums....!!
import org.biojava.bio.symbol.*;
import org.biojava.bio.seq.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
public class Translate {
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String userInput = args[0];
try {
//SymbolList aminoAcid = table.translate(sym);
//create a DNA SymbolList
SymbolList symL = DNATools.createDNA(userInput);
//transcribe to DNA to RNA
symL = DNATools.toRNA(symL);
//translate to protein
symL = RNATools.translate(symL);
//prove that it worked
System.out.println(symL.seqString());
}catch (IllegalAlphabetException ex) {
/*
* this will occur if you try and transcribe a non DNA sequence or translate
* a sequence that isn't a triplet view on a RNA sequence.
*/
ex.printStackTrace();
}catch (IllegalSymbolException ex) {
// this will happen if non IUB characters are used to create the DNA SymbolList
//send the exception to the form through the CGI.
//catch the exception for the PROTEIN reverse translation.
ex.printStackTrace();
}
}
}
- 08-15-2012, 07:05 PM #2
Senior Member
- Join Date
- Oct 2011
- Location
- Sweden
- Posts
- 123
- Rep Power
- 0
Re: Hi, I am going crazy I can't figure out what's wrong...
So, what isn't working? The line of code? What happens when you run it? Can you compile and run it? Are exceptions thrown? Do you think the error is in the JavaBIO or regular Java?
Please be more specific and post with [CODE] tags to make the code easy to read.
Thanks,
Z!
- 08-15-2012, 07:25 PM #3
Re: Hi, I am going crazy I can't figure out what's wrong...
First off, make sure to place the [code] tags around your program text to make the text easier to look at.
Next, could you explain which part of the program is not working. Could you elaborate on your problem and you want to happen?
edit: Zyril got to the punch before I did.Last edited by kammce; 08-15-2012 at 08:00 PM.
My API:Java Code:cat > a.out || cat > main.class
- 08-15-2012, 07:52 PM #4
Re: Hi, I am going crazy I can't figure out what's wrong...
Please go through the Forum Rules -- particularly the third paragraph.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
what is wrong with this? cant figure it out
By flagrl in forum NetBeansReplies: 3Last Post: 01-27-2012, 01:10 AM -
Can't figure out what's wrong, help please.
By Taszk in forum New To JavaReplies: 30Last Post: 05-24-2011, 11:30 AM -
2 Errors Please help em figure out what is wrong with this
By jwb4291 in forum Advanced JavaReplies: 16Last Post: 08-09-2010, 11:40 PM -
Cant figure out where went wrong.
By leviathan in forum New To JavaReplies: 15Last Post: 06-06-2010, 06:55 PM -
Please Help, can't figure out what I'm doing wrong.
By tamik0 in forum New To JavaReplies: 2Last Post: 07-11-2008, 09:41 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks