Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Reading frames and amino acids: msg#00012

java.bio.general

Subject: RE: Reading frames and amino acids

I tried to compile the program Mark Schreiber wrote but the only thing I get is:
Hex.java:13: illegal character: \154
/**
^
Hex.java:16: illegal character: \154
public static void help() {
^
Hex.java:17: illegal character: \154
System.out.println(
^
Hex.java:17: illegal character: \154
System.out.println(
^
Hex.java:17: illegal character: \154
System.out.println(
^
Hex.java:18: illegal character: \154
"usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
^
Hex.java:18: illegal character: \154
"usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
^
In total I get 100 of these error messages, and I don't understand them. Can
you help me?
Gera


-----Oorspronkelijk bericht-----
Van: mark.schreiber@xxxxxxxxxxxxxxxxxx
[mailto:mark.schreiber@xxxxxxxxxxxxxxxxxx]
Verzonden: vr 5-3-2004 10:35
Aan: Dan Bolser
CC: biojava-l@xxxxxxxxxxxxxxxxxxx; biojava-l-bounces@xxxxxxxxxxxxxxxxxxx;
Jellema, Gera
Onderwerp: Re: [Biojava-l] Reading frames and amino acids

That is the intention of the 'biojava in anger' site. I just haven't had
time to add lots of little scripts to it. I will gratefully take
donations.

- Mark






Dan Bolser <dmb@xxxxxxxxxxxxxxxxxx>
03/05/2004 05:29 PM


To: Mark Schreiber/GP/Novartis@PH
cc: "Jellema, Gera" <Gera.Jellema@xxxxxx>,
biojava-l@xxxxxxxxxxxxxxxxxxx,
biojava-l-bounces@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Biojava-l] Reading frames and amino acids




I have seen 'biojava in anger', but is their a 'biojava cookbook'?

It strikes me that lots of small scripts like this could be useful for
lots of people if archived properly.

Does the cookbook exist?

Cheers, Dan.

On Fri, 5 Mar 2004 mark.schreiber@xxxxxxxxxxxxxxxxxx wrote:

> Hi Gera -
>
> The code below seems to work for me. Please note that I have not tested
it
> thoroughly so you might want to eyeball a few results to make sure they
> are sensible.
>
> You could probably improve it by making some of the 'in line' code into
> methods etc.
>
> - Mark
>
> import java.io.*;
>
> import org.biojava.bio.*;
> import org.biojava.bio.seq.*;
> import org.biojava.bio.seq.io.*;
> import org.biojava.bio.symbol.*;
>
> /**
> * <p>Program to six-frame translate a nucleotide sequence</p>
> */
>
> public class Hex {
> /**
> * Call this to get usage info, program terminates after call.
> */
> public static void help() {
> System.out.println(
> "usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
> System.exit( -1);
> }
>
> public static void main(String[] args) throws Exception{
> if (args.length != 3) {
> help();
> }
>
> BufferedReader br = null;
> String format = args[1];
> String alpha = args[2];
>
> try {
> br = new BufferedReader(new FileReader(args[0]));
>
> SequenceIterator seqi =
> (SequenceIterator)SeqIOTools.fileToBiojava(format, alpha, br);
>
> //for each sequence
> while(seqi.hasNext()){
> Sequence seq = seqi.nextSequence();
>
> //for each frame
> for (int i = 0; i < 3; i++) {
> SymbolList prot;
> Sequence trans;
>
> //take the reading frame
> SymbolList syms = seq.subList(
> i+1,
> seq.length() - (seq.length() - i)%3);
>
>
> //if it is DNA transcribe it to RNA
> if(syms.getAlphabet() == DNATools.getDNA()){
> syms = RNATools.transcribe(syms);
> }
>
> //output forward translation to STDOUT
> prot = RNATools.translate(syms);
> trans = SequenceTools.createSequence(prot, "",
> seq.getName()+
> "TranslationFrame: +"+i,
> Annotation.EMPTY_ANNOTATION);
> SeqIOTools.writeFasta(System.out, trans);
>
> //output reverse frame translation to STDOUT
> syms = RNATools.reverseComplement(syms);
> prot = RNATools.translate(syms);
> trans = SequenceTools.createSequence(prot, "",
> seq.getName() +
> "TranslationFrame: -" +
i,
> Annotation.EMPTY_ANNOTATION);
> SeqIOTools.writeFasta(System.out, trans);
> }
> }
> }
> finally {
> if(br != null){
> br.close();
> }
> }
> }
> }
>
>
>
>
>
> "Jellema, Gera" <Gera.Jellema@xxxxxx>
> Sent by: biojava-l-bounces@xxxxxxxxxxxxxxxxxxx
> 03/04/2004 09:30 PM
>
>
> To: <biojava-l@xxxxxxxxxxxxxxxxxxx>
> cc:
> Subject: [Biojava-l] Reading frames and amino acids
>
>
> Hi,
> I'm new to biojava so I don't know if this has already been asked. I
have
> a genome sequence and I want to have it in the 6 reading frames, and
then
> per reading frame translated into amino acids so I can look for
proteins.
> I don't know how I have to do it.
> Thanks,
> Gera
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l@xxxxxxxxxxx
> http://biojava.org/mailman/listinfo/biojava-l
>
> [ Attachment ''WINMAIL.DAT'' removed by Mark Schreiber ]
>
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l@xxxxxxxxxxx
> http://biojava.org/mailman/listinfo/biojava-l
>







_______________________________________________
Biojava-l mailing list - Biojava-l@xxxxxxxxxxx
http://biojava.org/mailman/listinfo/biojava-l



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo