text: user1461: The module DigitalExpression which is part of the popular Drop-seq tools digitally count gene transcripts.
  The manual is not very clear on how exactly it resolves the UMI information. 
  Maybe I'm missing something but I was wondering if UMI are used in isolation or in conjunction with the barcode and or transcript?
  The manual i.e. Drop-seq Alignment Cookbook only states:
  To digitally count gene transcripts, a list of UMIs in each gene, within each cell, is assembled, and UMIs
  within edit distance = 1 are merged together. The total number of unique UMI sequences is counted,
  and this number is reported as the number of transcripts of that gene for a given cell.
  
  To clarify my point, I'll use an example. Say my reads are only 4 bp and read 1 has the cell barcode at position 1+2 and UMI at position 3+4.  read 2 constitutes the transcript read. 
  Given the following example reads:
  seqence1:   read1 = AATT  read2 = ATGC
  seqence2:   read1 = AATT  read2 = TTTT
  
  UMI and barcode are the same but read2 is different, would they be collapsed to 1 UMI count or 2?
  Similarly as case with same UMI and transcript but different cell barcode:
  seqence1:   read1 = AATT  read2 = ATGC
  seqence2:   read1 = GGTT  read2 = ATGC
  
  Also of note, UMI deduplication is the default setting as of the parameter below:
  OUTPUT_READS_INSTEAD=Boolean  Output number of reads instead of number of unique molecular barcodes.  Default value:
                                false. This option can be set to 'null' to clear the default value. Possible values:
                                {true, false} 
  
  
  user4866: The code does EXACTLY what it says in the first quote.
  Let's say you have 5 reads on a cell barcode that align to gene A.  Those reads have the following molecular barcodes:
  AAAA,BBBB,AAAA,CCCC,DDDD.
  There are 4 UNIQUE molecular barcodes.
  The only complication to this is that we collapse barcodes with an edit distance of 1, which takes care of over-inflation of UMI counts due to PCR/Sequencing errors.  If we added a barcode with the sequence AAAB to the original list, it would be collapsed into AAAA as it has an edit distance of 1, and you'd still have 4 unique molecular barcodes.
  
  user2388: 
  UMI and barcode are the same but read2 is different, would they be
    collapsed to 1 UMI count or 2?
  
  If the two reads share cell barcodes and UMI sequences and align to the same gene, (even if they are different sequences) then they originate from the same RNA molecule, and should only count as 1.
  https://support.10xgenomics.com/single-cell-gene-expression/library-prep/doc/user-guide-chromium-single-cell-3-reagent-kits-user-guide-v3-chemistry
  
original_text: 1461: <p>The module <code>DigitalExpression</code> which is part of the popular <a href="https://github.com/broadinstitute/Drop-seq" rel="nofollow noreferrer">Drop-seq tools</a> digitally count gene transcripts.</p>
  
  <p>The manual is not very clear on how exactly it resolves the UMI information. 
  Maybe I'm missing something but I was wondering if UMI are used in isolation or in conjunction with the barcode and or transcript?</p>
  
  <p>The manual i.e. <a href="https://github.com/broadinstitute/Drop-seq/blob/v2.3.0/doc/Drop-seq_Alignment_Cookbook.pdf" rel="nofollow noreferrer">Drop-seq Alignment Cookbook</a> only states:</p>
  
  <pre><code>To digitally count gene transcripts, a list of UMIs in each gene, within each cell, is assembled, and UMIs
  within edit distance = 1 are merged together. The total number of unique UMI sequences is counted,
  and this number is reported as the number of transcripts of that gene for a given cell.
  </code></pre>
  
  <p>To clarify my point, I'll use an example. Say my reads are only 4 bp and read 1 has the cell barcode at position 1+2 and UMI at position 3+4.  read 2 constitutes the transcript read. </p>
  
  <p>Given the following example reads:</p>
  
  <pre><code>seqence1:   read1 = AATT  read2 = ATGC
  seqence2:   read1 = AATT  read2 = TTTT
  </code></pre>
  
  <p>UMI and barcode are the same but read2 is different, would they be collapsed to 1 UMI count or 2?</p>
  
  <p>Similarly as case with same UMI and transcript but different cell barcode:</p>
  
  <pre><code>seqence1:   read1 = AATT  read2 = ATGC
  seqence2:   read1 = GGTT  read2 = ATGC
  </code></pre>
  
  <p>Also of note, UMI deduplication is the default setting as of the parameter below:</p>
  
  <pre><code>OUTPUT_READS_INSTEAD=Boolean  Output number of reads instead of number of unique molecular barcodes.  Default value:
                                false. This option can be set to 'null' to clear the default value. Possible values:
                                {true, false} 
  </code></pre>
   4866: <p>The code does EXACTLY what it says in the first quote.</p>
  
  <p>Let's say you have 5 reads on a cell barcode that align to gene A.  Those reads have the following molecular barcodes:</p>
  
  <p>AAAA,BBBB,AAAA,CCCC,DDDD.</p>
  
  <p>There are 4 UNIQUE molecular barcodes.</p>
  
  <p>The only complication to this is that we collapse barcodes with an edit distance of 1, which takes care of over-inflation of UMI counts due to PCR/Sequencing errors.  If we added a barcode with the sequence AAAB to the original list, it would be collapsed into AAAA as it has an edit distance of 1, and you'd still have 4 unique molecular barcodes.</p>
   2388: <blockquote>
    <p>UMI and barcode are the same but read2 is different, would they be
    collapsed to 1 UMI count or 2?</p>
  </blockquote>
  
  <p>If the two reads share cell barcodes and UMI sequences and align to the same <strong>gene</strong>, (even if they are different sequences) then they originate from the same RNA molecule, and should only count as 1.</p>
  
  <p><a href="https://support.10xgenomics.com/single-cell-gene-expression/library-prep/doc/user-guide-chromium-single-cell-3-reagent-kits-user-guide-v3-chemistry" rel="nofollow noreferrer">https://support.10xgenomics.com/single-cell-gene-expression/library-prep/doc/user-guide-chromium-single-cell-3-reagent-kits-user-guide-v3-chemistry</a></p>
  