<p>Thank you for asking this question. "Flag" is actually an obsolete notation which predates the introduction of proper <a href="https://www.uniprot.org/help/evidences" rel="nofollow noreferrer">evidence attribution</a> in UniProtKB, and which escaped us in our efforts to update documentation to use the correct terminology. The correct  term would now be "Evidence", and the next version of the user manual will have this corrected (release 2019_06 due on July 3rd, 2019).</p>

<p>Before the current way of evidencing annotations was introduced in UniProtKB, the following "non-experimental qualifiers" or "flags" were used: By similarity, Potential, Probable. Absence of such a flag would generally imply that the information is based on an experiment.</p>

<p>When in doubt, please don't hesitate to contact the UniProt helpdesk. </p>

CC BY-SA 4.0
2019-06-11T15:16:25.480Z
2019-06-11T15:16:25.480Z
Elisabeth.Gasteiger
<p>In creating a parser for the UniProt flat file <code>uniprot_sprot.dat</code> (<a href="ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/" rel="nofollow noreferrer">directory</a>) in the <a href="https://www.uniprot.org/docs/userman.htm" rel="nofollow noreferrer">manual</a> for the section <code>SUBCELLULAR LOCATION</code> is listed </p>

<blockquote>
  <p>The format of SUBCELLULAR LOCATION is:</p>
  
  <p>CC   -!- SUBCELLULAR LOCATION:(( Molecule:)?( Location.)+)?(
  Note=Free_text( <code>Flag</code>)?.)?</p>
  
  <p>Where:  </p>
  
  <ul>
  <li>Molecule: Isoform, chain or peptide name  </li>
  <li>Location = Subcellular_location( <code>Flag</code>)?(; Topology( <code>Flag</code>)?)?(; Orientation( <code>Flag</code>)?)? 
  
  <ul>
  <li>Subcellular_location: SL-line of subcell.txt ID-record </li>
  <li>Topology: SL-line of subcell.txt IT-record </li>
  <li>Orientation: SL-line of subcell.txt IO-record</li>
  </ul></li>
  </ul>
</blockquote>

<p>What does <code>Flag</code> mean?</p>

<p>My best guess at present is that these are the text surrounded by parenthesis, e.g.</p>

<pre><code> Note=Not associated with microtubules (PubMed:21558460).
</code></pre>

<p>but that does not help in understanding why it is named flag.</p>

<p>While I can use my parser to verify this is correct when this section is working, it would be nicer to have a better understanding of what the word flag means in this context.</p>

<p>I also checked the XML <a href="ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot.xsd" rel="nofollow noreferrer">schema</a> but no help there.</p>

<hr>

<p>Per request.</p>

<p>More examples from file.</p>

<p>These where gathered using grep. </p>

<pre><code>grep -A 3 -n 'CC   -!- SUBCELLULAR LOCATION'  /mnt/.../uniprot_sprot.dat     
</code></pre>

<p><br></p>

<pre><code>71:CC   -!- SUBCELLULAR LOCATION: Host membrane {ECO:0000305}; Single-pass
72-CC       membrane protein {ECO:0000305}.

2163:CC   -!- SUBCELLULAR LOCATION: Membrane {ECO:0000305}; Single-pass membrane
2164-CC       protein {ECO:0000305}.

6003:CC   -!- SUBCELLULAR LOCATION: Secreted {ECO:0000305}.

7039:CC   -!- SUBCELLULAR LOCATION: Cell membrane {ECO:0000305}; Lipid-anchor,
7040-CC       GPI-anchor {ECO:0000305}. Note=In microneme/rhoptry complexes.
7041-CC       {ECO:0000250}.

7409:CC   -!- SUBCELLULAR LOCATION: Secreted {ECO:0000305}.

8677:CC   -!- SUBCELLULAR LOCATION: Virion {ECO:0000269|PubMed:9499098}. Host
8678-CC       endoplasmic reticulum-Golgi intermediate compartment
8679-CC       {ECO:0000269|PubMed:15016891, ECO:0000269|PubMed:9499098}.

