# Get frequency of index sequences of fastq file

I recently did some sequencing on a MiniSeq and unexpectedly the Undetermined_S0_L001_R1_001.fastq.gz file contained quite a lot of data (about 40% of total). I would like to know which indices are present in this file and ideally get a frequency of all index sequences in this file. How can I do this?

This is the output of head:

@MN00148:128:000H2YCW2:1:11102:12116:1065 1:N:0:0
GNAGAGGATTCAGGGAGCCAGCGCGCATATATCAG
+
F#FFFFFFFFFFFFFFFFFFA=/A///////////
@MN00148:128:000H2YCW2:1:11102:11354:1065 1:N:0:0
GNACCCGTGCGGCTGGAGAGACCACTAGAAAGAAT
+
A#AFFFFFFFFFFFFFFFFF///////FF=////6
@MN00148:128:000H2YCW2:1:11102:4103:1066 1:N:0:0
ANGTTGGTGGTACATCAGGGACGCGGAGATCTCAG

• I do not recall how the formatting of the header exactly is, but the index read sequences should be in there and it is rather trivial to parse and then uniq -c them. May 17 at 9:36
• How did you demultiplex? With bcl2fastq? You can generate the index reads like I1 May 17 at 17:07

I actually went back to the output folder on the MiniSeq and found this file: DemultiplexSummaryF1L1, which contains demultiplexing information of the whole run. Half-way through this file I found what I was looking for:

### Most Popular Index Sequences

### Columns: Sequence ReverseComplement HitCount

Index
TGACCA  TGGTCA  2455964
CGATGT  ACATCG  2320579
GGCCCC  GGGGCC  2023652
CGCGGG  CCCGCG  1983605
CCGTCC  GGACGG  1641274
CAGATC  GATCTG  1514252
CCGGCC  GGCCGG  1319383
CCGCGC  GCGCGG  1109940
ACAGTG  CACTGT  891344
CCCGGG  CCCGGG  706083
TGCCCA  TGGGCA  168294
CAGCTC  GAGCTG  164091
.... [data continues]


I don't know that you can get them from that file. I've noticed that when the Miseq is left to run its version of fastq generation software, there are no indices in the undetermined file. I usually run bcl2fastq myself if I want that information.

They recently came out with a new version of software for the MiSeq, so things might be different now.