From 7e15cf09e22e31f8b265ef09a8018f1dda7ec83e Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Fri, 21 Jul 2023 14:31:36 -0700 Subject: [PATCH] Generate proviral_landscape for HIVIntact runs too --- gene_splicer/sample.py | 2 +- gene_splicer/utils.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gene_splicer/sample.py b/gene_splicer/sample.py index 858782b..8048830 100644 --- a/gene_splicer/sample.py +++ b/gene_splicer/sample.py @@ -115,7 +115,7 @@ def main(): for file in fasta_files: gene_splicer.run(file, outdir=outpath) utils.generate_table_precursor(name=run_name, outpath=outpath) - utils.generate_proviral_landscape_csv(outpath) + utils.generate_proviral_landscape_csv(outpath, is_hivintact=args.hivintact) copy_output(outpath / 'outcome_summary.csv', args.outcome_summary_csv) copy_output(outpath / (run_name + '_conseqs_primer_analysis.csv'), args.conseqs_primers_csv) diff --git a/gene_splicer/utils.py b/gene_splicer/utils.py index b5f65b6..3f0ff15 100644 --- a/gene_splicer/utils.py +++ b/gene_splicer/utils.py @@ -558,12 +558,14 @@ def generate_table_precursor_2(hivseqinr_resultsfile, filtered_file, return table_precursorfile -def generate_proviral_landscape_csv(outpath): +def generate_proviral_landscape_csv(outpath, is_hivintact): proviral_landscape_csv = os.path.join(outpath, 'proviral_landscape.csv') landscape_rows = [] table_precursor_csv = os.path.join(outpath, 'table_precursor.csv') blastn_csv = glob.glob( + os.path.join(outpath, 'hivintact*', 'blast.tsv') \ + if is_hivintact else \ os.path.join( outpath, 'hivseqinr*',