Skip to content

Commit 8c48956

Browse files
dpark01claude
andcommitted
Address PR review comments: cleanup stale GATK references and temp files
- Rename '# ========= GATK ==========' section header to 'align_and_fix' - Remove unused IS_ARM import from test_assembly_integration.py - Clean up .tbi temp file after FreeBayes VCF processing - Fix stale 'deambiguated genome for GATK' comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 241092c commit 8c48956

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/viral_ngs/assembly.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def refine_assembly(
704704
if not already_realigned_bam:
705705
novoalign = viral_ngs.core.novoalign.NovoalignTool(license_path=novoalign_license_path)
706706

707-
# Sanitize fasta header & create deambiguated genome for GATK
707+
# Sanitize fasta header & create deambiguated genome for variant calling
708708
deambigFasta = viral_ngs.core.file.mkstempfname('.deambig.fasta')
709709
with viral_ngs.core.file.fastas_with_sanitized_ids(inFasta, use_tmp=True) as sanitized_fastas:
710710
deambig_fasta(sanitized_fastas[0], deambigFasta)
@@ -763,6 +763,8 @@ def refine_assembly(
763763
if outVcf.endswith('.gz'):
764764
shutil.copyfile(tmpVcf + '.tbi', outVcf + '.tbi')
765765
os.unlink(tmpVcf)
766+
if os.path.exists(tmpVcf + '.tbi'):
767+
os.unlink(tmpVcf + '.tbi')
766768
shutil.copyfile(tmpFasta, outFasta)
767769
os.unlink(tmpFasta)
768770

src/viral_ngs/read_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ def main_novoindex(args):
12331233

12341234
__commands__.append(('novoindex', parser_novoindex))
12351235

1236-
# ========= GATK ==========
1236+
# ========= align_and_fix ==========
12371237

12381238

12391239
def align_and_fix(

tests/unit/assemble/test_assembly_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import viral_ngs.core.minimap2
1818
import viral_ngs.core.picard
1919
import viral_ngs.core.samtools
20-
from tests import TestCaseWithTmp, _CPUS, IS_ARM
20+
from tests import TestCaseWithTmp, _CPUS
2121

2222

2323
def _align_with_minimap2(refFasta, inBam):

0 commit comments

Comments
 (0)