Skip to content

Commit

Permalink
address review comments and update to use http instead of ftp
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed Sep 20, 2023
1 parent 25afa6b commit 9cdaec8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion eva_submission/eload_backlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def find_file_on_ena(self, fn, analysis):
if not os.path.exists(full_path):
try:
self.info(f'Retrieve {basename} in {analysis} from ENA ftp')
url = f'ftp://ftp.sra.ebi.ac.uk/vol1/{analysis[:6]}/{analysis}/{basename}'
url = f'http://ftp.sra.ebi.ac.uk/vol1/{analysis[:6]}/{analysis}/{basename}'
download_file(url, full_path)
except urllib.error.URLError:
self.error(f'Could not access {url} on ENA: most likely does not exist')
Expand Down
7 changes: 5 additions & 2 deletions eva_submission/eload_ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ def _get_target_assembly(self):
If present use that, and insert into supported assembly table.
3. If the project's taxonomy is not in Ensembl, check ENA for the taxonomies associated with the project's
assemblies, called the alternate taxonomies.
4. If there is exactly one alternate taxonomy, check Ensembl (main then rapid release) for its supported
assembly. If present use that, and insert into supported assembly table.
4. If there is exactly one alternate taxonomy, check EVAPRO first then Ensembl (main and rapid release) for its
supported assembly. If present use that, inserting into supported assembly table if necessary.
5. If we still do not have a target assembly (i.e. project taxonomy is not supported by Ensembl AND alternate
taxonomy cannot be determined or is not supported by Ensembl), and the project has exactly one assembly,
then choose that one and insert into the supported assembly table.
Expand All @@ -441,6 +441,9 @@ def _get_target_assembly(self):
target_assembly = list(self.assembly_accessions)[0]
add_to_supported_assemblies(self.metadata_connection_handle, source_of_assembly='EVA',
target_assembly=target_assembly, taxonomy_id=self.taxonomy)
else:
self.warning(f'Could not determine target assembly from EVAPRO, Ensembl, or submitted assemblies: '
f'{", ".join(self.assembly_accessions)}')
return target_assembly

def _get_alt_tax_id(self):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cached-property
cerberus
ebi-eva-common-pyutils==0.5.8.dev0
ebi-eva-common-pyutils==0.5.8.dev1
eva-vcf-merge>=0.0.6
humanize
lxml
Expand Down

0 comments on commit 9cdaec8

Please sign in to comment.