Esempio n. 1
0
    def setUp(self):
        """
        Initilize/create the NLMSA using : .aln alignment file,
        the file containing the genomes created with in memory mode,
        read in the sequences from the genomes file
        """

        thisdir = os.path.abspath(os.path.dirname(__file__))
        
        def thisfile(name):
            return os.path.join(thisdir, name)
        
        self.db = seqdb.SequenceFileDB(thisfile('test_genomes_file'))
        
        buf = open(thisfile('test_clustalw_alignment.aln'), "r").read()
        
        clustal_res_list = Clustalw_NLMSA.read_clustalw(buf.split("\n"))
        
       

        alignment = cnestedlist.NLMSA('test', mode='memory', seqDict=self.db,
                                      use_virtual_lpo=True)
    
        self.temp_nlmsa = Clustalw_NLMSA.create_NLMSA_clustalw(buf, self.db,
                                                               alignment)
Esempio n. 2
0
 def setUp(self):
     """
     Initialize the residues from a test file
     """
     
     thisdir = os.path.abspath(os.path.dirname(__file__))
     self.db = seqdb.SequenceFileDB(os.path.join(thisdir,
                                                 'test_genomes_file'))
     
     lines = open(os.path.join(thisdir, 'test_clustalw_alignment.aln')).readlines()
     
     self.clustalw_resds = Clustalw_NLMSA.read_clustalw(lines)
Esempio n. 3
0
    def setUp(self):
        #initilize/create the NLMSA using : .aln alignment file,
        #the file containing the genomes created with in memory mode,
        #read in the sequences from the genomes file

        thisdir = os.path.abspath(os.path.dirname(__file__))
        self.db = seqdb.SequenceFileDB(os.path.join(thisdir,
                                                    'test_genomes_file'))
        
        
        clustal_res_list = Clustalw_NLMSA.read_clustalw('test_clustalw_alignment.aln')
        genome_names = clustal_res_list[0].get_names() 
        genomes_dict = {}
        for genome in genome_names:
            genomes_dict[genome] = self.db[genome]


        alignment = cnestedlist.NLMSA('test', mode='memory', seqDict=self.db,
                                      use_virtual_lpo=True)
    
        alignment += genomes_dict[genome_names[0]]
        
        
        self.temp_nlmsa = Clustalw_NLMSA.create_NLMSA_clustalw('test_clustalw_alignment.aln',self.db,alignment)
Esempio n. 4
0
 def setUp(self):
     #initialize the residues from a test file
     self.clustalw_resds = Clustalw_NLMSA.read_clustalw('test_clustalw_alignment.aln')