Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbio committed Jan 14, 2025
1 parent b1cccd5 commit 7489c0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions BALSAMIC/assets/scripts/sex_prediction_tga.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def read_cov(filepath: str) -> List[List[str]]:
List[List[str]]: Parsed rows of the coverage file.
"""
with open(filepath, "r") as rf:
rows = rf.readlines()
return [r.strip("\n").split("\t") for r in rows]
return [line.split("\t") for line in rf]


def process_data(data_rows: List[List[str]]) -> Optional[pd.DataFrame]:
Expand Down
7 changes: 4 additions & 3 deletions BALSAMIC/assets/scripts/sex_prediction_wgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ def predict_sex_wgs(
Determines the sex of a sample based on ASCAT statistics or chromosome coverage.
Args:
case_ascat_statistics (str): Path to the ASCAT statistics file.
sample_y_coverage (str): Path to the Y chromosome coverage file.
sample_x_coverage (str): Path to the X chromosome coverage file.
tumor_y_coverage (str): Path to the Y chromosome coverage file for the tumor sample.
tumor_x_coverage (str): Path to the X chromosome coverage file for the tumor sample.
normal_y_coverage (str): Path to the Y chromosome coverage file for the normal sample.
normal_x_coverage (str): Path to the X chromosome coverage file for the normal sample.
output (str): Path to the output file for the results.
"""
predicted_sex = predict_sex_from_y_and_x_cov(
Expand Down

0 comments on commit 7489c0c

Please sign in to comment.