Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two bugs about data type #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cuiran
Copy link

@cuiran cuiran commented Nov 21, 2019

Specifying int type for x2 in iter_bim fixes error 'numpy.int64 object has no attribute isdigit'. Changed the file saving line to include the compression in the to_csv arguments. This avoids error about something needs to be bytes like and not string...

…t has no attribute isdigit'. Changed the file saving line to include the compression in the to_csv arguments. This avoids error about something needs to be bytes like and not string...
@@ -29,8 +29,7 @@ def make_annot_files(args, bed_for_annot):
df_annot.fillna(0, inplace=True)
df_annot = df_annot[['ANNOT']].astype(int)
if args.annot_file.endswith('.gz'):
with gzip.open(args.annot_file, 'wb') as f:
df_annot.to_csv(f, sep = "\t", index = False)
df_annot.to_csv(args.annot_file, sep = "\t", index = False, compression='\gzip')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of the backslash on \gzip?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, pandas 0.24 can infer compression based on extension, but not in 0.20 which we're pinned to (bummer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants