Skip to content

Instantly share code, notes, and snippets.

@nh13
Last active August 17, 2019 17:12
Show Gist options
  • Save nh13/87bdcf155cbbe5807d593d7b24285305 to your computer and use it in GitHub Desktop.
Save nh13/87bdcf155cbbe5807d593d7b24285305 to your computer and use it in GitHub Desktop.
DemuxFastqs with multiple FASTQs per sub-read
#!/bin/bash
set -euo pipefail
# Concatenate the FASTQs per sub-read prior to running DemuxFastqs
cat SAMPLE1_S1_L001_R1_001.fastq.gz SAMPLE1_S1_L001_R1_002.fastq.gz > SAMPLE1_S1_L001_R1_COMBINED.fastq.gz;
cat SAMPLE1_S1_L001_R2_001.fastq.gz SAMPLE1_S1_L001_R2_002.fastq.gz > SAMPLE1_S1_L001_R2_COMBINED.fastq.gz;
# Run Demux Fastqs (try `conda install -c bioconda fgbio` to install `fgbio`).
# Note: since we have two sub-reads, we must have two read structures.
fgbio DemuxFastqs \
-i SAMPLE1_S1_L001_R1_COMBINED.fastq.gz SAMPLE1_S1_L001_R2_COMBINED.fastq.gz
-r 8B+T 8B+T \
...<other options>;
#!/bin/bash
set -euo pipefail
# Run Demux Fastqs (try `conda install -c bioconda fgbio` to install `fgbio`).
# Note: since we have two sub-reads, we must have two read structures.
fgbio DemuxFastqs \
-i <(cat SAMPLE1_S1_L001_R1_001.fastq.gz SAMPLE1_S1_L001_R1_002.fastq.gz) \
<(cat SAMPLE1_S1_L001_R2_001.fastq.gz SAMPLE1_S1_L001_R2_002.fastq.gz) \
-r 8B+T 8B+T \
...<other options>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment