[Biojava-l] WriteFasta

Richard Holland holland at ebi.ac.uk
Fri Oct 5 10:13:36 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Where are the input sequences coming from? i.e. what method are you
using to construct them or read them from a file.

Also, what do you mean by the 'front' of each write? Could you send me
an example of an entire FASTA file containing the problem? (It'd be best
to attach the file to an email to me personally as this list will not
accept attachments, and copying-and-pasting from a text editor to an
email client may obscure the underlying problem).

It'd be good also to see your entire code from the point the sequences
are read or created to the point where they are written out. Or, a
sample program which exhibits the same behaviour would suffice.

I suspect that the sequences themselves contain the incorrect data,
although technically this should be impossible as the sequence alphabet
should prevent it.

We recently had an issue reported here regarding BioJava not being able
to do certain sequence tasks on platforms using non-Western-European
character mappings. If your machine is running such a mapping, try it
again on a machine with an English or other Western European language
set up by default. If it works there but not on your machine, then
this'll be the same problem. (There is no solution yet, but at least
you'll know what's wrong).

cheers,
Richard

Saif Ur-Rehman wrote:
> Dear Richard,
> 
> I have tried the RichSEquence.IOTools.writeFasta method and this method is still
> appending the characters "??" to the front of each write. I am using a 
> FileOutputStream and a Sequence object as inputs to the method. like so.
> 
> 
>  Sequence seq; // read in from File
>  FileOutputStream f =new FileOutputStream (fileName);
> 
> 
> 			   try{
> 
> 			    	RichSequence.IOTools.writeFasta(f,
> 			    	        seq,
> 			    	        RichObjectFactory.getDefaultNamespace()
> 			    	        );
> 
> 
> 			    }
> 
> 
> Thanks a lot for your time
> 
> Sincerely,
> 
> Saif
> 
> Quoting Richard Holland <holland at ebi.ac.uk>:
> 
> SeqIOTools is deprecated.
> 
> Try RichSequence.IOTools.writeFasta() instead to see if that helps.
> 
> e.g.:
> 
> RichSequence.IOTools.writeFasta(
> 	System.out,
> 	seq,
> 	RichObjectFactory.getDefaultNamespace()
> 	);
> 
> where seq is either a Sequence or a SequenceIterator.
> 
> cheers,
> Richard
> 
> Saif Ur-Rehman wrote:
>>>> Dear All,
>>>>
>>>> I was writing to ask about the SeqIOTools.writeFasta() Method. I am
> currently
>>>> trying to break up Fasta Files of whole organisms into one file per gene
> for
>>>> further analysis. However the writeFasta method appears to append the
>>>> characters
>>>> "¨Ì
>>>>
>>>> ------------------------------------------------------------------
>>>> University of St Andrews Webmail: https://webmail.st-andrews.ac.uk
>>>>
>>>> _______________________________________________
>>>> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/biojava-l
>>>>
>>

> -------------------------------------------------------------------------------
> Saif Ur-Rehman
> Research Student
> The Centre for Evolution, Genes & Genomics (CEGG)
> Dyers Brae
> School of Biology
> The University of St Andrews
> St Andrews,
> Fife
> Scotland,UK

> ------------------------------------------------------------------
> University of St Andrews Webmail: https://webmail.st-andrews.ac.uk


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBg5Q4C5LeMEKA/QRAlKlAKCKXrMfJI2W4Ir7Us5P9bj3KmEY1ACgo89L
WgUPFCLGUNSUZxO8h3Ltqlw=
=Jq7X
-----END PGP SIGNATURE-----



More information about the Biojava-l mailing list