Skip to content

Latest commit

 

History

History
512 lines (451 loc) · 18.9 KB

README.md

File metadata and controls

512 lines (451 loc) · 18.9 KB

Single Cell Toolkit

barcode_10x_scatac_fastqs

Usage

$ ./barcode_10x_scatac_fastqs.sh 

Usage:
    barcode_10x_scatac_fastqs \
        fastq_R1 \
        fastq_R2 \
        fastq_R3 \
        fastq_output_prefix \
        <interleaved [true|false]> \
        <add_barcode_in_comment [true|false]> \
        <barcode_tags_or_separator> \
        <compress_fastq_cmd [bgzip|pigz|gzip|stdout|-|uncompressed]> \

Purpose: Barcode 10x scATAC FASTQ files by adding the cell barcode from R2 to each
         read in R1 and R3, as a comment or in front of the original read name.

Parameters:
  - fastq_R1:   FASTQ R1 filename (uncompressed or gzipped).
  - fastq_R2:   FASTQ R2 filename with barcodes (uncompressed or gzipped).
  - fastq_R3:   FASTQ R3 filename (uncompressed or gzipped).
  - fastq_output_prefix: Output prefix for FASTQ output file(s).
  - interleaved:
      - true:   Write one output FASTQ file with reads from R1 and R3 interleaved.
      - false:  Write R1 and R2 output FASTQ file with reads from R1 and R3 respectively (default).
  - add_barcode_in_comment:
      - true:   Add barcode and barcode quality from R2 as read comment in SAM spec format
                (for usage wtih: "bwa -C") (default).
      - false:  Add barcode from R2 at the beginning of the read (for usage with bap/sinto).
  - barcode_tags_or_separator:
      - If add_barcode_in_comment = "true":
          Specify barcode tag (2 characters) and barcode quality tag (2 characters)
          (default: "CR_CY").
      - If add_barcode_in_comment = "false":
          Specify string which will be added between barcode name and the original read name
          (default: "-").
  - compress_fastq_cmd:
      - Compression program to use for output FASTQ files:
          - "bgzip":  'bgzip -@ 4 -l 6 -c'
          - "pigz":   'pigz -p 4 -6 -c'  (default)
          - "igzip":  'igzip -3 -c'  (very fast, low compression)
          - "gzip":   'gzip -6 -c'
          - "stdout":  Write uncompressed output to stdout.
          - "-":       Write uncompressed output to stdout.
          - "uncompressed":  Write uncompressed FASTQ files.
          - full custom command

        To change number of compression threads:
          - export compress_fastq_threads="4"

        To change compression level:
          - export compress_fastq_level="6"

Examples

Input FASTQ files:

Normal input FASTQ files:

test/barcode_10x_scatac_fastqs/input_R1.fastq:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 1:N:0:AGCACTGG
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 1:N:0:AGCACTGG
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 1:N:0:AGCACTGG
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 1:N:0:AGCACTGG
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E

test/barcode_10x_scatac_fastqs/input_R2.fastq:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 2:N:0:AGCACTGG
TAGGTCATCGCGCTGA
+
AAAAAEEEEEEEEEEE
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 2:N:0:AGCACTGG
CAGACTTTCTGAACGT
+
AAABBBBEEEEEEEEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 2:N:0:AGCACTGG
TAACCAAAGCCCATGC
+
AAAACCCCCCEEEEEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 2:N:0:AGCACTGG
AGTGGCAGTTCTACGA
+
AAAADDDDDEEEEEEE

test/barcode_10x_scatac_fastqs/input_R3.fastq:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 3:N:0:AGCACTGG
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 3:N:0:AGCACTGG
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 3:N:0:AGCACTGG
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 3:N:0:AGCACTGG
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

R2 fastq file with barcode corrected read in FASTQ comment:

test/barcode_10x_scatac_fastqs/input_R2.with_corrected_bc.fastq:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 2:N:0:AGCACTGG CB:Z:TAGGTCATCGCGCTGA-1
TAGGTCATCGCGCTGA
+
AAAAAEEEEEEEEEEE
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 2:N:0:AGCACTGG CB:Z:CAGACTTTCTGAACGT-1
CAGACTTTCTGAACGT
+
AAABBBBEEEEEEEEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 2:N:0:AGCACTGG CB:Z:TAACCAAAGCCCATGC-1
TAACCAAAGCCCATGC
+
AAAACCCCCCEEEEEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 2:N:0:AGCACTGG CB:Z:AGTGGCAGTTCTACGA-1
AGTGGCAGTTCTACGA
+
AAAADDDDDEEEEEEE

Write R1 and R2 FASTQ files with barcode tag CR and barcode quality tag CY in the FASTQ comment field.

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_true \
    false \
    true
test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_true_R1.fastq.gz:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA    CY:Z:AAAAAEEEEEEEEEEE
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT    CY:Z:AAABBBBEEEEEEEEE
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC    CY:Z:AAAACCCCCCEEEEEE
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA    CY:Z:AAAADDDDDEEEEEEE
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E

