mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Merge pull request #12685 from bernt-matthias/topic/illumina-sniffer
This commit is contained in:
@@ -860,6 +860,11 @@ class FastqSolexa(Fastq):
|
||||
return False
|
||||
return True
|
||||
|
||||
def sniff_prefix(self, file_prefix: FilePrefix):
|
||||
# we expicitely do not want to have this sniffed. so we keep this here
|
||||
# such that it can not be enabled in datatypes_conf
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class FastqIllumina(Fastq):
|
||||
"""Class representing a FASTQ sequence ( the Illumina 1.3+ variant )
|
||||
@@ -880,6 +885,11 @@ class FastqIllumina(Fastq):
|
||||
return False
|
||||
return True
|
||||
|
||||
def sniff_prefix(self, file_prefix: FilePrefix):
|
||||
# we expicitely do not want to have this sniffed. so we keep this here
|
||||
# such that it can not be enabled in datatypes_conf
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class FastqCSSanger(Fastq):
|
||||
"""Class representing a Color Space FASTQ sequence ( e.g a SOLiD variant )
|
||||
|
||||
@@ -80,9 +80,13 @@ def handle_upload(
|
||||
if requested_ext != 'auto':
|
||||
datatype = registry.get_datatype_by_extension(requested_ext)
|
||||
# Enable sniffer "validate mode" (prevents certain sniffers from disabling themselves)
|
||||
if check_content and hasattr(datatype, 'sniff') and not datatype.sniff(path):
|
||||
stdout = ("Warning: The file 'Type' was set to '{ext}' but the file does not appear to be of that"
|
||||
" type".format(ext=requested_ext))
|
||||
if check_content and hasattr(datatype, 'sniff'):
|
||||
try:
|
||||
is_of_datatype = datatype.sniff(path)
|
||||
except Exception:
|
||||
is_of_datatype = False
|
||||
if not is_of_datatype:
|
||||
stdout = f"Warning: The file 'Type' was set to '{requested_ext}' but the file does not appear to be of that type"
|
||||
|
||||
# Handle unsniffable binaries
|
||||
if is_binary and ext == 'binary':
|
||||
|
||||
Reference in New Issue
Block a user