Skip to content

Commit

Permalink
Merge pull request #75 from Clinical-Genomics-Lund/symlink-dir-fixes
Browse files Browse the repository at this point in the history
Symlink dir fixes
  • Loading branch information
svartapaerlan authored Jun 10, 2024
2 parents 7ef56ba + 6d9a0a6 commit 7774822
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
22 changes: 13 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@

### Fixed

- Changed `--symlink_dir` to `--symlink-dir` for consistency

### Changed

- Use `basename` when `symlink_dir` provided

## [0.9.1]

### Added

- Added additional tests to ensure that Bonsai input data can be re-cast into a `PipelineResult` data format.
- Added additional tests to ensure that Bonsai input data can be re-cast into a `PipelineResult` data format.

### Fixed

### Changed

- Fixed some Pylint warnings.
- Pylint ignores pysam functions since they are generated.
- Fixed some Pylint warnings.
- Pylint ignores pysam functions since they are generated.

## [0.9.0]

### Added

- Added Shigapass output
- Added tests for the Shigapass parser.
- Added Shigapass output
- Added tests for the Shigapass parser.

### Fixed

- Fixed minor issues with the ShigaPass parser.
- Fixed minor issues with the ShigaPass parser.

### Changed

Expand All @@ -38,7 +42,7 @@

### Fixed

- Reordered lineage data models in the method index.
- Reordered lineage data models in the method index.

### Changed

Expand All @@ -48,11 +52,11 @@

### Fixed

- Updated lineage parser to work with TbProfiler v6.2
- Updated lineage parser to work with TbProfiler v6.2

### Changed

- Changes lineage datamodel to reflect changes in TbProfiler output
- Changes lineage datamodel to reflect changes in TbProfiler output

## [0.8.1]

Expand Down
4 changes: 2 additions & 2 deletions prp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def cli():
)
@click.option("--snv-vcf", type=click.Path(), help="VCF with SNV variants")
@click.option("--sv-vcf", type=click.Path(), help="VCF with SV variants")
@click.option("--symlink_dir", type=click.Path(), help="Dir for symlink")
@click.option("--symlink-dir", type=click.Path(), help="Dir for symlink")
@click.option("--correct_alleles", is_flag=True, help="Correct alleles")
@click.option(
"-o", "--output", required=True, type=click.Path(), help="output filepath"
Expand Down Expand Up @@ -366,7 +366,7 @@ def create_bonsai_input(
)
@click.option(
"-s",
"--symlink_dir",
"--symlink-dir",
required=False,
type=click.Path(exists=True, file_okay=False, dir_okay=True),
help="Path to symlink directory",
Expand Down
2 changes: 1 addition & 1 deletion prp/parse/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_db_version(db_version: dict) -> str:
def _get_path(symlink_dir: str, subdir: str, filepath: str) -> str:
"""Get absolute/symlink path"""
return (
os.path.join(symlink_dir, subdir, filepath)
os.path.join(symlink_dir, subdir, os.path.basename(filepath))
if symlink_dir
else os.path.realpath(filepath)
)
Expand Down

0 comments on commit 7774822

Please sign in to comment.