Skip to content

Commit

Permalink
More references
Browse files Browse the repository at this point in the history
  • Loading branch information
chaplin89 committed May 17, 2024
1 parent c5422a2 commit 7ce91b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion wgse/metadata/references.json

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions wgse/reference_genome/repository_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,17 @@ def _create_companion_files(self, genome: Genome, force=False):
_external.make_dictionary(genome.fasta, genome.dict)
else:
logging.info(f"{genome}: Dictionary file exists.")

def self_test(self):
for index, reference in enumerate(self.genomes):
if reference.sequences is None:
try:
logging.info(f"Processing {reference} as it has no sequences.")
genome = manager.ingest(
genome = self.ingest(
reference.fasta_url, reference.source, reference.build
)
manager.genomes[index] = genome
manager._loader.save(manager.genomes)
self.genomes[index] = genome
self._loader.save(self.genomes)
except Exception as e:
logging.critical(e)

Expand Down Expand Up @@ -191,9 +191,4 @@ def ingest(
logging.info(f"4/4: Extracting sequence data: {compressor_output.name}.")
self._create_companion_files(genome)
genome.sequences = self._get_sequences(genome)
return genome


if __name__ == "__main__":
manager = RepositoryManager()
manager.self_test()
return genome

0 comments on commit 7ce91b4

Please sign in to comment.