Skip to content

Commit

Permalink
modify pre_model_delete strategy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
PengNi committed Jun 15, 2019
1 parent ef18d39 commit 382585e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The example data can be downloaded from [here](http://bioinformatics.csu.edu.cn/
Before run deepsignal, the reads must be processed by the *re-squiggle* module of [tombo](https://github.com/nanoporetech/tombo).

Note:
- If the fast5 files are in multi-read FAST5 format, please use _multi_to_single_fast5_ command from the [ont_fast5_api package](https://github.com/nanoporetech/ont_fast5_api) to conver the fast5 files first (Ref to [issue #173](https://github.com/nanoporetech/tombo/issues/173) in [tombo](https://github.com/nanoporetech/tombo)).
- If the fast5 files are in multi-read FAST5 format, please use _multi_to_single_fast5_ command from the [ont_fast5_api package](https://github.com/nanoporetech/ont_fast5_api) to convert the fast5 files first (Ref to [issue #173](https://github.com/nanoporetech/tombo/issues/173) in [tombo](https://github.com/nanoporetech/tombo)).
- If the basecall results are saved as fastq, run the [*tombo proprecess annotate_raw_with_fastqs*](https://nanoporetech.github.io/tombo/resquiggle.html) command before *re-squiggle*.

For the example data:
Expand Down
4 changes: 3 additions & 1 deletion deepsignal/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def train(train_file, valid_file, model_dir, log_dir, kmer_len, cent_signals_len

model_regex = re.compile(r"bn_" + str(kmer_len) + "\.sn_" + str(cent_signals_len) +
"\.epoch_\d+\.ckpt*")
model_prefix = "bn_" + str(kmer_len) + ".sn_" + str(cent_signals_len) + ".epoch_"
model_suffix = '.ckpt'
if os.path.exists(model_dir):
# shutil.rmtree(model_dir)
count = 0
Expand Down Expand Up @@ -210,7 +212,7 @@ def train(train_file, valid_file, model_dir, log_dir, kmer_len, cent_signals_len
test_accu_best_ep = np.mean(test_accuracy_total)
if test_accu_best_ep > test_accu_best:
saver.save(sess, "/".join([model_dir,
]))
model_prefix + str(epoch_id) + model_suffix]))

end = time.time()
line = "epoch: %d, iterid: %d\n train_loss: %.3f, valid_loss: %.3f, train_accuracy: %.3f, " \
Expand Down

0 comments on commit 382585e

Please sign in to comment.