Exemplo n.º 1
0
    def CreateAdmix(self, FI, admixPath, famPath, phenPath, Name, PheCol, nb):
        """Creates Admix using imported data."""
        #Create File Manager
        FM = FI.CreateFileManager(Name)

        #Get the data from the path
        #Create File To Store Data
        #Get Data From File
        AdmixData = FI.GetFileData(admixPath)
        FamData = FI.GetFileData(famPath)
        FI.CreateFile('Admix IS THE NAME', AdmixData, 'Admix', FM)
        FI.CreateFile('Fam IS THE NAME', FamData, 'Fam', FM)
        DataAdmix = FI.GetFileManager(Name).GetAdmixFile().GetData()
        DataFam = FI.GetFileManager(Name).GetFamFile().GetData()

        #Get the data from the path if there is one
        #Create File To Store Data
        #Get Data From File
        PheData = FI.GetFileData(phenPath)
        #Checks for phe data
        if (PheData != None):
            FI.CreateFile('Phen IS THE NAME', PheData, 'Phen', FM)
            DataAdmixPhen = FI.GetFileManager(Name).GetPhenFile().GetData()
        else:
            DataAdmixPhen = None

        GraphCreate.CreateAdmix(DataAdmix, DataFam, DataAdmixPhen, PheCol, nb,
                                Name)
Exemplo n.º 2
0
 def setUp(self):
     self.PcaData = GetFileData('..\\Data\\comm-SYMCL.pca.evec')
     self.PhenData = GetFileData("..\\Data\\comm.phe")
     self.filePath = "..\\Data\\Test.gpf"
     self.filePath2 = "..\\Data\\Name.gpf"
     self._Test = GraphCreate.CreatePca(self.PhenData, self.PcaData, 1, 2,
                                        3, "Test", None)
Exemplo n.º 3
0
    def CreatePca(self, FI, pcaPath, phenPath, Name, pcaColoumnOne,
                  PcaColoumnTwo, PhenColoumn, panel):
        """Creates PCA using imported data."""
        #Create File Manager
        FM = FI.CreateFileManager(Name)

        #Get the data from the path
        #Create File To Store Data
        #Get Data From File
        _PcaData = FI.GetFileData(pcaPath)
        FI.CreateFile('PCA IS THE NAME', _PcaData, 'Pca', FM)
        DataPca = FI.GetFileManager(Name).GetPcaFile().GetData()

        #Get the data from the path if there is one
        #Create File To Store Data
        #Get Data From File
        _PhenData = FI.GetFileData(phenPath)
        if (_PhenData != None):

            FI.CreateFile('Phen IS THE NAME', _PhenData, 'Phen', FM)
            DataPhen = FI.GetFileManager(Name).GetPhenFile().GetData()
        #checks if there is phen Data
        else:
            DataPhen = None

        GraphCreate.CreatePca(DataPhen, DataPca, pcaColoumnOne, PcaColoumnTwo,
                              PhenColoumn, Name, panel)
Exemplo n.º 4
0
 def test_CompleteWithPhen(self):
     PcaData = GetFileData('..\\Data\\comm-SYMCL.pca.evec')
     PhenData = GetFileData("..\\Data\\comm.phe")
     _Test =GraphCreate.CreatePca(PhenData,PcaData,1,2,3,"Test",None)
     self.assertTrue(_Test)
Exemplo n.º 5
0
 def test_InCompleteWithoutPhen(self):
     PcaData = GetFileData('..\\Data\\comm-SYMCL.pca.evec')
     _Test =GraphCreate.CreatePca(None,None,1,2,3,"Test",None)
     print("HI")
     self.assertTrue(_Test)