Results 1 to 4 of 4
  1. #1
    salpie is offline Member
    Join Date
    Aug 2012
    Posts
    1
    Rep Power
    0

    Default 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();
    }
    }
    }

  2. #2
    Zyril is offline Senior Member
    Join Date
    Oct 2011
    Location
    Sweden
    Posts
    124
    Rep Power
    0

    Default 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!

  3. #3
    kammce's Avatar
    kammce is offline Senior Member
    Join Date
    Dec 2010
    Location
    California
    Posts
    194
    Rep Power
    4

    Default 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

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Hi, I am going crazy I can't figure out what's wrong...

    Please go through the Forum Rules -- particularly the third paragraph.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. what is wrong with this? cant figure it out
    By flagrl in forum NetBeans
    Replies: 3
    Last Post: 01-27-2012, 01:10 AM
  2. Can't figure out what's wrong, help please.
    By Taszk in forum New To Java
    Replies: 30
    Last Post: 05-24-2011, 11:30 AM
  3. Replies: 16
    Last Post: 08-09-2010, 11:40 PM
  4. Cant figure out where went wrong.
    By leviathan in forum New To Java
    Replies: 15
    Last Post: 06-06-2010, 06:55 PM
  5. Replies: 2
    Last Post: 07-11-2008, 09:41 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •