Code Duplication    Length = 15-15 lines in 2 locations

rna_tools/tools/mq/rna_mq_collect.py 1 location

@@ 440-454 (lines=15) @@
437
        """
438
        global ref_seq, ref_ss, verbose, methods, lock, c
439
440
        if opt.seq_ss_filename:
441
            pdb_id, ref_seq, ref_ss = [x.strip() for x in open(opt.seq_ss_filename).read().strip().split('\n')]
442
            #sg.phr_text('FASTA SEQ/SS')
443
            sg.poptions({'AnalyzeGeometry': True, 'SSAgreement' : True})
444
            sg.poption('pdb_id', pdb_id)
445
            sg.poption('ref_seq', ref_seq)
446
            sg.poption('ref_ss', ref_ss)
447
        else:
448
            pdb_id, ref_seq, ref_ss = ['', '', '']
449
            sg.poptions({'SSAgreement' : True})
450
            # hack
451
            try: # if it's not on the list
452
                methods.remove('SSAgreement')
453
            except ValueError:
454
                pass
455
456
        verbose = opt.verbose
457

rna_tools/tools/mq/rna_mq_collect_tqdm.py 1 location

@@ 417-431 (lines=15) @@
414
        """
415
        global ref_seq, ref_ss, verbose, methods, lock, c
416
417
        if opt.seq_ss_filename:
418
            pdb_id, ref_seq, ref_ss = [x.strip() for x in open(opt.seq_ss_filename).read().strip().split('\n')]
419
            #sg.phr_text('FASTA SEQ/SS')
420
            sg.poptions({'AnalyzeGeometry': True, 'SSAgreement' : True})
421
            sg.poption('pdb_id', pdb_id)
422
            sg.poption('ref_seq', ref_seq)
423
            sg.poption('ref_ss', ref_ss)
424
        else:
425
            pdb_id, ref_seq, ref_ss = ['', '', '']
426
            sg.poptions({'SSAgreement' : True})
427
            # hack
428
            try: # if it's not on the list
429
                methods.remove('SSAgreement')
430
            except ValueError:
431
                pass
432
433
        verbose = opt.verbose
434