test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_true_R2.fastq.gz:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA    CY:Z:AAAAAEEEEEEEEEEE
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT    CY:Z:AAABBBBEEEEEEEEE
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC    CY:Z:AAAACCCCCCEEEEEE
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA    CY:Z:AAAADDDDDEEEEEEE
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

Write R1 and R2 FASTQ files with barcode tag CR and barcode quality tag CY and corrected CB tag (from R2 comment) in the FASTQ comment field.

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.with_corrected_bc.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_true_with_corrected_bc \
    false \
    true
test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_true_with_corrected_bc_R1.fastq.gz:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA	CY:Z:AAAAAEEEEEEEEEEE	CB:Z:TAGGTCATCGCGCTGA-1
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT	CY:Z:AAABBBBEEEEEEEEE	CB:Z:CAGACTTTCTGAACGT-1
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC	CY:Z:AAAACCCCCCEEEEEE	CB:Z:TAACCAAAGCCCATGC-1
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA	CY:Z:AAAADDDDDEEEEEEE	CB:Z:AGTGGCAGTTCTACGA-1
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E

test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_true_with_corrected_bc_R2.fastq.gz:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA	CY:Z:AAAAAEEEEEEEEEEE	CB:Z:TAGGTCATCGCGCTGA-1
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT	CY:Z:AAABBBBEEEEEEEEE	CB:Z:CAGACTTTCTGAACGT-1
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC	CY:Z:AAAACCCCCCEEEEEE	CB:Z:TAACCAAAGCCCATGC-1
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA	CY:Z:AAAADDDDDEEEEEEE	CB:Z:AGTGGCAGTTCTACGA-1
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

Write interleaved FASTQ file with barcode tag CR and barcode quality tag CY in the FASTQ comment field.

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R{1,2,3}.fastq \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    est/barcode_10x_scatac_fastqs/output_interleaved_true_add_barcode_in_comment_true \
    true \
    true
test/barcode_10x_scatac_fastqs/output_interleaved_true_add_barcode_in_comment_true_interleaved.fastq.gz:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA    CY:Z:AAAAAEEEEEEEEEEE
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA    CY:Z:AAAAAEEEEEEEEEEE
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT    CY:Z:AAABBBBEEEEEEEEE
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT    CY:Z:AAABBBBEEEEEEEEE
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC    CY:Z:AAAACCCCCCEEEEEE
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC    CY:Z:AAAACCCCCCEEEEEE
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA    CY:Z:AAAADDDDDEEEEEEE
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA    CY:Z:AAAADDDDDEEEEEEE
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

Write R1 and R2 FASTQ files with barcode added in front of the read name (separated with a "_").

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_false_with_bc_read_name_sep_underscore \
    false \
    false \
    "_"
test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_false_with_bc_read_name_sep_underscore_R1.fastq.gz:
@TAGGTCATCGCGCTGA_A00305:151:HL7Y5DRXX:1:2101:2682:1094
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@CAGACTTTCTGAACGT_A00305:151:HL7Y5DRXX:1:2101:3766:1094
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@TAACCAAAGCCCATGC_A00305:151:HL7Y5DRXX:1:2101:3893:1094
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@AGTGGCAGTTCTACGA_A00305:151:HL7Y5DRXX:1:2101:4327:1094
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E

test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_false_with_bc_read_name_sep_underscore_R2.fastq.gz:
@TAGGTCATCGCGCTGA_A00305:151:HL7Y5DRXX:1:2101:2682:1094
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@CAGACTTTCTGAACGT_A00305:151:HL7Y5DRXX:1:2101:3766:1094
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@TAACCAAAGCCCATGC_A00305:151:HL7Y5DRXX:1:2101:3893:1094
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@AGTGGCAGTTCTACGA_A00305:151:HL7Y5DRXX:1:2101:4327:1094
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

Write interleaved FASTQ file with barcode tag XX and barcode quality tag YY in the FASTQ comment field.

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R{1,2,3}.fastq \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    test/barcode_10x_scatac_fastqs/output_interleaved_true_add_barcode_in_comment_true_with_bc_tag_XX_and_bc_qual_tag_YY \
    true \
    true \
    XX_YY
test/barcode_10x_scatac_fastqs/output_interleaved_true_add_barcode_in_comment_true_with_bc_tag_XX_and_bc_qual_tag_YY_interleaved.fastq.gz:
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 XX:Z:TAGGTCATCGCGCTGA    YY:Z:AAAAAEEEEEEEEEEE
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 XX:Z:TAGGTCATCGCGCTGA    YY:Z:AAAAAEEEEEEEEEEE
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 XX:Z:CAGACTTTCTGAACGT    YY:Z:AAABBBBEEEEEEEEE
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 XX:Z:CAGACTTTCTGAACGT    YY:Z:AAABBBBEEEEEEEEE
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 XX:Z:TAACCAAAGCCCATGC    YY:Z:AAAACCCCCCEEEEEE
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 XX:Z:TAACCAAAGCCCATGC    YY:Z:AAAACCCCCCEEEEEE
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 XX:Z:AGTGGCAGTTCTACGA    YY:Z:AAAADDDDDEEEEEEE
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 XX:Z:AGTGGCAGTTCTACGA    YY:Z:AAAADDDDDEEEEEEE
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