12871:CC   -!- SUBCELLULAR LOCATION: Nucleus {ECO:0000250|UniProtKB:P48349}.
12872-CC       Cytoplasm {ECO:0000250|UniProtKB:P48349}. Note=Translocates from
12873-CC       the cytosol to the nucleus when phosphorylated.
12874-CC       {ECO:0000250|UniProtKB:P48349}.
</code></pre>

<p><br></p>

<pre><code>grep -A 6 -n -m 200 'CC   -!- SUBCELLULAR LOCATION.*(.*)'  /mnt/.../uniprot_sprot.dat
</code></pre>

<p><br></p>

<pre><code>1560049:CC   -!- SUBCELLULAR LOCATION: Secreted. Note=Dense core vesicles (DCV).

2452012:CC   -!- SUBCELLULAR LOCATION: DNA-(apurinic or apyrimidinic site) lyase,
2452013-CC       mitochondrial: Mitochondrion. Note=Translocation from the
2452014-CC       cytoplasm to the mitochondria is mediated by ROS signaling and
2452015-CC       cleavage mediated by granzyme A. Tom20-dependent translocated
2452016-CC       mitochondrial APEX1 level is significantly increased after
2452017-CC       genotoxic stress (By similarity). The cleaved APEX2 is only
2452018-CC       detected in mitochondria. {ECO:0000250}.

9243083:CC   -!- SUBCELLULAR LOCATION: Isoform Soluble copper chaperone CopA(Z):
9243084-CC       Cytoplasm {ECO:0000250|UniProtKB:Q59385}.

38197671:CC   -!- SUBCELLULAR LOCATION: E(rns) glycoprotein: Host cell membrane
38197672-CC       {ECO:0000269|PubMed:28290554}; Peripheral membrane protein. Virion
38197673-CC       membrane {ECO:0000269|PubMed:28290554}; Peripheral membrane
38197674-CC       protein {ECO:0000305}. Note=The C-terminus membrane anchor of Erns
38197675-CC       represents an amphipathic helix embedded in plane into the
38197676-CC       membrane.

4924705:CC   -!- SUBCELLULAR LOCATION: Note=(Microbial infection) In the presence
4924706-CC       of M.tuberculosis EsxA-EsxB complex decreased amounts of B2M are
4924707-CC       found on the cell surface (PubMed:25356553).
4924708-CC       {ECO:0000269|PubMed:25356553}.
</code></pre>

<p><strong>02/18/2019</strong></p>

<p>For the DE line it is noted</p>

<blockquote>
  <p>A block of DE lines may further contain multiple Includes: and/or Contains: sections and a separate field <code>Flags</code>: to indicate whether the protein sequence is a precursor or a fragment:</p>
</blockquote>

<p>At present this seems to be related to the answer. When I have the file correctly parsed, then I can check for a correspondence as verification.</p>

