| @@ 349-420 (lines=72) @@ | ||
| 346 | pass |
|
| 347 | ||
| 348 | ||
| 349 | def option_parser(): |
|
| 350 | """Get options or show usage msg. |
|
| 351 | """ |
|
| 352 | description = '' |
|
| 353 | version = __version__ |
|
| 354 | usage = '\t%prog [-m <number_processes>] [-n <native_pdb_filename>] [-s <seq_ss_filename>] [-g <ignore_pdb_filename>] \ \n\t -o <output csv> <dir/*> # [!] no .csv! the file will get version of mqaprna \n\t' + __version__ |
|
| 355 | parser = OptionParser(description=__doc__, |
|
| 356 | version=version, |
|
| 357 | usage=usage) |
|
| 358 | ||
| 359 | parser.add_option("-q", "--mQapscore", |
|
| 360 | action="store_true", default=False, dest="mqapscore", help="calculate mqapscore") |
|
| 361 | ||
| 362 | parser.add_option("-v", "--verbose", |
|
| 363 | action="store_true", default=False, dest="verbose", help="verbose") |
|
| 364 | ||
| 365 | parser.add_option("--force", |
|
| 366 | action="store_true", default=False) |
|
| 367 | ||
| 368 | parser.add_option("-f", "--no-filename-version", |
|
| 369 | action="store_true", default=False, dest="no_filename_version", help="don't add version of tool to csv filename") |
|
| 370 | ||
| 371 | ||
| 372 | parser.add_option("-n", "--native_pdb_filename", |
|
| 373 | action="store", type="string", dest="native_pdb_filename", help="native structure in PDB format to calculate RMSD") |
|
| 374 | ||
| 375 | parser.add_option("-m", "--multiprocessing", |
|
| 376 | action="store", type="int", dest="number_processes", default=8, |
|
| 377 | help="set a number of processes, default=8, 0 is no multiprocessing") |
|
| 378 | ||
| 379 | group2 = OptionGroup(parser, "Ignore pdbs, don't have empty lines here! Example", |
|
| 380 | """1xjrA_output3-000142_AA.pdb |
|
| 381 | 1xjrA_output3-000208_AA.pdb |
|
| 382 | 1xjrA_output3-000166_AA.pdb""") |
|
| 383 | ||
| 384 | group2.add_option("-g", "--ignore-pdbs", |
|
| 385 | action="store", type="string", dest="ignore_pdb_filename") |
|
| 386 | ||
| 387 | group = OptionGroup(parser, "Seq-SS. Example", |
|
| 388 | """>1xjrA |
|
| 389 | GAGUUCACCGAGGCCACGCGGAGUACGAUCGAGGGUACAGUGAAUU |
|
| 390 | .(((((((...((((.((((.....))..))..))).).)))))))""") |
|
| 391 | ||
| 392 | group.add_option("-t", "--methods", |
|
| 393 | action="store", type="string", dest="methods", help=', '.join(['RASP', 'SimRNA', 'AnalyzeGeometry','FARNA', 'QRNA', 'NAST_pyro', |
|
| 394 | 'radius_of_gyration', 'SSAgreement', 'ClashScore', 'RNAkb', |
|
| 395 | 'RNAkb_all', 'FARNA_hires', 'FARNA', 'FARFAR2', |
|
| 396 | 'FARFAR2_hires', 'Dfire', 'RNA3DCNN', 'eSCORE'])) |
|
| 397 | ||
| 398 | group.add_option("-s", "--seq-ss", |
|
| 399 | action="store", type="string", dest="seq_ss_filename", help="") |
|
| 400 | ||
| 401 | group.add_option("-o", "--output", |
|
| 402 | action="store", type="string", dest="output", help="output csv file") |
|
| 403 | ||
| 404 | group.add_option("-l", "--list-of-files", |
|
| 405 | action="store", type="string", dest="list_of_files", help="list of files") |
|
| 406 | ||
| 407 | ||
| 408 | parser.add_option_group(group) |
|
| 409 | parser.add_option_group(group2) |
|
| 410 | ||
| 411 | (opt, arguments) = parser.parse_args() |
|
| 412 | ||
| 413 | arguments = [f for f in arguments if f.endswith('.pdb')] |
|
| 414 | ||
| 415 | if len(arguments) == 0: |
|
| 416 | parser.print_help() |
|
| 417 | print('\n Curr methods: ', ','.join(methods), end=' ') |
|
| 418 | sys.exit(1) |
|
| 419 | ||
| 420 | return arguments, opt |
|
| 421 | ||
| 422 | ||
| 423 | class RunAllDirectory(): |
|
| @@ 329-397 (lines=69) @@ | ||
| 326 | pass |
|
| 327 | ||
| 328 | ||
| 329 | def option_parser(): |
|
| 330 | """Get options or show usage msg. |
|
| 331 | """ |
|
| 332 | description = '' |
|
| 333 | version = __version__ |
|
| 334 | usage = '\t%prog [-m <number_processes>] [-n <native_pdb_filename>] [-s <seq_ss_filename>] [-g <ignore_pdb_filename>] \ \n\t -o <output csv> <dir/*> # [!] no .csv! the file will get version of mqaprna \n\t' + __version__ |
|
| 335 | parser = OptionParser(description=__doc__, |
|
| 336 | version=version, |
|
| 337 | usage=usage) |
|
| 338 | ||
| 339 | parser.add_option("-q", "--mQapscore", |
|
| 340 | action="store_true", default=False, dest="mqapscore", help="calculate mqapscore") |
|
| 341 | ||
| 342 | parser.add_option("-v", "--verbose", |
|
| 343 | action="store_true", default=False, dest="verbose", help="verbose") |
|
| 344 | ||
| 345 | parser.add_option("-f", "--no-filename-version", |
|
| 346 | action="store_true", default=False, dest="no_filename_version", help="don't add version of tool to csv filename") |
|
| 347 | ||
| 348 | ||
| 349 | parser.add_option("-n", "--native_pdb_filename", |
|
| 350 | action="store", type="string", dest="native_pdb_filename", help="native structure in PDB format to calculate RMSD") |
|
| 351 | ||
| 352 | parser.add_option("-m", "--multiprocessing", |
|
| 353 | action="store", type="int", dest="number_processes", default=1, |
|
| 354 | help="set a number of processes, default=8, 0 is no multiprocessing") |
|
| 355 | ||
| 356 | group2 = OptionGroup(parser, "Ignore pdbs, don't have empty lines here! Example", |
|
| 357 | """1xjrA_output3-000142_AA.pdb |
|
| 358 | 1xjrA_output3-000208_AA.pdb |
|
| 359 | 1xjrA_output3-000166_AA.pdb""") |
|
| 360 | ||
| 361 | group2.add_option("-g", "--ignore-pdbs", |
|
| 362 | action="store", type="string", dest="ignore_pdb_filename") |
|
| 363 | ||
| 364 | group = OptionGroup(parser, "Seq-SS. Example", |
|
| 365 | """>1xjrA |
|
| 366 | GAGUUCACCGAGGCCACGCGGAGUACGAUCGAGGGUACAGUGAAUU |
|
| 367 | .(((((((...((((.((((.....))..))..))).).)))))))""") |
|
| 368 | ||
| 369 | group.add_option("-t", "--methods", |
|
| 370 | action="store", type="string", dest="methods", help=', '.join(['RASP', 'SimRNA', 'AnalyzeGeometry','FARNA', 'QRNA', 'NAST_pyro', |
|
| 371 | 'radius_of_gyration', 'SSAgreement', 'ClashScore', 'RNAkb', |
|
| 372 | 'RNAkb_all', 'FARNA_hires', 'FARNA', 'FARFAR2', |
|
| 373 | 'FARFAR2_hires', 'Dfire', 'RNA3DCNN', 'eSCORE'])) |
|
| 374 | ||
| 375 | group.add_option("-s", "--seq-ss", |
|
| 376 | action="store", type="string", dest="seq_ss_filename", help="") |
|
| 377 | ||
| 378 | group.add_option("-o", "--output", |
|
| 379 | action="store", type="string", dest="output", help="output csv file") |
|
| 380 | ||
| 381 | group.add_option("-l", "--list-of-files", |
|
| 382 | action="store", type="string", dest="list_of_files", help="list of files") |
|
| 383 | ||
| 384 | ||
| 385 | parser.add_option_group(group) |
|
| 386 | parser.add_option_group(group2) |
|
| 387 | ||
| 388 | (opt, arguments) = parser.parse_args() |
|
| 389 | ||
| 390 | arguments = [f for f in arguments if f.endswith('.pdb')] |
|
| 391 | ||
| 392 | if len(arguments) == 0: |
|
| 393 | parser.print_help() |
|
| 394 | print('\n Curr methods: ', ','.join(methods), end=' ') |
|
| 395 | sys.exit(1) |
|
| 396 | ||
| 397 | return arguments, opt |
|
| 398 | ||
| 399 | ||
| 400 | class RunAllDirectory(): |
|