FASTQ files contain sequencing reads 'as they come off the sequencing instrument' (https://genome.ucsc.edu/ENCODE/fileFormats.html#FASTQ). Is there any particular order to them? E.g. based on the position of the flow cell? Quality?
Illumina reads are roughly in scan order. Nearby reads are likely to be nearby in the fastq. They are not ordered by quality. It depends on the instrument, but there are some universal truths (by "adjacent" I'm describing Illumina ordering):
All reads in a lane are adjacent.
All reads in a tile are adjacent.
Reads in adjacent tiles are adjacent. Also, the last tile in a row is adjacent to the first tile in the next row.
Within a tile, it's more mysterious. The reads seem to go left-to-right then top-to-down. I'm not really sure what the algorithm is, with regards to pixels, but of course it's platform-specific. You can detect this very precisely from the read names.