[BioC] Sequence output formatting

Tobias Straub tstraub at med.uni-muenchen.de
Mon Jul 9 17:26:11 CEST 2007


I'd recommend using sth like

con <- file("fastaseq.txt", open="wt")
for (i in 1:length(acc))
{
	writeLines(paste(">",acc[i],sep=""))
	writeLines(getSEQ(acc[i]))
}
close(con)

imho, sink is not done for what you want it to do

Tobias

On Jul 9, 2007, at 4:45 PM, Daniel Brewer wrote:

> Just a quick question.  Is there any way to stop the "[1]" outputting
> when printing to a file?
>
> I am trying to create a fasta format file using the following:
> sink(file = "fastaseq.txt")
> for (i in 1:length(acc))
> {
> print(paste(">",acc[i],sep=""))
> print(getSEQ(acc[i]))
> }
> sink(file = NULL)
>
> Thanks
>
> Dan
> --  
> **************************************************************
> Daniel Brewer, Ph.D.
> Institute of Cancer Research
> Molecular Carcinogenesis
> Email: daniel.brewer at icr.ac.uk
> **************************************************************
>
> The Institute of Cancer Research: Royal Cancer Hospital, a  
> charitable Company Limited by Guarantee, Registered in England  
> under Company No. 534147 with its Registered Office at 123 Old  
> Brompton Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the add...{{dropped}}



More information about the Bioconductor mailing list