How can I merge my fastq files?

Please note that NanoTYPER 2.x.x versions CAN handle multiple fastq files!

If the MinKNOW basecalling configuration is incorrect or the customer is using post-run basecalling, the MinKNOW generates several small FASTQ files instead of a single and large one.

If the NanoTYPER is not able able to handle those multiple FASTQ files for the same sample, we have to manually merge those files into a single one.

  • First, launch the Ubuntu terminal or CMD in the folder where the FASTQ files are located or navigate until there;
  • Then, make sure that the folder where the FASTQ files are located has writing permissions by executing the following command:

sudo chmod -w .

Note: the period at the end of the command above should be inserted as well.

  • Then, merge the FASTQ files (this command can be performed either with the FASTQ file gz compressed [*.fastq.gz] or not [*.fastq]) using the following command (where the content within braces should be replaced):

Linux:

cat *.gz > fastq_runid_{long-run-id}_{barcode}_{unique-number}.fastq.gz

  • A practical example for the replacement of the variables of the command above would be:
cat *.gz > fastq_runid_f2110fa627844e26356ca6059191c104539be713_barcode01_01.fastq.gz

Windows:

copy *.gz /b fastq_runid_{long-run-id}_{barcode}_{unique-number}.fastq.gz

  • A practical example for the replacement of the variables of the command above would be:
copy *.gz /b fastq_runid_f2110fa627844e26356ca6059191c104539be713_barcode01_01.fastq.gz

Please do not forget to change the unique numbers (last variable of the string), to prevent Twin pairing the sample files that share the same!

Using “wildcards”:

Wildcard characters (like the asterisk – * )  can be used if needed for specific samples.

For example:

copy SU252*_*_*_L1_R1_001.fastq /b SU252_merged_L1_R1_001.fastq