R: how to use writeFASTA in modality "append"
1
0
Entering edit mode
@mauedealiceit-3511
Last seen 10.2 years ago
I have the 3UTR sequence and the description in separated variables. How can I generate a list with the two elements $seq and $desc as expected by writeFASTA ? Thank you, Maura. ________________________________ Da: bioconductor-bounces@stat.math.ethz.ch per conto di Alvaro Cuadros Inostroza Inviato: gio 16/07/2009 16.24 A: 'Bioconductor List' Oggetto: Re: [BioC] how to use writeFASTA in modality "append" 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@stat.math.ethz.ch [mailto:bioconductor- bounces@stat.math.ethz.ch] On Behalf Of mauede@alice.it Sent: Thursday, July 16, 2009 3:40 PM To: Bioconductor List Cc: r-help@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@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor .html?pmk=footer> [[alternative HTML version deleted]]
Transcription miRNA Biostrings Transcription miRNA Biostrings • 1.3k views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States
Hi, > I have the 3UTR sequence and the description in separated variables. > How can I generate a list with the two elements $seq and $desc as > expected by writeFASTA ? Let's say your var names that hold the data are: seqs and descs: fasta.list <- lapply(seq(seqs), function (i) list(seq=seqs[[i]], desc=descs[[i]])) I think that should work, no? -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT

Login before adding your answer.

Traffic: 654 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6