예제 #1
0
 def json_protocols_decoder(
         self):  # Decodes the content of the protocols request
     meta = MetaData(self.get_json_protocols_request(),
                     self.get_protocols_url())
     meta.decode_json()
     self.decoded_json_protocols = meta.get_decoded()
예제 #2
0
 def json_files_decoder(self):  # Decodes the files JSON
     meta = MetaData(self.get_json_files_request(), self.get_files_url())
     meta.decode_json()
     self.decoded_json_files = meta.get_decoded()
예제 #3
0
 kw = ["cancer"]
 x.insert_keywords(kw)
 dic = {"samplecount" : "[200 TO 500]"}
 #dic = {}
 x.insert_criteria(dic)
 x.url_generator("experiments")                            # Creates the URL to be requested
 request = File_Requester(x.get_url())
 #print(request.get_url())
 request.do_request()
 request.get_request()
 request.do_content()                               # Returns the content of the requested URL
 #print(request.get_content())
 decoder = MetaData(request.get_content(), request.get_url())
 decoder.decode_json()                   # Decodes the content JSON
 #print(decoder.get_decoded())
 exp = Experiment(decoder.get_decoded()["experiments"]["experiment"][13])       # Created an Experiment Instance
 #print(exp.__dict__)
 #print(exp.accession)
 #exp.do_files_url()
 #print(exp.get_files_url())
 #exp.json_files_requester()
 #print(exp.get_json_files_request())
 #exp.json_files_decoder()
 #print(exp.get_decoded_json_files())
 #exp.create_files()
 #print(exp.files)
 #exp.download_all_files("C:/Users/utilizador/Google Drive/drive/Bioinformática/1_ano/2_Semestre/Projeto/Scripts/Downloads")
 exp.do_idf_file("C:/Users/utilizador/Google Drive/drive/Bioinformática/1_ano/2_Semestre/Projeto/Scripts/Downloads")          # Downloads and creates an data with IDF data
 #print(exp.get_idf_file())
 exp.do_sdrf_file("C:/Users/utilizador/Google Drive/drive/Bioinformática/1_ano/2_Semestre/Projeto/Scripts/Downloads") #Downloads and creates an data structure with SDRF data
 #print(exp.get_sdrf_file())