def download_fastqs(self,dest_dir,barcode,overwrite=False):
        """
        Downloads all FASTQ files in the project that match the specified barcode, or if a barcode 
        isn't given, all FASTQ files as in this case it is assumed that this is not a multiplexed 
        experiment. Files are downloaded to the directory specified by dest_dir. 
    
        Args:
            barcode: `str`. The barcode sequence used. 
            dest_dir: `str`. The local directory in which the FASTQs will be downloaded.
            overwrite: `bool`. If True, then if the file to download already exists in dest_dir, the 
                file will be downloaded again, overwriting it. If False, the file will not be 
                downloaded again from DNAnexus.
    
        Returns: 
             `dict`: The key is the barcode, and the value is a dict with integer keys of 1 for the 
              forward reads file, and 2 for the reverse reads file. If not paired-end, 
    
        Raises:
            `Exception`: The barcode is specified and less than or greater than 2 FASTQ files are found.
        """
        fastq_props = self.get_fastq_files_props(barcode=barcode)
        res = {}  
        for f in fastq_props:
            props = fastq_props[f]
            read_num = int(props["read"])
            barcode = props["barcode"]
            if barcode not in res:
                res[barcode] = {}
            name = props["fastq_file_name"]
            filedest = os.path.abspath(os.path.join(dest_dir,name))
            res[barcode][read_num] = filedest
            if os.path.exists(filedest) and not overwrite:
                continue
            debug_logger.debug("Downloading FASTQ file {name} from DNAnexus project {project} to {path}.".format(name=name,project=self.dx_project_name,path=filedest))
            dxpy.download_dxfile(f,filedest)
        return res
Downloads all FASTQ files in the project that match the specified barcode, or if a barcode 
        isn't given, all FASTQ files as in this case it is assumed that this is not a multiplexed 
        experiment. Files are downloaded to the directory specified by dest_dir. 
    
        Args:
            barcode: `str`. The barcode sequence used. 
            dest_dir: `str`. The local directory in which the FASTQs will be downloaded.
            overwrite: `bool`. If True, then if the file to download already exists in dest_dir, the 
                file will be downloaded again, overwriting it. If False, the file will not be 
                downloaded again from DNAnexus.
    
        Returns: 
             `dict`: The key is the barcode, and the value is a dict with integer keys of 1 for the 
              forward reads file, and 2 for the reverse reads file. If not paired-end, 
    
        Raises:
            `Exception`: The barcode is specified and less than or greater than 2 FASTQ files are found.