Method to seperate FASTQ files containing 2 different amplicons


I have a similar problem to this discussion - Multi-gene amplicon sequences with dada2.
Here Danny mentions there is code to split out each different gene in R and I’m wondering if anyone has this script or a similar one so I can run it with my FASTQ files to separate them, then use the suggestions posted above. I have 16S and ITS reads together in my FASTQ files.