Skip to content

Commit

Permalink
Merge pull request #370 from EBI-Metagenomics/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MGS-sails authored Oct 28, 2024
2 parents cc70aec + 109ff60 commit ef38aec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion emgapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,6 @@ def available(self, request=None):
"""
query_filters = {
"all": [
Q(study__is_suppressed=False),
Q(study__is_private=False),
Q(run__is_private=False) | Q(assembly__is_private=False),
Q(is_suppressed=False),
Expand Down
12 changes: 6 additions & 6 deletions emgapianns/management/commands/import_extra_run_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.core.management import BaseCommand

logger = logging.getLogger(__name__)

import re

class Command(BaseCommand):
help = "Imports a directory of GFFs that as 'extra run annotations', " \
Expand Down Expand Up @@ -61,15 +61,15 @@ def handle(self, *args, **options):
logger.info('Looking for RO Crates (.zips')
for file in Path(self.gffs_dir).glob('**/*.zip'):
logger.info(f'Handling RO Crate Zip file {file}')
# erz = 'ERZ' + file.name.split('ERZ')[1].strip('.zip')
logger.info('this is the FILE NAME ' + file.name)
srr = 'SRR' + file.name.split('SRR')[1].strip('.zip')
accession_prefix = re.search(r'[A-Z]{3}\d+', file.name)
accession_prefix = accession_prefix.group().strip()
try:
run = emg_models.Run.objects.get(accession=srr)
run = emg_models.Run.objects.get(accession=accession_prefix)
except emg_models.Run.DoesNotExist:
logger.warning(f'No Run found for RO Crate apparent ERZ {srr}')
logger.warning(f'No Run found for RO Crate {accession_prefix}')
continue
logger.info(f'Will upload RO Crate for {srr}')
logger.info(f'Will upload RO Crate for {accession_prefix}')
self.upload_rocrate(run, gffs_directory, file.name)

def upload_rocrate(
Expand Down
2 changes: 1 addition & 1 deletion emgcli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "2.4.49"
__version__: str = "2.4.50"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ max-line-length = 119
"""

[tool.bumpversion]
current_version = "2.4.49"
current_version = "2.4.50"

[[tool.bumpversion.files]]
filename = "emgcli/__init__.py"

0 comments on commit ef38aec

Please sign in to comment.