[BioC] how to use writeFASTA in modality "append"

Alvaro Cuadros Inostroza Inostroza at mpimp-golm.mpg.de
Thu Jul 16 16:24:56 CEST 2009


Hi,

You could try to open the file first, call the function "writeFASTA" many times using the same file as output and then close it. Something like this:

fasta.file <- file("my.fasta", "w")
[ some code...]
writeFASTA(fasta.obj, file = fasta.file)
[ more code...]
writeFASTA(another.fasta.obj, file = fasta.file)
[ final code...]
writeFASTA(yet.another.fasta.obj, file = fasta.file)
close(fasta.file)

I tried it here and it worked.
Alvaro.


-----Original Message-----
From: bioconductor-bounces at stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of mauede at alice.it
Sent: Thursday, July 16, 2009 3:40 PM
To: Bioconductor List
Cc: r-help at stat.math.ethz.ch
Subject: [BioC] how to use writeFASTA in modality "append"

It looks like Biostrings function "writeFASTA" overwrites the output file at each run.
It seems it does not support the "append" parameter.
 
I have to generate one big file gathering a miRNA identifier and relative sequence followd by a variable number of  dara records pertaining such a miRNA  target genes transcription. 
Each record is made up of  a 3'utr identifier <hgnc_id>.<ensembl_id>.<transript_id>
followed by the relative 3'UTR sequence.
 
I hoped I could use writeFASTA but it does not allow me to append sequences to the same output file.
Any suggestion is more than welcome.
 
Thank you in advance,
Maura



.html?pmk=footer> 

	[[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list