Skip to content

Commit

Permalink
remove nextflow_qc_pass column and adjust the tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
DarianHole committed Apr 24, 2024
1 parent 0d0456a commit 611ca1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions bin/negative_control_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def main() -> None:
key_cols = [x for x in key_cols if x in cols]
extra_cols = [x for x in cols if (x not in key_cols) and (x not in negative_columns)]
final_df = final_df[key_cols+extra_cols+negative_columns]

# Drop any additional columns
final_df.drop(['nextflow_qc_pass'], axis=1, inplace=True)

# Final Output
final_df.to_csv('{}.qc.csv'.format(args.output_prefix), index=False)

if __name__ == "__main__":
Expand Down
9 changes: 5 additions & 4 deletions bin/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def compare_nextclade_fs_to_ncovtools_fs(sample: str, next_df: pd.DataFrame, nco
'''
# Adding in a column for tracking if correction occured
ncov_df.reset_index(inplace=True, drop=True)
ncov_df['nc_frameshift_adjustment'] = 'False'
ncov_df['qc_adjustment_from_nextclade'] = 'No adjustment'

# Filter down nextclade df to just the wanted sample
# It should only be 1 sample but just in case
Expand All @@ -376,10 +376,11 @@ def compare_nextclade_fs_to_ncovtools_fs(sample: str, next_df: pd.DataFrame, nco
ncov_qc_value_list.remove('POSSIBLE_FRAMESHIFT_INDELS')
if ncov_qc_value_list == []:
ncov_qc_value_list = ['PASS']
ncov_df['qc_adjustment_from_nextclade'] = 'Adjusted FS flag to PASS'
else:
ncov_df['qc_adjustment_from_nextclade'] = 'Removed FS flag'

ncov_df.at[0, 'qc_pass'] = ';'.join(ncov_qc_value_list)
ncov_df['nc_frameshift_adjustment'] = 'True'

ncov_df.at[0, 'qc_pass'] = ';'.join(ncov_qc_value_list)
return

def get_samplesheet_info(sample_tsv, sample_name, project_id, sequencing_tech):
Expand Down

0 comments on commit 611ca1a

Please sign in to comment.