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

Updating DNA2Vec to work with Python 3.7, and to work on Windows 10. #15

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
removed hidden file issue on linus
  • Loading branch information
LightenedLimited committed May 31, 2020
commit fc3139701ab5292f13160befc7168fee3b9a3945
4 changes: 2 additions & 2 deletions scripts/train_dna2vec.py
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ def train(self, kmer_seq_generator):

def write_vec(self):
out_filename = '{}.w2v'.format(self.out_fileroot)
self.model.wv.save_word2vec_format("."+out_filename, binary=False)
self.model.wv.save_word2vec_format(out_filename, binary=False)

def run_main(args, inputs, out_fileroot):
logbook.info(' '.join(sys.argv))
@@ -132,7 +132,7 @@ def main():
args.kmer_fragmenter))

out_txt_filename = '{}.txt'.format(out_fileroot)
with open("."+out_txt_filename, 'w+') as summary_fptr:
with open(out_txt_filename, 'w+') as summary_fptr:
Copy link
Owner

Choose a reason for hiding this comment

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

Why the w+ change?

with Tee(summary_fptr):
logbook.StreamHandler(sys.stdout, level=log_level).push_application()
redirect_logging()