Skip to content
This repository has been archived by the owner on Mar 12, 2022. It is now read-only.

Commit

Permalink
v2.0.5 (#36)
Browse files Browse the repository at this point in the history
* Bump joblib from 0.17.0 to 1.0.1

Bumps [joblib](https://github.com/joblib/joblib) from 0.17.0 to 1.0.1.
- [Release notes](https://github.com/joblib/joblib/releases)
- [Changelog](https://github.com/joblib/joblib/blob/master/CHANGES.rst)
- [Commits](joblib/joblib@0.17.0...1.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Inclued lock file and upgraded dependencies.

* Fixed 1-oligo feature bug.

* Added `ifpd` disclaimer.

* Removed line break

* Bump rich from 9.10.0 to 9.11.0

Bumps [rich](https://github.com/willmcgugan/rich) from 9.10.0 to 9.11.0.
- [Release notes](https://github.com/willmcgugan/rich/releases)
- [Changelog](https://github.com/willmcgugan/rich/blob/master/CHANGELOG.md)
- [Commits](Textualize/rich@v9.10.0...v9.11.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump scipy from 1.6.0 to 1.6.1

Bumps [scipy](https://github.com/scipy/scipy) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](scipy/scipy@v1.6.0...v1.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rich from 9.11.0 to 9.11.1

Bumps [rich](https://github.com/willmcgugan/rich) from 9.11.0 to 9.11.1.
- [Release notes](https://github.com/willmcgugan/rich/releases)
- [Changelog](https://github.com/willmcgugan/rich/blob/master/CHANGELOG.md)
- [Commits](Textualize/rich@v9.11.0...v9.11.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Fixed ifpd_serve bug and released.

* Updated lock and fixed queried region passing

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
ggirelli and dependabot[bot] authored Feb 22, 2021
1 parent a0866b0 commit 1a9fb55
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 148 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@

# pytest cache
.pytest_cache/*

# Poetry
poetry.lock
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.



## [2.0.5] - 2021-02-22
## Added
- `poetry.lock` file for common dependency versions.
- Logging commands submitted to queue via `ifpd serve`.

## Changed
- Upgraded dependencies to latest versions and tested.

## Fixed
- Minor bug in `ifpd_mkdb` triggered by databases with 1 oligo in a feature. (unlikely scenario)
- Bug in `ifpd_serve` that added quotes around `--region start end` and caused queries to fail.



## [2.0.4] - 2021-02-11
### Added
- Tooltip to GUI explaining that setting `start` and `end` to the same value triggers a query of the whole feature.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Once you have `pipx` ready on your system, install the latest stable release of

## Usage

More details on how to run **iFISH-Probe-Design** are available in the online [documentation](https://ggirelli.github.io/iFISH-probe-design/usage).
All **iFISH-Probe-Design** commands are accessible via the `ifpd` keyword on the terminal. For each command, you can access its help page by using the `-h` option. More details on how to run `ifpd` are available in the online [documentation](https://ggirelli.github.io/iFISH-probe-design/usage).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion ifpd/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
@contact: gigi.ga90@gmail.com
"""

__version__ = "2.0.4"
__version__ = "2.0.5"

featureList = ["size", "homogeneity", "centrality"]
12 changes: 8 additions & 4 deletions ifpd/scripts/mkdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,20 @@ def sort_oligos(args, chromList):
if any(startPositions <= endPositions):
has_overlaps = True

oligoLengthList = np.unique(chromDF["chromEnd"] - chromDF["chromStart"])
oligoLengthRange[0] = min(oligoLengthRange[0], oligoLengthList.min())
oligoLengthRange[1] = max(oligoLengthRange[1], oligoLengthList.max())

assert len(startPositions) == len(endPositions)
if 0 == len(startPositions):
continue
oligoMinDist = min(oligoMinDist, min(startPositions - endPositions - 1))

oligoLengthList = np.unique(chromDF["chromEnd"] - chromDF["chromStart"])
oligoLengthRange[0] = min(oligoLengthRange[0], oligoLengthList.min())
oligoLengthRange[1] = max(oligoLengthRange[1], oligoLengthList.max())
return oligoMinDist, oligoLengthRange, has_overlaps


def mk_config(args, oligoMinDist, oligoLengthRange, has_overlaps):
if np.inf == oligoMinDist:
oligoMinDist = 0
logging.info("Write config file.")
config = configparser.ConfigParser()
config["DATABASE"] = {"name": args.dbName, "refGenome": args.refGenome}
Expand Down Expand Up @@ -197,6 +199,8 @@ def run(args: argparse.Namespace) -> None:
logging.info("Parse and write database.")
chromList = set()
for line in oligoGenerator:
if 0 == len(line.strip()):
continue
line = line.strip().split("\t")
chrom = line.pop(0)
line = "\t".join(line) + "\n"
Expand Down
3 changes: 0 additions & 3 deletions ifpd/sections/probe_design/enquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ def run(self):

# If the queue released a task
if not type(None) == type(cmd):
logging.info(cmd)
outdir_id = self.__get_outdir_id(cmd)

query_id = os.path.basename(cmd[outdir_id])
logging.info((cmd[outdir_id], query_id))
EH = open(f"{cmd[outdir_id]}.error.log", "w+")
logging.info(EH)

logging.debug(f'Running query "{query_id}"')
timestamp = time.time()
Expand Down
25 changes: 18 additions & 7 deletions ifpd/sections/probe_design/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import ifpd as fp
from ifpd.sections import routes
from ifpd.sections.probe_design.query import Query
import logging
import os
import pandas as pd # type: ignore
import shlex
Expand Down Expand Up @@ -586,9 +587,13 @@ def single_query(routes, self):
"""

formData = bot.request.forms
queriedRegion = ""
queriedRegion = []
if formData.start != formData.end:
queriedRegion = f"--region {formData.start} {formData.end}"
queriedRegion = [
"--region",
shlex.quote(formData.start),
shlex.quote(formData.end),
]
query_id = "%s:%s:%s:%s" % (
formData.chromosome,
formData.start,
Expand Down Expand Up @@ -624,7 +629,8 @@ def single_query(routes, self):
shlex.quote(f"{min_dist}"),
]
if 0 != len(queriedRegion):
cmd.extend([shlex.quote(queriedRegion)])
cmd.extend(queriedRegion)
logging.info(" ".join(cmd))

config = configparser.ConfigParser()
timestamp = time.time()
Expand Down Expand Up @@ -667,9 +673,13 @@ def spotting_query(routes, self):
"""

formData = bot.request.forms
queriedRegion = ""
if formData.multi_start != formData.multi_end:
queriedRegion = f"--region {formData.multi_start} {formData.multi_end}"
queriedRegion = []
if formData.start != formData.end:
queriedRegion = [
"--region",
shlex.quote(formData.start),
shlex.quote(formData.end),
]
query_id = "%s:%s:%s:%s" % (
formData.multi_chromosome,
formData.multi_start,
Expand Down Expand Up @@ -706,7 +716,8 @@ def spotting_query(routes, self):
shlex.quote(f"{formData.multi_win_shift}"),
]
if 0 != len(queriedRegion):
cmd.extend([shlex.quote(queriedRegion)])
cmd.extend(queriedRegion)
logging.info(" ".join(cmd))

config = configparser.ConfigParser()
timestamp = time.time()
Expand Down
Loading

0 comments on commit 1a9fb55

Please sign in to comment.