[Biojava-l] fasta description line

ThorstenInAnger henrich at embl.de
Mon Oct 23 09:57:14 UTC 2006


Hi,

I want to do something very simple:

- get id and sequence from a database
- create a sequence object
- write it out as fasta format file (with a defined description line)

this is my code:
				rs = stmt.executeQuery(query);
			    Feature.Template templ = new Feature.Template();
			
			    //fill in the template
			    Annotation an = new SimpleAnnotation();
			    templ.location = Location.empty;
				
				while (rs.next()) {
					mepdId = rs.getInt(1);
					mepdName = rs.getString(2);
					seq = rs.getString(3);
					seqObj =  DNATools.createDNASequence(seq, mepdName);
				    an.setProperty(FastaFormat.PROPERTY_DESCRIPTIONLINE, "my description
here");
				    templ.annotation = an;
					seqObj.createFeature(templ);
					SeqIOTools.writeFasta(fastaFos, seqObj);
					//db.addSequence(seqObj);
				}

It works fine, but there is no description line in the resulting file!
How can I change the fasta description line?

Also I am using deprecated methods, but could not find out what to use
instead:
FastaFormat.PROPERTY_DESCRIPTIONLINE
SeqIOTools.writeFasta
All tutorials I found are using the deprecated.

Cheers,

Thorsten

-- 
View this message in context: http://www.nabble.com/fasta-description-line-tf2493269.html#a6950970
Sent from the BioJava mailing list archive at Nabble.com.




More information about the Biojava-l mailing list