Ejemplo n.º 1
0
    def setGeneralInformation(self, aString):
        m = GENERAL_INFORMATION_PATTERN.match(aString)

        if m:
            self.seqlHeader_raw = m.group('seqlHeader_raw')
            self.seqlHeader = safeStrip(self.seqlHeader_raw)
            self.applicant_raw = m.group('applicant_raw')
            self.applicant_val = m.group('applicant')
            applicantLines = self.applicant_val.splitlines()
            self.applicant = [
                a.strip() for a in applicantLines if a.strip() != ''
            ]
            self.title_raw = m.group('title_raw')
            self.title = su.inOneLine(safeStrip(m.group('title')))
            self.reference_raw = m.group('reference_raw')
            self.reference = safeStrip(m.group('reference'))
            self.applicationNumber_raw = m.group('applicationNumber_raw')
            self.applicationNumber = safeStrip(m.group('applicationNumber'))
            self.filingDate = safeStrip(m.group('filingDate'))
            self.filingDate_raw = m.group('filingDate_raw')
            self.priorities_raw = m.group('priorities_raw')
            self.priorities = su.parsePriorities(self.priorities_raw)
            self.quantity_raw = m.group('quantity_raw')
            self.quantity = safeStrip(m.group('quantity'))
            self.software_raw = m.group('software_raw')
            self.software = safeStrip(m.group('software'))
            self.isSeql = True

        else:
            print 'File', self.filePath
            print 'SequenceListing: No match for general information pattern.'
Ejemplo n.º 2
0
 def setGeneralInformation(self, aString):
     m = GENERAL_INFORMATION_PATTERN.match(aString)
       
     if m:
         self.seqlHeader_raw = m.group('seqlHeader_raw')
         self.seqlHeader = safeStrip(self.seqlHeader_raw)
         self.applicant_raw = m.group('applicant_raw')
         self.applicant_val = m.group('applicant')
         applicantLines = self.applicant_val.splitlines()
         self.applicant = [a.strip() for a in applicantLines if a.strip() != ''] 
         self.title_raw = m.group('title_raw')
         self.title = su.inOneLine(safeStrip(m.group('title')))
         self.reference_raw = m.group('reference_raw')
         self.reference = safeStrip(m.group('reference'))
         self.applicationNumber_raw = m.group('applicationNumber_raw')
         self.applicationNumber = safeStrip(m.group('applicationNumber'))
         self.filingDate = safeStrip(m.group('filingDate'))
         self.filingDate_raw = m.group('filingDate_raw')
         self.priorities_raw = m.group('priorities_raw')
         self.priorities = su.parsePriorities(self.priorities_raw)
         self.quantity_raw = m.group('quantity_raw')
         self.quantity = safeStrip(m.group('quantity'))
         self.software_raw = m.group('software_raw')
         self.software = safeStrip(m.group('software'))
         self.isSeql = True
         
     else:
         print 'File', self.filePath
         print 'SequenceListing: No match for general information pattern.'
Ejemplo n.º 3
0
 def test_parsePriorities(self):
     ins = '<150>  61536558 - prio1\r\n\r\n<151>  2001-01-01\r\n\r\n'
     exp = [('61536558 - prio1', '2001-01-01')]
     self.assertEqual(exp, seqlutils.parsePriorities(ins))
Ejemplo n.º 4
0
 def test_parsePriorities(self):
     ins = '<150>  61536558 - prio1\r\n\r\n<151>  2001-01-01\r\n\r\n'
     exp = [('61536558 - prio1', '2001-01-01')]
     self.assertEqual(exp, seqlutils.parsePriorities(ins))