Skip to content

Commit

Permalink
allow for N symbol in barcode
Browse files Browse the repository at this point in the history
if barcodes have been corrected using other tools than 10x cellranger and/or have not been whitelisted, they may contain N symbols.
  • Loading branch information
koriege authored Nov 6, 2024
1 parent 5187127 commit f06ad31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dupsifter.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ uint64_t get_packed_barcode(bam1_t *read1, ds_conf_t *conf) {
uint8_t *full = s+1;
s++;
while (*s) {
if (*s != 'A' && *s != 'C' && *s != 'G' && *s != 'T' && *s != '+' && *s != '-') {
if (*s != 'N' && *s != 'A' && *s != 'C' && *s != 'G' && *s != 'T' && *s != '+' && *s != '-') {
fprintf(stderr, "[dupsifter] WARNING: Unable to parse barcode from CB tag ('barcode': %s). Using default barcode.\n", full);

return 0;
Expand All @@ -804,7 +804,7 @@ uint64_t get_packed_barcode(bam1_t *read1, ds_conf_t *conf) {
uint8_t *full = s+1;
s++;
while (*s) {
if (*s != 'A' && *s != 'C' && *s != 'G' && *s != 'T' && *s != '+' && *s != '-') {
if (*s != 'N' && *s != 'A' && *s != 'C' && *s != 'G' && *s != 'T' && *s != '+' && *s != '-') {
fprintf(stderr, "[dupsifter] WARNING: Unable to parse barcode from CB tag ('barcode': %s). Using default barcode.\n", full);

return 0;
Expand Down Expand Up @@ -834,7 +834,7 @@ uint64_t get_packed_barcode(bam1_t *read1, ds_conf_t *conf) {
if (last) {
last++;
while (*last) {
if (*last != 'A' && *last != 'C' && *last != 'G' && *last != 'T' && *last != '+' && *last != '-') {
if (*last != 'N' && *last != 'A' && *last != 'C' && *last != 'G' && *last != 'T' && *last != '+' && *last != '-') {
fprintf(stderr, "[dupsifter] WARNING: Unable to parse barcode from read name ('barcode': %s). Using default barcode.\n", full);

return 0;
Expand Down

0 comments on commit f06ad31

Please sign in to comment.