Skip to content

Commit

Permalink
fix no_backup argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jdcla authored and jdcla committed Sep 4, 2024
1 parent 0155513 commit b842a36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion transcript_transformer/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def process_seq_data(h5_path, gtf_path, fa_path, backup_path, backup=True):
backup_path = os.path.splitext(gtf_path)[0] + ".h5"
if os.path.abspath(backup_path) == os.path.abspath(os.path.dirname(h5_path)):
print(f"!-> Backup path identical to h5 output path, disabling backup...")
backup=False
backup = False
elif not os.path.isfile(h5_path) and os.path.isfile(backup_path):
print(f"--> Processed assembly data restored ({backup_path})")
shutil.copy(backup_path, h5_path)
Expand Down
1 change: 0 additions & 1 deletion transcript_transformer/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ def csv_to_gtf(h5_path, df, out_prefix, exclude_annotated=False):
3,
f'exon_number "{exon}',
)

if feature not in ["transcript", "exon"]:
property_list.insert(
3,
Expand Down
6 changes: 5 additions & 1 deletion transcript_transformer/ribotie.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ def main():
assert args.use_ribo, "No ribosome data specified."
if not args.results:
process_seq_data(
args.h5_path, args.gtf_path, args.fa_path, args.backup_path, ~args.no_backup
args.h5_path,
args.gtf_path,
args.fa_path,
args.backup_path,
not args.no_backup,
)
process_ribo_data(
args.h5_path,
Expand Down

0 comments on commit b842a36

Please sign in to comment.