Exemplo n.º 1
0
    def testRequiredFields(self):
        required = Proteome.required_fields()

        self.assertEqual(type(required), tuple,
                         "required_fields() returns a tuple.")

        self.assertTrue(len(required) > 0,
                        "required_field() did not return empty value.")
Exemplo n.º 2
0
    def testRequiredFields(self):
        """ Test the required_fields() static method. """
        required = Proteome.required_fields()

        self.assertEqual(type(required), tuple,
                         "required_fields() returns a tuple.")

        self.assertTrue(
            len(required) > 0, "required_fields() did not return empty value.")
Exemplo n.º 3
0
root = logging.getLogger()
root.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
ch.setFormatter(formatter)
root.addHandler(ch)

username = "******"
password = "******"

session = iHMPSession(username, password)

print("Required fields: ")
print(Proteome.required_fields())

proteome = Proteome()

proteome.analyzer = "the analyzer"
proteome.checksums = {"md5": "72bdc024d83226ccc90fbd2177e78d56"}
proteome.comment = "test comment. Hello world!"
proteome.detector = "the detector"
proteome.instrument_name = "name of instrument"
proteome.pepid_format = "format of pepid"
proteome.pride_id = "PRIDE ID"
proteome.processing_method = "a processing method"
proteome.protid_format = "format of protid"
proteome.protmod_format = "protmod format"
proteome.protocol_name = "name of the protocol"
proteome.sample_name = "name of the sample"
Exemplo n.º 4
0
    root = logging.getLogger()
    root.setLevel(logging.DEBUG)
    ch = logging.StreamHandler(sys.stdout)
    ch.setLevel(logging.DEBUG)
    formatter = logging.Formatter(
        '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    ch.setFormatter(formatter)
    root.addHandler(ch)


set_logging()

session = iHMPSession(username, password)

print("Required fields: ")
print(Proteome.required_fields())

proteome = Proteome()

proteome.analyzer = "the analyzer"
proteome.checksums = {"md5": "72bdc024d83226ccc90fbd2177e78d56"}
proteome.comment = "test comment. Hello world!"
proteome.detector = "the detector"
proteome.instrument_name = "name of instrument"
proteome.pepid_format = "format of pepid"
proteome.pride_id = "PRIDE ID"
proteome.processing_method = "a processing method"
proteome.protid_format = "format of protid"
proteome.protmod_format = "protmod format"
proteome.protocol_name = "name of the protocol"
proteome.sample_name = "name of the sample"