Skip to content

Commit

Permalink
Merge pull request #271 from jodyphelan/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jodyphelan committed Feb 15, 2023
2 parents d16ddef + 12a546b commit 440394b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions tb-profiler
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ parser_sub.add_argument('--lofreq_sample_name',help='Sample name to use if VCF h
parser_sub.add_argument('--suspect',action="store_true",help="Use the suspect suite of tools to add ML predictions")
parser_sub.add_argument('--txt',action="store_true",help="Add text output")
parser_sub.add_argument('--csv',action="store_true",help="Add CSV output")
parser_sub.add_argument('--docx',help="Add docx output. This requires docxtpl to be installed")
parser_sub.add_argument('--add_columns',default=None,type=str,help="Add additional columns found in the mutation database to the text and csv results")
parser_sub.add_argument('--verbose',default=0, choices=[0,1,2],help="Verbosity increases from 0 to 2",type=int)
parser_sub.add_argument('--delly_vcf',help=argparse.SUPPRESS)
Expand All @@ -504,6 +505,7 @@ parser_sub.add_argument('--external_db',type=str,help='Path to db files prefix (
parser_sub.add_argument('--suspect',action="store_true",help="Use the suspect suite of tools to add ML predictions")
parser_sub.add_argument('--txt',action="store_true",help="Add text output")
parser_sub.add_argument('--csv',action="store_true",help="Add CSV output")
parser_sub.add_argument('--docx',help="Add docx output. This requires docxtpl to be installed")
parser_sub.add_argument('--add_columns',default=None,type=str,help="Add additional columns found in the mutation database to the text and csv results")
parser_sub.add_argument('--kmer_counter',default='kmc',choices=["kmc","dsk"],type=str,help="Kmer counter")
parser_sub.add_argument('--verbose',default=0, choices=[0,1,2],help="Verbosity increases from 0 to 2",type=int)
Expand All @@ -519,6 +521,7 @@ parser_sub.add_argument('--bam','-a',required=True, help='BAM file. Make sure it
parser_sub.add_argument('--prefix','-p',default="tbprofiler",help='Sample prefix')
parser_sub.add_argument('--txt',action="store_true",help="Add text output")
parser_sub.add_argument('--csv',action="store_true",help="Add CSV output")
parser_sub.add_argument('--docx',help="Add docx output. This requires docxtpl to be installed")
parser_sub.add_argument('--snps',action="store_true",help='Sample prefix')
parser_sub.add_argument('--caller',default='freebayes',choices=["bcftools","freebayes","gatk"],type=str,help="Variant caller")
parser_sub.add_argument('--kmer_counter',default='kmc',choices=["kmc","dsk"],type=str,help="Kmer counter")
Expand All @@ -542,6 +545,7 @@ group.add_argument('--fasta','-f',help='Fasta file')
parser_sub.add_argument('--prefix','-p',default="tbprofiler",help='Sample prefix')
parser_sub.add_argument('--txt',action="store_true",help="Add text output")
parser_sub.add_argument('--csv',action="store_true",help="Add CSV output")
parser_sub.add_argument('--docx',help="Add docx output. This requires docxtpl to be installed")
parser_sub.add_argument('--output_template',type=str,help='Jinja2 formatted template for output')
parser_sub.add_argument('--kmer_counter',default='kmc',choices=["kmc","dsk"],type=str,help="Kmer counter")
parser_sub.add_argument('--platform','-m',choices=["illumina","nanopore","pacbio"],default="illumina",help='NGS Platform used to generate data')
Expand Down Expand Up @@ -591,6 +595,7 @@ parser_sub = subparsers.add_parser('reformat', help='Reformat json results into
parser_sub.add_argument('json',default="tbprofiler",help='Sample prefix')
parser_sub.add_argument('--txt',action="store_true",help="Add text output")
parser_sub.add_argument('--csv',action="store_true",help="Add CSV output")
parser_sub.add_argument('--docx',help="Add docx output. This requires docxtpl to be installed")
parser_sub.add_argument('--output_template',type=str,help='Jinja2 formatted template for output')
parser_sub.add_argument('--db',default='tbdb',help='Mutation panel name')
parser_sub.add_argument('--external_db',type=str,help='Path to db files prefix (overrides "--db" parameter)')
Expand Down
2 changes: 1 addition & 1 deletion tbprofiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
from .output import *
from .snp_dists import *

__version__ = "4.4.1"
__version__ = "4.4.2"
3 changes: 2 additions & 1 deletion tbprofiler/docx.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def write_docx(json_results,conf,outfile,template_file,reporting_af = 0.0):
'sensitive': True if data['drtype'] == "Sensitive" else False,
'mdr': True if data['drtype'] in ("MDR-TB","Pre-XDR-TB") else False,
'xdr': True if data['drtype'] in "XDR-TB" else False,
'resistant': True if data['drtype'] in ("Other","RR-TB","HR-TB") else False
'resistant': True if data['drtype'] in ("Other","RR-TB","HR-TB") else False,
'drtype': data['drtype'],
}

for d in conf['drugs']:
Expand Down

0 comments on commit 440394b

Please sign in to comment.