CC BY-SA 4.0
2019-02-11T18:17:12.100Z
Of interest: UniProt [subcell.txt](https://www.uniprot.org/docs/subcell) - Controlled vocabulary of subcellular locations and membrane topologies and orientations.
Guy Coder
CC BY-SA 4.0
2019-02-11T18:19:24.343Z
Of interest: UniProt [Evidence](https://www.uniprot.org/help/evidences) - Most information in UniProtKB has one or several “evidence tags” which describe the source of the information, e.g. an experiment that has been published in the scientific literature, an orthologous protein, a record from another database, etc.
Guy Coder
CC BY-SA 4.0
2019-02-13T14:28:06.897Z
Thanks. And sorry, I forgot to delete my comment after I added the example. Have you looked at the [Swissknife](http://swissknife.sourceforge.net/docs/) perl module? This is produced by Uniprot precisely to deal with these files. That should at least point you in the right direction.
terdon
CC BY-SA 4.0
2019-02-13T15:16:37.400Z
Ah, maybe. Perhaps to specify that the precursor is in one subcellular location while the mature product is in another. I don't know. And I couldn't find an example of these "flags" in an actual CC section of the `uniprot_sprot.dat` I had lying around. But I admit I just looked at a few, I don't really know how to `grep` for it.
terdon
CC BY-SA 4.0
2019-02-13T15:31:08.533Z
Please don't update the question with what you learned, but post an answer instead! That way, the question will be marked as answered and can help future users. And thank you, I am very familiar with grep, I've been using it every day of my life for almost a couple of decades now.  :)
terdon
<file-formats><uniprot>
UniProt flat file. Interpreting format of SUBCELLULAR LOCATION. What does flag mean?
# UniProt flat file. Interpreting format of SUBCELLULAR LOCATION. What does flag mean?

(Asked by: username_0 on 2019-02-11)

In creating a parser for the UniProt flat file uniprot_sprot.dat (directory) in the manual for the section SUBCELLULAR LOCATION is listed 

The format of SUBCELLULAR LOCATION is:
CC   -!- SUBCELLULAR LOCATION:(( Molecule:)?( Location.)+)?(
  Note=Free_text( Flag)?.)?
Where:  

Molecule: Isoform, chain or peptide name  
Location = Subcellular_location( Flag)?(; Topology( Flag)?)?(; Orientation( Flag)?)? 
  
  
Subcellular_location: SL-line of subcell.txt ID-record 
Topology: SL-line of subcell.txt IT-record 
Orientation: SL-line of subcell.txt IO-record



What does Flag mean?
My best guess at present is that these are the text surrounded by parenthesis, e.g.
 Note=Not associated with microtubules (PubMed:21558460).

but that does not help in understanding why it is named flag.
While I can use my parser to verify this is correct when this section is working, it would be nicer to have a better understanding of what the word flag means in this context.
I also checked the XML schema but no help there.

Per request.
More examples from file.
These where gathered using grep. 
grep -A 3 -n 'CC   -!- SUBCELLULAR LOCATION'  /mnt/.../uniprot_sprot.dat     


71:CC   -!- SUBCELLULAR LOCATION: Host membrane {ECO:0000305}; Single-pass
72-CC       membrane protein {ECO:0000305}.

2163:CC   -!- SUBCELLULAR LOCATION: Membrane {ECO:0000305}; Single-pass membrane
2164-CC       protein {ECO:0000305}.

6003:CC   -!- SUBCELLULAR LOCATION: Secreted {ECO:0000305}.

7039:CC   -!- SUBCELLULAR LOCATION: Cell membrane {ECO:0000305}; Lipid-anchor,
7040-CC       GPI-anchor {ECO:0000305}. Note=In microneme/rhoptry complexes.
7041-CC       {ECO:0000250}.

7409:CC   -!- SUBCELLULAR LOCATION: Secreted {ECO:0000305}.

8677:CC   -!- SUBCELLULAR LOCATION: Virion {ECO:0000269|PubMed:9499098}. Host
8678-CC       endoplasmic reticulum-Golgi intermediate compartment
8679-CC       {ECO:0000269|PubMed:15016891, ECO:0000269|PubMed:9499098}.

12871:CC   -!- SUBCELLULAR LOCATION: Nucleus {ECO:0000250|UniProtKB:P48349}.
12872-CC       Cytoplasm {ECO:0000250|UniProtKB:P48349}. Note=Translocates from
12873-CC       the cytosol to the nucleus when phosphorylated.
12874-CC       {ECO:0000250|UniProtKB:P48349}.


grep -A 6 -n -m 200 'CC   -!- SUBCELLULAR LOCATION.*(.*)'  /mnt/.../uniprot_sprot.dat


1560049:CC   -!- SUBCELLULAR LOCATION: Secreted. Note=Dense core vesicles (DCV).

2452012:CC   -!- SUBCELLULAR LOCATION: DNA-(apurinic or apyrimidinic site) lyase,
2452013-CC       mitochondrial: Mitochondrion. Note=Translocation from the
2452014-CC       cytoplasm to the mitochondria is mediated by ROS signaling and
2452015-CC       cleavage mediated by granzyme A. Tom20-dependent translocated
2452016-CC       mitochondrial APEX1 level is significantly increased after
2452017-CC       genotoxic stress (By similarity). The cleaved APEX2 is only
2452018-CC       detected in mitochondria. {ECO:0000250}.

9243083:CC   -!- SUBCELLULAR LOCATION: Isoform Soluble copper chaperone CopA(Z):
9243084-CC       Cytoplasm {ECO:0000250|UniProtKB:Q59385}.

38197671:CC   -!- SUBCELLULAR LOCATION: E(rns) glycoprotein: Host cell membrane
38197672-CC       {ECO:0000269|PubMed:28290554}; Peripheral membrane protein. Virion
38197673-CC       membrane {ECO:0000269|PubMed:28290554}; Peripheral membrane
38197674-CC       protein {ECO:0000305}. Note=The C-terminus membrane anchor of Erns
38197675-CC       represents an amphipathic helix embedded in plane into the
38197676-CC       membrane.

4924705:CC   -!- SUBCELLULAR LOCATION: Note=(Microbial infection) In the presence
4924706-CC       of M.tuberculosis EsxA-EsxB complex decreased amounts of B2M are
4924707-CC       found on the cell surface (PubMed:25356553).
4924708-CC       {ECO:0000269|PubMed:25356553}.

02/18/2019
For the DE line it is noted

A block of DE lines may further contain multiple Includes: and/or Contains: sections and a separate field Flags: to indicate whether the protein sequence is a precursor or a fragment:

At present this seems to be related to the answer. When I have the file correctly parsed, then I can check for a correspondence as verification.

**Tags:** file-formats, uniprot
> **Comments:**
> **username_0**: Of interest: UniProt [subcell.txt](https://www.uniprot.org/docs/subcell) - Controlled vocabulary of subcellular locations and membrane topologies and orientations.  
> **username_0**: Of interest: UniProt [Evidence](https://www.uniprot.org/help/evidences) - Most information in UniProtKB has one or several “evidence tags” which describe the source of the information, e.g. an experiment that has been published in the scientific literature, an orthologous protein, a record from another database, etc.  
> **username_1**: Thanks. And sorry, I forgot to delete my comment after I added the example. Have you looked at the [Swissknife](http://swissknife.sourceforge.net/docs/) perl module? This is produced by Uniprot precisely to deal with these files. That should at least point you in the right direction.  
> **username_1**: Ah, maybe. Perhaps to specify that the precursor is in one subcellular location while the mature product is in another. I don't know. And I couldn't find an example of these "flags" in an actual CC section of the `uniprot_sprot.dat` I had lying around. But I admit I just looked at a few, I don't really know how to `grep` for it.  
> **username_1**: Please don't update the question with what you learned, but post an answer instead! That way, the question will be marked as answered and can help future users. And thank you, I am very familiar with grep, I've been using it every day of my life for almost a couple of decades now.  :)  

---

## 1 answers

### Answer by username_2 on 2019-06-11. Score: 1 | Accepted answer

Thank you for asking this question. "Flag" is actually an obsolete notation which predates the introduction of proper [evidence attribution](https://www.uniprot.org/help/evidences) in UniProtKB, and which escaped us in our efforts to update documentation to use the correct terminology. The correct term would now be "Evidence", and the next version of the user manual will have this corrected (release 2019\_06 due on July 3rd, 2019).

Before the current way of evidencing annotations was introduced in UniProtKB, the following "non-experimental qualifiers" or "flags" were used: By similarity, Potential, Probable. Absence of such a flag would generally imply that the information is based on an experiment.

When in doubt, please don't hesitate to contact the UniProt helpdesk.


---

