Skip to content

Commit

Permalink
change default novoindex to -k 9 and -s 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Mar 30, 2016
1 parent ce1a7ac commit ee75063
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/novoalign.py
Expand Up @@ -186,7 +186,7 @@ def align_one_rg_bam(self, inBam, refFasta, outBam, rgid=None, options=None, min
JVMmemory=JVMmemory
)

def index_fasta(self, refFasta):
def index_fasta(self, refFasta, k=9, s=1):
''' Index a FASTA file (reference genome) for use with Novoalign.
The input file name must end in ".fasta". This will create a
new ".nix" file in the same directory. If it already exists,
Expand All @@ -196,7 +196,12 @@ def index_fasta(self, refFasta):
outfname = self._fasta_to_idx_name(refFasta)
if os.path.isfile(outfname):
os.unlink(outfname)
cmd = [novoindex, outfname, refFasta]
cmd = [novoindex]
if k is not None:
cmd.extend(['-k', str(k)])
if s is not None:
cmd.extend(['-s', str(s)])
cmd.extend([outfname, refFasta])
_log.debug(' '.join(cmd))
util.misc.run_and_print(cmd)
try:
Expand Down

0 comments on commit ee75063

Please sign in to comment.