Hello, I am new with Perl language. I want to extract particular data from the file. I have big text file, it consists of all the information about protein, from that I want gene name and copy numbers only. File:
#BEGIN_ECARDFILE
# Entry_ID:
CC1227A.1
# Accession_No.:
UA0001227
# Gene_Ontology:
>>> Function: Not Available
||
>>> Process: Not Available
# Location:
Cytoplasm
# Blattner_Number:
b3038
# Gene_Sequence:
ATGGA
# Gene_Name:
ygiC
# Preceding_Gene:
ygiB
# Copy Number:
Unknown
# RNA_Copy_No.: Log phase (2max): 0.31 Stationary phase (2max): 0.17 Ref: Nature Biotech., 18, 1262-68, Dec. 2000 (PMID=11101804)
# Genbank_ID_(DNA):
G1789416
Output:
# Gene_Name:
ygiC
# Copy Number:
Unknown
This is repeating for every proteins means around 100 times all information and I want to store dis all in new file. What should I do? Should I use pattern matching? Thank you.
A possible Unix solution
Please edit + format your question.