Skip to content

Commit

Permalink
Merge pull request #220 from SMD-Bioinformatics-Lund/jw/load-chromoso…
Browse files Browse the repository at this point in the history
…me-lengths

Remove loading chr sizes from file
  • Loading branch information
Jakob37 authored Feb 7, 2025
2 parents 2a45de6 + 6705022 commit ec4b1f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/)
### Fixed
- Resolved all type errors from tsc
- Initial type hints added to command and db modules
- Remove unused file argument for load chromomsome info CLI command
- Fixed various issues raised by pylint

## 3.0.1
Expand Down
10 changes: 2 additions & 8 deletions gens/commands/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,6 @@ def transcripts(file: TextIO, mane: TextIO, genome_build: GenomeBuild):


@load.command()
# FIXME: Remove? Does not seem to be used?
@click.option(
"-f",
"--file",
type=click.File(),
help="Chromosome sizes in tsv format",
)
@click.option(
"-b",
"--genome-build",
Expand All @@ -232,7 +225,7 @@ def transcripts(file: TextIO, mane: TextIO, genome_build: GenomeBuild):
help="Timeout for queries.",
)
@with_appcontext
def chromosome_info(file: TextIO, genome_build: GenomeBuild, timeout: int):
def chromosome_info(genome_build: GenomeBuild, timeout: int):
"""Load chromosome size information into the database."""
db = app.config["GENS_DB"]
# if collection is not indexed, create index
Expand All @@ -254,6 +247,7 @@ def chromosome_info(file: TextIO, genome_build: GenomeBuild, timeout: int):
chromosomes_data = build_chromosomes_obj(chrom_data, genome_build, timeout)
except Exception as err:
raise click.UsageError(str(err))

# remove old entries
res = db[CHROMSIZES_COLLECTION].delete_many({"genome_build": int(genome_build)})
LOG.info(
Expand Down

0 comments on commit ec4b1f6

Please sign in to comment.