ACGTGTGTACCCCC"))?
lines2New<-unlist(lapply(split(lines2,(seq_along(lines2)-1)%/%2+1),function(x) paste(x,collapse="\n")),use.names=FALSE)
res<-lapply(lines1,function(x) {x1<- strsplit(x," ")[[1]]; x1New<-x1[-1];x2<-? gsub(">(.*)\\n.*","\\1",lines2New);lines3<-lines2New[match(x1New,x2)];write.table(lines3,paste0(x1[1],".txt"),row.names=FALSE,quote=FALSE)})
Attached is one of the files generated by the code.
A.K.
Hi all,
I have two input files. First file (file1.txt) contains entries in the following tab delimited format:
gene1 or1|1234 or3|56 or4|793
gene4 or2|347
gene5 or3|23 or7|123456789
.......
..
The second file (file2.txt) contains some additional features along with the header line of the first file, such as: