Re: [R] Help needed in feature extraction from two input files

2013-06-11 Thread arun
Hi, Try this: lines1<- readLines("file1.txt") lines1<- lines1[lines1!=""] #In "file2.txt", >or1|1234 ATCGGATTCAGG >or2|347 GAACCTATCAATTTA TATAA###this should be a single line >or3|56 ATCGGAGATATAACCAATC >or3|23 TTAACAAGAGAATAGACAAA >or4|793 ATCTCTCTCCTCTCTCTCTA >or7|1

Re: [R] Help needed in feature extraction from two input files

2013-06-11 Thread arun
Hi, Try this: lines1<- readLines(textConnection("gene1 or1|1234 or3|56 or4|793 gene4 or2|347 gene5 or3|23 or7|123456789")) lines2<-readLines(textConnection(">or1|1234 ATCGGATTCAGG >or2|347 GAACCTATCAATTTATATAA >or3|56 ATCGGAGATATAACCAATC >or3|23 TTAACAAGAGAATAGACAAA >or4|793