Esempio n. 1
0
def init_argparser(p=None):

    p = naltparser.init_argparser(p)

    p.add_argument('-o', '--outfile')
    p.add_argument('--type', default='nalt', choices=['nalt', 'ralt'])
    return p
Esempio n. 2
0
def init_argparser(p=None):

    p = naltparser.init_argparser()
    p.add_argument('--countmissing', default=False, action='store_true')
    p.add_argument('-o', '--outfile', default='outfile.dist.txt')
    p.add_argument('--includepos', default=None)

    return p
Esempio n. 3
0
def init_argparser(p=None):

    p = naltparser.init_argparser(with_group=False)
    p.add_argument('--includepos', default='')
    p.add_argument('--revfmt', default=False, action='store_true')
    p.add_argument('-o', '--outfile', default='outfile.haplotypes.txt')

    return p
Esempio n. 4
0
def init_argparser(p=None):
    if not p:
        p = arg_parser("ralt2allqc - checking exhaustively")

    p = naltparser.init_argparser(p, with_group=False, with_position=False)

    p.add_argument('--mac', type=int, default=1, help="Minor Allele Count")
    p.add_argument('--miss', type=float, default=1.0, help='Missingness fraction threshold')
    p.add_argument('-k', type=int, default=-1, help='start from individual/samples no K')
    p.add_argument('-o', '--outfile', default='out.exhqc.txt')
    p.add_argument('-s', type=int, default=-1, help='no of sample to be exported')

    return p
Esempio n. 5
0
def init_argparser(p=None):

    if p is None:
        p = arg_parser('classify.py - classify samples based on SNP barcodes')

    p = naltparser.init_argparser(p)

    p.add_argument('--profile', default=None, required=True)
    p.add_argument('--includepos', default=None, required=True)
    p.add_argument('--code', default=None, required=True)
    p.add_argument('--remark', default=None, required=True)
    p.add_argument('--replace', default=False, action='store_true')
    p.add_argument('--update', default=False, action='store_true')

    return p
Esempio n. 6
0
def init_argparser():
    parser = arg_parser("simxval.py - simulate cross-validation of likelihood evaluator with various model and k")
    parser.add_argument('-m', '--method', help ='method to use : list rand dt hfst hhfstdt')
    parser.add_argument('-k', default='100,50', help='k list')
    parser.add_argument('--iter', default=5, type=int, help='iteration per fold')
    parser.add_argument('--repeats', default=20, type=int, help='n repeats of fold')
    parser.add_argument('--fold', default=10, type=int)
    parser.add_argument('--mac', default=0, type=int)
    parser.add_argument('-o', '--outfile', default='out.accuracy.dt.txt')
    parser.add_argument('--outsnp', default=None)
    parser.add_argument('--snpfile', default=None, help='file containing list of SNPs for list method')
    parser.add_argument('-j', default=1, type=int, help='No of process')
    parser.add_argument('--guidetree', default=None)
    parser.add_argument('--minfst', type=float, default=0.9, help='min FST for hfst method')
    parser.add_argument('--logfile', default=None, help='log file output')
    parser = naltparser.init_argparser(parser)

    return parser
Esempio n. 7
0
def init_argparser(p=None):
    if not p:
        p = arg_parser("ralt2allqc - checking exhaustively")

    p = naltparser.init_argparser(p)

    p.add_argument('--indvindex', default=None)
    p.add_argument('--posindex', default=None)
    p.add_argument('--includepos', default=None)
    p.add_argument('--excludesample', default=None)
    p.add_argument('--includesample', default=None)
    p.add_argument('--completesamples', default=False, action="store_true")
    p.add_argument('--mac', default=0, type=int)
    p.add_argument('--type', default='ralt')
    p.add_argument('--autofilename', default=False, action='store_true')
    p.add_argument('--outfmt', default='text', choices=['text', 'pickle', 'npy'])
    p.add_argument('-o', '--outfile', default='outfile')

    return p
Esempio n. 8
0
def init_argparser():
    p = arg_parser("Convert r_alt datafile to n_alt datafile")
    p.add_argument('-o', '--outfile', default='outdata')
    p.add_argument('-r',
                   '--hetratio',
                   type=float,
                   default=0.25,
                   help="ratio for calling heterozygosity")
    p.add_argument('-m',
                   '--major',
                   action="store_true",
                   help="set all caling to major allele")
    p.add_argument('--missingtohet',
                   action='store_true',
                   help="set missing as heterozygosity")
    p.add_argument('--outfmt', default='npy', choices=['npy', 'pickle', 'tab'])
    p.add_argument('--autofilename', default=True, action='store_true')
    # option to treat all missing as hets

    p = naltparser.init_argparser(p, with_group=False, with_position=False)

    return p
Esempio n. 9
0
File: lkest.py Progetto: trmznt/pys
def init_argparser(p = None):
    if p is None:
        p = arg_parser('lkest.py - SNP-based likelihood estimator')

    p = naltparser.init_argparser(p)

    p.add_argument('-c', '--config', default=None, help = 'config file to use (optional)')
    p.add_argument('--mode', default='predict', choices = mode.keys()
                , help = 'run mode')
    p.add_argument('--logfile', default=None)
    p.add_argument('-o', '--outfile', default='outfile.txt')

    # cross validation params
    p.add_argument('--repeats', default=10, type=int, help='number of repeats')
    p.add_argument('--fold', default=5, type=int, help='number of fold')
    p.add_argument('--iter', default=1, type=int, help='iteration per fold')

    # simulate
    p.add_argument('-j', default=1, type=int, help='no of process')
    p.add_argument('--outsnp', default=None, help='output filename for index of SNPs')
    p.add_argument('-m', '--method', choices=['fix', 'rand', 'list', 'dt', 'hfst', 'hfst+dt'])
    p.add_argument('-k', default='100,50'
            , help='list of k, with k interpreted depending on selected method')
    p.add_argument('--insnp', default=None, help='input file containing index of SNPs')
    p.add_argument('--guidetree', default=None, help='guide tree used by hfst and hfst+dt')
    p.add_argument('--minfst', default=None, help='minimum FST for hfst and hfst+dt')
    p.add_argument('--mac', default=0, help='filtering for MAC')


    # train
    p.add_argument('--outprofile')

    # predict
    p.add_argument('--inprofile')

    return p
Esempio n. 10
0
def init_argparser():
    parser = arg_parser('Assess SNP and sample quality from nalt file')
    parser = naltparser.init_argparser(parser, with_group=False)

    return parser