Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
Update ONTrack.R
Browse files Browse the repository at this point in the history
  • Loading branch information
MaestSi authored Apr 28, 2021
1 parent 453685a commit 26c538d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ONTrack.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ for (i in 1:length(fasta_files)) {
num_reads_mac <- as.double(system(paste0("cat ", decont_fasta, " | grep \"^>\" | wc -l"), intern=TRUE))
target_reads_contig <- 200
target_reads_polishing <- 200


if (num_reads_mac < 3) {
cat(text = paste0("WARNING: Only ", num_reads_mac, " reads available for sample ", sample_name, "; skipping"), sep = "\n")
cat(text = paste0("WARNING: Only ", num_reads_mac, " reads available for sample ", sample_name, "; skipping"), file = logfile, sep = "\n", append = TRUE)
next
}

if (num_reads_mac < target_reads_contig) {
target_reads_contig <- num_reads_mac
target_reads_polishing <- num_reads_mac
Expand Down

0 comments on commit 26c538d

Please sign in to comment.