Skip to content

Commit

Permalink
Added code to change float to int
Browse files Browse the repository at this point in the history
  • Loading branch information
Abigail Shockey committed Dec 9, 2024
1 parent 2d42cf0 commit e986b07
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/dryad_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def join_dfs_no_quast(df_log, df_excluded):
# Begin joining
df_log_excluded = pd.merge(df_log, df_excluded, on='Sample', how='outer')

# Change float to int
df[['Sequence Length','Cluster Coverage (bps)']] = df[['Sequence Length','Cluster Coverage (bps)']].astype(int)

# Rename and Drop columns
df_log_excluded = df_log_excluded.rename(columns={'excluded_from_analysis':'Excluded from Parsnp\'s analysis'})

Expand All @@ -58,6 +61,9 @@ def join_dfs_with_quast(df_log, df_excluded, df_quast):
df_log_excluded = pd.merge(df_log, df_excluded, on='Sample', how='outer')
df_log_excluded_quast = pd.merge(df_log_excluded, df_quast, on='Sample', how='outer')

# Change float to int
df[['Sequence Length','Cluster Coverage (bps)','Contigs','N50']] = df[['Sequence Length','Cluster Coverage (bps)','Contigs','N50']].astype(int)

# Rename and Drop columns
df_log_excluded_quast = df_log_excluded_quast.rename(columns={'excluded_from_analysis':'Excluded from Parsnp\'s analysis'})
df_log_excluded_quast = df_log_excluded_quast.drop('Assembly Length (bp)', axis=1)
Expand Down

0 comments on commit e986b07

Please sign in to comment.