Пример #1
0
 def addProbability(self,geoX='',geoY='',data=None,title='',ghost=False,operation='',splitKey='',hue='bfactor',palette='viridis_r',centre=False,vmin=0,vmax=0,categorical=False,restrictions={},exclusions={},range=[]):
     isNew = False
     if data is None:
         isNew = True
     gp = geop.GeoPlot(data, geoX, geoY=geoY, title=title, newData=isNew, operation=operation,splitKey=splitKey,
                       hue=hue,palette=palette,centre=centre,vmin=vmin,vmax=vmax,categorical=categorical,
                       plot='probability',restrictions=restrictions,exclusions=exclusions,report=self)
     gp.range = range
     if not ghost:
         self.plots.append(gp)
     else:
         self.plots.append(geop.GeoOverlay(gp, '', title='ghost', report=self))
Пример #2
0
    def addHexBins(self,geoX='',geoY='',data=None,title='',gridsize=50,bins=100,ghost=False,operation='',hue='bfactor',palette='viridis_r',restrictions={},exclusions={},range=[]):
        isNew = False
        if data is None:
            isNew = True
        gp = geop.GeoPlot(data, geoX, geoY=geoY, title=title, newData=isNew, operation=operation,
                          hue=hue,palette=palette,plot='hexbin',restrictions=restrictions,exclusions=exclusions,report=self,gridsize=gridsize)

        gp.range = range
        if not ghost:
            self.plots.append(gp)
        else:
            self.plots.append(
                geop.GeoOverlay(gp, '', title='ghost', report=self))
Пример #3
0
    def addHistogram(self,geoX='',data=None,title='',ghost=False,operation='',splitKey='',hue='DEFAULT',
                     palette='crimson',count=False,range=[],restrictions={},exclusions={}):
        isNew = False
        if data is None:
            isNew=True
        if hue=='':
            hue='pdbCode'
        gp = geop.GeoPlot(data,geoX,geoY='',title=title,newData=isNew,operation=operation,splitKey=splitKey,
                          plot='histogram',hue=hue,palette=palette,count=count,restrictions=restrictions,exclusions=exclusions,report=self)
        gp.range=range
        if not ghost:
            self.plots.append(gp)
        else:
            self.plots.append(geop.GeoOverlay(gp,'',title='ghost',report=self))

        return gp
Пример #4
0
 def addSlice(self, slice, palette='viridis', title='',logged=False,centre=False,Contour=True,YellowDots=np.array([])):
     gp = geop.GeoPlot(data=None,geoX='',title=title, palette=palette, plot='surface', report=self,centre=centre,Contour=Contour)
     gp.surface = slice
     gp.logged=logged
     gp.differ=0
     gp.YellowDots = YellowDots
     self.plots.append(gp)
Пример #5
0
 def addSurfaceOverlay(self, surfaces, title='',logged=False):
     mat = []
     gp = geop.GeoPlot(data=None, geoX='', title=title, plot='surfaces', report=self)
     gp.surface = surfaces
     gp.logged=logged
     self.plots.append(gp)
     return mat
Пример #6
0
    def addDifference(self,dataA=None,dataB=None,geoX='',geoY='',restrictionsA={},restrictionsB = {},exclusionsA={},exclusionsB={},title='',palette='seismic'):
        isNew = False
        if dataA is None:
            isNew = True
        diffPlot = geop.GeoDifference(dataA=dataA,dataB=dataB,geoX=geoX,geoY=geoY,title=title,
                                      palette=palette,restrictionsA=restrictionsA,restrictionsB=restrictionsB,
                                      exclusionsA=exclusionsA,exclusionsB=exclusionsB,newData=isNew,report=self)

        self.plots.append(diffPlot.plotA)
        self.plots.append(diffPlot.plotDiff)
        self.plots.append(diffPlot.plotB)
Пример #7
0
 def addSlices(self, slices, palette='viridis', title='',logged=False,centre=False,Contour=True):
     mat = []
     for s in slices:
         if mat == []:
             mat = s
         else:
             mat = mat + s
     gp = geop.GeoPlot(data=None, geoX='', title=title, palette=palette, plot='surface', report=self,centre=centre,Contour=Contour)
     gp.surface = mat
     gp.logged=logged
     self.plots.append(gp)
     return mat
Пример #8
0
 def addCloseContact(self,pdbCode,atomA,atomB,distanceLimit=8.0,ridLimit=2,palette='viridis',hue='distance',categorical=False,title=''):
     pdbmanager = geopdb.GeoPdbs(self.pdbDataPath, self.edDataPath, self.ed, self.dssp)
     pdb = pdbmanager.getPdb(pdbCode,True)
     cc = geocc.CloseContact(pdb,atomA,atomB,distanceLimit,ridLimit,hue)
     if hue !='distance':
         hue = hue+'A'
     df = cc.createContacts()
     if title != '':
         title += '\n'
     title +=atomA+':'+atomB + '\n'
     title += 'Max Contact=' +  str(distanceLimit) + 'Å\n'
     title += 'Residue Gap=' + str(ridLimit)
     gp = geop.GeoPlot(data=df, geoX='ridxA', geoY='ridxB', title=title, newData=False, hue=hue,
                       palette=palette, plot='contact',categorical=categorical,report=self)
     self.plots.append(gp)
     return df
Пример #9
0
 def addStatsSummary(self, data=None, desc='',geoX='',geoY='', hue='', title=''):
     gp = geop.GeoPlot(data, geoX, geoY=geoY, title=title,hue=hue,plot='summary')
     gp.descA = desc
     self.plots.append(gp)
Пример #10
0
 def addStatsCompare(self, dataA=None, dataB=None, descA='',descB='',geoX='', title=''):
     gp = geop.GeoPlot(dataA, geoX, title=title,plot='compare')
     gp.data2 = dataB
     gp.descA = descA
     gp.descB = descB
     self.plots.append(gp)
Пример #11
0
 def addComment(self, comment):
     gp = geop.GeoPlot(data=pd.DataFrame(),title=comment,plot='comment',geoX='')
     self.plots.append(gp)
Пример #12
0
 def addCsv(self, data, title=''):
     gp = geop.GeoPlot(data=data,title=title,plot='csv',geoX='')
     self.plots.append(gp)