I need the name of the protein in /product="protein_name" using bash commands. Beware, there is a lot of whitespace between lines.
FEATURES Location/Qualifiers
source 1..1266
/organism="Sarcophilus harrisii"
/mol_type="mRNA"
/isolate="Salem"
/db_xref="taxon:9305"
/chromosome="1"
/map="unlocalized"
/sex="female"
/country="Australia: Taronga Zoo, Sydney"
gene 1..1266
/gene="UROS"
/note="Derived by automated computational analysis using
gene prediction method: Gnomon. Supporting evidence
includes similarity to: 10 Proteins, and 100% coverage of
the annotated genomic feature by RNAseq alignments,
including 5 samples with support for all annotated
introns"
/db_xref="GeneID:100933602"
CDS 60..908
/gene="UROS"
/codon_start=1
/product="uroporphyrinogen-III synthase isoform X1"
/protein_id="XP_003755055.2"
/db_xref="GeneID:100933602"
/translation="MRIPTSFSRGAWWKMKVLLLKDAKDDDSGLDPYLQELGSCGFEA
TLIPVLAFEFLSLPSFSEKLSHPEAYGGLVFTSPRAVEALQLSLERAGQLEVWKKSLK
EKWRLKPAYVVGQATASLVKKVGLAAEGEKCGNGEKLAEYICSRETPATLPLLFPCGT
LKGEVLPKTLKQKGILLESLTVYQKVQHPRMQDSLKSYFSTQGVPAGVTFFSPSGLTY
SLPHIQELSGASFDRIKFAAIGPTTARALASAGIPVSCTAEKPCPQDLAAGLQKALQP
SGPSSS"
Right now I have this:
while read p;
do cat "${p}.gb" | tr "\"" " "| egrep -v "/db_xref= taxon"| egrep "/gene=|/db_xref=|/product=|/protein_id=" | sort | uniq | awk '{print($2)}END{print("")}'
done <XM_codes.txt
Which results in this:
GeneID:100933602
UROS
uroporphyrinogen-111
XP_003755055.2
My output should be:
GeneID:100933602
UROS
uroporphyrinogen-III synthase isoform X1
XP_003755055.2