diff --git a/src/cgr_gwas_qc/workflow/scripts/qc_report_table.py b/src/cgr_gwas_qc/workflow/scripts/qc_report_table.py index ce347919..39d6b1e8 100644 --- a/src/cgr_gwas_qc/workflow/scripts/qc_report_table.py +++ b/src/cgr_gwas_qc/workflow/scripts/qc_report_table.py @@ -214,7 +214,7 @@ def _subject_qc(sample_sheet_csv: PathLike, sample_qc_csv: PathLike) -> pd.DataF "GD4", "F(%)", "E(%)", - "A(%)" + "A(%)", ] @@ -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") diff --git a/src/cgr_gwas_qc/workflow/scripts/subject_qc_table.py b/src/cgr_gwas_qc/workflow/scripts/subject_qc_table.py index b40a1d58..b41693f1 100644 --- a/src/cgr_gwas_qc/workflow/scripts/subject_qc_table.py +++ b/src/cgr_gwas_qc/workflow/scripts/subject_qc_table.py @@ -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: