diff --git a/src/encoded/commands/create_annotated_filenames.py b/src/encoded/commands/create_annotated_filenames.py index f47cc0ba..79e84c53 100644 --- a/src/encoded/commands/create_annotated_filenames.py +++ b/src/encoded/commands/create_annotated_filenames.py @@ -756,12 +756,15 @@ def get_sequencing_and_assay_codes( sequencers: List[Dict[str], Any], assays: List[Dict[str], Any], ) -> FilenamePart: - """Get sequencing and assay codes for file.""" + """Get sequencing and assay codes for file. + + Returns XX for Reference Genome and Reference Conversion files. + """ sequencing_codes = get_sequencing_codes(sequencers) assay_codes = get_assay_codes(assays) if len(sequencing_codes) == 1 and len(assay_codes) == 1: return get_filename_part(value=f"{sequencing_codes[0]}{assay_codes[0]}") - elif file_constants.DATA_CATEGORY_REFERENCE_GENOME in file.get("data_category",""): + elif file_constants.DATA_CATEGORY_REFERENCE_GENOME in file.get("data_category","") or file_constants.DATA_CATEGORY_REFERENCE_CONVERSION in file.get("data_category",""): return get_filename_part(value="XX") errors = [] if not sequencing_codes: @@ -820,6 +823,7 @@ def get_analysis( value = get_analysis_value( software_and_versions, reference_genome_code ) + import pdb; pdb.set_trace() if file_format_utils.is_chain_file(file_extension): value = f"{value}{ANALYSIS_INFO_SEPARATOR}{get_chain_file_value(file)}" if not value: diff --git a/src/encoded/commands/release_file.py b/src/encoded/commands/release_file.py index 705bc37d..62abb81d 100644 --- a/src/encoded/commands/release_file.py +++ b/src/encoded/commands/release_file.py @@ -198,7 +198,7 @@ def get_file_sets_from_file(self) -> List[dict]: ) mwfrs = ff_utils.search_metadata(search_filter, key=self.key) if len(mwfrs) != 1: - if file_constants.DATA_CATEGORY_REFERENCE_GENOME not in self.file["data_category"]: + if file_constants.DATA_CATEGORY_REFERENCE_GENOME not in self.file["data_category"] and file_constants.DATA_CATEGORY_REFERENCE_CONVERSION not in self.file["data_category"]: self.print_error_and_exit( ( f"Expected exactly one associated MetaWorkflowRun, got" diff --git a/src/encoded/item_utils/file_format.py b/src/encoded/item_utils/file_format.py index bb1679e1..55987f7a 100644 --- a/src/encoded/item_utils/file_format.py +++ b/src/encoded/item_utils/file_format.py @@ -10,4 +10,5 @@ def get_other_allowed_extensions(properties: Dict[str, Any]) -> str: def is_chain_file(properties: Dict[str, Any]) -> bool: - return get_standard_file_extension(properties) == "chain.gz" \ No newline at end of file + return get_standard_file_extension(properties) in ["chain.gz","chain"] + \ No newline at end of file