| |||||||||||
| |||||||||||
how to parsse this Posted by revtopo (revtopo), 9 July 2007 Hi there,I am trying to prase a set of data. data is like this: Gene3D; G3DSA:1.10.20.10; Histone-fold; 1. PANTHER; PTHR11064:SF9; CBFA_NFYB_topo; 1. Pfam; PF00808; CBFD_NFYB_HMF; 1. PRINTS; PR00615; CCAATSUBUNTA. EMBL; AAEE01000005; EAK88737.1; -; Genomic_DNA. InterPro; IPR001241; Topo_IIA_B/N. PROSITE; PS00177; TOPOISOMERASE_II; UNKNOWN_1. EMBL; CP000360; ABF43760.1; -; Genomic_DNA. GenomeReviews; CP000360_GR; Acid345_4761. InterPro; IPR002510; Peptidase_U62. Pfam; PF01523; PmbA_TldD; 1. EMBL; AY596923; AAT09328.1; -; Genomic_DNA. HSSP; P09097; 1AB4. SMR; Q6PLK1; 1-115. of this i need only the EMBL line.could any one help me to parse that. thanks. Posted by admin (Graham Ellis), 10 July 2007 Try someting like@emlines = grep(/^EMBL/,<DATA>); Posted by revtopo (revtopo), 10 July 2007 thanks but i have done the other way around. this too works:$line =~ /^DR\s+EMBL;\s+(\w+)/ Posted by KevinAD (KevinAD), 17 July 2007 on 07/10/07 at 11:05:13, revtopo wrote:
Then clearly the data you posted and the real data you are parsing are different. There is no "DR " in the lines containing EMBL in the data you posted Posted by admin (Graham Ellis), 17 July 2007 on 07/17/07 at 07:39:41, KevinAD wrote:
Kevin, welcome to the forum ..... I'm afraid you'll find that many questions we get asked aren't as crisp as you might like, but then we do pride ourselves in being here to help people who are struggling a bit! Posted by KevinAD (KevinAD), 17 July 2007 on 07/17/07 at 12:58:11, Graham Ellis wrote:
Hi Graham, Thank you for the welcome. I'll keep what you said in mind when posting here. Kevin This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |