Skip to content

Commit

Permalink
Merge 0dfd0f8 into 0fe36d1
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Jul 26, 2023
2 parents 0fe36d1 + 0dfd0f8 commit 337c7c0
Show file tree
Hide file tree
Showing 7 changed files with 220 additions and 75 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/github-publish-celery-flaskomics.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Flaskomics Docker image to github
name: Publish Flaskomics Docker image to github

on:
push:
Expand All @@ -14,13 +14,14 @@ env:

jobs:
build-and-push-image:
if: github.repository == 'askomics/flaskomics'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
-
-
name: Checkout repository
uses: actions/checkout@v3

Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/DockerfileCelery
file: ./docker/DockerfileCelery
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 3 additions & 2 deletions .github/workflows/github-publish-flaskomics.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Flaskomics Docker image to github
name: Publish Flaskomics Docker image to github

on:
push:
Expand All @@ -14,13 +14,14 @@ env:

jobs:
build-and-push-image:
if: github.repository == 'askomics/flaskomics'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
-
-
name: Checkout repository
uses: actions/checkout@v3

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ This changelog was started for release 4.2.0.
- Fixed Gff Faldo integration (was only integrating the last selected entity)
- Fixed an issue when using filters and an 'UNION' node
- Fixed an issue when launching a query with a 'linked' attribute toggled but unselected
- Fixed missing includeIn and includeInReference in bed files
- Fixed 'overlap_with' faldo query

### Changed

Expand Down
10 changes: 10 additions & 0 deletions askomics/libaskomics/BedFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,14 @@ def generate_rdf_content(self):
self.graph_chunk.add((begin, rdflib.RDF.type, faldo_strand))
self.graph_chunk.add((end, rdflib.RDF.type, faldo_strand))

# blocks
block_base = self.settings.getint("triplestore", "block_size")
block_start = int(self.convert_type(feature.start + 1)) // block_base
block_end = int(self.convert_type(feature.end)) // block_base

for slice_block in range(block_start, block_end + 1):
self.graph_chunk.add((entity, self.namespace_internal['includeIn'], rdflib.Literal(int(slice_block))))
block_reference = self.rdfize(self.format_uri("{}_{}".format(feature.chrom, slice_block)))
self.graph_chunk.add((entity, self.namespace_internal["includeInReference"], block_reference))

yield
18 changes: 9 additions & 9 deletions askomics/libaskomics/GffFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,15 @@ def generate_rdf_content(self):
self.graph_chunk.add((begin, rdflib.RDF.type, faldo_strand))
self.graph_chunk.add((end, rdflib.RDF.type, faldo_strand))

# blocks
block_base = self.settings.getint("triplestore", "block_size")
block_start = int(self.convert_type(feature.location.start)) // block_base
block_end = int(self.convert_type(feature.location.end)) // block_base

for slice_block in range(block_start, block_end + 1):
self.graph_chunk.add((entity, self.namespace_internal['includeIn'], rdflib.Literal(int(slice_block))))
block_reference = self.rdfize(self.format_uri("{}_{}".format(rec.id, slice_block)))
self.graph_chunk.add((entity, self.namespace_internal["includeInReference"], block_reference))
# blocks
block_base = self.settings.getint("triplestore", "block_size")
block_start = int(self.convert_type(feature.location.start)) // block_base
block_end = int(self.convert_type(feature.location.end)) // block_base

for slice_block in range(block_start, block_end + 1):
self.graph_chunk.add((entity, self.namespace_internal['includeIn'], rdflib.Literal(int(slice_block))))
block_reference = self.rdfize(self.format_uri("{}_{}".format(rec.id, slice_block)))
self.graph_chunk.add((entity, self.namespace_internal["includeInReference"], block_reference))

yield

Expand Down

0 comments on commit 337c7c0

Please sign in to comment.