text: user1771: I am preprocessing a set of scTHSSeq reads in which each read sequence identifier has been replaced with the cell barcode, e.g.:
  @CGAGGCTG_TATCCTCT_AGTCCA
  ...
  ...
  ...
  @CGAGGCTG_TATCCTCT_GGTACG
  ...
  
  The read sequence identifier has been replaced with the cell barcode to be able to demultiplex alignments after bwa into a different bamfile for each cell.
  I ran the alignment using bwa mem and I received no errors. However I would like to know if there are caveats or reasons why this approach may lead to misleading results.
  I will then proceed to remove PCR duplicates with samtools rmdup executed in each cell's bamfile and then I'd run peak calling using spp.
  
  user964: What tool did you use to replace the read names? Can you modify that to split up the reads into separate files or encode the cell barcode in the read description instead of the read name? 
  Typically is it assumed by many tools that the FASTQ read names are unique. you could have issues with BWA and split alignments but I don't know if that pertains to your data.  I think the best you can do is the sanity check the results at each step of the process.
  In the fastq format (https://en.wikipedia.org/wiki/FASTQ_format) on the first line denoted by the '@' there can be two values separated by a space.  The first is the name and the second is the description.  
  So an example would be:
  @Original_read_name CGAGGCTG_TATCCTCT_AGTCCA
  ATCGATCATGATGACA
  +
  @&%*@(%@%*($!##!
  
  
original_text: 1771: <p>I am preprocessing a set of scTHSSeq reads in which each read sequence identifier has been replaced with the cell barcode, e.g.:</p>
  
  <pre><code>@CGAGGCTG_TATCCTCT_AGTCCA
  ...
  ...
  ...
  @CGAGGCTG_TATCCTCT_GGTACG
  ...
  </code></pre>
  
  <p>The read sequence identifier has been replaced with the cell barcode to be able to demultiplex alignments after bwa into a different bamfile for each cell.</p>
  
  <p>I ran the alignment using <a href="http://bio-bwa.sourceforge.net/bwa.shtml" rel="nofollow noreferrer">bwa mem</a> and I received no errors. However I would like to know if there are caveats or reasons why this approach may lead to misleading results.</p>
  
  <p>I will then proceed to remove PCR duplicates with <code>samtools rmdup</code> executed in each cell's bamfile and then I'd run peak calling using <a href="https://github.com/hms-dbmi/spp" rel="nofollow noreferrer">spp</a>.</p>
   964: <p>What tool did you use to replace the read names? Can you modify that to split up the reads into separate files or encode the cell barcode in the read description instead of the read name? </p>
  
  <p>Typically is it assumed by many tools that the FASTQ read names are unique. you could have issues with BWA and split alignments but I don't know if that pertains to your data.  I think the best you can do is the sanity check the results at each step of the process.</p>
  
  <p>In the fastq format (<a href="https://en.wikipedia.org/wiki/FASTQ_format" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/FASTQ_format</a>) on the first line denoted by the '@' there can be two values separated by a space.  The first is the name and the second is the description.  </p>
  
  <p>So an example would be:</p>
  
  <pre><code>@Original_read_name CGAGGCTG_TATCCTCT_AGTCCA
  ATCGATCATGATGACA
  +
  @&amp;%*@(%@%*($!##!
  </code></pre>
  