[R] problem in reading a sequence file

Philipp Pagel p.pagel at wzw.tum.de
Tue Jul 5 15:05:46 CEST 2011


On Tue, Jul 05, 2011 at 02:06:02PM +0200, albert coster wrote:
>  seqfile
>                     V1
> 1 NNNNNNNNNNATTAAAGGGC
> 
> I want only  NNNNNNNNNNATTAAAGGGC .

If I understand correctly, your file simply contains one string
(sequence) per line. In that case you may want to use scan() instead
for read.table but without more infromation it's hard to know.

Can you proviede a very short example file (maybe 5 lines) and also
the output of str(foo) where foo is the variable you read the file
into?

Also: do you want a data frame with a single column? Or rather a
vector of strings? Something else? Does your file ONLY contain
sequences - or are there also identifiers, annotations etc.?

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/



More information about the R-help mailing list