Write interleaved FASTQ file to stdout (will always be interleaved) with barcode tag CR and barcode quality tag CR in the FASTQ comment field.

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    test/barcode_10x_scatac_fastqs/output_interleaved_true_add_barcode_in_comment_true_not_used_as_writes_to_stdout \
    true \
    true \
    CR_CY \
    stdout
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA    CY:Z:AAAAAEEEEEEEEEEE
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@A00305:151:HL7Y5DRXX:1:2101:2682:1094 CR:Z:TAGGTCATCGCGCTGA    CY:Z:AAAAAEEEEEEEEEEE
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT    CY:Z:AAABBBBEEEEEEEEE
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@A00305:151:HL7Y5DRXX:1:2101:3766:1094 CR:Z:CAGACTTTCTGAACGT    CY:Z:AAABBBBEEEEEEEEE
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC    CY:Z:AAAACCCCCCEEEEEE
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@A00305:151:HL7Y5DRXX:1:2101:3893:1094 CR:Z:TAACCAAAGCCCATGC    CY:Z:AAAACCCCCCEEEEEE
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA    CY:Z:AAAADDDDDEEEEEEE
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E
@A00305:151:HL7Y5DRXX:1:2101:4327:1094 CR:Z:AGTGGCAGTTCTACGA    CY:Z:AAAADDDDDEEEEEEE
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE

Write interleaved FASTQ file to stdout (will always be interleaved) with barcode added in front of the read name (separated with a "-").

./barcode_10x_scatac_fastqs.sh \
    test/barcode_10x_scatac_fastqs/input_R1.fastq \
    test/barcode_10x_scatac_fastqs/input_R2.fastq \
    test/barcode_10x_scatac_fastqs/input_R3.fastq \
    test/barcode_10x_scatac_fastqs/output_interleaved_false_add_barcode_in_comment_false_with_bc_read_name_sep_dask_not_used_as_writes_to_stdout \
    true \
    false \
    '-' \
    stdout
@TAGGTCATCGCGCTGA-A00305:151:HL7Y5DRXX:1:2101:2682:1094
GGTAAACACAATCTTACCCCACATCTTTACTTGGGTTTGACTTATAATA
+
AAAAA#EEEEEEEEEEEEEEEEEEEEEEEEEEEDDDDCCCCCCCCCCCC
@TAGGTCATCGCGCTGA-A00305:151:HL7Y5DRXX:1:2101:2682:1094
ACCATCTTCTTAGAGGGTCACCAGGCATTGGATCAGGGCCACCCTAAT
+
AAAAAEAEEE/E<EEE<EEEAA/EEEEEEEEEE<EEEEEAEAEEEE<E
@CAGACTTTCTGAACGT-A00305:151:HL7Y5DRXX:1:2101:3766:1094
GTGTGATACCTCCTCTGTCTCTGTCTCTCATCCTCCTCCTCCAGCCATG
+
AAAAAEAEEEEE/<AEEEEAEEEEEEEEAEEE/EEEE/EEEEEE/AAEE
@CAGACTTTCTGAACGT-A00305:151:HL7Y5DRXX:1:2101:3766:1094
AGCTCAATGAGGGCAAAGATAATGTCTACCTTATTCATTCCTGAGTCC
+
A/AAA6AEAEEEE<EAEAEEEEE6E66/EEAEEEEE<E/EAA/E/<EE
@TAACCAAAGCCCATGC-A00305:151:HL7Y5DRXX:1:2101:3893:1094
ACTATATATAGTCCCTTGGAAATTGGTAGGATAGAGACCTGTCTCTTAT
+
AAAAAAEEEEEEEEEEAEEEEEEEEEEEEEAEEEEEEEAAEEEEEAEEE
@TAACCAAAGCCCATGC-A00305:151:HL7Y5DRXX:1:2101:3893:1094
GTCTCTATCCTACCAATTTCCAAGGGACTATATATAGTCTGTCTCTTA
+
AAAAAEEEEEE/EEE<EEAEEAEE/EEEAAEEEEE/EEEEA/EE<EEE
@AGTGGCAGTTCTACGA-A00305:151:HL7Y5DRXX:1:2101:4327:1094
TGCCAGGAATAATTTTTCAAGAGAATCTGGATTCTGATTTGCAATCTGG
+
AAAAA/EAEEA<EA<A/6EE//EA<EEEA<EAEEE/E/EAAEEEE<<<E
@AGTGGCAGTTCTACGA-A00305:151:HL7Y5DRXX:1:2101:4327:1094
TGTCCCTTTTGGGGCCACTAATTATGACAAACTGGAAGCCAGGGTATC
+
AAAAAEEE/EAEAEEEE<AEEEE/EEA/A/A/AAEEEEEEEAEE<EEE