Skip to content

Commit

Permalink
remove empty files + add info messages
Browse files Browse the repository at this point in the history
  • Loading branch information
LaraFuhrmann committed Jul 22, 2024
1 parent b3498b3 commit 97a7366
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions viloca/b2w.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ def build_windows(alignment_file: str, tiling_strategy: TilingStrategy,
reference_filename=reference_filename,
threads=max_proc #1
)
# print this message since pysam print confusing error message with the functions above.
print("Index file was created successfully.")
#reffile = pysam.FastaFile(reference_filename) --> we need to read it in each child processo
#counter = 0 #--> counter is now coputed initially for all windows
reference_name = tiling_strategy.get_reference_name()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from . import cavi

logging.basicConfig(
filename="viloca_inference.log", encoding="utf-8", level=logging.INFO
filename="viloca.log", encoding="utf-8", level=logging.INFO
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from . import cavi

logging.basicConfig(
filename="viloca_inference.log", encoding="utf-8", level=logging.INFO
filename="viloca.log", encoding="utf-8", level=logging.INFO
)


Expand Down
9 changes: 5 additions & 4 deletions viloca/shotgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def main(args):
logging.debug("[shotgun] All processes completed successfully.")

# prepare directories
for sd_name in ['debug', 'sampling', 'freq', 'support',
for sd_name in ['debug', 'haplotypes',
'corrected', 'raw_reads', 'inference']:
try:
os.mkdir(sd_name)
Expand Down Expand Up @@ -555,9 +555,8 @@ def main(args):
move_files_into_dir("debug", glob.glob("./w*dbg"))
move_files_into_dir("sampling", glob.glob("./w*smp"))
move_files_into_dir("corrected", glob.glob("./w*reads-cor.fas"))
move_files_into_dir("support", glob.glob("./w*reads-support.fas"))
move_files_into_dir("freq", glob.glob("./w*reads-freq.csv"))
move_files_into_dir("sampling", glob.glob("./w*smp"))
move_files_into_dir("haplotypes", glob.glob("./w*reads-support.fas"))
#move_files_into_dir("sampling", glob.glob("./w*smp"))
raw_reads_files = glob.glob('./w*reads.fas') + glob.glob('./w*ref.fas') + glob.glob('./w*qualities.npy')
move_files_into_dir("raw_reads", raw_reads_files)
inference_files = glob.glob("./w*best_run.txt") + glob.glob("./w*history_run*.csv") + glob.glob("./w*results*.pkl")
Expand Down Expand Up @@ -684,3 +683,5 @@ def main(args):
shutil.move(snv_file, 'snv/')

logging.info('shotgun run ends')
logging.info('VILOCA terminated')
print("VILOCA terminated successfully.")

0 comments on commit 97a7366

Please sign in to comment.