# Does read sequence identifier need to be unique for proper alignment?

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.

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
+
@&%*@(%@%*(\$!##!

• In this iteration I did it using awk, do you mean incorporating it in the first line after the sequence identifier? I can certainly modify the script.
– gc5
Oct 17 '18 at 19:51
• I mean the one defined as entry.comment here?
– gc5
Oct 17 '18 at 20:02
• The classic way to do this would be to append the barcodes to the read name such that the read name looks like: @Original_read_name_CGAGGCTG_TATCCTCT_AGTCCA, If the barcodes are extacted from the read sequences themselves, this processing can be achevied using umi_tools extract Oct 18 '18 at 13:02