code: def movefastq(self):
          logging.info('Moving FASTQ files')
          for sample in self.metadata.runmetadata.samples:
              outputdir = os.path.join(self.path, sample.name)
              fastqfiles = sorted(glob(os.path.join(self.path, '{}_*.fastq*'.format(sample.name)))) \
                  if sorted(glob(os.path.join(self.path, '{}_*.fastq*'.format(sample.name)))) \
                  else sorted(glob(os.path.join(self.path, '{}.fastq*'.format(sample.name)))) \
                  if sorted(glob(os.path.join(self.path, '{}.fastq*'.format(sample.name)))) \
                  else sorted(glob(os.path.join(self.path, '{}*.fastq*'.format(sample.name))))
              if fastqfiles:
                  make_path(outputdir)
                  try:
                      list(map(lambda x: os.symlink(os.path.join('..', os.path.basename(x)),
                                                    os.path.join(outputdir, os.path.basename(x))), fastqfiles))
                  except OSError:
                      pass
                  fastqfiles = [fastq for fastq in sorted(glob(os.path.join(outputdir, '{}*.fastq*'.format(sample.name))))
                                if 'trimmed' not in fastq and 'normalised' not in fastq and 'corrected' not in fastq
                                and 'paired' not in fastq and 'unpaired' not in fastq]
              else:
                  if outputdir:
                      fastqfiles = [fastq for fastq in sorted(glob(os.path.join(
                          outputdir, '{}*.fastq*'.format(outputdir, sample.name))))
                                    if 'trimmed' not in fastq and 'normalised' not in fastq and 'corrected' not in fastq
                                    and 'paired' not in fastq and 'unpaired' not in fastq]
              sample.general.fastqfiles = fastqfiles