fastq.info fasta file truncates headers

When converting fastq files to fasta, fastq.info seems to only choose the first space-delimited text in the header. Like this:

@MISEQ:7:000000000-AMAKG:1:1101:16998:1719 1:N:0:PE716:ST6_21 TTGACCCT|0|TAGACCTA|0 ST6_21_F|0|23|
TTAGTTCCTTGCACACAATAGTTGCTCA

becomes

MISEQ_7_000000000-AMAKG_1_1101_16998_1719
TTAGTTCCTTGCACACAATAGTTGCTCA

But those other fields are critical for my analysis (they identify the sample number, origin of sample, primers, and gene). Is there a way to get the whole header?

You would have to write a script to connect the two. You could generate a mapping file doing…

grep “^@” *fastq | cut -c 2- > headers.txt