Skip to content

Commit

Permalink
Merge pull request #3 from lavenderyuuu/patch-3
Browse files Browse the repository at this point in the history
Update altref.py
  • Loading branch information
ncl935 authored Apr 16, 2021
2 parents 9b9286b + 189cb27 commit edb5f42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/altref.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,9 @@ def align(self, sv_str=None):
out_ref = self.out_ref
fastq = self.filtered_read_fasta
out_bam = self.out_bam

ref_size = math.ceil(1. * path.getsize(out_ref) / 1024 / 1024 / 1024 + .5)

#ref_size = math.ceil(1. * path.getsize(out_ref) / 1024 / 1024 / 1024 + .5)
ref_size = math.ceil((1. * path.getsize(out_ref) / 1e9 + .5) * 1.1)
minimap2_option_split_index_for_every_N_bases = f'-I {ref_size}G' if ref_size > 4 else ''
cmd = (
f'{minimap2} -Y {minimap2_option_split_index_for_every_N_bases} -t {nprocs} --MD -a {out_ref} {fastq} | '
Expand Down

0 comments on commit edb5f42

Please sign in to comment.