Skip to content

Commit

Permalink
fixup: Format Python code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
jfear committed Feb 5, 2024
1 parent 49b8a5c commit bff1e47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/cgr_gwas_qc/workflow/scripts/qc_report_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _subject_qc(sample_sheet_csv: PathLike, sample_qc_csv: PathLike) -> pd.DataF
"GD4",
"F(%)",
"E(%)",
"A(%)"
"A(%)",
]


Expand All @@ -230,10 +230,7 @@ def _ancestry(sample_qc_csv: PathLike, graf_txt: PathLike) -> pd.DataFrame:
axis=1,
)

graf = (
pd.read_csv(graf_txt, sep="\t", skiprows=7)
.rename({"Sample": "Sample_ID"}, axis=1)
)
graf = pd.read_csv(graf_txt, sep="\t", skiprows=7).rename({"Sample": "Sample_ID"}, axis=1)

return (
graf.merge(sample_qc, on="Sample_ID")
Expand Down
8 changes: 3 additions & 5 deletions src/cgr_gwas_qc/workflow/scripts/subject_qc_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ def main(
)


#Needed with graf-pop implementarion that returns Asian-Pacific_Islander which the hyphen isn't supported by snakemake wildcares
# Needed with graf-pop implementarion that returns Asian-Pacific_Islander which the hyphen isn't supported by snakemake wildcares
def _fix_hyphen_in_ancestry_name(df: pd.DataFrame) -> pd.DataFrame:
df['Ancestry'] = df['Ancestry'].str.replace('-', '_')
return (
df
)
df["Ancestry"] = df["Ancestry"].str.replace("-", "_")
return df


def _sample_qc_to_subject_qc(df: pd.DataFrame) -> pd.DataFrame:
Expand Down

0 comments on commit bff1e47

Please sign in to comment.