Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/refactor kinship print to write #43

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

ellendejong
Copy link
Collaborator

@ellendejong ellendejong commented Aug 20, 2024

What has changed?

Refactor of check_kinship.py

  • Changed type from NA to unrelated for unrelated samples.
  • Added two new columns:
    • thresholds (string): used kinship settings comma separated, first value is minimum value relatedness and second value is maximum.
    • message (string): user friendly message explaining why kinship check failed. If kinship check succeeded, value is an empty string.
  • Used pandas to easily add or edit columns.
  • Moved comment statements to start of file (previously last lines)
  • Added pytest and docstrings
  • Docker container migrated to github packages.

How to

If you want to print output to stdout, use:
check_kinship.py {kinship_file} {ped_file}

If you want to write output to a file use:
check_kinship.py {kinship_file} {ped_file} --output_prefix {prefix} --output_path {/path/to/output}

Examples

Checkout test output.
If all observed kinships values match with expectation based on pedigree file.

cat /hpc/diaggen/software/development/DxNextflowWES_edit_msg/work/49/6db38dc750e0b7e91e0412b8454e41/20240909_0096_8_test_ellen.kinship_check.out

Or if a parent-child relation is missing in pedigree,

cat /hpc/diaggen/software/development/DxNextflowWES_edit_msg/work/d1/11daa552e09b89e3c56e31da1f65cf/20240909_0096_8_test_ellen.kinship_check.out

@ellendejong ellendejong changed the base branch from main to develop August 20, 2024 10:58
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Copy link

@fdekievit fdekievit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zou je a.u.b. even kunnen kijken of al deze wijzigingen nodig zijn?

Ik zie b.v. wijzigingen in Mosaic hunter en Utils (wat alleen format wijzigingen zijn) die volgens mij neit relevant zijn voor deze ticket.

pyproject.toml Outdated Show resolved Hide resolved
Kinship/check_kinship.py Outdated Show resolved Hide resolved
Kinship/check_kinship.py Outdated Show resolved Hide resolved
Kinship/check_kinship.py Show resolved Hide resolved
Kinship/check_kinship.py Outdated Show resolved Hide resolved
Kinship/test_check_kinship.py Show resolved Hide resolved
Kinship/check_kinship.py Show resolved Hide resolved
MosaicHunter/1.0.0/test_get_gender_from_bam_chrx.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Utils/create_hsmetrics_summary.py Outdated Show resolved Hide resolved
.github/workflows/kinship_test.yml Show resolved Hide resolved
.github/workflows/kinship_test.yml Outdated Show resolved Hide resolved
Kinship/Dockerfile Outdated Show resolved Hide resolved
Kinship/check_kinship.py Show resolved Hide resolved

# Creating a virtual environment just for poetry and install it with pip
RUN python3 -m venv $POETRY_VENV \
&& $POETRY_VENV/bin/pip install -U pip setuptools \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wat doet pip -U ? en bedacht me net, is er ook een pip3 variant?

Copy link
Collaborator Author

@ellendejong ellendejong Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip3 gebruikt in nieuwste commit.

Copy link

@fdekievit fdekievit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ziet er goed uit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants