Hello Monks! i have a file that look like this:

LOCUS PPI3_SYNY3 379 aa linear BCT 1 +3-NOV-2019 DEFINITION RecName: Full=Putative thylakoid lumen peptidyl-prolyl cis +-trans isomerase sll0408; Short=Putative thylakoid lumen PPIase; +AltName: Full=Putative thylakoid lumen rotamase; Flags: Precursor. ACCESSION Q55118 VERSION Q55118.2 REFERENCE 1 (residues 1 to 379) AUTHORS Kaneko,T., Sato,S., Kotani,H., Tanaka,A., Asamizu,E., Naka +mura,Y., Miyajima,N., Hirosawa,M., Sugiura,M., Sasamoto,S., Kimura, +T., Hosouchi,T., Matsuno,A., Muraki,A., Nakazaki,N., Naruo,K., Okumura,S., Shimpo,S., Takeuchi,C., Wada,T., Watanabe,A., Yamada,M., Yasuda,M. and Tabata,S. TITLE Sequence analysis of the genome of the unicellular cyano +bacterium Synechocystis sp. strain PCC6803. II. Sequence determinati +on of the entire genome and assignment of potential protein-coding r +egions JOURNAL DNA Res. 3 (3), 109-136 (1996) PUBMED 8905231 REMARK NUCLEOTIDE SEQUENCE [LARGE SCALE GENOMIC DNA].; STRAIN=PCC 6803 / Kazusa REFERENCE 2 (residues 1 to 379)

I want to extract only these information from the file "PPI3_SYNY3 " , "Putative thylakoid lumen peptidyl-prolyl cis-trans isomerase sll0408" and "Sequence analysis of the genome of the unicellular cyanobacterium Synechocystis sp. strain PCC6803. II. Sequence determination of the entire genome and assignment of potential protein-coding regions" Here is my code where i am only able to extract the locus id from the file please help me here

open(GENBANK, "/Users/ale/Desktop/seq.gp.txt") or die; # Opening file results.txt in write mode with the help of ">" operator +. open (FH, ">", "results.txt"); my $content = join("", <GENBANK>); close(GENBANK); $content =~ /LOCUS\s+([A-Z0-9_]+)/; my $locus = $1; $content =~ /DEFINITION\s+(\w+\W+); my $acids = $1 ; $content =~ /TITLE([a-z0-9+\s]+)/; my $aminoAcids = uc($1); print(FH "$locus\n$acids\n$aminoAcids\n");

In reply to advance Regex by shabird

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.