Skip to content

Commit

Permalink
update genotype for new svtyper (v0.1.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernfrid committed Nov 18, 2016
1 parent 9a7ebe4 commit fb3cc80
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions svtools/genotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,32 @@ def __init__(self):
@staticmethod
def svtyper_option_lut():
opts = {
'bam' : '-B',
'split_bam' : '-S',
'input_vcf' : '-i',
'output_vcf' : '-o',
'splflank' : '-f',
'discflank' : '-F',
'bam' : '-B',
'lib_info' : '-l',
'min_aligned' : '-m',
'num_samp' : '-n',
'split_weight' : '--split_weight',
'disc_weight' : '--disc_weight',
'num_samp' : '-n',
'legacy' : '-M',
'debug' : '--debug',
'write_alignment' : '-w'
}
return opts

def description():
return 'compute genotype of structural variants based on breakpoint depth'

def add_arguments_to_parser(parser):
parser.add_argument('-B', '--bam', type=str, required=True, help='BAM file(s), comma-separated if genotyping multiple BAMs')
parser.add_argument('-S', '--split_bam', type=str, required=False, help='split-read bam file for sample, comma-separated if genotyping multiple BAMs')
parser.add_argument('-i', '--input_vcf', help='VCF input (default: stdin)')
parser.add_argument('-o', '--output_vcf', help='output VCF to write (default: stdout)')
parser.add_argument('-f', '--splflank', type=int, required=False, default=20, help='min number of split read query bases flanking breakpoint on either side [20]')
parser.add_argument('-F', '--discflank', type=int, required=False, default=20, help='min number of discordant read query bases flanking breakpoint on either side. (should not exceed read length) [20]')
parser.add_argument('-B', '--bam', type=str, required=True, help='BAM or CRAM file(s), comma-separated if genotyping multiple BAMs')
parser.add_argument('-l', '--lib_info', type=str, required=False, help='create/read JSON file of library information')
parser.add_argument('-m', '--min_aligned', type=int, required=False, default=20, help='minimum number of aligned bases to consider read as evidence [20]')
parser.add_argument('-n', dest='num_samp', type=int, required=False, default=1000000, help='number of pairs to sample from BAM file for building insert size distribution [1000000]')
parser.add_argument('--split_weight', type=float, required=False, default=1, help='weight for split reads [1]')
parser.add_argument('--disc_weight', type=float, required=False, default=1, help='weight for discordant paired-end reads [1]')
parser.add_argument('-n', dest='num_samp', type=int, required=False, default=1000000, help='number of pairs to sample from BAM file for building insert size distribution [1000000]')
parser.add_argument('-M', action='store_true', dest='legacy', required=False, help='split reads are flagged as secondary, not supplementary. For compatibility with legacy BWA-MEM "-M" flag')
parser.add_argument('--debug', action='store_true', help='debugging verbosity')
parser.add_argument('-w', '--write_alignment', type=str, required=False, default=None, help='write relevant reads to BAM file')
parser.add_argument('--debug', action='store_true', help=argparse.SUPPRESS)
parser.set_defaults(entry_point=run_from_args)

def command_parser():
Expand Down

0 comments on commit fb3cc80

Please sign in to comment.