Skip to content

Commit 56b8ea8

Browse files
committed
fixed float to int
1 parent f144edb commit 56b8ea8

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

build/beatAML/GetBeatAML.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,11 @@ def map_and_combine(df, data_type, entrez_map_file, improve_map_file, map_file=N
466466
right_on='other_id',
467467
how='left')
468468
mapped_df.insert(0, 'improve_sample_id', mapped_df.pop('improve_sample_id'))
469+
470+
print(mapped_df.to_string())
471+
mapped_df['improve_sample_id'] = mapped_df['improve_sample_id'].astype(int)
472+
mapped_df['entrez_id'] = mapped_df['entrez_id'].fillna(0)
473+
mapped_df['entrez_id'] = mapped_df['entrez_id'].astype(int)
469474
mapped_df['source'] = 'synapse'
470475
mapped_df['study'] = 'BeatAML'
471476

build/cptac/getCptacData.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,15 @@ def main():
380380
dat_files[dtype_key] = fdf2
381381
else:
382382
dat_files[dtype_key] = fdf.dropna()
383+
383384
print(dtype_key)
384385

385386
# Now concatenate all the cancers into a single file
386387
for dtype_key, df in dat_files.items():
387388
print('Saving ' + "cptac_" + dtype_key + '.csv.gz' + ' file')
389+
print(df.to_string())
390+
df['entrez_id'] = df['entrez_id'].fillna(0)
391+
df['entrez_id'] = df['entrez_id'].astype(int)
388392
df.to_csv("/tmp/" + "cptac_" + dtype_key + '.csv.gz', sep=',', index=False, compression='gzip')
389393

390394
if __name__ == '__main__':

0 commit comments

Comments
 (0)