[R] how to load only lines that start with a particular symbol

J Chen jiaxuan.chen at mdc-berlin.de
Tue Sep 15 22:59:48 CEST 2009


Dear all,

I have DNA sequence data which are fasta-formatted as

>gene A;.....
AAAAACCCC
TTTTTGGGG
CCCTTTTTT
>gene B;....
CCCCCAAAA
GGGGGTTTT

I want to load only the lines that start with ">" where the annotation
information for the gene is contained. In principle, I can remove the
sequences before loading or after loading all the lines. I just wonder if
there's a way to load only lines with a particular pattern. The skip
argument in read.table() doesn't work for my purpose.

Thanks in advance,
Jimmy

-- 
View this message in context: http://www.nabble.com/how-to-load-only-lines-that-start-with-a-particular-symbol-tp25461693p25461693.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list