tripal_core.schema.api.inc 328 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723
  1. <?php
  2. /* @file: This file contains default schema definitions for all chado tables
  3. * to be used with tripal_core chado insert/update/select functions.
  4. * These schema definitions can be augmented by the various modules
  5. * (specifically to add missing foreign key definitions) by implementing
  6. * hook_chado_<table name>_schema().
  7. */
  8. /**
  9. * @defgroup tripal_schema_api Core Module Schema API
  10. * @{
  11. * Provides an application programming interface (API) for describing Chado tables.
  12. * This API consists of a set of functions, one for each table in Chado. Each
  13. * function simply returns a Drupal style array that defines the table.
  14. *
  15. * Because Drupal 6 does not handle foreign key relationships, a separate
  16. * hook is used to define the foreign key relationships for each table. As
  17. * of version 0.3b of Tripal, not all foreign key relationships have been
  18. * defined. Therefore, if you need a foreign key you must create the appropriate
  19. * hook. Hooks are named hook_chado_table_schema() where 'hook' is replaced
  20. * with the module name, and 'table' is replaced by the Chado table name.
  21. *
  22. * The functions provided in this documentation should not be called as is, but if you need
  23. * the Drupal-style array definition for any table, use the following function
  24. * call:
  25. *
  26. * $table_desc = module_invoke_all('chado_'.$table.'_schema');
  27. *
  28. * where the variable $table contains the name of the table you want to
  29. * retireve. The function call above uses the Drupal hook infrastructure to
  30. * call the appropriate function in the Schema API as well as the appropriate
  31. * hook to add in any foreign key relationships.
  32. *
  33. * @}
  34. * @ingroup tripal_api
  35. */
  36. /**
  37. *
  38. * @ingroup tripal_schema_api
  39. */
  40. function tripal_core_get_chado_tables() {
  41. if(is_array($db_url) and array_key_exists('chado',$db_url)){
  42. $previous_db = tripal_db_set_active('chado');
  43. $sql = 'SELECT tablename FROM pg_tables';
  44. $resource = db_query($sql);
  45. tripal_db_set_active($previous_db);
  46. } else {
  47. $sql = "SELECT tablename FROM pg_tables WHERE schemaname='chado'";
  48. $resource = db_query($sql);
  49. }
  50. $tables = array();
  51. while ($r = db_fetch_object($resource)) {
  52. $tables[$r->tablename] = $r->tablename;
  53. }
  54. asort($tables);
  55. return $tables;
  56. }
  57. /**
  58. * Implements hook_organism_dbxref_schema()
  59. * Purpose: To describe the structure of organism_dbxref to tripal
  60. * @see tripal_core.api.inc: tripal_core_chado_insert()
  61. * @see tripal_core.api.inc: tripal_core_chado_update()
  62. * @see tripal_core.api.inc: tripal_core_chado_select()
  63. *
  64. * @return
  65. * An array describing the current table
  66. *
  67. * @ingroup tripal_schema_api
  68. *
  69. */
  70. function tripal_core_chado_organism_dbxref_schema () {
  71. $description = array();
  72. $description = array(
  73. 'table' => 'organism_dbxref',
  74. // 'description' => 'TODO: please describe this table!',
  75. 'fields' => array(
  76. 'organism_dbxref_id' => array(
  77. // 'description' => 'TODO: please describe this field!',
  78. 'type' => 'serial',
  79. 'not null' => '1',
  80. ),
  81. 'organism_id' => array(
  82. // 'description' => 'TODO: please describe this field!',
  83. 'type' => 'int',
  84. 'not null' => '1',
  85. ),
  86. 'dbxref_id' => array(
  87. // 'description' => 'TODO: please describe this field!',
  88. 'type' => 'int',
  89. 'not null' => '1',
  90. ),
  91. ),
  92. 'primary key' => array(
  93. '0' => 'organism_dbxref_id',
  94. ),
  95. 'unique keys' => array(
  96. 'organism_dbxref_c1' => array(
  97. '0' => 'organism_id',
  98. '1' => 'dbxref_id',
  99. ),
  100. ),
  101. 'indexes' => array(
  102. 'organism_dbxref_idx1' => array(
  103. '0' => 'organism_id',
  104. ),
  105. 'organism_dbxref_idx2' => array(
  106. '0' => 'dbxref_id',
  107. ),
  108. ),
  109. 'foreign keys' => array(
  110. ),
  111. );
  112. return $description;
  113. }
  114. /**
  115. * Implements hook_organismprop_schema()
  116. * Purpose: To describe the structure of organismprop to tripal
  117. * @see tripal_core.api.inc: tripal_core_chado_insert()
  118. * @see tripal_core.api.inc: tripal_core_chado_update()
  119. * @see tripal_core.api.inc: tripal_core_chado_select()
  120. *
  121. * @return
  122. * An array describing the current table
  123. *
  124. * @ingroup tripal_schema_api
  125. *
  126. */
  127. function tripal_core_chado_organismprop_schema () {
  128. $description = array();
  129. $description = array(
  130. 'table' => 'organismprop',
  131. // 'description' => 'TODO: please describe this table!',
  132. 'fields' => array(
  133. 'organismprop_id' => array(
  134. // 'description' => 'TODO: please describe this field!',
  135. 'type' => 'serial',
  136. 'not null' => '1',
  137. ),
  138. 'organism_id' => array(
  139. // 'description' => 'TODO: please describe this field!',
  140. 'type' => 'int',
  141. 'not null' => '1',
  142. ),
  143. 'type_id' => array(
  144. // 'description' => 'TODO: please describe this field!',
  145. 'type' => 'int',
  146. 'not null' => '1',
  147. ),
  148. 'value' => array(
  149. // 'description' => 'TODO: please describe this field!',
  150. 'type' => 'text',
  151. 'not null' => '',
  152. ),
  153. 'rank' => array(
  154. // 'description' => 'TODO: please describe this field!',
  155. 'type' => 'int',
  156. 'not null' => '1',
  157. 'default' => '0',
  158. ),
  159. ),
  160. 'primary key' => array(
  161. '0' => 'organismprop_id',
  162. ),
  163. 'unique keys' => array(
  164. 'organismprop_c1' => array(
  165. '0' => 'organism_id',
  166. '1' => 'type_id',
  167. '2' => 'rank',
  168. ),
  169. ),
  170. 'indexes' => array(
  171. 'organismprop_idx1' => array(
  172. '0' => 'organism_id',
  173. ),
  174. 'organismprop_idx2' => array(
  175. '0' => 'type_id',
  176. ),
  177. ),
  178. 'foreign keys' => array(
  179. ),
  180. );
  181. return $description;
  182. }
  183. /**
  184. * Implements hook_phendesc_schema()
  185. * Purpose: To describe the structure of phendesc to tripal
  186. * @see tripal_core.api.inc: tripal_core_chado_insert()
  187. * @see tripal_core.api.inc: tripal_core_chado_update()
  188. * @see tripal_core.api.inc: tripal_core_chado_select()
  189. *
  190. * @return
  191. * An array describing the current table
  192. *
  193. * @ingroup tripal_schema_api
  194. *
  195. */
  196. function tripal_core_chado_phendesc_schema () {
  197. $description = array();
  198. $description = array(
  199. 'table' => 'phendesc',
  200. // 'description' => 'TODO: please describe this table!',
  201. 'fields' => array(
  202. 'phendesc_id' => array(
  203. // 'description' => 'TODO: please describe this field!',
  204. 'type' => 'serial',
  205. 'not null' => '1',
  206. ),
  207. 'genotype_id' => array(
  208. // 'description' => 'TODO: please describe this field!',
  209. 'type' => 'int',
  210. 'not null' => '1',
  211. ),
  212. 'environment_id' => array(
  213. // 'description' => 'TODO: please describe this field!',
  214. 'type' => 'int',
  215. 'not null' => '1',
  216. ),
  217. 'description' => array(
  218. // 'description' => 'TODO: please describe this field!',
  219. 'type' => 'text',
  220. 'not null' => '1',
  221. ),
  222. 'type_id' => array(
  223. // 'description' => 'TODO: please describe this field!',
  224. 'type' => 'int',
  225. 'not null' => '1',
  226. ),
  227. 'pub_id' => array(
  228. // 'description' => 'TODO: please describe this field!',
  229. 'type' => 'int',
  230. 'not null' => '1',
  231. ),
  232. ),
  233. 'primary key' => array(
  234. '0' => 'phendesc_id',
  235. ),
  236. 'unique keys' => array(
  237. 'phendesc_c1' => array(
  238. '0' => 'genotype_id',
  239. '1' => 'environment_id',
  240. '2' => 'type_id',
  241. '3' => 'pub_id',
  242. ),
  243. ),
  244. 'indexes' => array(
  245. 'phendesc_idx1' => array(
  246. '0' => 'genotype_id',
  247. ),
  248. 'phendesc_idx2' => array(
  249. '0' => 'environment_id',
  250. ),
  251. 'phendesc_idx3' => array(
  252. '0' => 'pub_id',
  253. ),
  254. ),
  255. 'foreign keys' => array(
  256. ),
  257. );
  258. return $description;
  259. }
  260. /**
  261. * Implements hook_phenotype_schema()
  262. * Purpose: To describe the structure of phenotype to tripal
  263. * @see tripal_core.api.inc: tripal_core_chado_insert()
  264. * @see tripal_core.api.inc: tripal_core_chado_update()
  265. * @see tripal_core.api.inc: tripal_core_chado_select()
  266. *
  267. * @return
  268. * An array describing the current table
  269. *
  270. * @ingroup tripal_schema_api
  271. *
  272. */
  273. function tripal_core_chado_phenotype_schema () {
  274. $description = array();
  275. $description = array(
  276. 'table' => 'phenotype',
  277. // 'description' => 'TODO: please describe this table!',
  278. 'fields' => array(
  279. 'phenotype_id' => array(
  280. // 'description' => 'TODO: please describe this field!',
  281. 'type' => 'serial',
  282. 'not null' => '1',
  283. ),
  284. 'uniquename' => array(
  285. // 'description' => 'TODO: please describe this field!',
  286. 'type' => 'text',
  287. 'not null' => '1',
  288. ),
  289. 'observable_id' => array(
  290. // 'description' => 'TODO: please describe this field!',
  291. 'type' => 'int',
  292. 'not null' => '',
  293. ),
  294. 'attr_id' => array(
  295. // 'description' => 'TODO: please describe this field!',
  296. 'type' => 'int',
  297. 'not null' => '',
  298. ),
  299. 'value' => array(
  300. // 'description' => 'TODO: please describe this field!',
  301. 'type' => 'text',
  302. 'not null' => '',
  303. ),
  304. 'cvalue_id' => array(
  305. // 'description' => 'TODO: please describe this field!',
  306. 'type' => 'int',
  307. 'not null' => '',
  308. ),
  309. 'assay_id' => array(
  310. // 'description' => 'TODO: please describe this field!',
  311. 'type' => 'int',
  312. 'not null' => '',
  313. ),
  314. ),
  315. 'primary key' => array(
  316. '0' => 'phenotype_id',
  317. ),
  318. 'unique keys' => array(
  319. 'phenotype_c1' => array(
  320. '0' => 'uniquename',
  321. ),
  322. ),
  323. 'indexes' => array(
  324. 'phenotype_idx1' => array(
  325. '0' => 'cvalue_id',
  326. ),
  327. 'phenotype_idx2' => array(
  328. '0' => 'observable_id',
  329. ),
  330. 'phenotype_idx3' => array(
  331. '0' => 'attr_id',
  332. ),
  333. ),
  334. 'foreign keys' => array(
  335. ),
  336. );
  337. return $description;
  338. }
  339. /**
  340. * Implements hook_organism_schema()
  341. * Purpose: To describe the structure of organism to tripal
  342. * @see tripal_core.api.inc: tripal_core_chado_insert()
  343. * @see tripal_core.api.inc: tripal_core_chado_update()
  344. * @see tripal_core.api.inc: tripal_core_chado_select()
  345. *
  346. * @return
  347. * An array describing the current table
  348. *
  349. * @ingroup tripal_schema_api
  350. *
  351. */
  352. function tripal_core_chado_organism_schema () {
  353. $description = array();
  354. $description = array(
  355. 'table' => 'organism',
  356. // 'description' => 'TODO: please describe this table!',
  357. 'fields' => array(
  358. 'organism_id' => array(
  359. // 'description' => 'TODO: please describe this field!',
  360. 'type' => 'serial',
  361. 'not null' => '1',
  362. ),
  363. 'abbreviation' => array(
  364. // 'description' => 'TODO: please describe this field!',
  365. 'type' => 'varchar',
  366. 'length' => '255',
  367. 'not null' => '',
  368. ),
  369. 'genus' => array(
  370. // 'description' => 'TODO: please describe this field!',
  371. 'type' => 'varchar',
  372. 'length' => '255',
  373. 'not null' => '1',
  374. ),
  375. 'species' => array(
  376. // 'description' => 'TODO: please describe this field!',
  377. 'type' => 'varchar',
  378. 'length' => '255',
  379. 'not null' => '1',
  380. ),
  381. 'common_name' => array(
  382. // 'description' => 'TODO: please describe this field!',
  383. 'type' => 'varchar',
  384. 'length' => '255',
  385. 'not null' => '',
  386. ),
  387. 'comment' => array(
  388. // 'description' => 'TODO: please describe this field!',
  389. 'type' => 'text',
  390. 'not null' => '',
  391. ),
  392. ),
  393. 'primary key' => array(
  394. '0' => 'organism_id',
  395. ),
  396. 'unique keys' => array(
  397. 'organism_c1' => array(
  398. '0' => 'genus',
  399. '1' => 'species',
  400. ),
  401. ),
  402. 'indexes' => array(
  403. ),
  404. 'foreign keys' => array(
  405. ),
  406. );
  407. return $description;
  408. }
  409. /**
  410. * Implements hook_materialized_view_schema()
  411. * Purpose: To describe the structure of materialized_view to tripal
  412. * @see tripal_core.api.inc: tripal_core_chado_insert()
  413. * @see tripal_core.api.inc: tripal_core_chado_update()
  414. * @see tripal_core.api.inc: tripal_core_chado_select()
  415. *
  416. * @return
  417. * An array describing the current table
  418. *
  419. * @ingroup tripal_schema_api
  420. *
  421. */
  422. function tripal_core_chado_materialized_view_schema () {
  423. $description = array();
  424. $description = array(
  425. 'table' => 'materialized_view',
  426. // 'description' => 'TODO: please describe this table!',
  427. 'fields' => array(
  428. 'materialized_view_id' => array(
  429. // 'description' => 'TODO: please describe this field!',
  430. 'type' => 'serial',
  431. 'not null' => '1',
  432. ),
  433. 'last_update' => array(
  434. // 'description' => 'TODO: please describe this field!',
  435. 'type' => 'datetime',
  436. 'not null' => '',
  437. ),
  438. 'refresh_time' => array(
  439. // 'description' => 'TODO: please describe this field!',
  440. 'type' => 'int',
  441. 'not null' => '',
  442. ),
  443. 'name' => array(
  444. // 'description' => 'TODO: please describe this field!',
  445. 'type' => 'varchar',
  446. 'length' => '64',
  447. 'not null' => '',
  448. ),
  449. 'mv_schema' => array(
  450. // 'description' => 'TODO: please describe this field!',
  451. 'type' => 'varchar',
  452. 'length' => '64',
  453. 'not null' => '',
  454. ),
  455. 'mv_table' => array(
  456. // 'description' => 'TODO: please describe this field!',
  457. 'type' => 'varchar',
  458. 'length' => '128',
  459. 'not null' => '',
  460. ),
  461. 'mv_specs' => array(
  462. // 'description' => 'TODO: please describe this field!',
  463. 'type' => 'text',
  464. 'not null' => '',
  465. ),
  466. 'indexed' => array(
  467. // 'description' => 'TODO: please describe this field!',
  468. 'type' => 'text',
  469. 'not null' => '',
  470. ),
  471. 'query' => array(
  472. // 'description' => 'TODO: please describe this field!',
  473. 'type' => 'text',
  474. 'not null' => '',
  475. ),
  476. 'special_index' => array(
  477. // 'description' => 'TODO: please describe this field!',
  478. 'type' => 'text',
  479. 'not null' => '',
  480. ),
  481. ),
  482. 'primary key' => array(
  483. ),
  484. 'unique keys' => array(
  485. 'name' => array(
  486. '0' => 'name',
  487. ),
  488. ),
  489. 'indexes' => array(
  490. ),
  491. 'foreign keys' => array(
  492. ),
  493. );
  494. return $description;
  495. }
  496. /**
  497. * Implements hook_libraryprop_schema()
  498. * Purpose: To describe the structure of libraryprop to tripal
  499. * @see tripal_core.api.inc: tripal_core_chado_insert()
  500. * @see tripal_core.api.inc: tripal_core_chado_update()
  501. * @see tripal_core.api.inc: tripal_core_chado_select()
  502. *
  503. * @return
  504. * An array describing the current table
  505. *
  506. * @ingroup tripal_schema_api
  507. *
  508. */
  509. function tripal_core_chado_libraryprop_schema () {
  510. $description = array();
  511. $description = array(
  512. 'table' => 'libraryprop',
  513. // 'description' => 'TODO: please describe this table!',
  514. 'fields' => array(
  515. 'libraryprop_id' => array(
  516. // 'description' => 'TODO: please describe this field!',
  517. 'type' => 'serial',
  518. 'not null' => '1',
  519. ),
  520. 'library_id' => array(
  521. // 'description' => 'TODO: please describe this field!',
  522. 'type' => 'int',
  523. 'not null' => '1',
  524. ),
  525. 'type_id' => array(
  526. // 'description' => 'TODO: please describe this field!',
  527. 'type' => 'int',
  528. 'not null' => '1',
  529. ),
  530. 'value' => array(
  531. // 'description' => 'TODO: please describe this field!',
  532. 'type' => 'text',
  533. 'not null' => '',
  534. ),
  535. 'rank' => array(
  536. // 'description' => 'TODO: please describe this field!',
  537. 'type' => 'int',
  538. 'not null' => '1',
  539. 'default' => '0',
  540. ),
  541. ),
  542. 'primary key' => array(
  543. '0' => 'libraryprop_id',
  544. ),
  545. 'unique keys' => array(
  546. 'libraryprop_c1' => array(
  547. '0' => 'library_id',
  548. '1' => 'type_id',
  549. '2' => 'rank',
  550. ),
  551. ),
  552. 'indexes' => array(
  553. 'libraryprop_idx1' => array(
  554. '0' => 'library_id',
  555. ),
  556. 'libraryprop_idx2' => array(
  557. '0' => 'type_id',
  558. ),
  559. ),
  560. 'foreign keys' => array(
  561. ),
  562. );
  563. return $description;
  564. }
  565. /**
  566. * Implements hook_libraryprop_pub_schema()
  567. * Purpose: To describe the structure of libraryprop_pub to tripal
  568. * @see tripal_core.api.inc: tripal_core_chado_insert()
  569. * @see tripal_core.api.inc: tripal_core_chado_update()
  570. * @see tripal_core.api.inc: tripal_core_chado_select()
  571. *
  572. * @return
  573. * An array describing the current table
  574. *
  575. * @ingroup tripal_schema_api
  576. *
  577. */
  578. function tripal_core_chado_libraryprop_pub_schema () {
  579. $description = array();
  580. $description = array(
  581. 'table' => 'libraryprop_pub',
  582. // 'description' => 'TODO: please describe this table!',
  583. 'fields' => array(
  584. 'libraryprop_pub_id' => array(
  585. // 'description' => 'TODO: please describe this field!',
  586. 'type' => 'serial',
  587. 'not null' => '1',
  588. ),
  589. 'libraryprop_id' => array(
  590. // 'description' => 'TODO: please describe this field!',
  591. 'type' => 'int',
  592. 'not null' => '1',
  593. ),
  594. 'pub_id' => array(
  595. // 'description' => 'TODO: please describe this field!',
  596. 'type' => 'int',
  597. 'not null' => '1',
  598. ),
  599. ),
  600. 'primary key' => array(
  601. '0' => 'libraryprop_pub_id',
  602. ),
  603. 'unique keys' => array(
  604. 'libraryprop_pub_c1' => array(
  605. '0' => 'libraryprop_id',
  606. '1' => 'pub_id',
  607. ),
  608. ),
  609. 'indexes' => array(
  610. 'libraryprop_pub_idx1' => array(
  611. '0' => 'libraryprop_id',
  612. ),
  613. 'libraryprop_pub_idx2' => array(
  614. '0' => 'pub_id',
  615. ),
  616. ),
  617. 'foreign keys' => array(
  618. ),
  619. );
  620. return $description;
  621. }
  622. /**
  623. * Implements hook_magedocumentation_schema()
  624. * Purpose: To describe the structure of magedocumentation to tripal
  625. * @see tripal_core.api.inc: tripal_core_chado_insert()
  626. * @see tripal_core.api.inc: tripal_core_chado_update()
  627. * @see tripal_core.api.inc: tripal_core_chado_select()
  628. *
  629. * @return
  630. * An array describing the current table
  631. *
  632. * @ingroup tripal_schema_api
  633. *
  634. */
  635. function tripal_core_chado_magedocumentation_schema () {
  636. $description = array();
  637. $description = array(
  638. 'table' => 'magedocumentation',
  639. // 'description' => 'TODO: please describe this table!',
  640. 'fields' => array(
  641. 'magedocumentation_id' => array(
  642. // 'description' => 'TODO: please describe this field!',
  643. 'type' => 'serial',
  644. 'not null' => '1',
  645. ),
  646. 'mageml_id' => array(
  647. // 'description' => 'TODO: please describe this field!',
  648. 'type' => 'int',
  649. 'not null' => '1',
  650. ),
  651. 'tableinfo_id' => array(
  652. // 'description' => 'TODO: please describe this field!',
  653. 'type' => 'int',
  654. 'not null' => '1',
  655. ),
  656. 'row_id' => array(
  657. // 'description' => 'TODO: please describe this field!',
  658. 'type' => 'int',
  659. 'not null' => '1',
  660. ),
  661. 'mageidentifier' => array(
  662. // 'description' => 'TODO: please describe this field!',
  663. 'type' => 'text',
  664. 'not null' => '1',
  665. ),
  666. ),
  667. 'primary key' => array(
  668. '0' => 'magedocumentation_id',
  669. ),
  670. 'unique keys' => array(
  671. ),
  672. 'indexes' => array(
  673. 'magedocumentation_idx1' => array(
  674. '0' => 'mageml_id',
  675. ),
  676. 'magedocumentation_idx2' => array(
  677. '0' => 'tableinfo_id',
  678. ),
  679. 'magedocumentation_idx3' => array(
  680. '0' => 'row_id',
  681. ),
  682. ),
  683. 'foreign keys' => array(
  684. ),
  685. );
  686. return $description;
  687. }
  688. /**
  689. * Implements hook_mageml_schema()
  690. * Purpose: To describe the structure of mageml to tripal
  691. * @see tripal_core.api.inc: tripal_core_chado_insert()
  692. * @see tripal_core.api.inc: tripal_core_chado_update()
  693. * @see tripal_core.api.inc: tripal_core_chado_select()
  694. *
  695. * @return
  696. * An array describing the current table
  697. *
  698. * @ingroup tripal_schema_api
  699. *
  700. */
  701. function tripal_core_chado_mageml_schema () {
  702. $description = array();
  703. $description = array(
  704. 'table' => 'mageml',
  705. // 'description' => 'TODO: please describe this table!',
  706. 'fields' => array(
  707. 'mageml_id' => array(
  708. // 'description' => 'TODO: please describe this field!',
  709. 'type' => 'serial',
  710. 'not null' => '1',
  711. ),
  712. 'mage_package' => array(
  713. // 'description' => 'TODO: please describe this field!',
  714. 'type' => 'text',
  715. 'not null' => '1',
  716. ),
  717. 'mage_ml' => array(
  718. // 'description' => 'TODO: please describe this field!',
  719. 'type' => 'text',
  720. 'not null' => '1',
  721. ),
  722. ),
  723. 'primary key' => array(
  724. '0' => 'mageml_id',
  725. ),
  726. 'unique keys' => array(
  727. ),
  728. 'indexes' => array(
  729. ),
  730. 'foreign keys' => array(
  731. ),
  732. );
  733. return $description;
  734. }
  735. /**
  736. * Implements hook_phenotype_comparison_schema()
  737. * Purpose: To describe the structure of phenotype_comparison to tripal
  738. * @see tripal_core.api.inc: tripal_core_chado_insert()
  739. * @see tripal_core.api.inc: tripal_core_chado_update()
  740. * @see tripal_core.api.inc: tripal_core_chado_select()
  741. *
  742. * @return
  743. * An array describing the current table
  744. *
  745. * @ingroup tripal_schema_api
  746. *
  747. */
  748. function tripal_core_chado_phenotype_comparison_schema () {
  749. $description = array();
  750. $description = array(
  751. 'table' => 'phenotype_comparison',
  752. // 'description' => 'TODO: please describe this table!',
  753. 'fields' => array(
  754. 'phenotype_comparison_id' => array(
  755. // 'description' => 'TODO: please describe this field!',
  756. 'type' => 'serial',
  757. 'not null' => '1',
  758. ),
  759. 'genotype1_id' => array(
  760. // 'description' => 'TODO: please describe this field!',
  761. 'type' => 'int',
  762. 'not null' => '1',
  763. ),
  764. 'environment1_id' => array(
  765. // 'description' => 'TODO: please describe this field!',
  766. 'type' => 'int',
  767. 'not null' => '1',
  768. ),
  769. 'genotype2_id' => array(
  770. // 'description' => 'TODO: please describe this field!',
  771. 'type' => 'int',
  772. 'not null' => '1',
  773. ),
  774. 'environment2_id' => array(
  775. // 'description' => 'TODO: please describe this field!',
  776. 'type' => 'int',
  777. 'not null' => '1',
  778. ),
  779. 'phenotype1_id' => array(
  780. // 'description' => 'TODO: please describe this field!',
  781. 'type' => 'int',
  782. 'not null' => '1',
  783. ),
  784. 'phenotype2_id' => array(
  785. // 'description' => 'TODO: please describe this field!',
  786. 'type' => 'int',
  787. 'not null' => '',
  788. ),
  789. 'pub_id' => array(
  790. // 'description' => 'TODO: please describe this field!',
  791. 'type' => 'int',
  792. 'not null' => '1',
  793. ),
  794. 'organism_id' => array(
  795. // 'description' => 'TODO: please describe this field!',
  796. 'type' => 'int',
  797. 'not null' => '1',
  798. ),
  799. ),
  800. 'primary key' => array(
  801. '0' => 'phenotype_comparison_id',
  802. ),
  803. 'unique keys' => array(
  804. 'phenotype_comparison_c1' => array(
  805. '0' => 'genotype1_id',
  806. '1' => 'environment1_id',
  807. '2' => 'genotype2_id',
  808. '3' => 'environment2_id',
  809. '4' => 'phenotype1_id',
  810. '5' => 'pub_id',
  811. ),
  812. ),
  813. 'indexes' => array(
  814. 'phenotype_comparison_idx1' => array(
  815. '0' => 'genotype1_id',
  816. ),
  817. 'phenotype_comparison_idx2' => array(
  818. '0' => 'genotype2_id',
  819. ),
  820. 'phenotype_comparison_idx4' => array(
  821. '0' => 'pub_id',
  822. ),
  823. ),
  824. 'foreign keys' => array(
  825. ),
  826. );
  827. return $description;
  828. }
  829. /**
  830. * Implements hook_phenotype_comparison_cvterm_schema()
  831. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  832. * @see tripal_core.api.inc: tripal_core_chado_insert()
  833. * @see tripal_core.api.inc: tripal_core_chado_update()
  834. * @see tripal_core.api.inc: tripal_core_chado_select()
  835. *
  836. * @return
  837. * An array describing the current table
  838. *
  839. * @ingroup tripal_schema_api
  840. *
  841. */
  842. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  843. $description = array();
  844. $description = array(
  845. 'table' => 'phenotype_comparison_cvterm',
  846. // 'description' => 'TODO: please describe this table!',
  847. 'fields' => array(
  848. 'phenotype_comparison_cvterm_id' => array(
  849. // 'description' => 'TODO: please describe this field!',
  850. 'type' => 'serial',
  851. 'not null' => '1',
  852. ),
  853. 'phenotype_comparison_id' => array(
  854. // 'description' => 'TODO: please describe this field!',
  855. 'type' => 'int',
  856. 'not null' => '1',
  857. ),
  858. 'cvterm_id' => array(
  859. // 'description' => 'TODO: please describe this field!',
  860. 'type' => 'int',
  861. 'not null' => '1',
  862. ),
  863. 'pub_id' => array(
  864. // 'description' => 'TODO: please describe this field!',
  865. 'type' => 'int',
  866. 'not null' => '1',
  867. ),
  868. 'rank' => array(
  869. // 'description' => 'TODO: please describe this field!',
  870. 'type' => 'int',
  871. 'not null' => '1',
  872. 'default' => '0',
  873. ),
  874. ),
  875. 'primary key' => array(
  876. '0' => 'phenotype_comparison_cvterm_id',
  877. ),
  878. 'unique keys' => array(
  879. 'phenotype_comparison_cvterm_c1' => array(
  880. '0' => 'phenotype_comparison_id',
  881. '1' => 'cvterm_id',
  882. ),
  883. ),
  884. 'indexes' => array(
  885. 'phenotype_comparison_cvterm_idx1' => array(
  886. '0' => 'phenotype_comparison_id',
  887. ),
  888. 'phenotype_comparison_cvterm_idx2' => array(
  889. '0' => 'cvterm_id',
  890. ),
  891. ),
  892. 'foreign keys' => array(
  893. ),
  894. );
  895. return $description;
  896. }
  897. /**
  898. * Implements hook_phylonode_relationship_schema()
  899. * Purpose: To describe the structure of phylonode_relationship to tripal
  900. * @see tripal_core.api.inc: tripal_core_chado_insert()
  901. * @see tripal_core.api.inc: tripal_core_chado_update()
  902. * @see tripal_core.api.inc: tripal_core_chado_select()
  903. *
  904. * @return
  905. * An array describing the current table
  906. *
  907. * @ingroup tripal_schema_api
  908. *
  909. */
  910. function tripal_core_chado_phylonode_relationship_schema () {
  911. $description = array();
  912. $description = array(
  913. 'table' => 'phylonode_relationship',
  914. // 'description' => 'TODO: please describe this table!',
  915. 'fields' => array(
  916. 'phylonode_relationship_id' => array(
  917. // 'description' => 'TODO: please describe this field!',
  918. 'type' => 'serial',
  919. 'not null' => '1',
  920. ),
  921. 'subject_id' => array(
  922. // 'description' => 'TODO: please describe this field!',
  923. 'type' => 'int',
  924. 'not null' => '1',
  925. ),
  926. 'object_id' => array(
  927. // 'description' => 'TODO: please describe this field!',
  928. 'type' => 'int',
  929. 'not null' => '1',
  930. ),
  931. 'type_id' => array(
  932. // 'description' => 'TODO: please describe this field!',
  933. 'type' => 'int',
  934. 'not null' => '1',
  935. ),
  936. 'rank' => array(
  937. // 'description' => 'TODO: please describe this field!',
  938. 'type' => 'int',
  939. 'not null' => '',
  940. ),
  941. 'phylotree_id' => array(
  942. // 'description' => 'TODO: please describe this field!',
  943. 'type' => 'int',
  944. 'not null' => '1',
  945. ),
  946. ),
  947. 'primary key' => array(
  948. '0' => 'phylonode_relationship_id',
  949. ),
  950. 'unique keys' => array(
  951. 'subject_id' => array(
  952. '0' => 'subject_id',
  953. '1' => 'object_id',
  954. '2' => 'type_id',
  955. ),
  956. ),
  957. 'indexes' => array(
  958. 'phylonode_relationship_idx1' => array(
  959. '0' => 'subject_id',
  960. ),
  961. 'phylonode_relationship_idx2' => array(
  962. '0' => 'object_id',
  963. ),
  964. 'phylonode_relationship_idx3' => array(
  965. '0' => 'type_id',
  966. ),
  967. ),
  968. 'foreign keys' => array(
  969. ),
  970. );
  971. return $description;
  972. }
  973. /**
  974. * Implements hook_phylonodeprop_schema()
  975. * Purpose: To describe the structure of phylonodeprop to tripal
  976. * @see tripal_core.api.inc: tripal_core_chado_insert()
  977. * @see tripal_core.api.inc: tripal_core_chado_update()
  978. * @see tripal_core.api.inc: tripal_core_chado_select()
  979. *
  980. * @return
  981. * An array describing the current table
  982. *
  983. * @ingroup tripal_schema_api
  984. *
  985. */
  986. function tripal_core_chado_phylonodeprop_schema () {
  987. $description = array();
  988. $description = array(
  989. 'table' => 'phylonodeprop',
  990. // 'description' => 'TODO: please describe this table!',
  991. 'fields' => array(
  992. 'phylonodeprop_id' => array(
  993. // 'description' => 'TODO: please describe this field!',
  994. 'type' => 'serial',
  995. 'not null' => '1',
  996. ),
  997. 'phylonode_id' => array(
  998. // 'description' => 'TODO: please describe this field!',
  999. 'type' => 'int',
  1000. 'not null' => '1',
  1001. ),
  1002. 'type_id' => array(
  1003. // 'description' => 'TODO: please describe this field!',
  1004. 'type' => 'int',
  1005. 'not null' => '1',
  1006. ),
  1007. 'value' => array(
  1008. // 'description' => 'TODO: please describe this field!',
  1009. 'type' => 'text',
  1010. 'not null' => '1',
  1011. 'default' => '',
  1012. ),
  1013. 'rank' => array(
  1014. // 'description' => 'TODO: please describe this field!',
  1015. 'type' => 'int',
  1016. 'not null' => '1',
  1017. 'default' => '0',
  1018. ),
  1019. ),
  1020. 'primary key' => array(
  1021. '0' => 'phylonodeprop_id',
  1022. ),
  1023. 'unique keys' => array(
  1024. 'phylonode_id' => array(
  1025. '0' => 'phylonode_id',
  1026. '1' => 'type_id',
  1027. '2' => 'value',
  1028. '3' => 'rank',
  1029. ),
  1030. ),
  1031. 'indexes' => array(
  1032. 'phylonodeprop_idx1' => array(
  1033. '0' => 'phylonode_id',
  1034. ),
  1035. 'phylonodeprop_idx2' => array(
  1036. '0' => 'type_id',
  1037. ),
  1038. ),
  1039. 'foreign keys' => array(
  1040. ),
  1041. );
  1042. return $description;
  1043. }
  1044. /**
  1045. * Implements hook_phylotree_schema()
  1046. * Purpose: To describe the structure of phylotree to tripal
  1047. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1048. * @see tripal_core.api.inc: tripal_core_chado_update()
  1049. * @see tripal_core.api.inc: tripal_core_chado_select()
  1050. *
  1051. * @return
  1052. * An array describing the current table
  1053. *
  1054. * @ingroup tripal_schema_api
  1055. *
  1056. */
  1057. function tripal_core_chado_phylotree_schema () {
  1058. $description = array();
  1059. $description = array(
  1060. 'table' => 'phylotree',
  1061. // 'description' => 'TODO: please describe this table!',
  1062. 'fields' => array(
  1063. 'phylotree_id' => array(
  1064. // 'description' => 'TODO: please describe this field!',
  1065. 'type' => 'serial',
  1066. 'not null' => '1',
  1067. ),
  1068. 'dbxref_id' => array(
  1069. // 'description' => 'TODO: please describe this field!',
  1070. 'type' => 'int',
  1071. 'not null' => '1',
  1072. ),
  1073. 'name' => array(
  1074. // 'description' => 'TODO: please describe this field!',
  1075. 'type' => 'varchar',
  1076. 'length' => '255',
  1077. 'not null' => '',
  1078. ),
  1079. 'type_id' => array(
  1080. // 'description' => 'TODO: please describe this field!',
  1081. 'type' => 'int',
  1082. 'not null' => '',
  1083. ),
  1084. 'analysis_id' => array(
  1085. // 'description' => 'TODO: please describe this field!',
  1086. 'type' => 'int',
  1087. 'not null' => '',
  1088. ),
  1089. 'comment' => array(
  1090. // 'description' => 'TODO: please describe this field!',
  1091. 'type' => 'text',
  1092. 'not null' => '',
  1093. ),
  1094. ),
  1095. 'primary key' => array(
  1096. '0' => 'phylotree_id',
  1097. ),
  1098. 'unique keys' => array(
  1099. ),
  1100. 'indexes' => array(
  1101. 'phylotree_idx1' => array(
  1102. '0' => 'phylotree_id',
  1103. ),
  1104. ),
  1105. 'foreign keys' => array(
  1106. ),
  1107. );
  1108. return $description;
  1109. }
  1110. /**
  1111. * Implements hook_phylotree_pub_schema()
  1112. * Purpose: To describe the structure of phylotree_pub to tripal
  1113. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1114. * @see tripal_core.api.inc: tripal_core_chado_update()
  1115. * @see tripal_core.api.inc: tripal_core_chado_select()
  1116. *
  1117. * @return
  1118. * An array describing the current table
  1119. *
  1120. * @ingroup tripal_schema_api
  1121. *
  1122. */
  1123. function tripal_core_chado_phylotree_pub_schema () {
  1124. $description = array();
  1125. $description = array(
  1126. 'table' => 'phylotree_pub',
  1127. // 'description' => 'TODO: please describe this table!',
  1128. 'fields' => array(
  1129. 'phylotree_pub_id' => array(
  1130. // 'description' => 'TODO: please describe this field!',
  1131. 'type' => 'serial',
  1132. 'not null' => '1',
  1133. ),
  1134. 'phylotree_id' => array(
  1135. // 'description' => 'TODO: please describe this field!',
  1136. 'type' => 'int',
  1137. 'not null' => '1',
  1138. ),
  1139. 'pub_id' => array(
  1140. // 'description' => 'TODO: please describe this field!',
  1141. 'type' => 'int',
  1142. 'not null' => '1',
  1143. ),
  1144. ),
  1145. 'primary key' => array(
  1146. '0' => 'phylotree_pub_id',
  1147. ),
  1148. 'unique keys' => array(
  1149. 'phylotree_id' => array(
  1150. '0' => 'phylotree_id',
  1151. '1' => 'pub_id',
  1152. ),
  1153. ),
  1154. 'indexes' => array(
  1155. 'phylotree_pub_idx1' => array(
  1156. '0' => 'phylotree_id',
  1157. ),
  1158. 'phylotree_pub_idx2' => array(
  1159. '0' => 'pub_id',
  1160. ),
  1161. ),
  1162. 'foreign keys' => array(
  1163. ),
  1164. );
  1165. return $description;
  1166. }
  1167. /**
  1168. * Implements hook_phylonode_pub_schema()
  1169. * Purpose: To describe the structure of phylonode_pub to tripal
  1170. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1171. * @see tripal_core.api.inc: tripal_core_chado_update()
  1172. * @see tripal_core.api.inc: tripal_core_chado_select()
  1173. *
  1174. * @return
  1175. * An array describing the current table
  1176. *
  1177. * @ingroup tripal_schema_api
  1178. *
  1179. */
  1180. function tripal_core_chado_phylonode_pub_schema () {
  1181. $description = array();
  1182. $description = array(
  1183. 'table' => 'phylonode_pub',
  1184. // 'description' => 'TODO: please describe this table!',
  1185. 'fields' => array(
  1186. 'phylonode_pub_id' => array(
  1187. // 'description' => 'TODO: please describe this field!',
  1188. 'type' => 'serial',
  1189. 'not null' => '1',
  1190. ),
  1191. 'phylonode_id' => array(
  1192. // 'description' => 'TODO: please describe this field!',
  1193. 'type' => 'int',
  1194. 'not null' => '1',
  1195. ),
  1196. 'pub_id' => array(
  1197. // 'description' => 'TODO: please describe this field!',
  1198. 'type' => 'int',
  1199. 'not null' => '1',
  1200. ),
  1201. ),
  1202. 'primary key' => array(
  1203. '0' => 'phylonode_pub_id',
  1204. ),
  1205. 'unique keys' => array(
  1206. 'phylonode_id' => array(
  1207. '0' => 'phylonode_id',
  1208. '1' => 'pub_id',
  1209. ),
  1210. ),
  1211. 'indexes' => array(
  1212. 'phylonode_pub_idx1' => array(
  1213. '0' => 'phylonode_id',
  1214. ),
  1215. 'phylonode_pub_idx2' => array(
  1216. '0' => 'pub_id',
  1217. ),
  1218. ),
  1219. 'foreign keys' => array(
  1220. ),
  1221. );
  1222. return $description;
  1223. }
  1224. /**
  1225. * Implements hook_phylonode_organism_schema()
  1226. * Purpose: To describe the structure of phylonode_organism to tripal
  1227. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1228. * @see tripal_core.api.inc: tripal_core_chado_update()
  1229. * @see tripal_core.api.inc: tripal_core_chado_select()
  1230. *
  1231. * @return
  1232. * An array describing the current table
  1233. *
  1234. * @ingroup tripal_schema_api
  1235. *
  1236. */
  1237. function tripal_core_chado_phylonode_organism_schema () {
  1238. $description = array();
  1239. $description = array(
  1240. 'table' => 'phylonode_organism',
  1241. // 'description' => 'TODO: please describe this table!',
  1242. 'fields' => array(
  1243. 'phylonode_organism_id' => array(
  1244. // 'description' => 'TODO: please describe this field!',
  1245. 'type' => 'serial',
  1246. 'not null' => '1',
  1247. ),
  1248. 'phylonode_id' => array(
  1249. // 'description' => 'TODO: please describe this field!',
  1250. 'type' => 'int',
  1251. 'not null' => '1',
  1252. ),
  1253. 'organism_id' => array(
  1254. // 'description' => 'TODO: please describe this field!',
  1255. 'type' => 'int',
  1256. 'not null' => '1',
  1257. ),
  1258. ),
  1259. 'primary key' => array(
  1260. '0' => 'phylonode_organism_id',
  1261. ),
  1262. 'unique keys' => array(
  1263. 'phylonode_id' => array(
  1264. '0' => 'phylonode_id',
  1265. ),
  1266. ),
  1267. 'indexes' => array(
  1268. 'phylonode_organism_idx1' => array(
  1269. '0' => 'phylonode_id',
  1270. ),
  1271. 'phylonode_organism_idx2' => array(
  1272. '0' => 'organism_id',
  1273. ),
  1274. ),
  1275. 'foreign keys' => array(
  1276. ),
  1277. );
  1278. return $description;
  1279. }
  1280. /**
  1281. * Implements hook_phenotype_cvterm_schema()
  1282. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1283. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1284. * @see tripal_core.api.inc: tripal_core_chado_update()
  1285. * @see tripal_core.api.inc: tripal_core_chado_select()
  1286. *
  1287. * @return
  1288. * An array describing the current table
  1289. *
  1290. * @ingroup tripal_schema_api
  1291. *
  1292. */
  1293. function tripal_core_chado_phenotype_cvterm_schema () {
  1294. $description = array();
  1295. $description = array(
  1296. 'table' => 'phenotype_cvterm',
  1297. // 'description' => 'TODO: please describe this table!',
  1298. 'fields' => array(
  1299. 'phenotype_cvterm_id' => array(
  1300. // 'description' => 'TODO: please describe this field!',
  1301. 'type' => 'serial',
  1302. 'not null' => '1',
  1303. ),
  1304. 'phenotype_id' => array(
  1305. // 'description' => 'TODO: please describe this field!',
  1306. 'type' => 'int',
  1307. 'not null' => '1',
  1308. ),
  1309. 'cvterm_id' => array(
  1310. // 'description' => 'TODO: please describe this field!',
  1311. 'type' => 'int',
  1312. 'not null' => '1',
  1313. ),
  1314. 'rank' => array(
  1315. // 'description' => 'TODO: please describe this field!',
  1316. 'type' => 'int',
  1317. 'not null' => '1',
  1318. 'default' => '0',
  1319. ),
  1320. ),
  1321. 'primary key' => array(
  1322. '0' => 'phenotype_cvterm_id',
  1323. ),
  1324. 'unique keys' => array(
  1325. 'phenotype_cvterm_c1' => array(
  1326. '0' => 'phenotype_id',
  1327. '1' => 'cvterm_id',
  1328. '2' => 'rank',
  1329. ),
  1330. ),
  1331. 'indexes' => array(
  1332. 'phenotype_cvterm_idx1' => array(
  1333. '0' => 'phenotype_id',
  1334. ),
  1335. 'phenotype_cvterm_idx2' => array(
  1336. '0' => 'cvterm_id',
  1337. ),
  1338. ),
  1339. 'foreign keys' => array(
  1340. ),
  1341. );
  1342. return $description;
  1343. }
  1344. /**
  1345. * Implements hook_phenstatement_schema()
  1346. * Purpose: To describe the structure of phenstatement to tripal
  1347. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1348. * @see tripal_core.api.inc: tripal_core_chado_update()
  1349. * @see tripal_core.api.inc: tripal_core_chado_select()
  1350. *
  1351. * @return
  1352. * An array describing the current table
  1353. *
  1354. * @ingroup tripal_schema_api
  1355. *
  1356. */
  1357. function tripal_core_chado_phenstatement_schema () {
  1358. $description = array();
  1359. $description = array(
  1360. 'table' => 'phenstatement',
  1361. // 'description' => 'TODO: please describe this table!',
  1362. 'fields' => array(
  1363. 'phenstatement_id' => array(
  1364. // 'description' => 'TODO: please describe this field!',
  1365. 'type' => 'serial',
  1366. 'not null' => '1',
  1367. ),
  1368. 'genotype_id' => array(
  1369. // 'description' => 'TODO: please describe this field!',
  1370. 'type' => 'int',
  1371. 'not null' => '1',
  1372. ),
  1373. 'environment_id' => array(
  1374. // 'description' => 'TODO: please describe this field!',
  1375. 'type' => 'int',
  1376. 'not null' => '1',
  1377. ),
  1378. 'phenotype_id' => array(
  1379. // 'description' => 'TODO: please describe this field!',
  1380. 'type' => 'int',
  1381. 'not null' => '1',
  1382. ),
  1383. 'type_id' => array(
  1384. // 'description' => 'TODO: please describe this field!',
  1385. 'type' => 'int',
  1386. 'not null' => '1',
  1387. ),
  1388. 'pub_id' => array(
  1389. // 'description' => 'TODO: please describe this field!',
  1390. 'type' => 'int',
  1391. 'not null' => '1',
  1392. ),
  1393. ),
  1394. 'primary key' => array(
  1395. '0' => 'phenstatement_id',
  1396. ),
  1397. 'unique keys' => array(
  1398. 'phenstatement_c1' => array(
  1399. '0' => 'genotype_id',
  1400. '1' => 'phenotype_id',
  1401. '2' => 'environment_id',
  1402. '3' => 'type_id',
  1403. '4' => 'pub_id',
  1404. ),
  1405. ),
  1406. 'indexes' => array(
  1407. 'phenstatement_idx1' => array(
  1408. '0' => 'genotype_id',
  1409. ),
  1410. 'phenstatement_idx2' => array(
  1411. '0' => 'phenotype_id',
  1412. ),
  1413. ),
  1414. 'foreign keys' => array(
  1415. ),
  1416. );
  1417. return $description;
  1418. }
  1419. /**
  1420. * Implements hook_phylonode_schema()
  1421. * Purpose: To describe the structure of phylonode to tripal
  1422. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1423. * @see tripal_core.api.inc: tripal_core_chado_update()
  1424. * @see tripal_core.api.inc: tripal_core_chado_select()
  1425. *
  1426. * @return
  1427. * An array describing the current table
  1428. *
  1429. * @ingroup tripal_schema_api
  1430. *
  1431. */
  1432. function tripal_core_chado_phylonode_schema () {
  1433. $description = array();
  1434. $description = array(
  1435. 'table' => 'phylonode',
  1436. // 'description' => 'TODO: please describe this table!',
  1437. 'fields' => array(
  1438. 'phylonode_id' => array(
  1439. // 'description' => 'TODO: please describe this field!',
  1440. 'type' => 'serial',
  1441. 'not null' => '1',
  1442. ),
  1443. 'phylotree_id' => array(
  1444. // 'description' => 'TODO: please describe this field!',
  1445. 'type' => 'int',
  1446. 'not null' => '1',
  1447. ),
  1448. 'parent_phylonode_id' => array(
  1449. // 'description' => 'TODO: please describe this field!',
  1450. 'type' => 'int',
  1451. 'not null' => '',
  1452. ),
  1453. 'left_idx' => array(
  1454. // 'description' => 'TODO: please describe this field!',
  1455. 'type' => 'int',
  1456. 'not null' => '1',
  1457. ),
  1458. 'right_idx' => array(
  1459. // 'description' => 'TODO: please describe this field!',
  1460. 'type' => 'int',
  1461. 'not null' => '1',
  1462. ),
  1463. 'type_id' => array(
  1464. // 'description' => 'TODO: please describe this field!',
  1465. 'type' => 'int',
  1466. 'not null' => '',
  1467. ),
  1468. 'feature_id' => array(
  1469. // 'description' => 'TODO: please describe this field!',
  1470. 'type' => 'int',
  1471. 'not null' => '',
  1472. ),
  1473. 'label' => array(
  1474. // 'description' => 'TODO: please describe this field!',
  1475. 'type' => 'varchar',
  1476. 'length' => '255',
  1477. 'not null' => '',
  1478. ),
  1479. 'distance' => array(
  1480. // 'description' => 'TODO: please describe this field!',
  1481. 'type' => 'float',
  1482. 'size' => 'big',
  1483. 'not null' => '',
  1484. ),
  1485. ),
  1486. 'primary key' => array(
  1487. '0' => 'phylonode_id',
  1488. ),
  1489. 'unique keys' => array(
  1490. 'phylotree_id' => array(
  1491. '0' => 'phylotree_id',
  1492. '1' => 'left_idx',
  1493. ),
  1494. 'phylonode_phylotree_id_key1' => array(
  1495. '0' => 'phylotree_id',
  1496. '1' => 'right_idx',
  1497. ),
  1498. ),
  1499. 'indexes' => array(
  1500. ),
  1501. 'foreign keys' => array(
  1502. ),
  1503. );
  1504. return $description;
  1505. }
  1506. /**
  1507. * Implements hook_phylonode_dbxref_schema()
  1508. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1509. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1510. * @see tripal_core.api.inc: tripal_core_chado_update()
  1511. * @see tripal_core.api.inc: tripal_core_chado_select()
  1512. *
  1513. * @return
  1514. * An array describing the current table
  1515. *
  1516. * @ingroup tripal_schema_api
  1517. *
  1518. */
  1519. function tripal_core_chado_phylonode_dbxref_schema () {
  1520. $description = array();
  1521. $description = array(
  1522. 'table' => 'phylonode_dbxref',
  1523. // 'description' => 'TODO: please describe this table!',
  1524. 'fields' => array(
  1525. 'phylonode_dbxref_id' => array(
  1526. // 'description' => 'TODO: please describe this field!',
  1527. 'type' => 'serial',
  1528. 'not null' => '1',
  1529. ),
  1530. 'phylonode_id' => array(
  1531. // 'description' => 'TODO: please describe this field!',
  1532. 'type' => 'int',
  1533. 'not null' => '1',
  1534. ),
  1535. 'dbxref_id' => array(
  1536. // 'description' => 'TODO: please describe this field!',
  1537. 'type' => 'int',
  1538. 'not null' => '1',
  1539. ),
  1540. ),
  1541. 'primary key' => array(
  1542. '0' => 'phylonode_dbxref_id',
  1543. ),
  1544. 'unique keys' => array(
  1545. 'phylonode_id' => array(
  1546. '0' => 'phylonode_id',
  1547. '1' => 'dbxref_id',
  1548. ),
  1549. ),
  1550. 'indexes' => array(
  1551. 'phylonode_dbxref_idx1' => array(
  1552. '0' => 'phylonode_id',
  1553. ),
  1554. 'phylonode_dbxref_idx2' => array(
  1555. '0' => 'dbxref_id',
  1556. ),
  1557. ),
  1558. 'foreign keys' => array(
  1559. ),
  1560. );
  1561. return $description;
  1562. }
  1563. /**
  1564. * Implements hook_library_synonym_schema()
  1565. * Purpose: To describe the structure of library_synonym to tripal
  1566. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1567. * @see tripal_core.api.inc: tripal_core_chado_update()
  1568. * @see tripal_core.api.inc: tripal_core_chado_select()
  1569. *
  1570. * @return
  1571. * An array describing the current table
  1572. *
  1573. * @ingroup tripal_schema_api
  1574. *
  1575. */
  1576. function tripal_core_chado_library_synonym_schema () {
  1577. $description = array();
  1578. $description = array(
  1579. 'table' => 'library_synonym',
  1580. // 'description' => 'TODO: please describe this table!',
  1581. 'fields' => array(
  1582. 'library_synonym_id' => array(
  1583. // 'description' => 'TODO: please describe this field!',
  1584. 'type' => 'serial',
  1585. 'not null' => '1',
  1586. ),
  1587. 'synonym_id' => array(
  1588. // 'description' => 'TODO: please describe this field!',
  1589. 'type' => 'int',
  1590. 'not null' => '1',
  1591. ),
  1592. 'library_id' => array(
  1593. // 'description' => 'TODO: please describe this field!',
  1594. 'type' => 'int',
  1595. 'not null' => '1',
  1596. ),
  1597. 'pub_id' => array(
  1598. // 'description' => 'TODO: please describe this field!',
  1599. 'type' => 'int',
  1600. 'not null' => '1',
  1601. ),
  1602. 'is_current' => array(
  1603. // 'description' => 'TODO: please describe this field!',
  1604. 'type' => 'boolean',
  1605. 'not null' => '1',
  1606. 'default' => 'ru',
  1607. ),
  1608. 'is_internal' => array(
  1609. // 'description' => 'TODO: please describe this field!',
  1610. 'type' => 'boolean',
  1611. 'not null' => '1',
  1612. 'default' => 'als',
  1613. ),
  1614. ),
  1615. 'primary key' => array(
  1616. '0' => 'library_synonym_id',
  1617. ),
  1618. 'unique keys' => array(
  1619. 'library_synonym_c1' => array(
  1620. '0' => 'synonym_id',
  1621. '1' => 'library_id',
  1622. '2' => 'pub_id',
  1623. ),
  1624. ),
  1625. 'indexes' => array(
  1626. 'library_synonym_idx1' => array(
  1627. '0' => 'synonym_id',
  1628. ),
  1629. 'library_synonym_idx2' => array(
  1630. '0' => 'library_id',
  1631. ),
  1632. 'library_synonym_idx3' => array(
  1633. '0' => 'pub_id',
  1634. ),
  1635. ),
  1636. 'foreign keys' => array(
  1637. ),
  1638. );
  1639. return $description;
  1640. }
  1641. /**
  1642. * Implements hook_library_pub_schema()
  1643. * Purpose: To describe the structure of library_pub to tripal
  1644. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1645. * @see tripal_core.api.inc: tripal_core_chado_update()
  1646. * @see tripal_core.api.inc: tripal_core_chado_select()
  1647. *
  1648. * @return
  1649. * An array describing the current table
  1650. *
  1651. * @ingroup tripal_schema_api
  1652. *
  1653. */
  1654. function tripal_core_chado_library_pub_schema () {
  1655. $description = array();
  1656. $description = array(
  1657. 'table' => 'library_pub',
  1658. // 'description' => 'TODO: please describe this table!',
  1659. 'fields' => array(
  1660. 'library_pub_id' => array(
  1661. // 'description' => 'TODO: please describe this field!',
  1662. 'type' => 'serial',
  1663. 'not null' => '1',
  1664. ),
  1665. 'library_id' => array(
  1666. // 'description' => 'TODO: please describe this field!',
  1667. 'type' => 'int',
  1668. 'not null' => '1',
  1669. ),
  1670. 'pub_id' => array(
  1671. // 'description' => 'TODO: please describe this field!',
  1672. 'type' => 'int',
  1673. 'not null' => '1',
  1674. ),
  1675. ),
  1676. 'primary key' => array(
  1677. '0' => 'library_pub_id',
  1678. ),
  1679. 'unique keys' => array(
  1680. 'library_pub_c1' => array(
  1681. '0' => 'library_id',
  1682. '1' => 'pub_id',
  1683. ),
  1684. ),
  1685. 'indexes' => array(
  1686. 'library_pub_idx1' => array(
  1687. '0' => 'library_id',
  1688. ),
  1689. 'library_pub_idx2' => array(
  1690. '0' => 'pub_id',
  1691. ),
  1692. ),
  1693. 'foreign keys' => array(
  1694. ),
  1695. );
  1696. return $description;
  1697. }
  1698. /**
  1699. * Implements hook_featureprop_pub_schema()
  1700. * Purpose: To describe the structure of featureprop_pub to tripal
  1701. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1702. * @see tripal_core.api.inc: tripal_core_chado_update()
  1703. * @see tripal_core.api.inc: tripal_core_chado_select()
  1704. *
  1705. * @return
  1706. * An array describing the current table
  1707. *
  1708. * @ingroup tripal_schema_api
  1709. *
  1710. */
  1711. function tripal_core_chado_featureprop_pub_schema () {
  1712. $description = array();
  1713. $description = array(
  1714. 'table' => 'featureprop_pub',
  1715. // 'description' => 'TODO: please describe this table!',
  1716. 'fields' => array(
  1717. 'featureprop_pub_id' => array(
  1718. // 'description' => 'TODO: please describe this field!',
  1719. 'type' => 'serial',
  1720. 'not null' => '1',
  1721. ),
  1722. 'featureprop_id' => array(
  1723. // 'description' => 'TODO: please describe this field!',
  1724. 'type' => 'int',
  1725. 'not null' => '1',
  1726. ),
  1727. 'pub_id' => array(
  1728. // 'description' => 'TODO: please describe this field!',
  1729. 'type' => 'int',
  1730. 'not null' => '1',
  1731. ),
  1732. ),
  1733. 'primary key' => array(
  1734. '0' => 'featureprop_pub_id',
  1735. ),
  1736. 'unique keys' => array(
  1737. 'featureprop_pub_c1' => array(
  1738. '0' => 'featureprop_id',
  1739. '1' => 'pub_id',
  1740. ),
  1741. ),
  1742. 'indexes' => array(
  1743. 'featureprop_pub_idx1' => array(
  1744. '0' => 'featureprop_id',
  1745. ),
  1746. 'featureprop_pub_idx2' => array(
  1747. '0' => 'pub_id',
  1748. ),
  1749. ),
  1750. 'foreign keys' => array(
  1751. ),
  1752. );
  1753. return $description;
  1754. }
  1755. /**
  1756. * Implements hook_featureprop_schema()
  1757. * Purpose: To describe the structure of featureprop to tripal
  1758. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1759. * @see tripal_core.api.inc: tripal_core_chado_update()
  1760. * @see tripal_core.api.inc: tripal_core_chado_select()
  1761. *
  1762. * @return
  1763. * An array describing the current table
  1764. *
  1765. * @ingroup tripal_schema_api
  1766. *
  1767. */
  1768. function tripal_core_chado_featureprop_schema () {
  1769. $description = array();
  1770. $description = array(
  1771. 'table' => 'featureprop',
  1772. // 'description' => 'TODO: please describe this table!',
  1773. 'fields' => array(
  1774. 'featureprop_id' => array(
  1775. // 'description' => 'TODO: please describe this field!',
  1776. 'type' => 'serial',
  1777. 'not null' => '1',
  1778. ),
  1779. 'feature_id' => array(
  1780. // 'description' => 'TODO: please describe this field!',
  1781. 'type' => 'int',
  1782. 'not null' => '1',
  1783. ),
  1784. 'type_id' => array(
  1785. // 'description' => 'TODO: please describe this field!',
  1786. 'type' => 'int',
  1787. 'not null' => '1',
  1788. ),
  1789. 'value' => array(
  1790. // 'description' => 'TODO: please describe this field!',
  1791. 'type' => 'text',
  1792. 'not null' => '',
  1793. ),
  1794. 'rank' => array(
  1795. // 'description' => 'TODO: please describe this field!',
  1796. 'type' => 'int',
  1797. 'not null' => '1',
  1798. 'default' => '0',
  1799. ),
  1800. ),
  1801. 'primary key' => array(
  1802. '0' => 'featureprop_id',
  1803. ),
  1804. 'unique keys' => array(
  1805. 'featureprop_c1' => array(
  1806. '0' => 'feature_id',
  1807. '1' => 'type_id',
  1808. '2' => 'rank',
  1809. ),
  1810. ),
  1811. 'indexes' => array(
  1812. 'featureprop_idx1' => array(
  1813. '0' => 'feature_id',
  1814. ),
  1815. 'featureprop_idx2' => array(
  1816. '0' => 'type_id',
  1817. ),
  1818. ),
  1819. 'foreign keys' => array(
  1820. ),
  1821. );
  1822. return $description;
  1823. }
  1824. /**
  1825. * Implements hook_featurerange_schema()
  1826. * Purpose: To describe the structure of featurerange to tripal
  1827. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1828. * @see tripal_core.api.inc: tripal_core_chado_update()
  1829. * @see tripal_core.api.inc: tripal_core_chado_select()
  1830. *
  1831. * @return
  1832. * An array describing the current table
  1833. *
  1834. * @ingroup tripal_schema_api
  1835. *
  1836. */
  1837. function tripal_core_chado_featurerange_schema () {
  1838. $description = array();
  1839. $description = array(
  1840. 'table' => 'featurerange',
  1841. // 'description' => 'TODO: please describe this table!',
  1842. 'fields' => array(
  1843. 'featurerange_id' => array(
  1844. // 'description' => 'TODO: please describe this field!',
  1845. 'type' => 'serial',
  1846. 'not null' => '1',
  1847. ),
  1848. 'featuremap_id' => array(
  1849. // 'description' => 'TODO: please describe this field!',
  1850. 'type' => 'int',
  1851. 'not null' => '1',
  1852. ),
  1853. 'feature_id' => array(
  1854. // 'description' => 'TODO: please describe this field!',
  1855. 'type' => 'int',
  1856. 'not null' => '1',
  1857. ),
  1858. 'leftstartf_id' => array(
  1859. // 'description' => 'TODO: please describe this field!',
  1860. 'type' => 'int',
  1861. 'not null' => '1',
  1862. ),
  1863. 'leftendf_id' => array(
  1864. // 'description' => 'TODO: please describe this field!',
  1865. 'type' => 'int',
  1866. 'not null' => '',
  1867. ),
  1868. 'rightstartf_id' => array(
  1869. // 'description' => 'TODO: please describe this field!',
  1870. 'type' => 'int',
  1871. 'not null' => '',
  1872. ),
  1873. 'rightendf_id' => array(
  1874. // 'description' => 'TODO: please describe this field!',
  1875. 'type' => 'int',
  1876. 'not null' => '1',
  1877. ),
  1878. 'rangestr' => array(
  1879. // 'description' => 'TODO: please describe this field!',
  1880. 'type' => 'varchar',
  1881. 'length' => '255',
  1882. 'not null' => '',
  1883. ),
  1884. ),
  1885. 'primary key' => array(
  1886. '0' => 'featurerange_id',
  1887. ),
  1888. 'unique keys' => array(
  1889. ),
  1890. 'indexes' => array(
  1891. 'featurerange_idx1' => array(
  1892. '0' => 'featuremap_id',
  1893. ),
  1894. 'featurerange_idx2' => array(
  1895. '0' => 'feature_id',
  1896. ),
  1897. 'featurerange_idx3' => array(
  1898. '0' => 'leftstartf_id',
  1899. ),
  1900. 'featurerange_idx4' => array(
  1901. '0' => 'leftendf_id',
  1902. ),
  1903. 'featurerange_idx5' => array(
  1904. '0' => 'rightstartf_id',
  1905. ),
  1906. 'featurerange_idx6' => array(
  1907. '0' => 'rightendf_id',
  1908. ),
  1909. ),
  1910. 'foreign keys' => array(
  1911. ),
  1912. );
  1913. return $description;
  1914. }
  1915. /**
  1916. * Implements hook_featureset_meets_schema()
  1917. * Purpose: To describe the structure of featureset_meets to tripal
  1918. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1919. * @see tripal_core.api.inc: tripal_core_chado_update()
  1920. * @see tripal_core.api.inc: tripal_core_chado_select()
  1921. *
  1922. * @return
  1923. * An array describing the current table
  1924. *
  1925. * @ingroup tripal_schema_api
  1926. *
  1927. */
  1928. function tripal_core_chado_featureset_meets_schema () {
  1929. $description = array();
  1930. $description = array(
  1931. 'table' => 'featureset_meets',
  1932. // 'description' => 'TODO: please describe this table!',
  1933. 'fields' => array(
  1934. 'subject_id' => array(
  1935. // 'description' => 'TODO: please describe this field!',
  1936. 'type' => 'int',
  1937. 'not null' => '',
  1938. ),
  1939. 'object_id' => array(
  1940. // 'description' => 'TODO: please describe this field!',
  1941. 'type' => 'int',
  1942. 'not null' => '',
  1943. ),
  1944. ),
  1945. 'primary key' => array(
  1946. ),
  1947. 'unique keys' => array(
  1948. ),
  1949. 'indexes' => array(
  1950. ),
  1951. 'foreign keys' => array(
  1952. ),
  1953. );
  1954. return $description;
  1955. }
  1956. /**
  1957. * Implements hook_fnr_type_schema()
  1958. * Purpose: To describe the structure of fnr_type to tripal
  1959. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1960. * @see tripal_core.api.inc: tripal_core_chado_update()
  1961. * @see tripal_core.api.inc: tripal_core_chado_select()
  1962. *
  1963. * @return
  1964. * An array describing the current table
  1965. *
  1966. * @ingroup tripal_schema_api
  1967. *
  1968. */
  1969. function tripal_core_chado_fnr_type_schema () {
  1970. $description = array();
  1971. $description = array(
  1972. 'table' => 'fnr_type',
  1973. // 'description' => 'TODO: please describe this table!',
  1974. 'fields' => array(
  1975. 'feature_id' => array(
  1976. // 'description' => 'TODO: please describe this field!',
  1977. 'type' => 'int',
  1978. 'not null' => '',
  1979. ),
  1980. 'name' => array(
  1981. // 'description' => 'TODO: please describe this field!',
  1982. 'type' => 'varchar',
  1983. 'length' => '255',
  1984. 'not null' => '',
  1985. ),
  1986. 'dbxref_id' => array(
  1987. // 'description' => 'TODO: please describe this field!',
  1988. 'type' => 'int',
  1989. 'not null' => '',
  1990. ),
  1991. 'type' => array(
  1992. // 'description' => 'TODO: please describe this field!',
  1993. 'type' => 'varchar',
  1994. 'length' => '1024',
  1995. 'not null' => '',
  1996. ),
  1997. 'residues' => array(
  1998. // 'description' => 'TODO: please describe this field!',
  1999. 'type' => 'text',
  2000. 'not null' => '',
  2001. ),
  2002. 'seqlen' => array(
  2003. // 'description' => 'TODO: please describe this field!',
  2004. 'type' => 'int',
  2005. 'not null' => '',
  2006. ),
  2007. 'md5checksum' => array(
  2008. // 'description' => 'TODO: please describe this field!',
  2009. 'type' => 'char',
  2010. 'length' => '32',
  2011. 'not null' => '',
  2012. ),
  2013. 'type_id' => array(
  2014. // 'description' => 'TODO: please describe this field!',
  2015. 'type' => 'int',
  2016. 'not null' => '',
  2017. ),
  2018. 'timeaccessioned' => array(
  2019. // 'description' => 'TODO: please describe this field!',
  2020. 'type' => 'datetime',
  2021. 'not null' => '',
  2022. ),
  2023. 'timelastmodified' => array(
  2024. // 'description' => 'TODO: please describe this field!',
  2025. 'type' => 'datetime',
  2026. 'not null' => '',
  2027. ),
  2028. ),
  2029. 'primary key' => array(
  2030. ),
  2031. 'unique keys' => array(
  2032. ),
  2033. 'indexes' => array(
  2034. ),
  2035. 'foreign keys' => array(
  2036. ),
  2037. );
  2038. return $description;
  2039. }
  2040. /**
  2041. * Implements hook_featurepos_schema()
  2042. * Purpose: To describe the structure of featurepos to tripal
  2043. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2044. * @see tripal_core.api.inc: tripal_core_chado_update()
  2045. * @see tripal_core.api.inc: tripal_core_chado_select()
  2046. *
  2047. * @return
  2048. * An array describing the current table
  2049. *
  2050. * @ingroup tripal_schema_api
  2051. *
  2052. */
  2053. function tripal_core_chado_featurepos_schema () {
  2054. $description = array();
  2055. $description = array(
  2056. 'table' => 'featurepos',
  2057. // 'description' => 'TODO: please describe this table!',
  2058. 'fields' => array(
  2059. 'featurepos_id' => array(
  2060. // 'description' => 'TODO: please describe this field!',
  2061. 'type' => 'serial',
  2062. 'not null' => '1',
  2063. ),
  2064. 'featuremap_id' => array(
  2065. // 'description' => 'TODO: please describe this field!',
  2066. 'type' => 'serial',
  2067. 'not null' => '1',
  2068. ),
  2069. 'feature_id' => array(
  2070. // 'description' => 'TODO: please describe this field!',
  2071. 'type' => 'int',
  2072. 'not null' => '1',
  2073. ),
  2074. 'map_feature_id' => array(
  2075. // 'description' => 'TODO: please describe this field!',
  2076. 'type' => 'int',
  2077. 'not null' => '1',
  2078. ),
  2079. 'mappos' => array(
  2080. // 'description' => 'TODO: please describe this field!',
  2081. 'type' => 'float',
  2082. 'size' => 'big',
  2083. 'not null' => '1',
  2084. ),
  2085. ),
  2086. 'primary key' => array(
  2087. '0' => 'featurepos_id',
  2088. ),
  2089. 'unique keys' => array(
  2090. ),
  2091. 'indexes' => array(
  2092. 'featurepos_idx1' => array(
  2093. '0' => 'featuremap_id',
  2094. ),
  2095. 'featurepos_idx2' => array(
  2096. '0' => 'feature_id',
  2097. ),
  2098. 'featurepos_idx3' => array(
  2099. '0' => 'map_feature_id',
  2100. ),
  2101. ),
  2102. 'foreign keys' => array(
  2103. ),
  2104. );
  2105. return $description;
  2106. }
  2107. /**
  2108. * Implements hook_featuremap_pub_schema()
  2109. * Purpose: To describe the structure of featuremap_pub to tripal
  2110. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2111. * @see tripal_core.api.inc: tripal_core_chado_update()
  2112. * @see tripal_core.api.inc: tripal_core_chado_select()
  2113. *
  2114. * @return
  2115. * An array describing the current table
  2116. *
  2117. * @ingroup tripal_schema_api
  2118. *
  2119. */
  2120. function tripal_core_chado_featuremap_pub_schema () {
  2121. $description = array();
  2122. $description = array(
  2123. 'table' => 'featuremap_pub',
  2124. // 'description' => 'TODO: please describe this table!',
  2125. 'fields' => array(
  2126. 'featuremap_pub_id' => array(
  2127. // 'description' => 'TODO: please describe this field!',
  2128. 'type' => 'serial',
  2129. 'not null' => '1',
  2130. ),
  2131. 'featuremap_id' => array(
  2132. // 'description' => 'TODO: please describe this field!',
  2133. 'type' => 'int',
  2134. 'not null' => '1',
  2135. ),
  2136. 'pub_id' => array(
  2137. // 'description' => 'TODO: please describe this field!',
  2138. 'type' => 'int',
  2139. 'not null' => '1',
  2140. ),
  2141. ),
  2142. 'primary key' => array(
  2143. '0' => 'featuremap_pub_id',
  2144. ),
  2145. 'unique keys' => array(
  2146. ),
  2147. 'indexes' => array(
  2148. 'featuremap_pub_idx1' => array(
  2149. '0' => 'featuremap_id',
  2150. ),
  2151. 'featuremap_pub_idx2' => array(
  2152. '0' => 'pub_id',
  2153. ),
  2154. ),
  2155. 'foreign keys' => array(
  2156. ),
  2157. );
  2158. return $description;
  2159. }
  2160. /**
  2161. * Implements hook_feature_union_schema()
  2162. * Purpose: To describe the structure of feature_union to tripal
  2163. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2164. * @see tripal_core.api.inc: tripal_core_chado_update()
  2165. * @see tripal_core.api.inc: tripal_core_chado_select()
  2166. *
  2167. * @return
  2168. * An array describing the current table
  2169. *
  2170. * @ingroup tripal_schema_api
  2171. *
  2172. */
  2173. function tripal_core_chado_feature_union_schema () {
  2174. $description = array();
  2175. $description = array(
  2176. 'table' => 'feature_union',
  2177. // 'description' => 'TODO: please describe this table!',
  2178. 'fields' => array(
  2179. 'subject_id' => array(
  2180. // 'description' => 'TODO: please describe this field!',
  2181. 'type' => 'int',
  2182. 'not null' => '',
  2183. ),
  2184. 'object_id' => array(
  2185. // 'description' => 'TODO: please describe this field!',
  2186. 'type' => 'int',
  2187. 'not null' => '',
  2188. ),
  2189. 'srcfeature_id' => array(
  2190. // 'description' => 'TODO: please describe this field!',
  2191. 'type' => 'int',
  2192. 'not null' => '',
  2193. ),
  2194. 'subject_strand' => array(
  2195. // 'description' => 'TODO: please describe this field!',
  2196. 'type' => 'int',
  2197. 'size' => 'small',
  2198. 'not null' => '',
  2199. ),
  2200. 'object_strand' => array(
  2201. // 'description' => 'TODO: please describe this field!',
  2202. 'type' => 'int',
  2203. 'size' => 'small',
  2204. 'not null' => '',
  2205. ),
  2206. 'fmin' => array(
  2207. // 'description' => 'TODO: please describe this field!',
  2208. 'type' => 'int',
  2209. 'not null' => '',
  2210. ),
  2211. 'fmax' => array(
  2212. // 'description' => 'TODO: please describe this field!',
  2213. 'type' => 'int',
  2214. 'not null' => '',
  2215. ),
  2216. ),
  2217. 'primary key' => array(
  2218. ),
  2219. 'unique keys' => array(
  2220. ),
  2221. 'indexes' => array(
  2222. ),
  2223. 'foreign keys' => array(
  2224. ),
  2225. );
  2226. return $description;
  2227. }
  2228. /**
  2229. * Implements hook_featureloc_schema()
  2230. * Purpose: To describe the structure of featureloc to tripal
  2231. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2232. * @see tripal_core.api.inc: tripal_core_chado_update()
  2233. * @see tripal_core.api.inc: tripal_core_chado_select()
  2234. *
  2235. * @return
  2236. * An array describing the current table
  2237. *
  2238. * @ingroup tripal_schema_api
  2239. *
  2240. */
  2241. function tripal_core_chado_featureloc_schema () {
  2242. $description = array();
  2243. $description = array(
  2244. 'table' => 'featureloc',
  2245. // 'description' => 'TODO: please describe this table!',
  2246. 'fields' => array(
  2247. 'featureloc_id' => array(
  2248. // 'description' => 'TODO: please describe this field!',
  2249. 'type' => 'serial',
  2250. 'not null' => '1',
  2251. ),
  2252. 'feature_id' => array(
  2253. // 'description' => 'TODO: please describe this field!',
  2254. 'type' => 'int',
  2255. 'not null' => '1',
  2256. ),
  2257. 'srcfeature_id' => array(
  2258. // 'description' => 'TODO: please describe this field!',
  2259. 'type' => 'int',
  2260. 'not null' => '',
  2261. ),
  2262. 'fmin' => array(
  2263. // 'description' => 'TODO: please describe this field!',
  2264. 'type' => 'int',
  2265. 'not null' => '',
  2266. ),
  2267. 'is_fmin_partial' => array(
  2268. // 'description' => 'TODO: please describe this field!',
  2269. 'type' => 'boolean',
  2270. 'not null' => '1',
  2271. 'default' => 'als',
  2272. ),
  2273. 'fmax' => array(
  2274. // 'description' => 'TODO: please describe this field!',
  2275. 'type' => 'int',
  2276. 'not null' => '',
  2277. ),
  2278. 'is_fmax_partial' => array(
  2279. // 'description' => 'TODO: please describe this field!',
  2280. 'type' => 'boolean',
  2281. 'not null' => '1',
  2282. 'default' => 'als',
  2283. ),
  2284. 'strand' => array(
  2285. // 'description' => 'TODO: please describe this field!',
  2286. 'type' => 'int',
  2287. 'size' => 'small',
  2288. 'not null' => '',
  2289. ),
  2290. 'phase' => array(
  2291. // 'description' => 'TODO: please describe this field!',
  2292. 'type' => 'int',
  2293. 'not null' => '',
  2294. ),
  2295. 'residue_info' => array(
  2296. // 'description' => 'TODO: please describe this field!',
  2297. 'type' => 'text',
  2298. 'not null' => '',
  2299. ),
  2300. 'locgroup' => array(
  2301. // 'description' => 'TODO: please describe this field!',
  2302. 'type' => 'int',
  2303. 'not null' => '1',
  2304. 'default' => '0',
  2305. ),
  2306. 'rank' => array(
  2307. // 'description' => 'TODO: please describe this field!',
  2308. 'type' => 'int',
  2309. 'not null' => '1',
  2310. 'default' => '0',
  2311. ),
  2312. ),
  2313. 'primary key' => array(
  2314. '0' => 'featureloc_id',
  2315. ),
  2316. 'unique keys' => array(
  2317. 'featureloc_c1' => array(
  2318. '0' => 'feature_id',
  2319. '1' => 'locgroup',
  2320. '2' => 'rank',
  2321. ),
  2322. ),
  2323. 'indexes' => array(
  2324. 'binloc_boxrange' => array(
  2325. '0' => 'fmin',
  2326. ),
  2327. 'binloc_boxrange_src' => array(
  2328. '0' => 'srcfeature_id',
  2329. '1' => 'fmin',
  2330. ),
  2331. 'featureloc_idx1' => array(
  2332. '0' => 'feature_id',
  2333. ),
  2334. 'featureloc_idx2' => array(
  2335. '0' => 'srcfeature_id',
  2336. ),
  2337. 'featureloc_idx3' => array(
  2338. '0' => 'srcfeature_id',
  2339. '1' => 'fmin',
  2340. '2' => 'fmax',
  2341. ),
  2342. ),
  2343. 'foreign keys' => array(
  2344. ),
  2345. );
  2346. return $description;
  2347. }
  2348. /**
  2349. * Implements hook_featureloc_pub_schema()
  2350. * Purpose: To describe the structure of featureloc_pub to tripal
  2351. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2352. * @see tripal_core.api.inc: tripal_core_chado_update()
  2353. * @see tripal_core.api.inc: tripal_core_chado_select()
  2354. *
  2355. * @return
  2356. * An array describing the current table
  2357. *
  2358. * @ingroup tripal_schema_api
  2359. *
  2360. */
  2361. function tripal_core_chado_featureloc_pub_schema () {
  2362. $description = array();
  2363. $description = array(
  2364. 'table' => 'featureloc_pub',
  2365. // 'description' => 'TODO: please describe this table!',
  2366. 'fields' => array(
  2367. 'featureloc_pub_id' => array(
  2368. // 'description' => 'TODO: please describe this field!',
  2369. 'type' => 'serial',
  2370. 'not null' => '1',
  2371. ),
  2372. 'featureloc_id' => array(
  2373. // 'description' => 'TODO: please describe this field!',
  2374. 'type' => 'int',
  2375. 'not null' => '1',
  2376. ),
  2377. 'pub_id' => array(
  2378. // 'description' => 'TODO: please describe this field!',
  2379. 'type' => 'int',
  2380. 'not null' => '1',
  2381. ),
  2382. ),
  2383. 'primary key' => array(
  2384. '0' => 'featureloc_pub_id',
  2385. ),
  2386. 'unique keys' => array(
  2387. 'featureloc_pub_c1' => array(
  2388. '0' => 'featureloc_id',
  2389. '1' => 'pub_id',
  2390. ),
  2391. ),
  2392. 'indexes' => array(
  2393. 'featureloc_pub_idx1' => array(
  2394. '0' => 'featureloc_id',
  2395. ),
  2396. 'featureloc_pub_idx2' => array(
  2397. '0' => 'pub_id',
  2398. ),
  2399. ),
  2400. 'foreign keys' => array(
  2401. ),
  2402. );
  2403. return $description;
  2404. }
  2405. /**
  2406. * Implements hook_featuremap_schema()
  2407. * Purpose: To describe the structure of featuremap to tripal
  2408. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2409. * @see tripal_core.api.inc: tripal_core_chado_update()
  2410. * @see tripal_core.api.inc: tripal_core_chado_select()
  2411. *
  2412. * @return
  2413. * An array describing the current table
  2414. *
  2415. * @ingroup tripal_schema_api
  2416. *
  2417. */
  2418. function tripal_core_chado_featuremap_schema () {
  2419. $description = array();
  2420. $description = array(
  2421. 'table' => 'featuremap',
  2422. // 'description' => 'TODO: please describe this table!',
  2423. 'fields' => array(
  2424. 'featuremap_id' => array(
  2425. // 'description' => 'TODO: please describe this field!',
  2426. 'type' => 'serial',
  2427. 'not null' => '1',
  2428. ),
  2429. 'name' => array(
  2430. // 'description' => 'TODO: please describe this field!',
  2431. 'type' => 'varchar',
  2432. 'length' => '255',
  2433. 'not null' => '',
  2434. ),
  2435. 'description' => array(
  2436. // 'description' => 'TODO: please describe this field!',
  2437. 'type' => 'text',
  2438. 'not null' => '',
  2439. ),
  2440. 'unittype_id' => array(
  2441. // 'description' => 'TODO: please describe this field!',
  2442. 'type' => 'int',
  2443. 'not null' => '',
  2444. ),
  2445. ),
  2446. 'primary key' => array(
  2447. '0' => 'featuremap_id',
  2448. ),
  2449. 'unique keys' => array(
  2450. 'featuremap_c1' => array(
  2451. '0' => 'name',
  2452. ),
  2453. ),
  2454. 'indexes' => array(
  2455. ),
  2456. 'foreign keys' => array(
  2457. ),
  2458. );
  2459. return $description;
  2460. }
  2461. /**
  2462. * Implements hook_fp_key_schema()
  2463. * Purpose: To describe the structure of fp_key to tripal
  2464. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2465. * @see tripal_core.api.inc: tripal_core_chado_update()
  2466. * @see tripal_core.api.inc: tripal_core_chado_select()
  2467. *
  2468. * @return
  2469. * An array describing the current table
  2470. *
  2471. * @ingroup tripal_schema_api
  2472. *
  2473. */
  2474. function tripal_core_chado_fp_key_schema () {
  2475. $description = array();
  2476. $description = array(
  2477. 'table' => 'fp_key',
  2478. // 'description' => 'TODO: please describe this table!',
  2479. 'fields' => array(
  2480. 'feature_id' => array(
  2481. // 'description' => 'TODO: please describe this field!',
  2482. 'type' => 'int',
  2483. 'not null' => '',
  2484. ),
  2485. 'pkey' => array(
  2486. // 'description' => 'TODO: please describe this field!',
  2487. 'type' => 'varchar',
  2488. 'length' => '1024',
  2489. 'not null' => '',
  2490. ),
  2491. 'value' => array(
  2492. // 'description' => 'TODO: please describe this field!',
  2493. 'type' => 'text',
  2494. 'not null' => '',
  2495. ),
  2496. ),
  2497. 'primary key' => array(
  2498. ),
  2499. 'unique keys' => array(
  2500. ),
  2501. 'indexes' => array(
  2502. ),
  2503. 'foreign keys' => array(
  2504. ),
  2505. );
  2506. return $description;
  2507. }
  2508. /**
  2509. * Implements hook_genotype_schema()
  2510. * Purpose: To describe the structure of genotype to tripal
  2511. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2512. * @see tripal_core.api.inc: tripal_core_chado_update()
  2513. * @see tripal_core.api.inc: tripal_core_chado_select()
  2514. *
  2515. * @return
  2516. * An array describing the current table
  2517. *
  2518. * @ingroup tripal_schema_api
  2519. *
  2520. */
  2521. function tripal_core_chado_genotype_schema () {
  2522. $description = array();
  2523. $description = array(
  2524. 'table' => 'genotype',
  2525. // 'description' => 'TODO: please describe this table!',
  2526. 'fields' => array(
  2527. 'genotype_id' => array(
  2528. // 'description' => 'TODO: please describe this field!',
  2529. 'type' => 'serial',
  2530. 'not null' => '1',
  2531. ),
  2532. 'name' => array(
  2533. // 'description' => 'TODO: please describe this field!',
  2534. 'type' => 'text',
  2535. 'not null' => '',
  2536. ),
  2537. 'uniquename' => array(
  2538. // 'description' => 'TODO: please describe this field!',
  2539. 'type' => 'text',
  2540. 'not null' => '1',
  2541. ),
  2542. 'description' => array(
  2543. // 'description' => 'TODO: please describe this field!',
  2544. 'type' => 'varchar',
  2545. 'length' => '255',
  2546. 'not null' => '',
  2547. ),
  2548. ),
  2549. 'primary key' => array(
  2550. '0' => 'genotype_id',
  2551. ),
  2552. 'unique keys' => array(
  2553. 'genotype_c1' => array(
  2554. '0' => 'uniquename',
  2555. ),
  2556. ),
  2557. 'indexes' => array(
  2558. 'genotype_idx1' => array(
  2559. '0' => 'uniquename',
  2560. ),
  2561. 'genotype_idx2' => array(
  2562. '0' => 'name',
  2563. ),
  2564. ),
  2565. 'foreign keys' => array(
  2566. ),
  2567. );
  2568. return $description;
  2569. }
  2570. /**
  2571. * Implements hook_library_cvterm_schema()
  2572. * Purpose: To describe the structure of library_cvterm to tripal
  2573. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2574. * @see tripal_core.api.inc: tripal_core_chado_update()
  2575. * @see tripal_core.api.inc: tripal_core_chado_select()
  2576. *
  2577. * @return
  2578. * An array describing the current table
  2579. *
  2580. * @ingroup tripal_schema_api
  2581. *
  2582. */
  2583. function tripal_core_chado_library_cvterm_schema () {
  2584. $description = array();
  2585. $description = array(
  2586. 'table' => 'library_cvterm',
  2587. // 'description' => 'TODO: please describe this table!',
  2588. 'fields' => array(
  2589. 'library_cvterm_id' => array(
  2590. // 'description' => 'TODO: please describe this field!',
  2591. 'type' => 'serial',
  2592. 'not null' => '1',
  2593. ),
  2594. 'library_id' => array(
  2595. // 'description' => 'TODO: please describe this field!',
  2596. 'type' => 'int',
  2597. 'not null' => '1',
  2598. ),
  2599. 'cvterm_id' => array(
  2600. // 'description' => 'TODO: please describe this field!',
  2601. 'type' => 'int',
  2602. 'not null' => '1',
  2603. ),
  2604. 'pub_id' => array(
  2605. // 'description' => 'TODO: please describe this field!',
  2606. 'type' => 'int',
  2607. 'not null' => '1',
  2608. ),
  2609. ),
  2610. 'primary key' => array(
  2611. '0' => 'library_cvterm_id',
  2612. ),
  2613. 'unique keys' => array(
  2614. 'library_cvterm_c1' => array(
  2615. '0' => 'library_id',
  2616. '1' => 'cvterm_id',
  2617. '2' => 'pub_id',
  2618. ),
  2619. ),
  2620. 'indexes' => array(
  2621. 'library_cvterm_idx1' => array(
  2622. '0' => 'library_id',
  2623. ),
  2624. 'library_cvterm_idx2' => array(
  2625. '0' => 'cvterm_id',
  2626. ),
  2627. 'library_cvterm_idx3' => array(
  2628. '0' => 'pub_id',
  2629. ),
  2630. ),
  2631. 'foreign keys' => array(
  2632. ),
  2633. );
  2634. return $description;
  2635. }
  2636. /**
  2637. * Implements hook_library_dbxref_schema()
  2638. * Purpose: To describe the structure of library_dbxref to tripal
  2639. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2640. * @see tripal_core.api.inc: tripal_core_chado_update()
  2641. * @see tripal_core.api.inc: tripal_core_chado_select()
  2642. *
  2643. * @return
  2644. * An array describing the current table
  2645. *
  2646. * @ingroup tripal_schema_api
  2647. *
  2648. */
  2649. function tripal_core_chado_library_dbxref_schema () {
  2650. $description = array();
  2651. $description = array(
  2652. 'table' => 'library_dbxref',
  2653. // 'description' => 'TODO: please describe this table!',
  2654. 'fields' => array(
  2655. 'library_dbxref_id' => array(
  2656. // 'description' => 'TODO: please describe this field!',
  2657. 'type' => 'serial',
  2658. 'not null' => '1',
  2659. ),
  2660. 'library_id' => array(
  2661. // 'description' => 'TODO: please describe this field!',
  2662. 'type' => 'int',
  2663. 'not null' => '1',
  2664. ),
  2665. 'dbxref_id' => array(
  2666. // 'description' => 'TODO: please describe this field!',
  2667. 'type' => 'int',
  2668. 'not null' => '1',
  2669. ),
  2670. 'is_current' => array(
  2671. // 'description' => 'TODO: please describe this field!',
  2672. 'type' => 'boolean',
  2673. 'not null' => '1',
  2674. 'default' => 'ru',
  2675. ),
  2676. ),
  2677. 'primary key' => array(
  2678. '0' => 'library_dbxref_id',
  2679. ),
  2680. 'unique keys' => array(
  2681. 'library_dbxref_c1' => array(
  2682. '0' => 'library_id',
  2683. '1' => 'dbxref_id',
  2684. ),
  2685. ),
  2686. 'indexes' => array(
  2687. 'library_dbxref_idx1' => array(
  2688. '0' => 'library_id',
  2689. ),
  2690. 'library_dbxref_idx2' => array(
  2691. '0' => 'dbxref_id',
  2692. ),
  2693. ),
  2694. 'foreign keys' => array(
  2695. ),
  2696. );
  2697. return $description;
  2698. }
  2699. /**
  2700. * Implements hook_library_feature_schema()
  2701. * Purpose: To describe the structure of library_feature to tripal
  2702. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2703. * @see tripal_core.api.inc: tripal_core_chado_update()
  2704. * @see tripal_core.api.inc: tripal_core_chado_select()
  2705. *
  2706. * @return
  2707. * An array describing the current table
  2708. *
  2709. * @ingroup tripal_schema_api
  2710. *
  2711. */
  2712. function tripal_core_chado_library_feature_schema () {
  2713. $description = array();
  2714. $description = array(
  2715. 'table' => 'library_feature',
  2716. // 'description' => 'TODO: please describe this table!',
  2717. 'fields' => array(
  2718. 'library_feature_id' => array(
  2719. // 'description' => 'TODO: please describe this field!',
  2720. 'type' => 'serial',
  2721. 'not null' => '1',
  2722. ),
  2723. 'library_id' => array(
  2724. // 'description' => 'TODO: please describe this field!',
  2725. 'type' => 'int',
  2726. 'not null' => '1',
  2727. ),
  2728. 'feature_id' => array(
  2729. // 'description' => 'TODO: please describe this field!',
  2730. 'type' => 'int',
  2731. 'not null' => '1',
  2732. ),
  2733. ),
  2734. 'primary key' => array(
  2735. '0' => 'library_feature_id',
  2736. ),
  2737. 'unique keys' => array(
  2738. 'library_feature_c1' => array(
  2739. '0' => 'library_id',
  2740. '1' => 'feature_id',
  2741. ),
  2742. ),
  2743. 'indexes' => array(
  2744. 'library_feature_idx1' => array(
  2745. '0' => 'library_id',
  2746. ),
  2747. 'library_feature_idx2' => array(
  2748. '0' => 'feature_id',
  2749. ),
  2750. ),
  2751. 'foreign keys' => array(
  2752. ),
  2753. );
  2754. return $description;
  2755. }
  2756. /**
  2757. * Implements hook_library_feature_count_schema()
  2758. * Purpose: To describe the structure of library_feature_count to tripal
  2759. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2760. * @see tripal_core.api.inc: tripal_core_chado_update()
  2761. * @see tripal_core.api.inc: tripal_core_chado_select()
  2762. *
  2763. * @return
  2764. * An array describing the current table
  2765. *
  2766. * @ingroup tripal_schema_api
  2767. *
  2768. */
  2769. function tripal_core_chado_library_feature_count_schema () {
  2770. $description = array();
  2771. $description = array(
  2772. 'table' => 'library_feature_count',
  2773. // 'description' => 'TODO: please describe this table!',
  2774. 'fields' => array(
  2775. 'library_id' => array(
  2776. // 'description' => 'TODO: please describe this field!',
  2777. 'type' => 'int',
  2778. 'not null' => '',
  2779. ),
  2780. 'name' => array(
  2781. // 'description' => 'TODO: please describe this field!',
  2782. 'type' => 'varchar',
  2783. 'length' => '255',
  2784. 'not null' => '',
  2785. ),
  2786. 'num_features' => array(
  2787. // 'description' => 'TODO: please describe this field!',
  2788. 'type' => 'int',
  2789. 'not null' => '',
  2790. ),
  2791. 'feature_type' => array(
  2792. // 'description' => 'TODO: please describe this field!',
  2793. 'type' => 'varchar',
  2794. 'length' => '255',
  2795. 'not null' => '',
  2796. ),
  2797. ),
  2798. 'primary key' => array(
  2799. ),
  2800. 'unique keys' => array(
  2801. 'library_feature_count_index' => array(
  2802. '0' => 'library_id',
  2803. ),
  2804. ),
  2805. 'indexes' => array(
  2806. ),
  2807. 'foreign keys' => array(
  2808. ),
  2809. );
  2810. return $description;
  2811. }
  2812. /**
  2813. * Implements hook_library_schema()
  2814. * Purpose: To describe the structure of library to tripal
  2815. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2816. * @see tripal_core.api.inc: tripal_core_chado_update()
  2817. * @see tripal_core.api.inc: tripal_core_chado_select()
  2818. *
  2819. * @return
  2820. * An array describing the current table
  2821. *
  2822. * @ingroup tripal_schema_api
  2823. *
  2824. */
  2825. function tripal_core_chado_library_schema () {
  2826. $description = array();
  2827. $description = array(
  2828. 'table' => 'library',
  2829. // 'description' => 'TODO: please describe this table!',
  2830. 'fields' => array(
  2831. 'library_id' => array(
  2832. // 'description' => 'TODO: please describe this field!',
  2833. 'type' => 'serial',
  2834. 'not null' => '1',
  2835. ),
  2836. 'organism_id' => array(
  2837. // 'description' => 'TODO: please describe this field!',
  2838. 'type' => 'int',
  2839. 'not null' => '1',
  2840. ),
  2841. 'name' => array(
  2842. // 'description' => 'TODO: please describe this field!',
  2843. 'type' => 'varchar',
  2844. 'length' => '255',
  2845. 'not null' => '',
  2846. ),
  2847. 'uniquename' => array(
  2848. // 'description' => 'TODO: please describe this field!',
  2849. 'type' => 'text',
  2850. 'not null' => '1',
  2851. ),
  2852. 'type_id' => array(
  2853. // 'description' => 'TODO: please describe this field!',
  2854. 'type' => 'int',
  2855. 'not null' => '1',
  2856. ),
  2857. 'is_obsolete' => array(
  2858. // 'description' => 'TODO: please describe this field!',
  2859. 'type' => 'int',
  2860. 'not null' => '1',
  2861. 'default' => '0',
  2862. ),
  2863. 'timeaccessioned' => array(
  2864. // 'description' => 'TODO: please describe this field!',
  2865. 'type' => 'datetime',
  2866. 'not null' => '1',
  2867. 'default' => 'ow(',
  2868. ),
  2869. 'timelastmodified' => array(
  2870. // 'description' => 'TODO: please describe this field!',
  2871. 'type' => 'datetime',
  2872. 'not null' => '1',
  2873. 'default' => 'ow(',
  2874. ),
  2875. ),
  2876. 'primary key' => array(
  2877. '0' => 'library_id',
  2878. ),
  2879. 'unique keys' => array(
  2880. 'library_c1' => array(
  2881. '0' => 'organism_id',
  2882. '1' => 'uniquename',
  2883. '2' => 'type_id',
  2884. ),
  2885. ),
  2886. 'indexes' => array(
  2887. 'library_idx1' => array(
  2888. '0' => 'organism_id',
  2889. ),
  2890. 'library_idx2' => array(
  2891. '0' => 'type_id',
  2892. ),
  2893. 'library_idx3' => array(
  2894. '0' => 'uniquename',
  2895. ),
  2896. 'library_name_ind1' => array(
  2897. '0' => 'name',
  2898. ),
  2899. ),
  2900. 'foreign keys' => array(
  2901. ),
  2902. );
  2903. return $description;
  2904. }
  2905. /**
  2906. * Implements hook_intronloc_view_schema()
  2907. * Purpose: To describe the structure of intronloc_view to tripal
  2908. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2909. * @see tripal_core.api.inc: tripal_core_chado_update()
  2910. * @see tripal_core.api.inc: tripal_core_chado_select()
  2911. *
  2912. * @return
  2913. * An array describing the current table
  2914. *
  2915. * @ingroup tripal_schema_api
  2916. *
  2917. */
  2918. function tripal_core_chado_intronloc_view_schema () {
  2919. $description = array();
  2920. $description = array(
  2921. 'table' => 'intronloc_view',
  2922. // 'description' => 'TODO: please describe this table!',
  2923. 'fields' => array(
  2924. 'exon1_id' => array(
  2925. // 'description' => 'TODO: please describe this field!',
  2926. 'type' => 'int',
  2927. 'not null' => '',
  2928. ),
  2929. 'exon2_id' => array(
  2930. // 'description' => 'TODO: please describe this field!',
  2931. 'type' => 'int',
  2932. 'not null' => '',
  2933. ),
  2934. 'fmin' => array(
  2935. // 'description' => 'TODO: please describe this field!',
  2936. 'type' => 'int',
  2937. 'not null' => '',
  2938. ),
  2939. 'fmax' => array(
  2940. // 'description' => 'TODO: please describe this field!',
  2941. 'type' => 'int',
  2942. 'not null' => '',
  2943. ),
  2944. 'strand' => array(
  2945. // 'description' => 'TODO: please describe this field!',
  2946. 'type' => 'int',
  2947. 'size' => 'small',
  2948. 'not null' => '',
  2949. ),
  2950. 'srcfeature_id' => array(
  2951. // 'description' => 'TODO: please describe this field!',
  2952. 'type' => 'int',
  2953. 'not null' => '',
  2954. ),
  2955. ),
  2956. 'primary key' => array(
  2957. ),
  2958. 'unique keys' => array(
  2959. ),
  2960. 'indexes' => array(
  2961. ),
  2962. 'foreign keys' => array(
  2963. ),
  2964. );
  2965. return $description;
  2966. }
  2967. /**
  2968. * Implements hook_gff3atts_schema()
  2969. * Purpose: To describe the structure of gff3atts to tripal
  2970. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2971. * @see tripal_core.api.inc: tripal_core_chado_update()
  2972. * @see tripal_core.api.inc: tripal_core_chado_select()
  2973. *
  2974. * @return
  2975. * An array describing the current table
  2976. *
  2977. * @ingroup tripal_schema_api
  2978. *
  2979. */
  2980. function tripal_core_chado_gff3atts_schema () {
  2981. $description = array();
  2982. $description = array(
  2983. 'table' => 'gff3atts',
  2984. // 'description' => 'TODO: please describe this table!',
  2985. 'fields' => array(
  2986. 'feature_id' => array(
  2987. // 'description' => 'TODO: please describe this field!',
  2988. 'type' => 'int',
  2989. 'not null' => '',
  2990. ),
  2991. 'type' => array(
  2992. // 'description' => 'TODO: please describe this field!',
  2993. 'type' => 'text',
  2994. 'not null' => '',
  2995. ),
  2996. 'attribute' => array(
  2997. // 'description' => 'TODO: please describe this field!',
  2998. 'type' => 'varchar',
  2999. 'not null' => '',
  3000. ),
  3001. ),
  3002. 'primary key' => array(
  3003. ),
  3004. 'unique keys' => array(
  3005. ),
  3006. 'indexes' => array(
  3007. ),
  3008. 'foreign keys' => array(
  3009. ),
  3010. );
  3011. return $description;
  3012. }
  3013. /**
  3014. * Implements hook_gff3view_schema()
  3015. * Purpose: To describe the structure of gff3view to tripal
  3016. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3017. * @see tripal_core.api.inc: tripal_core_chado_update()
  3018. * @see tripal_core.api.inc: tripal_core_chado_select()
  3019. *
  3020. * @return
  3021. * An array describing the current table
  3022. *
  3023. * @ingroup tripal_schema_api
  3024. *
  3025. */
  3026. function tripal_core_chado_gff3view_schema () {
  3027. $description = array();
  3028. $description = array(
  3029. 'table' => 'gff3view',
  3030. // 'description' => 'TODO: please describe this table!',
  3031. 'fields' => array(
  3032. 'feature_id' => array(
  3033. // 'description' => 'TODO: please describe this field!',
  3034. 'type' => 'int',
  3035. 'not null' => '',
  3036. ),
  3037. 'ref' => array(
  3038. // 'description' => 'TODO: please describe this field!',
  3039. 'type' => 'varchar',
  3040. 'length' => '255',
  3041. 'not null' => '',
  3042. ),
  3043. 'source' => array(
  3044. // 'description' => 'TODO: please describe this field!',
  3045. 'type' => 'varchar',
  3046. 'length' => '255',
  3047. 'not null' => '',
  3048. ),
  3049. 'type' => array(
  3050. // 'description' => 'TODO: please describe this field!',
  3051. 'type' => 'varchar',
  3052. 'length' => '1024',
  3053. 'not null' => '',
  3054. ),
  3055. 'fstart' => array(
  3056. // 'description' => 'TODO: please describe this field!',
  3057. 'type' => 'int',
  3058. 'not null' => '',
  3059. ),
  3060. 'fend' => array(
  3061. // 'description' => 'TODO: please describe this field!',
  3062. 'type' => 'int',
  3063. 'not null' => '',
  3064. ),
  3065. 'score' => array(
  3066. // 'description' => 'TODO: please describe this field!',
  3067. 'type' => 'float',
  3068. 'size' => 'big',
  3069. 'not null' => '',
  3070. ),
  3071. 'strand' => array(
  3072. // 'description' => 'TODO: please describe this field!',
  3073. 'type' => 'int',
  3074. 'size' => 'small',
  3075. 'not null' => '',
  3076. ),
  3077. 'phase' => array(
  3078. // 'description' => 'TODO: please describe this field!',
  3079. 'type' => 'int',
  3080. 'not null' => '',
  3081. ),
  3082. 'seqlen' => array(
  3083. // 'description' => 'TODO: please describe this field!',
  3084. 'type' => 'int',
  3085. 'not null' => '',
  3086. ),
  3087. 'name' => array(
  3088. // 'description' => 'TODO: please describe this field!',
  3089. 'type' => 'varchar',
  3090. 'length' => '255',
  3091. 'not null' => '',
  3092. ),
  3093. 'organism_id' => array(
  3094. // 'description' => 'TODO: please describe this field!',
  3095. 'type' => 'int',
  3096. 'not null' => '',
  3097. ),
  3098. ),
  3099. 'primary key' => array(
  3100. ),
  3101. 'unique keys' => array(
  3102. ),
  3103. 'indexes' => array(
  3104. ),
  3105. 'foreign keys' => array(
  3106. ),
  3107. );
  3108. return $description;
  3109. }
  3110. /**
  3111. * Implements hook_gffatts_schema()
  3112. * Purpose: To describe the structure of gffatts to tripal
  3113. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3114. * @see tripal_core.api.inc: tripal_core_chado_update()
  3115. * @see tripal_core.api.inc: tripal_core_chado_select()
  3116. *
  3117. * @return
  3118. * An array describing the current table
  3119. *
  3120. * @ingroup tripal_schema_api
  3121. *
  3122. */
  3123. function tripal_core_chado_gffatts_schema () {
  3124. $description = array();
  3125. $description = array(
  3126. 'table' => 'gffatts',
  3127. // 'description' => 'TODO: please describe this table!',
  3128. 'fields' => array(
  3129. 'feature_id' => array(
  3130. // 'description' => 'TODO: please describe this field!',
  3131. 'type' => 'int',
  3132. 'not null' => '',
  3133. ),
  3134. 'type' => array(
  3135. // 'description' => 'TODO: please describe this field!',
  3136. 'type' => 'text',
  3137. 'not null' => '',
  3138. ),
  3139. 'attribute' => array(
  3140. // 'description' => 'TODO: please describe this field!',
  3141. 'type' => 'varchar',
  3142. 'not null' => '',
  3143. ),
  3144. ),
  3145. 'primary key' => array(
  3146. ),
  3147. 'unique keys' => array(
  3148. ),
  3149. 'indexes' => array(
  3150. ),
  3151. 'foreign keys' => array(
  3152. ),
  3153. );
  3154. return $description;
  3155. }
  3156. /**
  3157. * Implements hook_intron_combined_view_schema()
  3158. * Purpose: To describe the structure of intron_combined_view to tripal
  3159. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3160. * @see tripal_core.api.inc: tripal_core_chado_update()
  3161. * @see tripal_core.api.inc: tripal_core_chado_select()
  3162. *
  3163. * @return
  3164. * An array describing the current table
  3165. *
  3166. * @ingroup tripal_schema_api
  3167. *
  3168. */
  3169. function tripal_core_chado_intron_combined_view_schema () {
  3170. $description = array();
  3171. $description = array(
  3172. 'table' => 'intron_combined_view',
  3173. // 'description' => 'TODO: please describe this table!',
  3174. 'fields' => array(
  3175. 'exon1_id' => array(
  3176. // 'description' => 'TODO: please describe this field!',
  3177. 'type' => 'int',
  3178. 'not null' => '',
  3179. ),
  3180. 'exon2_id' => array(
  3181. // 'description' => 'TODO: please describe this field!',
  3182. 'type' => 'int',
  3183. 'not null' => '',
  3184. ),
  3185. 'fmin' => array(
  3186. // 'description' => 'TODO: please describe this field!',
  3187. 'type' => 'int',
  3188. 'not null' => '',
  3189. ),
  3190. 'fmax' => array(
  3191. // 'description' => 'TODO: please describe this field!',
  3192. 'type' => 'int',
  3193. 'not null' => '',
  3194. ),
  3195. 'strand' => array(
  3196. // 'description' => 'TODO: please describe this field!',
  3197. 'type' => 'int',
  3198. 'size' => 'small',
  3199. 'not null' => '',
  3200. ),
  3201. 'srcfeature_id' => array(
  3202. // 'description' => 'TODO: please describe this field!',
  3203. 'type' => 'int',
  3204. 'not null' => '',
  3205. ),
  3206. 'intron_rank' => array(
  3207. // 'description' => 'TODO: please describe this field!',
  3208. 'type' => 'int',
  3209. 'not null' => '',
  3210. ),
  3211. 'transcript_id' => array(
  3212. // 'description' => 'TODO: please describe this field!',
  3213. 'type' => 'int',
  3214. 'not null' => '',
  3215. ),
  3216. ),
  3217. 'primary key' => array(
  3218. ),
  3219. 'unique keys' => array(
  3220. ),
  3221. 'indexes' => array(
  3222. ),
  3223. 'foreign keys' => array(
  3224. ),
  3225. );
  3226. return $description;
  3227. }
  3228. /**
  3229. * Implements hook_project_schema()
  3230. * Purpose: To describe the structure of project to tripal
  3231. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3232. * @see tripal_core.api.inc: tripal_core_chado_update()
  3233. * @see tripal_core.api.inc: tripal_core_chado_select()
  3234. *
  3235. * @return
  3236. * An array describing the current table
  3237. *
  3238. * @ingroup tripal_schema_api
  3239. *
  3240. */
  3241. function tripal_core_chado_project_schema () {
  3242. $description = array();
  3243. $description = array(
  3244. 'table' => 'project',
  3245. // 'description' => 'TODO: please describe this table!',
  3246. 'fields' => array(
  3247. 'project_id' => array(
  3248. // 'description' => 'TODO: please describe this field!',
  3249. 'type' => 'serial',
  3250. 'not null' => '1',
  3251. ),
  3252. 'name' => array(
  3253. // 'description' => 'TODO: please describe this field!',
  3254. 'type' => 'varchar',
  3255. 'length' => '255',
  3256. 'not null' => '1',
  3257. ),
  3258. 'description' => array(
  3259. // 'description' => 'TODO: please describe this field!',
  3260. 'type' => 'varchar',
  3261. 'length' => '255',
  3262. 'not null' => '1',
  3263. ),
  3264. ),
  3265. 'primary key' => array(
  3266. '0' => 'project_id',
  3267. ),
  3268. 'unique keys' => array(
  3269. 'project_c1' => array(
  3270. '0' => 'name',
  3271. ),
  3272. ),
  3273. 'indexes' => array(
  3274. ),
  3275. 'foreign keys' => array(
  3276. ),
  3277. );
  3278. return $description;
  3279. }
  3280. /**
  3281. * Implements hook_protein_coding_gene_schema()
  3282. * Purpose: To describe the structure of protein_coding_gene to tripal
  3283. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3284. * @see tripal_core.api.inc: tripal_core_chado_update()
  3285. * @see tripal_core.api.inc: tripal_core_chado_select()
  3286. *
  3287. * @return
  3288. * An array describing the current table
  3289. *
  3290. * @ingroup tripal_schema_api
  3291. *
  3292. */
  3293. function tripal_core_chado_protein_coding_gene_schema () {
  3294. $description = array();
  3295. $description = array(
  3296. 'table' => 'protein_coding_gene',
  3297. // 'description' => 'TODO: please describe this table!',
  3298. 'fields' => array(
  3299. 'feature_id' => array(
  3300. // 'description' => 'TODO: please describe this field!',
  3301. 'type' => 'int',
  3302. 'not null' => '',
  3303. ),
  3304. 'dbxref_id' => array(
  3305. // 'description' => 'TODO: please describe this field!',
  3306. 'type' => 'int',
  3307. 'not null' => '',
  3308. ),
  3309. 'organism_id' => array(
  3310. // 'description' => 'TODO: please describe this field!',
  3311. 'type' => 'int',
  3312. 'not null' => '',
  3313. ),
  3314. 'name' => array(
  3315. // 'description' => 'TODO: please describe this field!',
  3316. 'type' => 'varchar',
  3317. 'length' => '255',
  3318. 'not null' => '',
  3319. ),
  3320. 'uniquename' => array(
  3321. // 'description' => 'TODO: please describe this field!',
  3322. 'type' => 'text',
  3323. 'not null' => '',
  3324. ),
  3325. 'residues' => array(
  3326. // 'description' => 'TODO: please describe this field!',
  3327. 'type' => 'text',
  3328. 'not null' => '',
  3329. ),
  3330. 'seqlen' => array(
  3331. // 'description' => 'TODO: please describe this field!',
  3332. 'type' => 'int',
  3333. 'not null' => '',
  3334. ),
  3335. 'md5checksum' => array(
  3336. // 'description' => 'TODO: please describe this field!',
  3337. 'type' => 'char',
  3338. 'length' => '32',
  3339. 'not null' => '',
  3340. ),
  3341. 'type_id' => array(
  3342. // 'description' => 'TODO: please describe this field!',
  3343. 'type' => 'int',
  3344. 'not null' => '',
  3345. ),
  3346. 'is_analysis' => array(
  3347. // 'description' => 'TODO: please describe this field!',
  3348. 'type' => 'boolean',
  3349. 'not null' => '',
  3350. ),
  3351. 'is_obsolete' => array(
  3352. // 'description' => 'TODO: please describe this field!',
  3353. 'type' => 'boolean',
  3354. 'not null' => '',
  3355. ),
  3356. 'timeaccessioned' => array(
  3357. // 'description' => 'TODO: please describe this field!',
  3358. 'type' => 'datetime',
  3359. 'not null' => '',
  3360. ),
  3361. 'timelastmodified' => array(
  3362. // 'description' => 'TODO: please describe this field!',
  3363. 'type' => 'datetime',
  3364. 'not null' => '',
  3365. ),
  3366. ),
  3367. 'primary key' => array(
  3368. ),
  3369. 'unique keys' => array(
  3370. ),
  3371. 'indexes' => array(
  3372. ),
  3373. 'foreign keys' => array(
  3374. ),
  3375. );
  3376. return $description;
  3377. }
  3378. /**
  3379. * Implements hook_studyfactorvalue_schema()
  3380. * Purpose: To describe the structure of studyfactorvalue to tripal
  3381. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3382. * @see tripal_core.api.inc: tripal_core_chado_update()
  3383. * @see tripal_core.api.inc: tripal_core_chado_select()
  3384. *
  3385. * @return
  3386. * An array describing the current table
  3387. *
  3388. * @ingroup tripal_schema_api
  3389. *
  3390. */
  3391. function tripal_core_chado_studyfactorvalue_schema () {
  3392. $description = array();
  3393. $description = array(
  3394. 'table' => 'studyfactorvalue',
  3395. // 'description' => 'TODO: please describe this table!',
  3396. 'fields' => array(
  3397. 'studyfactorvalue_id' => array(
  3398. // 'description' => 'TODO: please describe this field!',
  3399. 'type' => 'serial',
  3400. 'not null' => '1',
  3401. ),
  3402. 'studyfactor_id' => array(
  3403. // 'description' => 'TODO: please describe this field!',
  3404. 'type' => 'int',
  3405. 'not null' => '1',
  3406. ),
  3407. 'assay_id' => array(
  3408. // 'description' => 'TODO: please describe this field!',
  3409. 'type' => 'int',
  3410. 'not null' => '1',
  3411. ),
  3412. 'factorvalue' => array(
  3413. // 'description' => 'TODO: please describe this field!',
  3414. 'type' => 'text',
  3415. 'not null' => '',
  3416. ),
  3417. 'name' => array(
  3418. // 'description' => 'TODO: please describe this field!',
  3419. 'type' => 'text',
  3420. 'not null' => '',
  3421. ),
  3422. 'rank' => array(
  3423. // 'description' => 'TODO: please describe this field!',
  3424. 'type' => 'int',
  3425. 'not null' => '1',
  3426. 'default' => '0',
  3427. ),
  3428. ),
  3429. 'primary key' => array(
  3430. '0' => 'studyfactorvalue_id',
  3431. ),
  3432. 'unique keys' => array(
  3433. ),
  3434. 'indexes' => array(
  3435. 'studyfactorvalue_idx1' => array(
  3436. '0' => 'studyfactor_id',
  3437. ),
  3438. 'studyfactorvalue_idx2' => array(
  3439. '0' => 'assay_id',
  3440. ),
  3441. ),
  3442. 'foreign keys' => array(
  3443. ),
  3444. );
  3445. return $description;
  3446. }
  3447. /**
  3448. * Implements hook_studyfactor_schema()
  3449. * Purpose: To describe the structure of studyfactor to tripal
  3450. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3451. * @see tripal_core.api.inc: tripal_core_chado_update()
  3452. * @see tripal_core.api.inc: tripal_core_chado_select()
  3453. *
  3454. * @return
  3455. * An array describing the current table
  3456. *
  3457. * @ingroup tripal_schema_api
  3458. *
  3459. */
  3460. function tripal_core_chado_studyfactor_schema () {
  3461. $description = array();
  3462. $description = array(
  3463. 'table' => 'studyfactor',
  3464. // 'description' => 'TODO: please describe this table!',
  3465. 'fields' => array(
  3466. 'studyfactor_id' => array(
  3467. // 'description' => 'TODO: please describe this field!',
  3468. 'type' => 'serial',
  3469. 'not null' => '1',
  3470. ),
  3471. 'studydesign_id' => array(
  3472. // 'description' => 'TODO: please describe this field!',
  3473. 'type' => 'int',
  3474. 'not null' => '1',
  3475. ),
  3476. 'type_id' => array(
  3477. // 'description' => 'TODO: please describe this field!',
  3478. 'type' => 'int',
  3479. 'not null' => '',
  3480. ),
  3481. 'name' => array(
  3482. // 'description' => 'TODO: please describe this field!',
  3483. 'type' => 'text',
  3484. 'not null' => '1',
  3485. ),
  3486. 'description' => array(
  3487. // 'description' => 'TODO: please describe this field!',
  3488. 'type' => 'text',
  3489. 'not null' => '',
  3490. ),
  3491. ),
  3492. 'primary key' => array(
  3493. '0' => 'studyfactor_id',
  3494. ),
  3495. 'unique keys' => array(
  3496. ),
  3497. 'indexes' => array(
  3498. 'studyfactor_idx1' => array(
  3499. '0' => 'studydesign_id',
  3500. ),
  3501. 'studyfactor_idx2' => array(
  3502. '0' => 'type_id',
  3503. ),
  3504. ),
  3505. 'foreign keys' => array(
  3506. ),
  3507. );
  3508. return $description;
  3509. }
  3510. /**
  3511. * Implements hook_studyprop_schema()
  3512. * Purpose: To describe the structure of studyprop to tripal
  3513. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3514. * @see tripal_core.api.inc: tripal_core_chado_update()
  3515. * @see tripal_core.api.inc: tripal_core_chado_select()
  3516. *
  3517. * @return
  3518. * An array describing the current table
  3519. *
  3520. * @ingroup tripal_schema_api
  3521. *
  3522. */
  3523. function tripal_core_chado_studyprop_schema () {
  3524. $description = array();
  3525. $description = array(
  3526. 'table' => 'studyprop',
  3527. // 'description' => 'TODO: please describe this table!',
  3528. 'fields' => array(
  3529. 'studyprop_id' => array(
  3530. // 'description' => 'TODO: please describe this field!',
  3531. 'type' => 'serial',
  3532. 'not null' => '1',
  3533. ),
  3534. 'study_id' => array(
  3535. // 'description' => 'TODO: please describe this field!',
  3536. 'type' => 'int',
  3537. 'not null' => '1',
  3538. ),
  3539. 'type_id' => array(
  3540. // 'description' => 'TODO: please describe this field!',
  3541. 'type' => 'int',
  3542. 'not null' => '1',
  3543. ),
  3544. 'value' => array(
  3545. // 'description' => 'TODO: please describe this field!',
  3546. 'type' => 'text',
  3547. 'not null' => '',
  3548. ),
  3549. 'rank' => array(
  3550. // 'description' => 'TODO: please describe this field!',
  3551. 'type' => 'int',
  3552. 'not null' => '1',
  3553. 'default' => '0',
  3554. ),
  3555. ),
  3556. 'primary key' => array(
  3557. '0' => 'studyprop_id',
  3558. ),
  3559. 'unique keys' => array(
  3560. 'study_id' => array(
  3561. '0' => 'study_id',
  3562. '1' => 'type_id',
  3563. '2' => 'rank',
  3564. ),
  3565. ),
  3566. 'indexes' => array(
  3567. 'studyprop_idx1' => array(
  3568. '0' => 'study_id',
  3569. ),
  3570. 'studyprop_idx2' => array(
  3571. '0' => 'type_id',
  3572. ),
  3573. ),
  3574. 'foreign keys' => array(
  3575. ),
  3576. );
  3577. return $description;
  3578. }
  3579. /**
  3580. * Implements hook_studyprop_feature_schema()
  3581. * Purpose: To describe the structure of studyprop_feature to tripal
  3582. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3583. * @see tripal_core.api.inc: tripal_core_chado_update()
  3584. * @see tripal_core.api.inc: tripal_core_chado_select()
  3585. *
  3586. * @return
  3587. * An array describing the current table
  3588. *
  3589. * @ingroup tripal_schema_api
  3590. *
  3591. */
  3592. function tripal_core_chado_studyprop_feature_schema () {
  3593. $description = array();
  3594. $description = array(
  3595. 'table' => 'studyprop_feature',
  3596. // 'description' => 'TODO: please describe this table!',
  3597. 'fields' => array(
  3598. 'studyprop_feature_id' => array(
  3599. // 'description' => 'TODO: please describe this field!',
  3600. 'type' => 'serial',
  3601. 'not null' => '1',
  3602. ),
  3603. 'studyprop_id' => array(
  3604. // 'description' => 'TODO: please describe this field!',
  3605. 'type' => 'int',
  3606. 'not null' => '1',
  3607. ),
  3608. 'feature_id' => array(
  3609. // 'description' => 'TODO: please describe this field!',
  3610. 'type' => 'int',
  3611. 'not null' => '1',
  3612. ),
  3613. 'type_id' => array(
  3614. // 'description' => 'TODO: please describe this field!',
  3615. 'type' => 'int',
  3616. 'not null' => '',
  3617. ),
  3618. ),
  3619. 'primary key' => array(
  3620. '0' => 'studyprop_feature_id',
  3621. ),
  3622. 'unique keys' => array(
  3623. 'studyprop_id' => array(
  3624. '0' => 'studyprop_id',
  3625. '1' => 'feature_id',
  3626. ),
  3627. ),
  3628. 'indexes' => array(
  3629. 'studyprop_feature_idx1' => array(
  3630. '0' => 'studyprop_id',
  3631. ),
  3632. 'studyprop_feature_idx2' => array(
  3633. '0' => 'feature_id',
  3634. ),
  3635. ),
  3636. 'foreign keys' => array(
  3637. ),
  3638. );
  3639. return $description;
  3640. }
  3641. /**
  3642. * Implements hook_synonym_schema()
  3643. * Purpose: To describe the structure of synonym to tripal
  3644. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3645. * @see tripal_core.api.inc: tripal_core_chado_update()
  3646. * @see tripal_core.api.inc: tripal_core_chado_select()
  3647. *
  3648. * @return
  3649. * An array describing the current table
  3650. *
  3651. * @ingroup tripal_schema_api
  3652. *
  3653. */
  3654. function tripal_core_chado_synonym_schema () {
  3655. $description = array();
  3656. $description = array(
  3657. 'table' => 'synonym',
  3658. // 'description' => 'TODO: please describe this table!',
  3659. 'fields' => array(
  3660. 'synonym_id' => array(
  3661. // 'description' => 'TODO: please describe this field!',
  3662. 'type' => 'serial',
  3663. 'not null' => '1',
  3664. ),
  3665. 'name' => array(
  3666. // 'description' => 'TODO: please describe this field!',
  3667. 'type' => 'varchar',
  3668. 'length' => '255',
  3669. 'not null' => '1',
  3670. ),
  3671. 'type_id' => array(
  3672. // 'description' => 'TODO: please describe this field!',
  3673. 'type' => 'int',
  3674. 'not null' => '1',
  3675. ),
  3676. 'synonym_sgml' => array(
  3677. // 'description' => 'TODO: please describe this field!',
  3678. 'type' => 'varchar',
  3679. 'length' => '255',
  3680. 'not null' => '1',
  3681. ),
  3682. ),
  3683. 'primary key' => array(
  3684. '0' => 'synonym_id',
  3685. ),
  3686. 'unique keys' => array(
  3687. 'synonym_c1' => array(
  3688. '0' => 'name',
  3689. '1' => 'type_id',
  3690. ),
  3691. ),
  3692. 'indexes' => array(
  3693. 'synonym_idx1' => array(
  3694. '0' => 'type_id',
  3695. ),
  3696. ),
  3697. 'foreign keys' => array(
  3698. ),
  3699. );
  3700. return $description;
  3701. }
  3702. /**
  3703. * Implements hook_studydesignprop_schema()
  3704. * Purpose: To describe the structure of studydesignprop to tripal
  3705. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3706. * @see tripal_core.api.inc: tripal_core_chado_update()
  3707. * @see tripal_core.api.inc: tripal_core_chado_select()
  3708. *
  3709. * @return
  3710. * An array describing the current table
  3711. *
  3712. * @ingroup tripal_schema_api
  3713. *
  3714. */
  3715. function tripal_core_chado_studydesignprop_schema () {
  3716. $description = array();
  3717. $description = array(
  3718. 'table' => 'studydesignprop',
  3719. // 'description' => 'TODO: please describe this table!',
  3720. 'fields' => array(
  3721. 'studydesignprop_id' => array(
  3722. // 'description' => 'TODO: please describe this field!',
  3723. 'type' => 'serial',
  3724. 'not null' => '1',
  3725. ),
  3726. 'studydesign_id' => array(
  3727. // 'description' => 'TODO: please describe this field!',
  3728. 'type' => 'int',
  3729. 'not null' => '1',
  3730. ),
  3731. 'type_id' => array(
  3732. // 'description' => 'TODO: please describe this field!',
  3733. 'type' => 'int',
  3734. 'not null' => '1',
  3735. ),
  3736. 'value' => array(
  3737. // 'description' => 'TODO: please describe this field!',
  3738. 'type' => 'text',
  3739. 'not null' => '',
  3740. ),
  3741. 'rank' => array(
  3742. // 'description' => 'TODO: please describe this field!',
  3743. 'type' => 'int',
  3744. 'not null' => '1',
  3745. 'default' => '0',
  3746. ),
  3747. ),
  3748. 'primary key' => array(
  3749. '0' => 'studydesignprop_id',
  3750. ),
  3751. 'unique keys' => array(
  3752. 'studydesignprop_c1' => array(
  3753. '0' => 'studydesign_id',
  3754. '1' => 'type_id',
  3755. '2' => 'rank',
  3756. ),
  3757. ),
  3758. 'indexes' => array(
  3759. 'studydesignprop_idx1' => array(
  3760. '0' => 'studydesign_id',
  3761. ),
  3762. 'studydesignprop_idx2' => array(
  3763. '0' => 'type_id',
  3764. ),
  3765. ),
  3766. 'foreign keys' => array(
  3767. ),
  3768. );
  3769. return $description;
  3770. }
  3771. /**
  3772. * Implements hook_studydesign_schema()
  3773. * Purpose: To describe the structure of studydesign to tripal
  3774. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3775. * @see tripal_core.api.inc: tripal_core_chado_update()
  3776. * @see tripal_core.api.inc: tripal_core_chado_select()
  3777. *
  3778. * @return
  3779. * An array describing the current table
  3780. *
  3781. * @ingroup tripal_schema_api
  3782. *
  3783. */
  3784. function tripal_core_chado_studydesign_schema () {
  3785. $description = array();
  3786. $description = array(
  3787. 'table' => 'studydesign',
  3788. // 'description' => 'TODO: please describe this table!',
  3789. 'fields' => array(
  3790. 'studydesign_id' => array(
  3791. // 'description' => 'TODO: please describe this field!',
  3792. 'type' => 'serial',
  3793. 'not null' => '1',
  3794. ),
  3795. 'study_id' => array(
  3796. // 'description' => 'TODO: please describe this field!',
  3797. 'type' => 'int',
  3798. 'not null' => '1',
  3799. ),
  3800. 'description' => array(
  3801. // 'description' => 'TODO: please describe this field!',
  3802. 'type' => 'text',
  3803. 'not null' => '',
  3804. ),
  3805. ),
  3806. 'primary key' => array(
  3807. '0' => 'studydesign_id',
  3808. ),
  3809. 'unique keys' => array(
  3810. ),
  3811. 'indexes' => array(
  3812. 'studydesign_idx1' => array(
  3813. '0' => 'study_id',
  3814. ),
  3815. ),
  3816. 'foreign keys' => array(
  3817. ),
  3818. );
  3819. return $description;
  3820. }
  3821. /**
  3822. * Implements hook_stockprop_schema()
  3823. * Purpose: To describe the structure of stockprop to tripal
  3824. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3825. * @see tripal_core.api.inc: tripal_core_chado_update()
  3826. * @see tripal_core.api.inc: tripal_core_chado_select()
  3827. *
  3828. * @return
  3829. * An array describing the current table
  3830. *
  3831. * @ingroup tripal_schema_api
  3832. *
  3833. */
  3834. function tripal_core_chado_stockprop_schema () {
  3835. $description = array();
  3836. $description = array(
  3837. 'table' => 'stockprop',
  3838. // 'description' => 'TODO: please describe this table!',
  3839. 'fields' => array(
  3840. 'stockprop_id' => array(
  3841. // 'description' => 'TODO: please describe this field!',
  3842. 'type' => 'serial',
  3843. 'not null' => '1',
  3844. ),
  3845. 'stock_id' => array(
  3846. // 'description' => 'TODO: please describe this field!',
  3847. 'type' => 'int',
  3848. 'not null' => '1',
  3849. ),
  3850. 'type_id' => array(
  3851. // 'description' => 'TODO: please describe this field!',
  3852. 'type' => 'int',
  3853. 'not null' => '1',
  3854. ),
  3855. 'value' => array(
  3856. // 'description' => 'TODO: please describe this field!',
  3857. 'type' => 'text',
  3858. 'not null' => '',
  3859. ),
  3860. 'rank' => array(
  3861. // 'description' => 'TODO: please describe this field!',
  3862. 'type' => 'int',
  3863. 'not null' => '1',
  3864. 'default' => '0',
  3865. ),
  3866. ),
  3867. 'primary key' => array(
  3868. '0' => 'stockprop_id',
  3869. ),
  3870. 'unique keys' => array(
  3871. 'stockprop_c1' => array(
  3872. '0' => 'stock_id',
  3873. '1' => 'type_id',
  3874. '2' => 'rank',
  3875. ),
  3876. ),
  3877. 'indexes' => array(
  3878. 'stockprop_idx1' => array(
  3879. '0' => 'stock_id',
  3880. ),
  3881. 'stockprop_idx2' => array(
  3882. '0' => 'type_id',
  3883. ),
  3884. ),
  3885. 'foreign keys' => array(
  3886. ),
  3887. );
  3888. return $description;
  3889. }
  3890. /**
  3891. * Implements hook_stockprop_pub_schema()
  3892. * Purpose: To describe the structure of stockprop_pub to tripal
  3893. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3894. * @see tripal_core.api.inc: tripal_core_chado_update()
  3895. * @see tripal_core.api.inc: tripal_core_chado_select()
  3896. *
  3897. * @return
  3898. * An array describing the current table
  3899. *
  3900. * @ingroup tripal_schema_api
  3901. *
  3902. */
  3903. function tripal_core_chado_stockprop_pub_schema () {
  3904. $description = array();
  3905. $description = array(
  3906. 'table' => 'stockprop_pub',
  3907. // 'description' => 'TODO: please describe this table!',
  3908. 'fields' => array(
  3909. 'stockprop_pub_id' => array(
  3910. // 'description' => 'TODO: please describe this field!',
  3911. 'type' => 'serial',
  3912. 'not null' => '1',
  3913. ),
  3914. 'stockprop_id' => array(
  3915. // 'description' => 'TODO: please describe this field!',
  3916. 'type' => 'int',
  3917. 'not null' => '1',
  3918. ),
  3919. 'pub_id' => array(
  3920. // 'description' => 'TODO: please describe this field!',
  3921. 'type' => 'int',
  3922. 'not null' => '1',
  3923. ),
  3924. ),
  3925. 'primary key' => array(
  3926. '0' => 'stockprop_pub_id',
  3927. ),
  3928. 'unique keys' => array(
  3929. 'stockprop_pub_c1' => array(
  3930. '0' => 'stockprop_id',
  3931. '1' => 'pub_id',
  3932. ),
  3933. ),
  3934. 'indexes' => array(
  3935. 'stockprop_pub_idx1' => array(
  3936. '0' => 'stockprop_id',
  3937. ),
  3938. 'stockprop_pub_idx2' => array(
  3939. '0' => 'pub_id',
  3940. ),
  3941. ),
  3942. 'foreign keys' => array(
  3943. ),
  3944. );
  3945. return $description;
  3946. }
  3947. /**
  3948. * Implements hook_study_schema()
  3949. * Purpose: To describe the structure of study to tripal
  3950. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3951. * @see tripal_core.api.inc: tripal_core_chado_update()
  3952. * @see tripal_core.api.inc: tripal_core_chado_select()
  3953. *
  3954. * @return
  3955. * An array describing the current table
  3956. *
  3957. * @ingroup tripal_schema_api
  3958. *
  3959. */
  3960. function tripal_core_chado_study_schema () {
  3961. $description = array();
  3962. $description = array(
  3963. 'table' => 'study',
  3964. // 'description' => 'TODO: please describe this table!',
  3965. 'fields' => array(
  3966. 'study_id' => array(
  3967. // 'description' => 'TODO: please describe this field!',
  3968. 'type' => 'serial',
  3969. 'not null' => '1',
  3970. ),
  3971. 'contact_id' => array(
  3972. // 'description' => 'TODO: please describe this field!',
  3973. 'type' => 'int',
  3974. 'not null' => '1',
  3975. ),
  3976. 'pub_id' => array(
  3977. // 'description' => 'TODO: please describe this field!',
  3978. 'type' => 'int',
  3979. 'not null' => '',
  3980. ),
  3981. 'dbxref_id' => array(
  3982. // 'description' => 'TODO: please describe this field!',
  3983. 'type' => 'int',
  3984. 'not null' => '',
  3985. ),
  3986. 'name' => array(
  3987. // 'description' => 'TODO: please describe this field!',
  3988. 'type' => 'text',
  3989. 'not null' => '1',
  3990. ),
  3991. 'description' => array(
  3992. // 'description' => 'TODO: please describe this field!',
  3993. 'type' => 'text',
  3994. 'not null' => '',
  3995. ),
  3996. ),
  3997. 'primary key' => array(
  3998. '0' => 'study_id',
  3999. ),
  4000. 'unique keys' => array(
  4001. 'study_c1' => array(
  4002. '0' => 'name',
  4003. ),
  4004. ),
  4005. 'indexes' => array(
  4006. 'study_idx1' => array(
  4007. '0' => 'contact_id',
  4008. ),
  4009. 'study_idx2' => array(
  4010. '0' => 'pub_id',
  4011. ),
  4012. 'study_idx3' => array(
  4013. '0' => 'dbxref_id',
  4014. ),
  4015. ),
  4016. 'foreign keys' => array(
  4017. ),
  4018. );
  4019. return $description;
  4020. }
  4021. /**
  4022. * Implements hook_study_assay_schema()
  4023. * Purpose: To describe the structure of study_assay to tripal
  4024. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4025. * @see tripal_core.api.inc: tripal_core_chado_update()
  4026. * @see tripal_core.api.inc: tripal_core_chado_select()
  4027. *
  4028. * @return
  4029. * An array describing the current table
  4030. *
  4031. * @ingroup tripal_schema_api
  4032. *
  4033. */
  4034. function tripal_core_chado_study_assay_schema () {
  4035. $description = array();
  4036. $description = array(
  4037. 'table' => 'study_assay',
  4038. // 'description' => 'TODO: please describe this table!',
  4039. 'fields' => array(
  4040. 'study_assay_id' => array(
  4041. // 'description' => 'TODO: please describe this field!',
  4042. 'type' => 'serial',
  4043. 'not null' => '1',
  4044. ),
  4045. 'study_id' => array(
  4046. // 'description' => 'TODO: please describe this field!',
  4047. 'type' => 'int',
  4048. 'not null' => '1',
  4049. ),
  4050. 'assay_id' => array(
  4051. // 'description' => 'TODO: please describe this field!',
  4052. 'type' => 'int',
  4053. 'not null' => '1',
  4054. ),
  4055. ),
  4056. 'primary key' => array(
  4057. '0' => 'study_assay_id',
  4058. ),
  4059. 'unique keys' => array(
  4060. 'study_assay_c1' => array(
  4061. '0' => 'study_id',
  4062. '1' => 'assay_id',
  4063. ),
  4064. ),
  4065. 'indexes' => array(
  4066. 'study_assay_idx1' => array(
  4067. '0' => 'study_id',
  4068. ),
  4069. 'study_assay_idx2' => array(
  4070. '0' => 'assay_id',
  4071. ),
  4072. ),
  4073. 'foreign keys' => array(
  4074. ),
  4075. );
  4076. return $description;
  4077. }
  4078. /**
  4079. * Implements hook_tableinfo_schema()
  4080. * Purpose: To describe the structure of tableinfo to tripal
  4081. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4082. * @see tripal_core.api.inc: tripal_core_chado_update()
  4083. * @see tripal_core.api.inc: tripal_core_chado_select()
  4084. *
  4085. * @return
  4086. * An array describing the current table
  4087. *
  4088. * @ingroup tripal_schema_api
  4089. *
  4090. */
  4091. function tripal_core_chado_tableinfo_schema () {
  4092. $description = array();
  4093. $description = array(
  4094. 'table' => 'tableinfo',
  4095. // 'description' => 'TODO: please describe this table!',
  4096. 'fields' => array(
  4097. 'tableinfo_id' => array(
  4098. // 'description' => 'TODO: please describe this field!',
  4099. 'type' => 'serial',
  4100. 'not null' => '1',
  4101. ),
  4102. 'name' => array(
  4103. // 'description' => 'TODO: please describe this field!',
  4104. 'type' => 'varchar',
  4105. 'length' => '30',
  4106. 'not null' => '1',
  4107. ),
  4108. 'primary_key_column' => array(
  4109. // 'description' => 'TODO: please describe this field!',
  4110. 'type' => 'varchar',
  4111. 'length' => '30',
  4112. 'not null' => '',
  4113. ),
  4114. 'is_view' => array(
  4115. // 'description' => 'TODO: please describe this field!',
  4116. 'type' => 'int',
  4117. 'not null' => '1',
  4118. 'default' => '0',
  4119. ),
  4120. 'view_on_table_id' => array(
  4121. // 'description' => 'TODO: please describe this field!',
  4122. 'type' => 'int',
  4123. 'not null' => '',
  4124. ),
  4125. 'superclass_table_id' => array(
  4126. // 'description' => 'TODO: please describe this field!',
  4127. 'type' => 'int',
  4128. 'not null' => '',
  4129. ),
  4130. 'is_updateable' => array(
  4131. // 'description' => 'TODO: please describe this field!',
  4132. 'type' => 'int',
  4133. 'not null' => '1',
  4134. 'default' => '1',
  4135. ),
  4136. 'modification_date' => array(
  4137. // 'description' => 'TODO: please describe this field!',
  4138. 'type' => 'date',
  4139. 'not null' => '1',
  4140. 'default' => 'ow(',
  4141. ),
  4142. ),
  4143. 'primary key' => array(
  4144. '0' => 'tableinfo_id',
  4145. ),
  4146. 'unique keys' => array(
  4147. 'tableinfo_c1' => array(
  4148. '0' => 'name',
  4149. ),
  4150. ),
  4151. 'indexes' => array(
  4152. ),
  4153. 'foreign keys' => array(
  4154. ),
  4155. );
  4156. return $description;
  4157. }
  4158. /**
  4159. * Implements hook_treatment_schema()
  4160. * Purpose: To describe the structure of treatment to tripal
  4161. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4162. * @see tripal_core.api.inc: tripal_core_chado_update()
  4163. * @see tripal_core.api.inc: tripal_core_chado_select()
  4164. *
  4165. * @return
  4166. * An array describing the current table
  4167. *
  4168. * @ingroup tripal_schema_api
  4169. *
  4170. */
  4171. function tripal_core_chado_treatment_schema () {
  4172. $description = array();
  4173. $description = array(
  4174. 'table' => 'treatment',
  4175. // 'description' => 'TODO: please describe this table!',
  4176. 'fields' => array(
  4177. 'treatment_id' => array(
  4178. // 'description' => 'TODO: please describe this field!',
  4179. 'type' => 'serial',
  4180. 'not null' => '1',
  4181. ),
  4182. 'rank' => array(
  4183. // 'description' => 'TODO: please describe this field!',
  4184. 'type' => 'int',
  4185. 'not null' => '1',
  4186. 'default' => '0',
  4187. ),
  4188. 'biomaterial_id' => array(
  4189. // 'description' => 'TODO: please describe this field!',
  4190. 'type' => 'int',
  4191. 'not null' => '1',
  4192. ),
  4193. 'type_id' => array(
  4194. // 'description' => 'TODO: please describe this field!',
  4195. 'type' => 'int',
  4196. 'not null' => '1',
  4197. ),
  4198. 'protocol_id' => array(
  4199. // 'description' => 'TODO: please describe this field!',
  4200. 'type' => 'int',
  4201. 'not null' => '',
  4202. ),
  4203. 'name' => array(
  4204. // 'description' => 'TODO: please describe this field!',
  4205. 'type' => 'text',
  4206. 'not null' => '',
  4207. ),
  4208. ),
  4209. 'primary key' => array(
  4210. '0' => 'treatment_id',
  4211. ),
  4212. 'unique keys' => array(
  4213. ),
  4214. 'indexes' => array(
  4215. 'treatment_idx1' => array(
  4216. '0' => 'biomaterial_id',
  4217. ),
  4218. 'treatment_idx2' => array(
  4219. '0' => 'type_id',
  4220. ),
  4221. 'treatment_idx3' => array(
  4222. '0' => 'protocol_id',
  4223. ),
  4224. ),
  4225. 'foreign keys' => array(
  4226. ),
  4227. );
  4228. return $description;
  4229. }
  4230. /**
  4231. * Implements hook_tripal_obo_schema()
  4232. * Purpose: To describe the structure of tripal_obo to tripal
  4233. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4234. * @see tripal_core.api.inc: tripal_core_chado_update()
  4235. * @see tripal_core.api.inc: tripal_core_chado_select()
  4236. *
  4237. * @return
  4238. * An array describing the current table
  4239. *
  4240. * @ingroup tripal_schema_api
  4241. *
  4242. */
  4243. function tripal_core_chado_tripal_obo_schema () {
  4244. $description = array();
  4245. $description = array(
  4246. 'table' => 'tripal_obo',
  4247. // 'description' => 'TODO: please describe this table!',
  4248. 'fields' => array(
  4249. 'cv_id' => array(
  4250. // 'description' => 'TODO: please describe this field!',
  4251. 'type' => 'int',
  4252. 'unsigned' => '1',
  4253. 'not null' => '1',
  4254. 'default' => '0',
  4255. ),
  4256. 'file' => array(
  4257. // 'description' => 'TODO: please describe this field!',
  4258. 'type' => 'varchar',
  4259. 'length' => '1024',
  4260. 'not null' => '',
  4261. ),
  4262. 'url' => array(
  4263. // 'description' => 'TODO: please describe this field!',
  4264. 'type' => 'varchar',
  4265. 'length' => '1024',
  4266. 'not null' => '',
  4267. ),
  4268. ),
  4269. 'primary key' => array(
  4270. '0' => 'cv_id',
  4271. ),
  4272. 'unique keys' => array(
  4273. ),
  4274. 'indexes' => array(
  4275. 'cv_id' => array(
  4276. '0' => 'cv_id',
  4277. ),
  4278. ),
  4279. 'foreign keys' => array(
  4280. ),
  4281. );
  4282. return $description;
  4283. }
  4284. /**
  4285. * Implements hook_tripal_organism_views_common_name_schema()
  4286. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4287. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4288. * @see tripal_core.api.inc: tripal_core_chado_update()
  4289. * @see tripal_core.api.inc: tripal_core_chado_select()
  4290. *
  4291. * @return
  4292. * An array describing the current table
  4293. *
  4294. * @ingroup tripal_schema_api
  4295. *
  4296. */
  4297. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4298. $description = array();
  4299. $description = array(
  4300. 'table' => 'tripal_organism_views_common_name',
  4301. // 'description' => 'TODO: please describe this table!',
  4302. 'fields' => array(
  4303. 'nid' => array(
  4304. // 'description' => 'TODO: please describe this field!',
  4305. 'type' => 'int',
  4306. 'unsigned' => '1',
  4307. 'not null' => '1',
  4308. 'default' => '0',
  4309. ),
  4310. 'common_name' => array(
  4311. // 'description' => 'TODO: please describe this field!',
  4312. 'type' => 'varchar',
  4313. 'length' => '255',
  4314. 'not null' => '1',
  4315. 'default' => 'NA',
  4316. ),
  4317. ),
  4318. 'primary key' => array(
  4319. ),
  4320. 'unique keys' => array(
  4321. ),
  4322. 'indexes' => array(
  4323. ),
  4324. 'foreign keys' => array(
  4325. ),
  4326. );
  4327. return $description;
  4328. }
  4329. /**
  4330. * Implements hook_type_feature_count_schema()
  4331. * Purpose: To describe the structure of type_feature_count to tripal
  4332. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4333. * @see tripal_core.api.inc: tripal_core_chado_update()
  4334. * @see tripal_core.api.inc: tripal_core_chado_select()
  4335. *
  4336. * @return
  4337. * An array describing the current table
  4338. *
  4339. * @ingroup tripal_schema_api
  4340. *
  4341. */
  4342. function tripal_core_chado_type_feature_count_schema () {
  4343. $description = array();
  4344. $description = array(
  4345. 'table' => 'type_feature_count',
  4346. // 'description' => 'TODO: please describe this table!',
  4347. 'fields' => array(
  4348. 'type' => array(
  4349. // 'description' => 'TODO: please describe this field!',
  4350. 'type' => 'varchar',
  4351. 'length' => '1024',
  4352. 'not null' => '',
  4353. ),
  4354. 'num_features' => array(
  4355. // 'description' => 'TODO: please describe this field!',
  4356. 'type' => 'int',
  4357. 'size' => 'big',
  4358. 'not null' => '',
  4359. ),
  4360. ),
  4361. 'primary key' => array(
  4362. ),
  4363. 'unique keys' => array(
  4364. ),
  4365. 'indexes' => array(
  4366. ),
  4367. 'foreign keys' => array(
  4368. ),
  4369. );
  4370. return $description;
  4371. }
  4372. /**
  4373. * Implements hook_stockcollectionprop_schema()
  4374. * Purpose: To describe the structure of stockcollectionprop to tripal
  4375. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4376. * @see tripal_core.api.inc: tripal_core_chado_update()
  4377. * @see tripal_core.api.inc: tripal_core_chado_select()
  4378. *
  4379. * @return
  4380. * An array describing the current table
  4381. *
  4382. * @ingroup tripal_schema_api
  4383. *
  4384. */
  4385. function tripal_core_chado_stockcollectionprop_schema () {
  4386. $description = array();
  4387. $description = array(
  4388. 'table' => 'stockcollectionprop',
  4389. // 'description' => 'TODO: please describe this table!',
  4390. 'fields' => array(
  4391. 'stockcollectionprop_id' => array(
  4392. // 'description' => 'TODO: please describe this field!',
  4393. 'type' => 'serial',
  4394. 'not null' => '1',
  4395. ),
  4396. 'stockcollection_id' => array(
  4397. // 'description' => 'TODO: please describe this field!',
  4398. 'type' => 'int',
  4399. 'not null' => '1',
  4400. ),
  4401. 'type_id' => array(
  4402. // 'description' => 'TODO: please describe this field!',
  4403. 'type' => 'int',
  4404. 'not null' => '1',
  4405. ),
  4406. 'value' => array(
  4407. // 'description' => 'TODO: please describe this field!',
  4408. 'type' => 'text',
  4409. 'not null' => '',
  4410. ),
  4411. 'rank' => array(
  4412. // 'description' => 'TODO: please describe this field!',
  4413. 'type' => 'int',
  4414. 'not null' => '1',
  4415. 'default' => '0',
  4416. ),
  4417. ),
  4418. 'primary key' => array(
  4419. '0' => 'stockcollectionprop_id',
  4420. ),
  4421. 'unique keys' => array(
  4422. 'stockcollectionprop_c1' => array(
  4423. '0' => 'stockcollection_id',
  4424. '1' => 'type_id',
  4425. '2' => 'rank',
  4426. ),
  4427. ),
  4428. 'indexes' => array(
  4429. 'stockcollectionprop_idx1' => array(
  4430. '0' => 'stockcollection_id',
  4431. ),
  4432. 'stockcollectionprop_idx2' => array(
  4433. '0' => 'type_id',
  4434. ),
  4435. ),
  4436. 'foreign keys' => array(
  4437. ),
  4438. );
  4439. return $description;
  4440. }
  4441. /**
  4442. * Implements hook_stockcollection_stock_schema()
  4443. * Purpose: To describe the structure of stockcollection_stock to tripal
  4444. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4445. * @see tripal_core.api.inc: tripal_core_chado_update()
  4446. * @see tripal_core.api.inc: tripal_core_chado_select()
  4447. *
  4448. * @return
  4449. * An array describing the current table
  4450. *
  4451. * @ingroup tripal_schema_api
  4452. *
  4453. */
  4454. function tripal_core_chado_stockcollection_stock_schema () {
  4455. $description = array();
  4456. $description = array(
  4457. 'table' => 'stockcollection_stock',
  4458. // 'description' => 'TODO: please describe this table!',
  4459. 'fields' => array(
  4460. 'stockcollection_stock_id' => array(
  4461. // 'description' => 'TODO: please describe this field!',
  4462. 'type' => 'serial',
  4463. 'not null' => '1',
  4464. ),
  4465. 'stockcollection_id' => array(
  4466. // 'description' => 'TODO: please describe this field!',
  4467. 'type' => 'int',
  4468. 'not null' => '1',
  4469. ),
  4470. 'stock_id' => array(
  4471. // 'description' => 'TODO: please describe this field!',
  4472. 'type' => 'int',
  4473. 'not null' => '1',
  4474. ),
  4475. ),
  4476. 'primary key' => array(
  4477. '0' => 'stockcollection_stock_id',
  4478. ),
  4479. 'unique keys' => array(
  4480. 'stockcollection_stock_c1' => array(
  4481. '0' => 'stockcollection_id',
  4482. '1' => 'stock_id',
  4483. ),
  4484. ),
  4485. 'indexes' => array(
  4486. 'stockcollection_stock_idx1' => array(
  4487. '0' => 'stockcollection_id',
  4488. ),
  4489. 'stockcollection_stock_idx2' => array(
  4490. '0' => 'stock_id',
  4491. ),
  4492. ),
  4493. 'foreign keys' => array(
  4494. ),
  4495. );
  4496. return $description;
  4497. }
  4498. /**
  4499. * Implements hook_public_feature_schema()
  4500. * Purpose: To describe the structure of public_feature to tripal
  4501. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4502. * @see tripal_core.api.inc: tripal_core_chado_update()
  4503. * @see tripal_core.api.inc: tripal_core_chado_select()
  4504. *
  4505. * @return
  4506. * An array describing the current table
  4507. *
  4508. * @ingroup tripal_schema_api
  4509. *
  4510. */
  4511. function tripal_core_chado_public_feature_schema () {
  4512. $description = array();
  4513. $description = array(
  4514. 'table' => 'public_feature',
  4515. // 'description' => 'TODO: please describe this table!',
  4516. 'fields' => array(
  4517. 'vid' => array(
  4518. // 'description' => 'TODO: please describe this field!',
  4519. 'type' => 'int',
  4520. 'unsigned' => '1',
  4521. 'not null' => '1',
  4522. 'default' => '0',
  4523. ),
  4524. 'nid' => array(
  4525. // 'description' => 'TODO: please describe this field!',
  4526. 'type' => 'int',
  4527. 'unsigned' => '1',
  4528. 'not null' => '1',
  4529. 'default' => '0',
  4530. ),
  4531. 'feature_id' => array(
  4532. // 'description' => 'TODO: please describe this field!',
  4533. 'type' => 'int',
  4534. 'not null' => '1',
  4535. 'default' => '0',
  4536. ),
  4537. 'sync_date' => array(
  4538. // 'description' => 'TODO: please describe this field!',
  4539. 'type' => 'int',
  4540. 'not null' => '',
  4541. ),
  4542. ),
  4543. 'primary key' => array(
  4544. '0' => 'nid',
  4545. ),
  4546. 'unique keys' => array(
  4547. 'nid_vid' => array(
  4548. '0' => 'nid',
  4549. '1' => 'vid',
  4550. ),
  4551. 'vid' => array(
  4552. '0' => 'vid',
  4553. ),
  4554. ),
  4555. 'indexes' => array(
  4556. 'feature_id' => array(
  4557. '0' => 'feature_id',
  4558. ),
  4559. ),
  4560. 'foreign keys' => array(
  4561. ),
  4562. );
  4563. return $description;
  4564. }
  4565. /**
  4566. * Implements hook_public_library_schema()
  4567. * Purpose: To describe the structure of public_library to tripal
  4568. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4569. * @see tripal_core.api.inc: tripal_core_chado_update()
  4570. * @see tripal_core.api.inc: tripal_core_chado_select()
  4571. *
  4572. * @return
  4573. * An array describing the current table
  4574. *
  4575. * @ingroup tripal_schema_api
  4576. *
  4577. */
  4578. function tripal_core_chado_public_library_schema () {
  4579. $description = array();
  4580. $description = array(
  4581. 'table' => 'public_library',
  4582. // 'description' => 'TODO: please describe this table!',
  4583. 'fields' => array(
  4584. 'vid' => array(
  4585. // 'description' => 'TODO: please describe this field!',
  4586. 'type' => 'int',
  4587. 'unsigned' => '1',
  4588. 'not null' => '1',
  4589. 'default' => '0',
  4590. ),
  4591. 'nid' => array(
  4592. // 'description' => 'TODO: please describe this field!',
  4593. 'type' => 'int',
  4594. 'unsigned' => '1',
  4595. 'not null' => '1',
  4596. 'default' => '0',
  4597. ),
  4598. 'library_id' => array(
  4599. // 'description' => 'TODO: please describe this field!',
  4600. 'type' => 'int',
  4601. 'not null' => '1',
  4602. 'default' => '0',
  4603. ),
  4604. ),
  4605. 'primary key' => array(
  4606. '0' => 'nid',
  4607. ),
  4608. 'unique keys' => array(
  4609. 'nid_vid' => array(
  4610. '0' => 'nid',
  4611. '1' => 'vid',
  4612. ),
  4613. 'vid' => array(
  4614. '0' => 'vid',
  4615. ),
  4616. ),
  4617. 'indexes' => array(
  4618. 'library_id' => array(
  4619. '0' => 'library_id',
  4620. ),
  4621. ),
  4622. 'foreign keys' => array(
  4623. ),
  4624. );
  4625. return $description;
  4626. }
  4627. /**
  4628. * Implements hook_public_organism_schema()
  4629. * Purpose: To describe the structure of public_organism to tripal
  4630. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4631. * @see tripal_core.api.inc: tripal_core_chado_update()
  4632. * @see tripal_core.api.inc: tripal_core_chado_select()
  4633. *
  4634. * @return
  4635. * An array describing the current table
  4636. *
  4637. * @ingroup tripal_schema_api
  4638. *
  4639. */
  4640. function tripal_core_chado_public_organism_schema () {
  4641. $description = array();
  4642. $description = array(
  4643. 'table' => 'public_organism',
  4644. // 'description' => 'TODO: please describe this table!',
  4645. 'fields' => array(
  4646. 'vid' => array(
  4647. // 'description' => 'TODO: please describe this field!',
  4648. 'type' => 'int',
  4649. 'unsigned' => '1',
  4650. 'not null' => '1',
  4651. 'default' => '0',
  4652. ),
  4653. 'nid' => array(
  4654. // 'description' => 'TODO: please describe this field!',
  4655. 'type' => 'int',
  4656. 'unsigned' => '1',
  4657. 'not null' => '1',
  4658. 'default' => '0',
  4659. ),
  4660. 'organism_id' => array(
  4661. // 'description' => 'TODO: please describe this field!',
  4662. 'type' => 'int',
  4663. 'not null' => '1',
  4664. 'default' => '0',
  4665. ),
  4666. ),
  4667. 'primary key' => array(
  4668. '0' => 'nid',
  4669. ),
  4670. 'unique keys' => array(
  4671. 'nid_vid' => array(
  4672. '0' => 'nid',
  4673. '1' => 'vid',
  4674. ),
  4675. 'vid' => array(
  4676. '0' => 'vid',
  4677. ),
  4678. ),
  4679. 'indexes' => array(
  4680. 'organism_id' => array(
  4681. '0' => 'organism_id',
  4682. ),
  4683. ),
  4684. 'foreign keys' => array(
  4685. ),
  4686. );
  4687. return $description;
  4688. }
  4689. /**
  4690. * Implements hook_pubprop_schema()
  4691. * Purpose: To describe the structure of pubprop to tripal
  4692. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4693. * @see tripal_core.api.inc: tripal_core_chado_update()
  4694. * @see tripal_core.api.inc: tripal_core_chado_select()
  4695. *
  4696. * @return
  4697. * An array describing the current table
  4698. *
  4699. * @ingroup tripal_schema_api
  4700. *
  4701. */
  4702. function tripal_core_chado_pubprop_schema () {
  4703. $description = array();
  4704. $description = array(
  4705. 'table' => 'pubprop',
  4706. // 'description' => 'TODO: please describe this table!',
  4707. 'fields' => array(
  4708. 'pubprop_id' => array(
  4709. // 'description' => 'TODO: please describe this field!',
  4710. 'type' => 'serial',
  4711. 'not null' => '1',
  4712. ),
  4713. 'pub_id' => array(
  4714. // 'description' => 'TODO: please describe this field!',
  4715. 'type' => 'int',
  4716. 'not null' => '1',
  4717. ),
  4718. 'type_id' => array(
  4719. // 'description' => 'TODO: please describe this field!',
  4720. 'type' => 'int',
  4721. 'not null' => '1',
  4722. ),
  4723. 'value' => array(
  4724. // 'description' => 'TODO: please describe this field!',
  4725. 'type' => 'text',
  4726. 'not null' => '1',
  4727. ),
  4728. 'rank' => array(
  4729. // 'description' => 'TODO: please describe this field!',
  4730. 'type' => 'int',
  4731. 'not null' => '',
  4732. ),
  4733. ),
  4734. 'primary key' => array(
  4735. '0' => 'pubprop_id',
  4736. ),
  4737. 'unique keys' => array(
  4738. 'pubprop_c1' => array(
  4739. '0' => 'pub_id',
  4740. '1' => 'type_id',
  4741. '2' => 'rank',
  4742. ),
  4743. ),
  4744. 'indexes' => array(
  4745. 'pubprop_idx1' => array(
  4746. '0' => 'pub_id',
  4747. ),
  4748. 'pubprop_idx2' => array(
  4749. '0' => 'type_id',
  4750. ),
  4751. ),
  4752. 'foreign keys' => array(
  4753. ),
  4754. );
  4755. return $description;
  4756. }
  4757. /**
  4758. * Implements hook_pubauthor_schema()
  4759. * Purpose: To describe the structure of pubauthor to tripal
  4760. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4761. * @see tripal_core.api.inc: tripal_core_chado_update()
  4762. * @see tripal_core.api.inc: tripal_core_chado_select()
  4763. *
  4764. * @return
  4765. * An array describing the current table
  4766. *
  4767. * @ingroup tripal_schema_api
  4768. *
  4769. */
  4770. function tripal_core_chado_pubauthor_schema () {
  4771. $description = array();
  4772. $description = array(
  4773. 'table' => 'pubauthor',
  4774. // 'description' => 'TODO: please describe this table!',
  4775. 'fields' => array(
  4776. 'pubauthor_id' => array(
  4777. // 'description' => 'TODO: please describe this field!',
  4778. 'type' => 'serial',
  4779. 'not null' => '1',
  4780. ),
  4781. 'pub_id' => array(
  4782. // 'description' => 'TODO: please describe this field!',
  4783. 'type' => 'int',
  4784. 'not null' => '1',
  4785. ),
  4786. 'rank' => array(
  4787. // 'description' => 'TODO: please describe this field!',
  4788. 'type' => 'int',
  4789. 'not null' => '1',
  4790. ),
  4791. 'editor' => array(
  4792. // 'description' => 'TODO: please describe this field!',
  4793. 'type' => 'boolean',
  4794. 'not null' => '',
  4795. 'default' => 'als',
  4796. ),
  4797. 'surname' => array(
  4798. // 'description' => 'TODO: please describe this field!',
  4799. 'type' => 'varchar',
  4800. 'length' => '100',
  4801. 'not null' => '1',
  4802. ),
  4803. 'givennames' => array(
  4804. // 'description' => 'TODO: please describe this field!',
  4805. 'type' => 'varchar',
  4806. 'length' => '100',
  4807. 'not null' => '',
  4808. ),
  4809. 'suffix' => array(
  4810. // 'description' => 'TODO: please describe this field!',
  4811. 'type' => 'varchar',
  4812. 'length' => '100',
  4813. 'not null' => '',
  4814. ),
  4815. ),
  4816. 'primary key' => array(
  4817. '0' => 'pubauthor_id',
  4818. ),
  4819. 'unique keys' => array(
  4820. 'pubauthor_c1' => array(
  4821. '0' => 'pub_id',
  4822. '1' => 'rank',
  4823. ),
  4824. ),
  4825. 'indexes' => array(
  4826. 'pubauthor_idx2' => array(
  4827. '0' => 'pub_id',
  4828. ),
  4829. ),
  4830. 'foreign keys' => array(
  4831. ),
  4832. );
  4833. return $description;
  4834. }
  4835. /**
  4836. * Implements hook_pub_relationship_schema()
  4837. * Purpose: To describe the structure of pub_relationship to tripal
  4838. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4839. * @see tripal_core.api.inc: tripal_core_chado_update()
  4840. * @see tripal_core.api.inc: tripal_core_chado_select()
  4841. *
  4842. * @return
  4843. * An array describing the current table
  4844. *
  4845. * @ingroup tripal_schema_api
  4846. *
  4847. */
  4848. function tripal_core_chado_pub_relationship_schema () {
  4849. $description = array();
  4850. $description = array(
  4851. 'table' => 'pub_relationship',
  4852. // 'description' => 'TODO: please describe this table!',
  4853. 'fields' => array(
  4854. 'pub_relationship_id' => array(
  4855. // 'description' => 'TODO: please describe this field!',
  4856. 'type' => 'serial',
  4857. 'not null' => '1',
  4858. ),
  4859. 'subject_id' => array(
  4860. // 'description' => 'TODO: please describe this field!',
  4861. 'type' => 'int',
  4862. 'not null' => '1',
  4863. ),
  4864. 'object_id' => array(
  4865. // 'description' => 'TODO: please describe this field!',
  4866. 'type' => 'int',
  4867. 'not null' => '1',
  4868. ),
  4869. 'type_id' => array(
  4870. // 'description' => 'TODO: please describe this field!',
  4871. 'type' => 'int',
  4872. 'not null' => '1',
  4873. ),
  4874. ),
  4875. 'primary key' => array(
  4876. '0' => 'pub_relationship_id',
  4877. ),
  4878. 'unique keys' => array(
  4879. 'pub_relationship_c1' => array(
  4880. '0' => 'subject_id',
  4881. '1' => 'object_id',
  4882. '2' => 'type_id',
  4883. ),
  4884. ),
  4885. 'indexes' => array(
  4886. 'pub_relationship_idx1' => array(
  4887. '0' => 'subject_id',
  4888. ),
  4889. 'pub_relationship_idx2' => array(
  4890. '0' => 'object_id',
  4891. ),
  4892. 'pub_relationship_idx3' => array(
  4893. '0' => 'type_id',
  4894. ),
  4895. ),
  4896. 'foreign keys' => array(
  4897. ),
  4898. );
  4899. return $description;
  4900. }
  4901. /**
  4902. * Implements hook_protocol_schema()
  4903. * Purpose: To describe the structure of protocol to tripal
  4904. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4905. * @see tripal_core.api.inc: tripal_core_chado_update()
  4906. * @see tripal_core.api.inc: tripal_core_chado_select()
  4907. *
  4908. * @return
  4909. * An array describing the current table
  4910. *
  4911. * @ingroup tripal_schema_api
  4912. *
  4913. */
  4914. function tripal_core_chado_protocol_schema () {
  4915. $description = array();
  4916. $description = array(
  4917. 'table' => 'protocol',
  4918. // 'description' => 'TODO: please describe this table!',
  4919. 'fields' => array(
  4920. 'protocol_id' => array(
  4921. // 'description' => 'TODO: please describe this field!',
  4922. 'type' => 'serial',
  4923. 'not null' => '1',
  4924. ),
  4925. 'type_id' => array(
  4926. // 'description' => 'TODO: please describe this field!',
  4927. 'type' => 'int',
  4928. 'not null' => '1',
  4929. ),
  4930. 'pub_id' => array(
  4931. // 'description' => 'TODO: please describe this field!',
  4932. 'type' => 'int',
  4933. 'not null' => '',
  4934. ),
  4935. 'dbxref_id' => array(
  4936. // 'description' => 'TODO: please describe this field!',
  4937. 'type' => 'int',
  4938. 'not null' => '',
  4939. ),
  4940. 'name' => array(
  4941. // 'description' => 'TODO: please describe this field!',
  4942. 'type' => 'text',
  4943. 'not null' => '1',
  4944. ),
  4945. 'uri' => array(
  4946. // 'description' => 'TODO: please describe this field!',
  4947. 'type' => 'text',
  4948. 'not null' => '',
  4949. ),
  4950. 'protocoldescription' => array(
  4951. // 'description' => 'TODO: please describe this field!',
  4952. 'type' => 'text',
  4953. 'not null' => '',
  4954. ),
  4955. 'hardwaredescription' => array(
  4956. // 'description' => 'TODO: please describe this field!',
  4957. 'type' => 'text',
  4958. 'not null' => '',
  4959. ),
  4960. 'softwaredescription' => array(
  4961. // 'description' => 'TODO: please describe this field!',
  4962. 'type' => 'text',
  4963. 'not null' => '',
  4964. ),
  4965. ),
  4966. 'primary key' => array(
  4967. '0' => 'protocol_id',
  4968. ),
  4969. 'unique keys' => array(
  4970. 'protocol_c1' => array(
  4971. '0' => 'name',
  4972. ),
  4973. ),
  4974. 'indexes' => array(
  4975. 'protocol_idx1' => array(
  4976. '0' => 'type_id',
  4977. ),
  4978. 'protocol_idx2' => array(
  4979. '0' => 'pub_id',
  4980. ),
  4981. 'protocol_idx3' => array(
  4982. '0' => 'dbxref_id',
  4983. ),
  4984. ),
  4985. 'foreign keys' => array(
  4986. ),
  4987. );
  4988. return $description;
  4989. }
  4990. /**
  4991. * Implements hook_protocolparam_schema()
  4992. * Purpose: To describe the structure of protocolparam to tripal
  4993. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4994. * @see tripal_core.api.inc: tripal_core_chado_update()
  4995. * @see tripal_core.api.inc: tripal_core_chado_select()
  4996. *
  4997. * @return
  4998. * An array describing the current table
  4999. *
  5000. * @ingroup tripal_schema_api
  5001. *
  5002. */
  5003. function tripal_core_chado_protocolparam_schema () {
  5004. $description = array();
  5005. $description = array(
  5006. 'table' => 'protocolparam',
  5007. // 'description' => 'TODO: please describe this table!',
  5008. 'fields' => array(
  5009. 'protocolparam_id' => array(
  5010. // 'description' => 'TODO: please describe this field!',
  5011. 'type' => 'serial',
  5012. 'not null' => '1',
  5013. ),
  5014. 'protocol_id' => array(
  5015. // 'description' => 'TODO: please describe this field!',
  5016. 'type' => 'int',
  5017. 'not null' => '1',
  5018. ),
  5019. 'name' => array(
  5020. // 'description' => 'TODO: please describe this field!',
  5021. 'type' => 'text',
  5022. 'not null' => '1',
  5023. ),
  5024. 'datatype_id' => array(
  5025. // 'description' => 'TODO: please describe this field!',
  5026. 'type' => 'int',
  5027. 'not null' => '',
  5028. ),
  5029. 'unittype_id' => array(
  5030. // 'description' => 'TODO: please describe this field!',
  5031. 'type' => 'int',
  5032. 'not null' => '',
  5033. ),
  5034. 'value' => array(
  5035. // 'description' => 'TODO: please describe this field!',
  5036. 'type' => 'text',
  5037. 'not null' => '',
  5038. ),
  5039. 'rank' => array(
  5040. // 'description' => 'TODO: please describe this field!',
  5041. 'type' => 'int',
  5042. 'not null' => '1',
  5043. 'default' => '0',
  5044. ),
  5045. ),
  5046. 'primary key' => array(
  5047. '0' => 'protocolparam_id',
  5048. ),
  5049. 'unique keys' => array(
  5050. ),
  5051. 'indexes' => array(
  5052. 'protocolparam_idx1' => array(
  5053. '0' => 'protocol_id',
  5054. ),
  5055. 'protocolparam_idx2' => array(
  5056. '0' => 'datatype_id',
  5057. ),
  5058. 'protocolparam_idx3' => array(
  5059. '0' => 'unittype_id',
  5060. ),
  5061. ),
  5062. 'foreign keys' => array(
  5063. ),
  5064. );
  5065. return $description;
  5066. }
  5067. /**
  5068. * Implements hook_pub_schema()
  5069. * Purpose: To describe the structure of pub to tripal
  5070. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5071. * @see tripal_core.api.inc: tripal_core_chado_update()
  5072. * @see tripal_core.api.inc: tripal_core_chado_select()
  5073. *
  5074. * @return
  5075. * An array describing the current table
  5076. *
  5077. * @ingroup tripal_schema_api
  5078. *
  5079. */
  5080. function tripal_core_chado_pub_schema () {
  5081. $description = array();
  5082. $description = array(
  5083. 'table' => 'pub',
  5084. // 'description' => 'TODO: please describe this table!',
  5085. 'fields' => array(
  5086. 'pub_id' => array(
  5087. // 'description' => 'TODO: please describe this field!',
  5088. 'type' => 'serial',
  5089. 'not null' => '1',
  5090. ),
  5091. 'title' => array(
  5092. // 'description' => 'TODO: please describe this field!',
  5093. 'type' => 'text',
  5094. 'not null' => '',
  5095. ),
  5096. 'volumetitle' => array(
  5097. // 'description' => 'TODO: please describe this field!',
  5098. 'type' => 'text',
  5099. 'not null' => '',
  5100. ),
  5101. 'volume' => array(
  5102. // 'description' => 'TODO: please describe this field!',
  5103. 'type' => 'varchar',
  5104. 'length' => '255',
  5105. 'not null' => '',
  5106. ),
  5107. 'series_name' => array(
  5108. // 'description' => 'TODO: please describe this field!',
  5109. 'type' => 'varchar',
  5110. 'length' => '255',
  5111. 'not null' => '',
  5112. ),
  5113. 'issue' => array(
  5114. // 'description' => 'TODO: please describe this field!',
  5115. 'type' => 'varchar',
  5116. 'length' => '255',
  5117. 'not null' => '',
  5118. ),
  5119. 'pyear' => array(
  5120. // 'description' => 'TODO: please describe this field!',
  5121. 'type' => 'varchar',
  5122. 'length' => '255',
  5123. 'not null' => '',
  5124. ),
  5125. 'pages' => array(
  5126. // 'description' => 'TODO: please describe this field!',
  5127. 'type' => 'varchar',
  5128. 'length' => '255',
  5129. 'not null' => '',
  5130. ),
  5131. 'miniref' => array(
  5132. // 'description' => 'TODO: please describe this field!',
  5133. 'type' => 'varchar',
  5134. 'length' => '255',
  5135. 'not null' => '',
  5136. ),
  5137. 'uniquename' => array(
  5138. // 'description' => 'TODO: please describe this field!',
  5139. 'type' => 'text',
  5140. 'not null' => '1',
  5141. ),
  5142. 'type_id' => array(
  5143. // 'description' => 'TODO: please describe this field!',
  5144. 'type' => 'int',
  5145. 'not null' => '1',
  5146. ),
  5147. 'is_obsolete' => array(
  5148. // 'description' => 'TODO: please describe this field!',
  5149. 'type' => 'boolean',
  5150. 'not null' => '',
  5151. 'default' => 'als',
  5152. ),
  5153. 'publisher' => array(
  5154. // 'description' => 'TODO: please describe this field!',
  5155. 'type' => 'varchar',
  5156. 'length' => '255',
  5157. 'not null' => '',
  5158. ),
  5159. 'pubplace' => array(
  5160. // 'description' => 'TODO: please describe this field!',
  5161. 'type' => 'varchar',
  5162. 'length' => '255',
  5163. 'not null' => '',
  5164. ),
  5165. ),
  5166. 'primary key' => array(
  5167. '0' => 'pub_id',
  5168. ),
  5169. 'unique keys' => array(
  5170. 'pub_c1' => array(
  5171. '0' => 'uniquename',
  5172. ),
  5173. ),
  5174. 'indexes' => array(
  5175. 'pub_idx1' => array(
  5176. '0' => 'type_id',
  5177. ),
  5178. ),
  5179. 'foreign keys' => array(
  5180. ),
  5181. );
  5182. return $description;
  5183. }
  5184. /**
  5185. * Implements hook_pub_dbxref_schema()
  5186. * Purpose: To describe the structure of pub_dbxref to tripal
  5187. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5188. * @see tripal_core.api.inc: tripal_core_chado_update()
  5189. * @see tripal_core.api.inc: tripal_core_chado_select()
  5190. *
  5191. * @return
  5192. * An array describing the current table
  5193. *
  5194. * @ingroup tripal_schema_api
  5195. *
  5196. */
  5197. function tripal_core_chado_pub_dbxref_schema () {
  5198. $description = array();
  5199. $description = array(
  5200. 'table' => 'pub_dbxref',
  5201. // 'description' => 'TODO: please describe this table!',
  5202. 'fields' => array(
  5203. 'pub_dbxref_id' => array(
  5204. // 'description' => 'TODO: please describe this field!',
  5205. 'type' => 'serial',
  5206. 'not null' => '1',
  5207. ),
  5208. 'pub_id' => array(
  5209. // 'description' => 'TODO: please describe this field!',
  5210. 'type' => 'int',
  5211. 'not null' => '1',
  5212. ),
  5213. 'dbxref_id' => array(
  5214. // 'description' => 'TODO: please describe this field!',
  5215. 'type' => 'int',
  5216. 'not null' => '1',
  5217. ),
  5218. 'is_current' => array(
  5219. // 'description' => 'TODO: please describe this field!',
  5220. 'type' => 'boolean',
  5221. 'not null' => '1',
  5222. 'default' => 'ru',
  5223. ),
  5224. ),
  5225. 'primary key' => array(
  5226. '0' => 'pub_dbxref_id',
  5227. ),
  5228. 'unique keys' => array(
  5229. 'pub_dbxref_c1' => array(
  5230. '0' => 'pub_id',
  5231. '1' => 'dbxref_id',
  5232. ),
  5233. ),
  5234. 'indexes' => array(
  5235. 'pub_dbxref_idx1' => array(
  5236. '0' => 'pub_id',
  5237. ),
  5238. 'pub_dbxref_idx2' => array(
  5239. '0' => 'dbxref_id',
  5240. ),
  5241. ),
  5242. 'foreign keys' => array(
  5243. ),
  5244. );
  5245. return $description;
  5246. }
  5247. /**
  5248. * Implements hook_quantification_schema()
  5249. * Purpose: To describe the structure of quantification to tripal
  5250. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5251. * @see tripal_core.api.inc: tripal_core_chado_update()
  5252. * @see tripal_core.api.inc: tripal_core_chado_select()
  5253. *
  5254. * @return
  5255. * An array describing the current table
  5256. *
  5257. * @ingroup tripal_schema_api
  5258. *
  5259. */
  5260. function tripal_core_chado_quantification_schema () {
  5261. $description = array();
  5262. $description = array(
  5263. 'table' => 'quantification',
  5264. // 'description' => 'TODO: please describe this table!',
  5265. 'fields' => array(
  5266. 'quantification_id' => array(
  5267. // 'description' => 'TODO: please describe this field!',
  5268. 'type' => 'serial',
  5269. 'not null' => '1',
  5270. ),
  5271. 'acquisition_id' => array(
  5272. // 'description' => 'TODO: please describe this field!',
  5273. 'type' => 'int',
  5274. 'not null' => '1',
  5275. ),
  5276. 'operator_id' => array(
  5277. // 'description' => 'TODO: please describe this field!',
  5278. 'type' => 'int',
  5279. 'not null' => '',
  5280. ),
  5281. 'protocol_id' => array(
  5282. // 'description' => 'TODO: please describe this field!',
  5283. 'type' => 'int',
  5284. 'not null' => '',
  5285. ),
  5286. 'analysis_id' => array(
  5287. // 'description' => 'TODO: please describe this field!',
  5288. 'type' => 'int',
  5289. 'not null' => '1',
  5290. ),
  5291. 'quantificationdate' => array(
  5292. // 'description' => 'TODO: please describe this field!',
  5293. 'type' => 'datetime',
  5294. 'not null' => '',
  5295. 'default' => 'ow(',
  5296. ),
  5297. 'name' => array(
  5298. // 'description' => 'TODO: please describe this field!',
  5299. 'type' => 'text',
  5300. 'not null' => '',
  5301. ),
  5302. 'uri' => array(
  5303. // 'description' => 'TODO: please describe this field!',
  5304. 'type' => 'text',
  5305. 'not null' => '',
  5306. ),
  5307. ),
  5308. 'primary key' => array(
  5309. '0' => 'quantification_id',
  5310. ),
  5311. 'unique keys' => array(
  5312. 'quantification_c1' => array(
  5313. '0' => 'name',
  5314. '1' => 'analysis_id',
  5315. ),
  5316. ),
  5317. 'indexes' => array(
  5318. 'quantification_idx1' => array(
  5319. '0' => 'acquisition_id',
  5320. ),
  5321. 'quantification_idx2' => array(
  5322. '0' => 'operator_id',
  5323. ),
  5324. 'quantification_idx3' => array(
  5325. '0' => 'protocol_id',
  5326. ),
  5327. 'quantification_idx4' => array(
  5328. '0' => 'analysis_id',
  5329. ),
  5330. ),
  5331. 'foreign keys' => array(
  5332. ),
  5333. );
  5334. return $description;
  5335. }
  5336. /**
  5337. * Implements hook_quantification_relationship_schema()
  5338. * Purpose: To describe the structure of quantification_relationship to tripal
  5339. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5340. * @see tripal_core.api.inc: tripal_core_chado_update()
  5341. * @see tripal_core.api.inc: tripal_core_chado_select()
  5342. *
  5343. * @return
  5344. * An array describing the current table
  5345. *
  5346. * @ingroup tripal_schema_api
  5347. *
  5348. */
  5349. function tripal_core_chado_quantification_relationship_schema () {
  5350. $description = array();
  5351. $description = array(
  5352. 'table' => 'quantification_relationship',
  5353. // 'description' => 'TODO: please describe this table!',
  5354. 'fields' => array(
  5355. 'quantification_relationship_id' => array(
  5356. // 'description' => 'TODO: please describe this field!',
  5357. 'type' => 'serial',
  5358. 'not null' => '1',
  5359. ),
  5360. 'subject_id' => array(
  5361. // 'description' => 'TODO: please describe this field!',
  5362. 'type' => 'int',
  5363. 'not null' => '1',
  5364. ),
  5365. 'type_id' => array(
  5366. // 'description' => 'TODO: please describe this field!',
  5367. 'type' => 'int',
  5368. 'not null' => '1',
  5369. ),
  5370. 'object_id' => array(
  5371. // 'description' => 'TODO: please describe this field!',
  5372. 'type' => 'int',
  5373. 'not null' => '1',
  5374. ),
  5375. ),
  5376. 'primary key' => array(
  5377. '0' => 'quantification_relationship_id',
  5378. ),
  5379. 'unique keys' => array(
  5380. 'quantification_relationship_c1' => array(
  5381. '0' => 'subject_id',
  5382. '1' => 'object_id',
  5383. '2' => 'type_id',
  5384. ),
  5385. ),
  5386. 'indexes' => array(
  5387. 'quantification_relationship_idx1' => array(
  5388. '0' => 'subject_id',
  5389. ),
  5390. 'quantification_relationship_idx2' => array(
  5391. '0' => 'type_id',
  5392. ),
  5393. 'quantification_relationship_idx3' => array(
  5394. '0' => 'object_id',
  5395. ),
  5396. ),
  5397. 'foreign keys' => array(
  5398. ),
  5399. );
  5400. return $description;
  5401. }
  5402. /**
  5403. * Implements hook_stock_pub_schema()
  5404. * Purpose: To describe the structure of stock_pub to tripal
  5405. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5406. * @see tripal_core.api.inc: tripal_core_chado_update()
  5407. * @see tripal_core.api.inc: tripal_core_chado_select()
  5408. *
  5409. * @return
  5410. * An array describing the current table
  5411. *
  5412. * @ingroup tripal_schema_api
  5413. *
  5414. */
  5415. function tripal_core_chado_stock_pub_schema () {
  5416. $description = array();
  5417. $description = array(
  5418. 'table' => 'stock_pub',
  5419. // 'description' => 'TODO: please describe this table!',
  5420. 'fields' => array(
  5421. 'stock_pub_id' => array(
  5422. // 'description' => 'TODO: please describe this field!',
  5423. 'type' => 'serial',
  5424. 'not null' => '1',
  5425. ),
  5426. 'stock_id' => array(
  5427. // 'description' => 'TODO: please describe this field!',
  5428. 'type' => 'int',
  5429. 'not null' => '1',
  5430. ),
  5431. 'pub_id' => array(
  5432. // 'description' => 'TODO: please describe this field!',
  5433. 'type' => 'int',
  5434. 'not null' => '1',
  5435. ),
  5436. ),
  5437. 'primary key' => array(
  5438. '0' => 'stock_pub_id',
  5439. ),
  5440. 'unique keys' => array(
  5441. 'stock_pub_c1' => array(
  5442. '0' => 'stock_id',
  5443. '1' => 'pub_id',
  5444. ),
  5445. ),
  5446. 'indexes' => array(
  5447. 'stock_pub_idx1' => array(
  5448. '0' => 'stock_id',
  5449. ),
  5450. 'stock_pub_idx2' => array(
  5451. '0' => 'pub_id',
  5452. ),
  5453. ),
  5454. 'foreign keys' => array(
  5455. ),
  5456. );
  5457. return $description;
  5458. }
  5459. /**
  5460. * Implements hook_stock_relationship_schema()
  5461. * Purpose: To describe the structure of stock_relationship to tripal
  5462. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5463. * @see tripal_core.api.inc: tripal_core_chado_update()
  5464. * @see tripal_core.api.inc: tripal_core_chado_select()
  5465. *
  5466. * @return
  5467. * An array describing the current table
  5468. *
  5469. * @ingroup tripal_schema_api
  5470. *
  5471. */
  5472. function tripal_core_chado_stock_relationship_schema () {
  5473. $description = array();
  5474. $description = array(
  5475. 'table' => 'stock_relationship',
  5476. // 'description' => 'TODO: please describe this table!',
  5477. 'fields' => array(
  5478. 'stock_relationship_id' => array(
  5479. // 'description' => 'TODO: please describe this field!',
  5480. 'type' => 'serial',
  5481. 'not null' => '1',
  5482. ),
  5483. 'subject_id' => array(
  5484. // 'description' => 'TODO: please describe this field!',
  5485. 'type' => 'int',
  5486. 'not null' => '1',
  5487. ),
  5488. 'object_id' => array(
  5489. // 'description' => 'TODO: please describe this field!',
  5490. 'type' => 'int',
  5491. 'not null' => '1',
  5492. ),
  5493. 'type_id' => array(
  5494. // 'description' => 'TODO: please describe this field!',
  5495. 'type' => 'int',
  5496. 'not null' => '1',
  5497. ),
  5498. 'value' => array(
  5499. // 'description' => 'TODO: please describe this field!',
  5500. 'type' => 'text',
  5501. 'not null' => '',
  5502. ),
  5503. 'rank' => array(
  5504. // 'description' => 'TODO: please describe this field!',
  5505. 'type' => 'int',
  5506. 'not null' => '1',
  5507. 'default' => '0',
  5508. ),
  5509. ),
  5510. 'primary key' => array(
  5511. '0' => 'stock_relationship_id',
  5512. ),
  5513. 'unique keys' => array(
  5514. 'stock_relationship_c1' => array(
  5515. '0' => 'subject_id',
  5516. '1' => 'object_id',
  5517. '2' => 'type_id',
  5518. '3' => 'rank',
  5519. ),
  5520. ),
  5521. 'indexes' => array(
  5522. 'stock_relationship_idx1' => array(
  5523. '0' => 'subject_id',
  5524. ),
  5525. 'stock_relationship_idx2' => array(
  5526. '0' => 'object_id',
  5527. ),
  5528. 'stock_relationship_idx3' => array(
  5529. '0' => 'type_id',
  5530. ),
  5531. ),
  5532. 'foreign keys' => array(
  5533. ),
  5534. );
  5535. return $description;
  5536. }
  5537. /**
  5538. * Implements hook_stock_relationship_pub_schema()
  5539. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5540. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5541. * @see tripal_core.api.inc: tripal_core_chado_update()
  5542. * @see tripal_core.api.inc: tripal_core_chado_select()
  5543. *
  5544. * @return
  5545. * An array describing the current table
  5546. *
  5547. * @ingroup tripal_schema_api
  5548. *
  5549. */
  5550. function tripal_core_chado_stock_relationship_pub_schema () {
  5551. $description = array();
  5552. $description = array(
  5553. 'table' => 'stock_relationship_pub',
  5554. // 'description' => 'TODO: please describe this table!',
  5555. 'fields' => array(
  5556. 'stock_relationship_pub_id' => array(
  5557. // 'description' => 'TODO: please describe this field!',
  5558. 'type' => 'serial',
  5559. 'not null' => '1',
  5560. ),
  5561. 'stock_relationship_id' => array(
  5562. // 'description' => 'TODO: please describe this field!',
  5563. 'type' => 'int',
  5564. 'not null' => '1',
  5565. ),
  5566. 'pub_id' => array(
  5567. // 'description' => 'TODO: please describe this field!',
  5568. 'type' => 'int',
  5569. 'not null' => '1',
  5570. ),
  5571. ),
  5572. 'primary key' => array(
  5573. '0' => 'stock_relationship_pub_id',
  5574. ),
  5575. 'unique keys' => array(
  5576. 'stock_relationship_pub_c1' => array(
  5577. '0' => 'stock_relationship_id',
  5578. '1' => 'pub_id',
  5579. ),
  5580. ),
  5581. 'indexes' => array(
  5582. 'stock_relationship_pub_idx1' => array(
  5583. '0' => 'stock_relationship_id',
  5584. ),
  5585. 'stock_relationship_pub_idx2' => array(
  5586. '0' => 'pub_id',
  5587. ),
  5588. ),
  5589. 'foreign keys' => array(
  5590. ),
  5591. );
  5592. return $description;
  5593. }
  5594. /**
  5595. * Implements hook_stockcollection_schema()
  5596. * Purpose: To describe the structure of stockcollection to tripal
  5597. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5598. * @see tripal_core.api.inc: tripal_core_chado_update()
  5599. * @see tripal_core.api.inc: tripal_core_chado_select()
  5600. *
  5601. * @return
  5602. * An array describing the current table
  5603. *
  5604. * @ingroup tripal_schema_api
  5605. *
  5606. */
  5607. function tripal_core_chado_stockcollection_schema () {
  5608. $description = array();
  5609. $description = array(
  5610. 'table' => 'stockcollection',
  5611. // 'description' => 'TODO: please describe this table!',
  5612. 'fields' => array(
  5613. 'stockcollection_id' => array(
  5614. // 'description' => 'TODO: please describe this field!',
  5615. 'type' => 'serial',
  5616. 'not null' => '1',
  5617. ),
  5618. 'type_id' => array(
  5619. // 'description' => 'TODO: please describe this field!',
  5620. 'type' => 'int',
  5621. 'not null' => '1',
  5622. ),
  5623. 'contact_id' => array(
  5624. // 'description' => 'TODO: please describe this field!',
  5625. 'type' => 'int',
  5626. 'not null' => '',
  5627. ),
  5628. 'name' => array(
  5629. // 'description' => 'TODO: please describe this field!',
  5630. 'type' => 'varchar',
  5631. 'length' => '255',
  5632. 'not null' => '',
  5633. ),
  5634. 'uniquename' => array(
  5635. // 'description' => 'TODO: please describe this field!',
  5636. 'type' => 'text',
  5637. 'not null' => '1',
  5638. ),
  5639. ),
  5640. 'primary key' => array(
  5641. '0' => 'stockcollection_id',
  5642. ),
  5643. 'unique keys' => array(
  5644. 'stockcollection_c1' => array(
  5645. '0' => 'uniquename',
  5646. '1' => 'type_id',
  5647. ),
  5648. ),
  5649. 'indexes' => array(
  5650. 'stockcollection_idx1' => array(
  5651. '0' => 'contact_id',
  5652. ),
  5653. 'stockcollection_idx2' => array(
  5654. '0' => 'type_id',
  5655. ),
  5656. 'stockcollection_idx3' => array(
  5657. '0' => 'uniquename',
  5658. ),
  5659. 'stockcollection_name_ind1' => array(
  5660. '0' => 'name',
  5661. ),
  5662. ),
  5663. 'foreign keys' => array(
  5664. ),
  5665. );
  5666. return $description;
  5667. }
  5668. /**
  5669. * Implements hook_stock_genotype_schema()
  5670. * Purpose: To describe the structure of stock_genotype to tripal
  5671. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5672. * @see tripal_core.api.inc: tripal_core_chado_update()
  5673. * @see tripal_core.api.inc: tripal_core_chado_select()
  5674. *
  5675. * @return
  5676. * An array describing the current table
  5677. *
  5678. * @ingroup tripal_schema_api
  5679. *
  5680. */
  5681. function tripal_core_chado_stock_genotype_schema () {
  5682. $description = array();
  5683. $description = array(
  5684. 'table' => 'stock_genotype',
  5685. // 'description' => 'TODO: please describe this table!',
  5686. 'fields' => array(
  5687. 'stock_genotype_id' => array(
  5688. // 'description' => 'TODO: please describe this field!',
  5689. 'type' => 'serial',
  5690. 'not null' => '1',
  5691. ),
  5692. 'stock_id' => array(
  5693. // 'description' => 'TODO: please describe this field!',
  5694. 'type' => 'int',
  5695. 'not null' => '1',
  5696. ),
  5697. 'genotype_id' => array(
  5698. // 'description' => 'TODO: please describe this field!',
  5699. 'type' => 'int',
  5700. 'not null' => '1',
  5701. ),
  5702. ),
  5703. 'primary key' => array(
  5704. '0' => 'stock_genotype_id',
  5705. ),
  5706. 'unique keys' => array(
  5707. 'stock_genotype_c1' => array(
  5708. '0' => 'stock_id',
  5709. '1' => 'genotype_id',
  5710. ),
  5711. ),
  5712. 'indexes' => array(
  5713. 'stock_genotype_idx1' => array(
  5714. '0' => 'stock_id',
  5715. ),
  5716. 'stock_genotype_idx2' => array(
  5717. '0' => 'genotype_id',
  5718. ),
  5719. ),
  5720. 'foreign keys' => array(
  5721. ),
  5722. );
  5723. return $description;
  5724. }
  5725. /**
  5726. * Implements hook_stock_dbxref_schema()
  5727. * Purpose: To describe the structure of stock_dbxref to tripal
  5728. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5729. * @see tripal_core.api.inc: tripal_core_chado_update()
  5730. * @see tripal_core.api.inc: tripal_core_chado_select()
  5731. *
  5732. * @return
  5733. * An array describing the current table
  5734. *
  5735. * @ingroup tripal_schema_api
  5736. *
  5737. */
  5738. function tripal_core_chado_stock_dbxref_schema () {
  5739. $description = array();
  5740. $description = array(
  5741. 'table' => 'stock_dbxref',
  5742. // 'description' => 'TODO: please describe this table!',
  5743. 'fields' => array(
  5744. 'stock_dbxref_id' => array(
  5745. // 'description' => 'TODO: please describe this field!',
  5746. 'type' => 'serial',
  5747. 'not null' => '1',
  5748. ),
  5749. 'stock_id' => array(
  5750. // 'description' => 'TODO: please describe this field!',
  5751. 'type' => 'int',
  5752. 'not null' => '1',
  5753. ),
  5754. 'dbxref_id' => array(
  5755. // 'description' => 'TODO: please describe this field!',
  5756. 'type' => 'int',
  5757. 'not null' => '1',
  5758. ),
  5759. 'is_current' => array(
  5760. // 'description' => 'TODO: please describe this field!',
  5761. 'type' => 'boolean',
  5762. 'not null' => '1',
  5763. 'default' => 'ru',
  5764. ),
  5765. ),
  5766. 'primary key' => array(
  5767. '0' => 'stock_dbxref_id',
  5768. ),
  5769. 'unique keys' => array(
  5770. 'stock_dbxref_c1' => array(
  5771. '0' => 'stock_id',
  5772. '1' => 'dbxref_id',
  5773. ),
  5774. ),
  5775. 'indexes' => array(
  5776. 'stock_dbxref_idx1' => array(
  5777. '0' => 'stock_id',
  5778. ),
  5779. 'stock_dbxref_idx2' => array(
  5780. '0' => 'dbxref_id',
  5781. ),
  5782. ),
  5783. 'foreign keys' => array(
  5784. ),
  5785. );
  5786. return $description;
  5787. }
  5788. /**
  5789. * Implements hook_quantificationprop_schema()
  5790. * Purpose: To describe the structure of quantificationprop to tripal
  5791. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5792. * @see tripal_core.api.inc: tripal_core_chado_update()
  5793. * @see tripal_core.api.inc: tripal_core_chado_select()
  5794. *
  5795. * @return
  5796. * An array describing the current table
  5797. *
  5798. * @ingroup tripal_schema_api
  5799. *
  5800. */
  5801. function tripal_core_chado_quantificationprop_schema () {
  5802. $description = array();
  5803. $description = array(
  5804. 'table' => 'quantificationprop',
  5805. // 'description' => 'TODO: please describe this table!',
  5806. 'fields' => array(
  5807. 'quantificationprop_id' => array(
  5808. // 'description' => 'TODO: please describe this field!',
  5809. 'type' => 'serial',
  5810. 'not null' => '1',
  5811. ),
  5812. 'quantification_id' => array(
  5813. // 'description' => 'TODO: please describe this field!',
  5814. 'type' => 'int',
  5815. 'not null' => '1',
  5816. ),
  5817. 'type_id' => array(
  5818. // 'description' => 'TODO: please describe this field!',
  5819. 'type' => 'int',
  5820. 'not null' => '1',
  5821. ),
  5822. 'value' => array(
  5823. // 'description' => 'TODO: please describe this field!',
  5824. 'type' => 'text',
  5825. 'not null' => '',
  5826. ),
  5827. 'rank' => array(
  5828. // 'description' => 'TODO: please describe this field!',
  5829. 'type' => 'int',
  5830. 'not null' => '1',
  5831. 'default' => '0',
  5832. ),
  5833. ),
  5834. 'primary key' => array(
  5835. '0' => 'quantificationprop_id',
  5836. ),
  5837. 'unique keys' => array(
  5838. 'quantificationprop_c1' => array(
  5839. '0' => 'quantification_id',
  5840. '1' => 'type_id',
  5841. '2' => 'rank',
  5842. ),
  5843. ),
  5844. 'indexes' => array(
  5845. 'quantificationprop_idx1' => array(
  5846. '0' => 'quantification_id',
  5847. ),
  5848. 'quantificationprop_idx2' => array(
  5849. '0' => 'type_id',
  5850. ),
  5851. ),
  5852. 'foreign keys' => array(
  5853. ),
  5854. );
  5855. return $description;
  5856. }
  5857. /**
  5858. * Implements hook_stats_paths_to_root_schema()
  5859. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5860. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5861. * @see tripal_core.api.inc: tripal_core_chado_update()
  5862. * @see tripal_core.api.inc: tripal_core_chado_select()
  5863. *
  5864. * @return
  5865. * An array describing the current table
  5866. *
  5867. * @ingroup tripal_schema_api
  5868. *
  5869. */
  5870. function tripal_core_chado_stats_paths_to_root_schema () {
  5871. $description = array();
  5872. $description = array(
  5873. 'table' => 'stats_paths_to_root',
  5874. // 'description' => 'TODO: please describe this table!',
  5875. 'fields' => array(
  5876. 'cvterm_id' => array(
  5877. // 'description' => 'TODO: please describe this field!',
  5878. 'type' => 'int',
  5879. 'not null' => '',
  5880. ),
  5881. 'total_paths' => array(
  5882. // 'description' => 'TODO: please describe this field!',
  5883. 'type' => 'int',
  5884. 'size' => 'big',
  5885. 'not null' => '',
  5886. ),
  5887. 'avg_distance' => array(
  5888. // 'description' => 'TODO: please describe this field!',
  5889. 'type' => 'numeric',
  5890. 'not null' => '',
  5891. 'precision' => '0',
  5892. 'scale' => '0',
  5893. ),
  5894. 'min_distance' => array(
  5895. // 'description' => 'TODO: please describe this field!',
  5896. 'type' => 'int',
  5897. 'not null' => '',
  5898. ),
  5899. 'max_distance' => array(
  5900. // 'description' => 'TODO: please describe this field!',
  5901. 'type' => 'int',
  5902. 'not null' => '',
  5903. ),
  5904. ),
  5905. 'primary key' => array(
  5906. ),
  5907. 'unique keys' => array(
  5908. ),
  5909. 'indexes' => array(
  5910. ),
  5911. 'foreign keys' => array(
  5912. ),
  5913. );
  5914. return $description;
  5915. }
  5916. /**
  5917. * Implements hook_stock_schema()
  5918. * Purpose: To describe the structure of stock to tripal
  5919. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5920. * @see tripal_core.api.inc: tripal_core_chado_update()
  5921. * @see tripal_core.api.inc: tripal_core_chado_select()
  5922. *
  5923. * @return
  5924. * An array describing the current table
  5925. *
  5926. * @ingroup tripal_schema_api
  5927. *
  5928. */
  5929. function tripal_core_chado_stock_schema () {
  5930. $description = array();
  5931. $description = array(
  5932. 'table' => 'stock',
  5933. // 'description' => 'TODO: please describe this table!',
  5934. 'fields' => array(
  5935. 'stock_id' => array(
  5936. // 'description' => 'TODO: please describe this field!',
  5937. 'type' => 'serial',
  5938. 'not null' => '1',
  5939. ),
  5940. 'dbxref_id' => array(
  5941. // 'description' => 'TODO: please describe this field!',
  5942. 'type' => 'int',
  5943. 'not null' => '',
  5944. ),
  5945. 'organism_id' => array(
  5946. // 'description' => 'TODO: please describe this field!',
  5947. 'type' => 'int',
  5948. 'not null' => '1',
  5949. ),
  5950. 'name' => array(
  5951. // 'description' => 'TODO: please describe this field!',
  5952. 'type' => 'varchar',
  5953. 'length' => '255',
  5954. 'not null' => '',
  5955. ),
  5956. 'uniquename' => array(
  5957. // 'description' => 'TODO: please describe this field!',
  5958. 'type' => 'text',
  5959. 'not null' => '1',
  5960. ),
  5961. 'description' => array(
  5962. // 'description' => 'TODO: please describe this field!',
  5963. 'type' => 'text',
  5964. 'not null' => '',
  5965. ),
  5966. 'type_id' => array(
  5967. // 'description' => 'TODO: please describe this field!',
  5968. 'type' => 'int',
  5969. 'not null' => '1',
  5970. ),
  5971. 'is_obsolete' => array(
  5972. // 'description' => 'TODO: please describe this field!',
  5973. 'type' => 'boolean',
  5974. 'not null' => '1',
  5975. 'default' => 'als',
  5976. ),
  5977. ),
  5978. 'primary key' => array(
  5979. '0' => 'stock_id',
  5980. ),
  5981. 'unique keys' => array(
  5982. 'stock_c1' => array(
  5983. '0' => 'organism_id',
  5984. '1' => 'uniquename',
  5985. '2' => 'type_id',
  5986. ),
  5987. ),
  5988. 'indexes' => array(
  5989. 'stock_idx1' => array(
  5990. '0' => 'dbxref_id',
  5991. ),
  5992. 'stock_idx2' => array(
  5993. '0' => 'organism_id',
  5994. ),
  5995. 'stock_idx3' => array(
  5996. '0' => 'type_id',
  5997. ),
  5998. 'stock_idx4' => array(
  5999. '0' => 'uniquename',
  6000. ),
  6001. 'stock_name_ind1' => array(
  6002. '0' => 'name',
  6003. ),
  6004. ),
  6005. 'foreign keys' => array(
  6006. ),
  6007. );
  6008. return $description;
  6009. }
  6010. /**
  6011. * Implements hook_stock_cvterm_schema()
  6012. * Purpose: To describe the structure of stock_cvterm to tripal
  6013. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6014. * @see tripal_core.api.inc: tripal_core_chado_update()
  6015. * @see tripal_core.api.inc: tripal_core_chado_select()
  6016. *
  6017. * @return
  6018. * An array describing the current table
  6019. *
  6020. * @ingroup tripal_schema_api
  6021. *
  6022. */
  6023. function tripal_core_chado_stock_cvterm_schema () {
  6024. $description = array();
  6025. $description = array(
  6026. 'table' => 'stock_cvterm',
  6027. // 'description' => 'TODO: please describe this table!',
  6028. 'fields' => array(
  6029. 'stock_cvterm_id' => array(
  6030. // 'description' => 'TODO: please describe this field!',
  6031. 'type' => 'serial',
  6032. 'not null' => '1',
  6033. ),
  6034. 'stock_id' => array(
  6035. // 'description' => 'TODO: please describe this field!',
  6036. 'type' => 'int',
  6037. 'not null' => '1',
  6038. ),
  6039. 'cvterm_id' => array(
  6040. // 'description' => 'TODO: please describe this field!',
  6041. 'type' => 'int',
  6042. 'not null' => '1',
  6043. ),
  6044. 'pub_id' => array(
  6045. // 'description' => 'TODO: please describe this field!',
  6046. 'type' => 'int',
  6047. 'not null' => '1',
  6048. ),
  6049. ),
  6050. 'primary key' => array(
  6051. '0' => 'stock_cvterm_id',
  6052. ),
  6053. 'unique keys' => array(
  6054. 'stock_cvterm_c1' => array(
  6055. '0' => 'stock_id',
  6056. '1' => 'cvterm_id',
  6057. '2' => 'pub_id',
  6058. ),
  6059. ),
  6060. 'indexes' => array(
  6061. 'stock_cvterm_idx1' => array(
  6062. '0' => 'stock_id',
  6063. ),
  6064. 'stock_cvterm_idx2' => array(
  6065. '0' => 'cvterm_id',
  6066. ),
  6067. 'stock_cvterm_idx3' => array(
  6068. '0' => 'pub_id',
  6069. ),
  6070. ),
  6071. 'foreign keys' => array(
  6072. ),
  6073. );
  6074. return $description;
  6075. }
  6076. /**
  6077. * Implements hook_feature_synonym_schema()
  6078. * Purpose: To describe the structure of feature_synonym to tripal
  6079. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6080. * @see tripal_core.api.inc: tripal_core_chado_update()
  6081. * @see tripal_core.api.inc: tripal_core_chado_select()
  6082. *
  6083. * @return
  6084. * An array describing the current table
  6085. *
  6086. * @ingroup tripal_schema_api
  6087. *
  6088. */
  6089. function tripal_core_chado_feature_synonym_schema () {
  6090. $description = array();
  6091. $description = array(
  6092. 'table' => 'feature_synonym',
  6093. // 'description' => 'TODO: please describe this table!',
  6094. 'fields' => array(
  6095. 'feature_synonym_id' => array(
  6096. // 'description' => 'TODO: please describe this field!',
  6097. 'type' => 'serial',
  6098. 'not null' => '1',
  6099. ),
  6100. 'synonym_id' => array(
  6101. // 'description' => 'TODO: please describe this field!',
  6102. 'type' => 'int',
  6103. 'not null' => '1',
  6104. ),
  6105. 'feature_id' => array(
  6106. // 'description' => 'TODO: please describe this field!',
  6107. 'type' => 'int',
  6108. 'not null' => '1',
  6109. ),
  6110. 'pub_id' => array(
  6111. // 'description' => 'TODO: please describe this field!',
  6112. 'type' => 'int',
  6113. 'not null' => '1',
  6114. ),
  6115. 'is_current' => array(
  6116. // 'description' => 'TODO: please describe this field!',
  6117. 'type' => 'boolean',
  6118. 'not null' => '1',
  6119. 'default' => 'als',
  6120. ),
  6121. 'is_internal' => array(
  6122. // 'description' => 'TODO: please describe this field!',
  6123. 'type' => 'boolean',
  6124. 'not null' => '1',
  6125. 'default' => 'als',
  6126. ),
  6127. ),
  6128. 'primary key' => array(
  6129. '0' => 'feature_synonym_id',
  6130. ),
  6131. 'unique keys' => array(
  6132. 'feature_synonym_c1' => array(
  6133. '0' => 'synonym_id',
  6134. '1' => 'feature_id',
  6135. '2' => 'pub_id',
  6136. ),
  6137. ),
  6138. 'indexes' => array(
  6139. 'feature_synonym_idx1' => array(
  6140. '0' => 'synonym_id',
  6141. ),
  6142. 'feature_synonym_idx2' => array(
  6143. '0' => 'feature_id',
  6144. ),
  6145. 'feature_synonym_idx3' => array(
  6146. '0' => 'pub_id',
  6147. ),
  6148. ),
  6149. 'foreign keys' => array(
  6150. ),
  6151. );
  6152. return $description;
  6153. }
  6154. /**
  6155. * Implements hook_feature_relationshipprop_pub_schema()
  6156. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6157. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6158. * @see tripal_core.api.inc: tripal_core_chado_update()
  6159. * @see tripal_core.api.inc: tripal_core_chado_select()
  6160. *
  6161. * @return
  6162. * An array describing the current table
  6163. *
  6164. * @ingroup tripal_schema_api
  6165. *
  6166. */
  6167. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  6168. $description = array();
  6169. $description = array(
  6170. 'table' => 'feature_relationshipprop_pub',
  6171. // 'description' => 'TODO: please describe this table!',
  6172. 'fields' => array(
  6173. 'feature_relationshipprop_pub_id' => array(
  6174. // 'description' => 'TODO: please describe this field!',
  6175. 'type' => 'serial',
  6176. 'not null' => '1',
  6177. ),
  6178. 'feature_relationshipprop_id' => array(
  6179. // 'description' => 'TODO: please describe this field!',
  6180. 'type' => 'int',
  6181. 'not null' => '1',
  6182. ),
  6183. 'pub_id' => array(
  6184. // 'description' => 'TODO: please describe this field!',
  6185. 'type' => 'int',
  6186. 'not null' => '1',
  6187. ),
  6188. ),
  6189. 'primary key' => array(
  6190. '0' => 'feature_relationshipprop_pub_id',
  6191. ),
  6192. 'unique keys' => array(
  6193. 'feature_relationshipprop_pub_c1' => array(
  6194. '0' => 'feature_relationshipprop_id',
  6195. '1' => 'pub_id',
  6196. ),
  6197. ),
  6198. 'indexes' => array(
  6199. 'feature_relationshipprop_pub_idx1' => array(
  6200. '0' => 'feature_relationshipprop_id',
  6201. ),
  6202. 'feature_relationshipprop_pub_idx2' => array(
  6203. '0' => 'pub_id',
  6204. ),
  6205. ),
  6206. 'foreign keys' => array(
  6207. ),
  6208. );
  6209. return $description;
  6210. }
  6211. /**
  6212. * Implements hook_cell_line_relationship_schema()
  6213. * Purpose: To describe the structure of cell_line_relationship to tripal
  6214. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6215. * @see tripal_core.api.inc: tripal_core_chado_update()
  6216. * @see tripal_core.api.inc: tripal_core_chado_select()
  6217. *
  6218. * @return
  6219. * An array describing the current table
  6220. *
  6221. * @ingroup tripal_schema_api
  6222. *
  6223. */
  6224. function tripal_core_chado_cell_line_relationship_schema () {
  6225. $description = array();
  6226. $description = array(
  6227. 'table' => 'cell_line_relationship',
  6228. // 'description' => 'TODO: please describe this table!',
  6229. 'fields' => array(
  6230. 'cell_line_relationship_id' => array(
  6231. // 'description' => 'TODO: please describe this field!',
  6232. 'type' => 'serial',
  6233. 'not null' => '1',
  6234. ),
  6235. 'subject_id' => array(
  6236. // 'description' => 'TODO: please describe this field!',
  6237. 'type' => 'int',
  6238. 'not null' => '1',
  6239. ),
  6240. 'object_id' => array(
  6241. // 'description' => 'TODO: please describe this field!',
  6242. 'type' => 'int',
  6243. 'not null' => '1',
  6244. ),
  6245. 'type_id' => array(
  6246. // 'description' => 'TODO: please describe this field!',
  6247. 'type' => 'int',
  6248. 'not null' => '1',
  6249. ),
  6250. ),
  6251. 'primary key' => array(
  6252. '0' => 'cell_line_relationship_id',
  6253. ),
  6254. 'unique keys' => array(
  6255. 'cell_line_relationship_c1' => array(
  6256. '0' => 'subject_id',
  6257. '1' => 'object_id',
  6258. '2' => 'type_id',
  6259. ),
  6260. ),
  6261. 'indexes' => array(
  6262. ),
  6263. 'foreign keys' => array(
  6264. ),
  6265. );
  6266. return $description;
  6267. }
  6268. /**
  6269. * Implements hook_cell_line_pub_schema()
  6270. * Purpose: To describe the structure of cell_line_pub to tripal
  6271. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6272. * @see tripal_core.api.inc: tripal_core_chado_update()
  6273. * @see tripal_core.api.inc: tripal_core_chado_select()
  6274. *
  6275. * @return
  6276. * An array describing the current table
  6277. *
  6278. * @ingroup tripal_schema_api
  6279. *
  6280. */
  6281. function tripal_core_chado_cell_line_pub_schema () {
  6282. $description = array();
  6283. $description = array(
  6284. 'table' => 'cell_line_pub',
  6285. // 'description' => 'TODO: please describe this table!',
  6286. 'fields' => array(
  6287. 'cell_line_pub_id' => array(
  6288. // 'description' => 'TODO: please describe this field!',
  6289. 'type' => 'serial',
  6290. 'not null' => '1',
  6291. ),
  6292. 'cell_line_id' => array(
  6293. // 'description' => 'TODO: please describe this field!',
  6294. 'type' => 'int',
  6295. 'not null' => '1',
  6296. ),
  6297. 'pub_id' => array(
  6298. // 'description' => 'TODO: please describe this field!',
  6299. 'type' => 'int',
  6300. 'not null' => '1',
  6301. ),
  6302. ),
  6303. 'primary key' => array(
  6304. '0' => 'cell_line_pub_id',
  6305. ),
  6306. 'unique keys' => array(
  6307. 'cell_line_pub_c1' => array(
  6308. '0' => 'cell_line_id',
  6309. '1' => 'pub_id',
  6310. ),
  6311. ),
  6312. 'indexes' => array(
  6313. ),
  6314. 'foreign keys' => array(
  6315. ),
  6316. );
  6317. return $description;
  6318. }
  6319. /**
  6320. * Implements hook_cell_line_synonym_schema()
  6321. * Purpose: To describe the structure of cell_line_synonym to tripal
  6322. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6323. * @see tripal_core.api.inc: tripal_core_chado_update()
  6324. * @see tripal_core.api.inc: tripal_core_chado_select()
  6325. *
  6326. * @return
  6327. * An array describing the current table
  6328. *
  6329. * @ingroup tripal_schema_api
  6330. *
  6331. */
  6332. function tripal_core_chado_cell_line_synonym_schema () {
  6333. $description = array();
  6334. $description = array(
  6335. 'table' => 'cell_line_synonym',
  6336. // 'description' => 'TODO: please describe this table!',
  6337. 'fields' => array(
  6338. 'cell_line_synonym_id' => array(
  6339. // 'description' => 'TODO: please describe this field!',
  6340. 'type' => 'serial',
  6341. 'not null' => '1',
  6342. ),
  6343. 'cell_line_id' => array(
  6344. // 'description' => 'TODO: please describe this field!',
  6345. 'type' => 'int',
  6346. 'not null' => '1',
  6347. ),
  6348. 'synonym_id' => array(
  6349. // 'description' => 'TODO: please describe this field!',
  6350. 'type' => 'int',
  6351. 'not null' => '1',
  6352. ),
  6353. 'pub_id' => array(
  6354. // 'description' => 'TODO: please describe this field!',
  6355. 'type' => 'int',
  6356. 'not null' => '1',
  6357. ),
  6358. 'is_current' => array(
  6359. // 'description' => 'TODO: please describe this field!',
  6360. 'type' => 'boolean',
  6361. 'not null' => '1',
  6362. 'default' => 'als',
  6363. ),
  6364. 'is_internal' => array(
  6365. // 'description' => 'TODO: please describe this field!',
  6366. 'type' => 'boolean',
  6367. 'not null' => '1',
  6368. 'default' => 'als',
  6369. ),
  6370. ),
  6371. 'primary key' => array(
  6372. '0' => 'cell_line_synonym_id',
  6373. ),
  6374. 'unique keys' => array(
  6375. 'cell_line_synonym_c1' => array(
  6376. '0' => 'synonym_id',
  6377. '1' => 'cell_line_id',
  6378. '2' => 'pub_id',
  6379. ),
  6380. ),
  6381. 'indexes' => array(
  6382. ),
  6383. 'foreign keys' => array(
  6384. ),
  6385. );
  6386. return $description;
  6387. }
  6388. /**
  6389. * Implements hook_cell_lineprop_schema()
  6390. * Purpose: To describe the structure of cell_lineprop to tripal
  6391. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6392. * @see tripal_core.api.inc: tripal_core_chado_update()
  6393. * @see tripal_core.api.inc: tripal_core_chado_select()
  6394. *
  6395. * @return
  6396. * An array describing the current table
  6397. *
  6398. * @ingroup tripal_schema_api
  6399. *
  6400. */
  6401. function tripal_core_chado_cell_lineprop_schema () {
  6402. $description = array();
  6403. $description = array(
  6404. 'table' => 'cell_lineprop',
  6405. // 'description' => 'TODO: please describe this table!',
  6406. 'fields' => array(
  6407. 'cell_lineprop_id' => array(
  6408. // 'description' => 'TODO: please describe this field!',
  6409. 'type' => 'serial',
  6410. 'not null' => '1',
  6411. ),
  6412. 'cell_line_id' => array(
  6413. // 'description' => 'TODO: please describe this field!',
  6414. 'type' => 'int',
  6415. 'not null' => '1',
  6416. ),
  6417. 'type_id' => array(
  6418. // 'description' => 'TODO: please describe this field!',
  6419. 'type' => 'int',
  6420. 'not null' => '1',
  6421. ),
  6422. 'value' => array(
  6423. // 'description' => 'TODO: please describe this field!',
  6424. 'type' => 'text',
  6425. 'not null' => '',
  6426. ),
  6427. 'rank' => array(
  6428. // 'description' => 'TODO: please describe this field!',
  6429. 'type' => 'int',
  6430. 'not null' => '1',
  6431. 'default' => '0',
  6432. ),
  6433. ),
  6434. 'primary key' => array(
  6435. '0' => 'cell_lineprop_id',
  6436. ),
  6437. 'unique keys' => array(
  6438. 'cell_lineprop_c1' => array(
  6439. '0' => 'cell_line_id',
  6440. '1' => 'type_id',
  6441. '2' => 'rank',
  6442. ),
  6443. ),
  6444. 'indexes' => array(
  6445. ),
  6446. 'foreign keys' => array(
  6447. ),
  6448. );
  6449. return $description;
  6450. }
  6451. /**
  6452. * Implements hook_cell_lineprop_pub_schema()
  6453. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6454. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6455. * @see tripal_core.api.inc: tripal_core_chado_update()
  6456. * @see tripal_core.api.inc: tripal_core_chado_select()
  6457. *
  6458. * @return
  6459. * An array describing the current table
  6460. *
  6461. * @ingroup tripal_schema_api
  6462. *
  6463. */
  6464. function tripal_core_chado_cell_lineprop_pub_schema () {
  6465. $description = array();
  6466. $description = array(
  6467. 'table' => 'cell_lineprop_pub',
  6468. // 'description' => 'TODO: please describe this table!',
  6469. 'fields' => array(
  6470. 'cell_lineprop_pub_id' => array(
  6471. // 'description' => 'TODO: please describe this field!',
  6472. 'type' => 'serial',
  6473. 'not null' => '1',
  6474. ),
  6475. 'cell_lineprop_id' => array(
  6476. // 'description' => 'TODO: please describe this field!',
  6477. 'type' => 'int',
  6478. 'not null' => '1',
  6479. ),
  6480. 'pub_id' => array(
  6481. // 'description' => 'TODO: please describe this field!',
  6482. 'type' => 'int',
  6483. 'not null' => '1',
  6484. ),
  6485. ),
  6486. 'primary key' => array(
  6487. '0' => 'cell_lineprop_pub_id',
  6488. ),
  6489. 'unique keys' => array(
  6490. 'cell_lineprop_pub_c1' => array(
  6491. '0' => 'cell_lineprop_id',
  6492. '1' => 'pub_id',
  6493. ),
  6494. ),
  6495. 'indexes' => array(
  6496. ),
  6497. 'foreign keys' => array(
  6498. ),
  6499. );
  6500. return $description;
  6501. }
  6502. /**
  6503. * Implements hook_cell_line_library_schema()
  6504. * Purpose: To describe the structure of cell_line_library to tripal
  6505. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6506. * @see tripal_core.api.inc: tripal_core_chado_update()
  6507. * @see tripal_core.api.inc: tripal_core_chado_select()
  6508. *
  6509. * @return
  6510. * An array describing the current table
  6511. *
  6512. * @ingroup tripal_schema_api
  6513. *
  6514. */
  6515. function tripal_core_chado_cell_line_library_schema () {
  6516. $description = array();
  6517. $description = array(
  6518. 'table' => 'cell_line_library',
  6519. // 'description' => 'TODO: please describe this table!',
  6520. 'fields' => array(
  6521. 'cell_line_library_id' => array(
  6522. // 'description' => 'TODO: please describe this field!',
  6523. 'type' => 'serial',
  6524. 'not null' => '1',
  6525. ),
  6526. 'cell_line_id' => array(
  6527. // 'description' => 'TODO: please describe this field!',
  6528. 'type' => 'int',
  6529. 'not null' => '1',
  6530. ),
  6531. 'library_id' => array(
  6532. // 'description' => 'TODO: please describe this field!',
  6533. 'type' => 'int',
  6534. 'not null' => '1',
  6535. ),
  6536. 'pub_id' => array(
  6537. // 'description' => 'TODO: please describe this field!',
  6538. 'type' => 'int',
  6539. 'not null' => '1',
  6540. ),
  6541. ),
  6542. 'primary key' => array(
  6543. '0' => 'cell_line_library_id',
  6544. ),
  6545. 'unique keys' => array(
  6546. 'cell_line_library_c1' => array(
  6547. '0' => 'cell_line_id',
  6548. '1' => 'library_id',
  6549. '2' => 'pub_id',
  6550. ),
  6551. ),
  6552. 'indexes' => array(
  6553. ),
  6554. 'foreign keys' => array(
  6555. ),
  6556. );
  6557. return $description;
  6558. }
  6559. /**
  6560. * Implements hook_cell_line_feature_schema()
  6561. * Purpose: To describe the structure of cell_line_feature to tripal
  6562. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6563. * @see tripal_core.api.inc: tripal_core_chado_update()
  6564. * @see tripal_core.api.inc: tripal_core_chado_select()
  6565. *
  6566. * @return
  6567. * An array describing the current table
  6568. *
  6569. * @ingroup tripal_schema_api
  6570. *
  6571. */
  6572. function tripal_core_chado_cell_line_feature_schema () {
  6573. $description = array();
  6574. $description = array(
  6575. 'table' => 'cell_line_feature',
  6576. // 'description' => 'TODO: please describe this table!',
  6577. 'fields' => array(
  6578. 'cell_line_feature_id' => array(
  6579. // 'description' => 'TODO: please describe this field!',
  6580. 'type' => 'serial',
  6581. 'not null' => '1',
  6582. ),
  6583. 'cell_line_id' => array(
  6584. // 'description' => 'TODO: please describe this field!',
  6585. 'type' => 'int',
  6586. 'not null' => '1',
  6587. ),
  6588. 'feature_id' => array(
  6589. // 'description' => 'TODO: please describe this field!',
  6590. 'type' => 'int',
  6591. 'not null' => '1',
  6592. ),
  6593. 'pub_id' => array(
  6594. // 'description' => 'TODO: please describe this field!',
  6595. 'type' => 'int',
  6596. 'not null' => '1',
  6597. ),
  6598. ),
  6599. 'primary key' => array(
  6600. '0' => 'cell_line_feature_id',
  6601. ),
  6602. 'unique keys' => array(
  6603. 'cell_line_feature_c1' => array(
  6604. '0' => 'cell_line_id',
  6605. '1' => 'feature_id',
  6606. '2' => 'pub_id',
  6607. ),
  6608. ),
  6609. 'indexes' => array(
  6610. ),
  6611. 'foreign keys' => array(
  6612. ),
  6613. );
  6614. return $description;
  6615. }
  6616. /**
  6617. * Implements hook_cell_line_schema()
  6618. * Purpose: To describe the structure of cell_line to tripal
  6619. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6620. * @see tripal_core.api.inc: tripal_core_chado_update()
  6621. * @see tripal_core.api.inc: tripal_core_chado_select()
  6622. *
  6623. * @return
  6624. * An array describing the current table
  6625. *
  6626. * @ingroup tripal_schema_api
  6627. *
  6628. */
  6629. function tripal_core_chado_cell_line_schema () {
  6630. $description = array();
  6631. $description = array(
  6632. 'table' => 'cell_line',
  6633. // 'description' => 'TODO: please describe this table!',
  6634. 'fields' => array(
  6635. 'cell_line_id' => array(
  6636. // 'description' => 'TODO: please describe this field!',
  6637. 'type' => 'serial',
  6638. 'not null' => '1',
  6639. ),
  6640. 'name' => array(
  6641. // 'description' => 'TODO: please describe this field!',
  6642. 'type' => 'varchar',
  6643. 'length' => '255',
  6644. 'not null' => '',
  6645. ),
  6646. 'uniquename' => array(
  6647. // 'description' => 'TODO: please describe this field!',
  6648. 'type' => 'varchar',
  6649. 'length' => '255',
  6650. 'not null' => '1',
  6651. ),
  6652. 'organism_id' => array(
  6653. // 'description' => 'TODO: please describe this field!',
  6654. 'type' => 'int',
  6655. 'not null' => '1',
  6656. ),
  6657. 'timeaccessioned' => array(
  6658. // 'description' => 'TODO: please describe this field!',
  6659. 'type' => 'datetime',
  6660. 'not null' => '1',
  6661. 'default' => 'ow(',
  6662. ),
  6663. 'timelastmodified' => array(
  6664. // 'description' => 'TODO: please describe this field!',
  6665. 'type' => 'datetime',
  6666. 'not null' => '1',
  6667. 'default' => 'ow(',
  6668. ),
  6669. ),
  6670. 'primary key' => array(
  6671. '0' => 'cell_line_id',
  6672. ),
  6673. 'unique keys' => array(
  6674. 'cell_line_c1' => array(
  6675. '0' => 'uniquename',
  6676. '1' => 'organism_id',
  6677. ),
  6678. ),
  6679. 'indexes' => array(
  6680. ),
  6681. 'foreign keys' => array(
  6682. ),
  6683. );
  6684. return $description;
  6685. }
  6686. /**
  6687. * Implements hook_cell_line_cvterm_schema()
  6688. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6689. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6690. * @see tripal_core.api.inc: tripal_core_chado_update()
  6691. * @see tripal_core.api.inc: tripal_core_chado_select()
  6692. *
  6693. * @return
  6694. * An array describing the current table
  6695. *
  6696. * @ingroup tripal_schema_api
  6697. *
  6698. */
  6699. function tripal_core_chado_cell_line_cvterm_schema () {
  6700. $description = array();
  6701. $description = array(
  6702. 'table' => 'cell_line_cvterm',
  6703. // 'description' => 'TODO: please describe this table!',
  6704. 'fields' => array(
  6705. 'cell_line_cvterm_id' => array(
  6706. // 'description' => 'TODO: please describe this field!',
  6707. 'type' => 'serial',
  6708. 'not null' => '1',
  6709. ),
  6710. 'cell_line_id' => array(
  6711. // 'description' => 'TODO: please describe this field!',
  6712. 'type' => 'int',
  6713. 'not null' => '1',
  6714. ),
  6715. 'cvterm_id' => array(
  6716. // 'description' => 'TODO: please describe this field!',
  6717. 'type' => 'int',
  6718. 'not null' => '1',
  6719. ),
  6720. 'pub_id' => array(
  6721. // 'description' => 'TODO: please describe this field!',
  6722. 'type' => 'int',
  6723. 'not null' => '1',
  6724. ),
  6725. 'rank' => array(
  6726. // 'description' => 'TODO: please describe this field!',
  6727. 'type' => 'int',
  6728. 'not null' => '1',
  6729. 'default' => '0',
  6730. ),
  6731. ),
  6732. 'primary key' => array(
  6733. '0' => 'cell_line_cvterm_id',
  6734. ),
  6735. 'unique keys' => array(
  6736. 'cell_line_cvterm_c1' => array(
  6737. '0' => 'cell_line_id',
  6738. '1' => 'cvterm_id',
  6739. '2' => 'pub_id',
  6740. '3' => 'rank',
  6741. ),
  6742. ),
  6743. 'indexes' => array(
  6744. ),
  6745. 'foreign keys' => array(
  6746. ),
  6747. );
  6748. return $description;
  6749. }
  6750. /**
  6751. * Implements hook_cell_line_cvtermprop_schema()
  6752. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6753. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6754. * @see tripal_core.api.inc: tripal_core_chado_update()
  6755. * @see tripal_core.api.inc: tripal_core_chado_select()
  6756. *
  6757. * @return
  6758. * An array describing the current table
  6759. *
  6760. * @ingroup tripal_schema_api
  6761. *
  6762. */
  6763. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6764. $description = array();
  6765. $description = array(
  6766. 'table' => 'cell_line_cvtermprop',
  6767. // 'description' => 'TODO: please describe this table!',
  6768. 'fields' => array(
  6769. 'cell_line_cvtermprop_id' => array(
  6770. // 'description' => 'TODO: please describe this field!',
  6771. 'type' => 'serial',
  6772. 'not null' => '1',
  6773. ),
  6774. 'cell_line_cvterm_id' => array(
  6775. // 'description' => 'TODO: please describe this field!',
  6776. 'type' => 'int',
  6777. 'not null' => '1',
  6778. ),
  6779. 'type_id' => array(
  6780. // 'description' => 'TODO: please describe this field!',
  6781. 'type' => 'int',
  6782. 'not null' => '1',
  6783. ),
  6784. 'value' => array(
  6785. // 'description' => 'TODO: please describe this field!',
  6786. 'type' => 'text',
  6787. 'not null' => '',
  6788. ),
  6789. 'rank' => array(
  6790. // 'description' => 'TODO: please describe this field!',
  6791. 'type' => 'int',
  6792. 'not null' => '1',
  6793. 'default' => '0',
  6794. ),
  6795. ),
  6796. 'primary key' => array(
  6797. '0' => 'cell_line_cvtermprop_id',
  6798. ),
  6799. 'unique keys' => array(
  6800. 'cell_line_cvtermprop_c1' => array(
  6801. '0' => 'cell_line_cvterm_id',
  6802. '1' => 'type_id',
  6803. '2' => 'rank',
  6804. ),
  6805. ),
  6806. 'indexes' => array(
  6807. ),
  6808. 'foreign keys' => array(
  6809. ),
  6810. );
  6811. return $description;
  6812. }
  6813. /**
  6814. * Implements hook_cell_line_dbxref_schema()
  6815. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6816. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6817. * @see tripal_core.api.inc: tripal_core_chado_update()
  6818. * @see tripal_core.api.inc: tripal_core_chado_select()
  6819. *
  6820. * @return
  6821. * An array describing the current table
  6822. *
  6823. * @ingroup tripal_schema_api
  6824. *
  6825. */
  6826. function tripal_core_chado_cell_line_dbxref_schema () {
  6827. $description = array();
  6828. $description = array(
  6829. 'table' => 'cell_line_dbxref',
  6830. // 'description' => 'TODO: please describe this table!',
  6831. 'fields' => array(
  6832. 'cell_line_dbxref_id' => array(
  6833. // 'description' => 'TODO: please describe this field!',
  6834. 'type' => 'serial',
  6835. 'not null' => '1',
  6836. ),
  6837. 'cell_line_id' => array(
  6838. // 'description' => 'TODO: please describe this field!',
  6839. 'type' => 'int',
  6840. 'not null' => '1',
  6841. ),
  6842. 'dbxref_id' => array(
  6843. // 'description' => 'TODO: please describe this field!',
  6844. 'type' => 'int',
  6845. 'not null' => '1',
  6846. ),
  6847. 'is_current' => array(
  6848. // 'description' => 'TODO: please describe this field!',
  6849. 'type' => 'boolean',
  6850. 'not null' => '1',
  6851. 'default' => 'ru',
  6852. ),
  6853. ),
  6854. 'primary key' => array(
  6855. '0' => 'cell_line_dbxref_id',
  6856. ),
  6857. 'unique keys' => array(
  6858. 'cell_line_dbxref_c1' => array(
  6859. '0' => 'cell_line_id',
  6860. '1' => 'dbxref_id',
  6861. ),
  6862. ),
  6863. 'indexes' => array(
  6864. ),
  6865. 'foreign keys' => array(
  6866. ),
  6867. );
  6868. return $description;
  6869. }
  6870. /**
  6871. * Implements hook_channel_schema()
  6872. * Purpose: To describe the structure of channel to tripal
  6873. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6874. * @see tripal_core.api.inc: tripal_core_chado_update()
  6875. * @see tripal_core.api.inc: tripal_core_chado_select()
  6876. *
  6877. * @return
  6878. * An array describing the current table
  6879. *
  6880. * @ingroup tripal_schema_api
  6881. *
  6882. */
  6883. function tripal_core_chado_channel_schema () {
  6884. $description = array();
  6885. $description = array(
  6886. 'table' => 'channel',
  6887. // 'description' => 'TODO: please describe this table!',
  6888. 'fields' => array(
  6889. 'channel_id' => array(
  6890. // 'description' => 'TODO: please describe this field!',
  6891. 'type' => 'serial',
  6892. 'not null' => '1',
  6893. ),
  6894. 'name' => array(
  6895. // 'description' => 'TODO: please describe this field!',
  6896. 'type' => 'text',
  6897. 'not null' => '1',
  6898. ),
  6899. 'definition' => array(
  6900. // 'description' => 'TODO: please describe this field!',
  6901. 'type' => 'text',
  6902. 'not null' => '1',
  6903. ),
  6904. ),
  6905. 'primary key' => array(
  6906. '0' => 'channel_id',
  6907. ),
  6908. 'unique keys' => array(
  6909. 'channel_c1' => array(
  6910. '0' => 'name',
  6911. ),
  6912. ),
  6913. 'indexes' => array(
  6914. ),
  6915. 'foreign keys' => array(
  6916. ),
  6917. );
  6918. return $description;
  6919. }
  6920. /**
  6921. * Implements hook_common_ancestor_cvterm_schema()
  6922. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6923. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6924. * @see tripal_core.api.inc: tripal_core_chado_update()
  6925. * @see tripal_core.api.inc: tripal_core_chado_select()
  6926. *
  6927. * @return
  6928. * An array describing the current table
  6929. *
  6930. * @ingroup tripal_schema_api
  6931. *
  6932. */
  6933. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6934. $description = array();
  6935. $description = array(
  6936. 'table' => 'common_ancestor_cvterm',
  6937. // 'description' => 'TODO: please describe this table!',
  6938. 'fields' => array(
  6939. 'cvterm1_id' => array(
  6940. // 'description' => 'TODO: please describe this field!',
  6941. 'type' => 'int',
  6942. 'not null' => '',
  6943. ),
  6944. 'cvterm2_id' => array(
  6945. // 'description' => 'TODO: please describe this field!',
  6946. 'type' => 'int',
  6947. 'not null' => '',
  6948. ),
  6949. 'ancestor_cvterm_id' => array(
  6950. // 'description' => 'TODO: please describe this field!',
  6951. 'type' => 'int',
  6952. 'not null' => '',
  6953. ),
  6954. 'pathdistance1' => array(
  6955. // 'description' => 'TODO: please describe this field!',
  6956. 'type' => 'int',
  6957. 'not null' => '',
  6958. ),
  6959. 'pathdistance2' => array(
  6960. // 'description' => 'TODO: please describe this field!',
  6961. 'type' => 'int',
  6962. 'not null' => '',
  6963. ),
  6964. 'total_pathdistance' => array(
  6965. // 'description' => 'TODO: please describe this field!',
  6966. 'type' => 'int',
  6967. 'not null' => '',
  6968. ),
  6969. ),
  6970. 'primary key' => array(
  6971. ),
  6972. 'unique keys' => array(
  6973. ),
  6974. 'indexes' => array(
  6975. ),
  6976. 'foreign keys' => array(
  6977. ),
  6978. );
  6979. return $description;
  6980. }
  6981. /**
  6982. * Implements hook_cv_cvterm_count_with_obs_schema()
  6983. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  6984. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6985. * @see tripal_core.api.inc: tripal_core_chado_update()
  6986. * @see tripal_core.api.inc: tripal_core_chado_select()
  6987. *
  6988. * @return
  6989. * An array describing the current table
  6990. *
  6991. * @ingroup tripal_schema_api
  6992. *
  6993. */
  6994. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  6995. $description = array();
  6996. $description = array(
  6997. 'table' => 'cv_cvterm_count_with_obs',
  6998. // 'description' => 'TODO: please describe this table!',
  6999. 'fields' => array(
  7000. 'name' => array(
  7001. // 'description' => 'TODO: please describe this field!',
  7002. 'type' => 'varchar',
  7003. 'length' => '255',
  7004. 'not null' => '',
  7005. ),
  7006. 'num_terms_incl_obs' => array(
  7007. // 'description' => 'TODO: please describe this field!',
  7008. 'type' => 'int',
  7009. 'size' => 'big',
  7010. 'not null' => '',
  7011. ),
  7012. ),
  7013. 'primary key' => array(
  7014. ),
  7015. 'unique keys' => array(
  7016. ),
  7017. 'indexes' => array(
  7018. ),
  7019. 'foreign keys' => array(
  7020. ),
  7021. );
  7022. return $description;
  7023. }
  7024. /**
  7025. * Implements hook_cv_leaf_schema()
  7026. * Purpose: To describe the structure of cv_leaf to tripal
  7027. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7028. * @see tripal_core.api.inc: tripal_core_chado_update()
  7029. * @see tripal_core.api.inc: tripal_core_chado_select()
  7030. *
  7031. * @return
  7032. * An array describing the current table
  7033. *
  7034. * @ingroup tripal_schema_api
  7035. *
  7036. */
  7037. function tripal_core_chado_cv_leaf_schema () {
  7038. $description = array();
  7039. $description = array(
  7040. 'table' => 'cv_leaf',
  7041. // 'description' => 'TODO: please describe this table!',
  7042. 'fields' => array(
  7043. 'cv_id' => array(
  7044. // 'description' => 'TODO: please describe this field!',
  7045. 'type' => 'int',
  7046. 'not null' => '',
  7047. ),
  7048. 'cvterm_id' => array(
  7049. // 'description' => 'TODO: please describe this field!',
  7050. 'type' => 'int',
  7051. 'not null' => '',
  7052. ),
  7053. ),
  7054. 'primary key' => array(
  7055. ),
  7056. 'unique keys' => array(
  7057. ),
  7058. 'indexes' => array(
  7059. ),
  7060. 'foreign keys' => array(
  7061. ),
  7062. );
  7063. return $description;
  7064. }
  7065. /**
  7066. * Implements hook_cv_link_count_schema()
  7067. * Purpose: To describe the structure of cv_link_count to tripal
  7068. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7069. * @see tripal_core.api.inc: tripal_core_chado_update()
  7070. * @see tripal_core.api.inc: tripal_core_chado_select()
  7071. *
  7072. * @return
  7073. * An array describing the current table
  7074. *
  7075. * @ingroup tripal_schema_api
  7076. *
  7077. */
  7078. function tripal_core_chado_cv_link_count_schema () {
  7079. $description = array();
  7080. $description = array(
  7081. 'table' => 'cv_link_count',
  7082. // 'description' => 'TODO: please describe this table!',
  7083. 'fields' => array(
  7084. 'cv_name' => array(
  7085. // 'description' => 'TODO: please describe this field!',
  7086. 'type' => 'varchar',
  7087. 'length' => '255',
  7088. 'not null' => '',
  7089. ),
  7090. 'relation_name' => array(
  7091. // 'description' => 'TODO: please describe this field!',
  7092. 'type' => 'varchar',
  7093. 'length' => '1024',
  7094. 'not null' => '',
  7095. ),
  7096. 'relation_cv_name' => array(
  7097. // 'description' => 'TODO: please describe this field!',
  7098. 'type' => 'varchar',
  7099. 'length' => '255',
  7100. 'not null' => '',
  7101. ),
  7102. 'num_links' => array(
  7103. // 'description' => 'TODO: please describe this field!',
  7104. 'type' => 'int',
  7105. 'size' => 'big',
  7106. 'not null' => '',
  7107. ),
  7108. ),
  7109. 'primary key' => array(
  7110. ),
  7111. 'unique keys' => array(
  7112. ),
  7113. 'indexes' => array(
  7114. ),
  7115. 'foreign keys' => array(
  7116. ),
  7117. );
  7118. return $description;
  7119. }
  7120. /**
  7121. * Implements hook_cv_path_count_schema()
  7122. * Purpose: To describe the structure of cv_path_count to tripal
  7123. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7124. * @see tripal_core.api.inc: tripal_core_chado_update()
  7125. * @see tripal_core.api.inc: tripal_core_chado_select()
  7126. *
  7127. * @return
  7128. * An array describing the current table
  7129. *
  7130. * @ingroup tripal_schema_api
  7131. *
  7132. */
  7133. function tripal_core_chado_cv_path_count_schema () {
  7134. $description = array();
  7135. $description = array(
  7136. 'table' => 'cv_path_count',
  7137. // 'description' => 'TODO: please describe this table!',
  7138. 'fields' => array(
  7139. 'cv_name' => array(
  7140. // 'description' => 'TODO: please describe this field!',
  7141. 'type' => 'varchar',
  7142. 'length' => '255',
  7143. 'not null' => '',
  7144. ),
  7145. 'relation_name' => array(
  7146. // 'description' => 'TODO: please describe this field!',
  7147. 'type' => 'varchar',
  7148. 'length' => '1024',
  7149. 'not null' => '',
  7150. ),
  7151. 'relation_cv_name' => array(
  7152. // 'description' => 'TODO: please describe this field!',
  7153. 'type' => 'varchar',
  7154. 'length' => '255',
  7155. 'not null' => '',
  7156. ),
  7157. 'num_paths' => array(
  7158. // 'description' => 'TODO: please describe this field!',
  7159. 'type' => 'int',
  7160. 'size' => 'big',
  7161. 'not null' => '',
  7162. ),
  7163. ),
  7164. 'primary key' => array(
  7165. ),
  7166. 'unique keys' => array(
  7167. ),
  7168. 'indexes' => array(
  7169. ),
  7170. 'foreign keys' => array(
  7171. ),
  7172. );
  7173. return $description;
  7174. }
  7175. /**
  7176. * Implements hook_cv_cvterm_count_schema()
  7177. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7178. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7179. * @see tripal_core.api.inc: tripal_core_chado_update()
  7180. * @see tripal_core.api.inc: tripal_core_chado_select()
  7181. *
  7182. * @return
  7183. * An array describing the current table
  7184. *
  7185. * @ingroup tripal_schema_api
  7186. *
  7187. */
  7188. function tripal_core_chado_cv_cvterm_count_schema () {
  7189. $description = array();
  7190. $description = array(
  7191. 'table' => 'cv_cvterm_count',
  7192. // 'description' => 'TODO: please describe this table!',
  7193. 'fields' => array(
  7194. 'name' => array(
  7195. // 'description' => 'TODO: please describe this field!',
  7196. 'type' => 'varchar',
  7197. 'length' => '255',
  7198. 'not null' => '',
  7199. ),
  7200. 'num_terms_excl_obs' => array(
  7201. // 'description' => 'TODO: please describe this field!',
  7202. 'type' => 'int',
  7203. 'size' => 'big',
  7204. 'not null' => '',
  7205. ),
  7206. ),
  7207. 'primary key' => array(
  7208. ),
  7209. 'unique keys' => array(
  7210. ),
  7211. 'indexes' => array(
  7212. ),
  7213. 'foreign keys' => array(
  7214. ),
  7215. );
  7216. return $description;
  7217. }
  7218. /**
  7219. * Implements hook_cv_schema()
  7220. * Purpose: To describe the structure of cv to tripal
  7221. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7222. * @see tripal_core.api.inc: tripal_core_chado_update()
  7223. * @see tripal_core.api.inc: tripal_core_chado_select()
  7224. *
  7225. * @return
  7226. * An array describing the current table
  7227. *
  7228. * @ingroup tripal_schema_api
  7229. *
  7230. */
  7231. function tripal_core_chado_cv_schema () {
  7232. $description = array();
  7233. $description = array(
  7234. 'table' => 'cv',
  7235. // 'description' => 'TODO: please describe this table!',
  7236. 'fields' => array(
  7237. 'cv_id' => array(
  7238. // 'description' => 'TODO: please describe this field!',
  7239. 'type' => 'serial',
  7240. 'not null' => '1',
  7241. ),
  7242. 'name' => array(
  7243. // 'description' => 'TODO: please describe this field!',
  7244. 'type' => 'varchar',
  7245. 'length' => '255',
  7246. 'not null' => '1',
  7247. ),
  7248. 'definition' => array(
  7249. // 'description' => 'TODO: please describe this field!',
  7250. 'type' => 'text',
  7251. 'not null' => '',
  7252. ),
  7253. ),
  7254. 'primary key' => array(
  7255. '0' => 'cv_id',
  7256. ),
  7257. 'unique keys' => array(
  7258. 'cv_c1' => array(
  7259. '0' => 'name',
  7260. ),
  7261. ),
  7262. 'indexes' => array(
  7263. ),
  7264. 'foreign keys' => array(
  7265. ),
  7266. );
  7267. return $description;
  7268. }
  7269. /**
  7270. * Implements hook_common_descendant_cvterm_schema()
  7271. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7272. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7273. * @see tripal_core.api.inc: tripal_core_chado_update()
  7274. * @see tripal_core.api.inc: tripal_core_chado_select()
  7275. *
  7276. * @return
  7277. * An array describing the current table
  7278. *
  7279. * @ingroup tripal_schema_api
  7280. *
  7281. */
  7282. function tripal_core_chado_common_descendant_cvterm_schema () {
  7283. $description = array();
  7284. $description = array(
  7285. 'table' => 'common_descendant_cvterm',
  7286. // 'description' => 'TODO: please describe this table!',
  7287. 'fields' => array(
  7288. 'cvterm1_id' => array(
  7289. // 'description' => 'TODO: please describe this field!',
  7290. 'type' => 'int',
  7291. 'not null' => '',
  7292. ),
  7293. 'cvterm2_id' => array(
  7294. // 'description' => 'TODO: please describe this field!',
  7295. 'type' => 'int',
  7296. 'not null' => '',
  7297. ),
  7298. 'ancestor_cvterm_id' => array(
  7299. // 'description' => 'TODO: please describe this field!',
  7300. 'type' => 'int',
  7301. 'not null' => '',
  7302. ),
  7303. 'pathdistance1' => array(
  7304. // 'description' => 'TODO: please describe this field!',
  7305. 'type' => 'int',
  7306. 'not null' => '',
  7307. ),
  7308. 'pathdistance2' => array(
  7309. // 'description' => 'TODO: please describe this field!',
  7310. 'type' => 'int',
  7311. 'not null' => '',
  7312. ),
  7313. 'total_pathdistance' => array(
  7314. // 'description' => 'TODO: please describe this field!',
  7315. 'type' => 'int',
  7316. 'not null' => '',
  7317. ),
  7318. ),
  7319. 'primary key' => array(
  7320. ),
  7321. 'unique keys' => array(
  7322. ),
  7323. 'indexes' => array(
  7324. ),
  7325. 'foreign keys' => array(
  7326. ),
  7327. );
  7328. return $description;
  7329. }
  7330. /**
  7331. * Implements hook_contact_schema()
  7332. * Purpose: To describe the structure of contact to tripal
  7333. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7334. * @see tripal_core.api.inc: tripal_core_chado_update()
  7335. * @see tripal_core.api.inc: tripal_core_chado_select()
  7336. *
  7337. * @return
  7338. * An array describing the current table
  7339. *
  7340. * @ingroup tripal_schema_api
  7341. *
  7342. */
  7343. function tripal_core_chado_contact_schema () {
  7344. $description = array();
  7345. $description = array(
  7346. 'table' => 'contact',
  7347. // 'description' => 'TODO: please describe this table!',
  7348. 'fields' => array(
  7349. 'contact_id' => array(
  7350. // 'description' => 'TODO: please describe this field!',
  7351. 'type' => 'serial',
  7352. 'not null' => '1',
  7353. ),
  7354. 'type_id' => array(
  7355. // 'description' => 'TODO: please describe this field!',
  7356. 'type' => 'int',
  7357. 'not null' => '',
  7358. ),
  7359. 'name' => array(
  7360. // 'description' => 'TODO: please describe this field!',
  7361. 'type' => 'varchar',
  7362. 'length' => '255',
  7363. 'not null' => '1',
  7364. ),
  7365. 'description' => array(
  7366. // 'description' => 'TODO: please describe this field!',
  7367. 'type' => 'varchar',
  7368. 'length' => '255',
  7369. 'not null' => '',
  7370. ),
  7371. ),
  7372. 'primary key' => array(
  7373. '0' => 'contact_id',
  7374. ),
  7375. 'unique keys' => array(
  7376. 'contact_c1' => array(
  7377. '0' => 'name',
  7378. ),
  7379. ),
  7380. 'indexes' => array(
  7381. ),
  7382. 'foreign keys' => array(
  7383. ),
  7384. );
  7385. return $description;
  7386. }
  7387. /**
  7388. * Implements hook_contact_relationship_schema()
  7389. * Purpose: To describe the structure of contact_relationship to tripal
  7390. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7391. * @see tripal_core.api.inc: tripal_core_chado_update()
  7392. * @see tripal_core.api.inc: tripal_core_chado_select()
  7393. *
  7394. * @return
  7395. * An array describing the current table
  7396. *
  7397. * @ingroup tripal_schema_api
  7398. *
  7399. */
  7400. function tripal_core_chado_contact_relationship_schema () {
  7401. $description = array();
  7402. $description = array(
  7403. 'table' => 'contact_relationship',
  7404. // 'description' => 'TODO: please describe this table!',
  7405. 'fields' => array(
  7406. 'contact_relationship_id' => array(
  7407. // 'description' => 'TODO: please describe this field!',
  7408. 'type' => 'serial',
  7409. 'not null' => '1',
  7410. ),
  7411. 'type_id' => array(
  7412. // 'description' => 'TODO: please describe this field!',
  7413. 'type' => 'int',
  7414. 'not null' => '1',
  7415. ),
  7416. 'subject_id' => array(
  7417. // 'description' => 'TODO: please describe this field!',
  7418. 'type' => 'int',
  7419. 'not null' => '1',
  7420. ),
  7421. 'object_id' => array(
  7422. // 'description' => 'TODO: please describe this field!',
  7423. 'type' => 'int',
  7424. 'not null' => '1',
  7425. ),
  7426. ),
  7427. 'primary key' => array(
  7428. '0' => 'contact_relationship_id',
  7429. ),
  7430. 'unique keys' => array(
  7431. 'contact_relationship_c1' => array(
  7432. '0' => 'subject_id',
  7433. '1' => 'object_id',
  7434. '2' => 'type_id',
  7435. ),
  7436. ),
  7437. 'indexes' => array(
  7438. 'contact_relationship_idx1' => array(
  7439. '0' => 'type_id',
  7440. ),
  7441. 'contact_relationship_idx2' => array(
  7442. '0' => 'subject_id',
  7443. ),
  7444. 'contact_relationship_idx3' => array(
  7445. '0' => 'object_id',
  7446. ),
  7447. ),
  7448. 'foreign keys' => array(
  7449. ),
  7450. );
  7451. return $description;
  7452. }
  7453. /**
  7454. * Implements hook_control_schema()
  7455. * Purpose: To describe the structure of control to tripal
  7456. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7457. * @see tripal_core.api.inc: tripal_core_chado_update()
  7458. * @see tripal_core.api.inc: tripal_core_chado_select()
  7459. *
  7460. * @return
  7461. * An array describing the current table
  7462. *
  7463. * @ingroup tripal_schema_api
  7464. *
  7465. */
  7466. function tripal_core_chado_control_schema () {
  7467. $description = array();
  7468. $description = array(
  7469. 'table' => 'control',
  7470. // 'description' => 'TODO: please describe this table!',
  7471. 'fields' => array(
  7472. 'control_id' => array(
  7473. // 'description' => 'TODO: please describe this field!',
  7474. 'type' => 'serial',
  7475. 'not null' => '1',
  7476. ),
  7477. 'type_id' => array(
  7478. // 'description' => 'TODO: please describe this field!',
  7479. 'type' => 'int',
  7480. 'not null' => '1',
  7481. ),
  7482. 'assay_id' => array(
  7483. // 'description' => 'TODO: please describe this field!',
  7484. 'type' => 'int',
  7485. 'not null' => '1',
  7486. ),
  7487. 'tableinfo_id' => array(
  7488. // 'description' => 'TODO: please describe this field!',
  7489. 'type' => 'int',
  7490. 'not null' => '1',
  7491. ),
  7492. 'row_id' => array(
  7493. // 'description' => 'TODO: please describe this field!',
  7494. 'type' => 'int',
  7495. 'not null' => '1',
  7496. ),
  7497. 'name' => array(
  7498. // 'description' => 'TODO: please describe this field!',
  7499. 'type' => 'text',
  7500. 'not null' => '',
  7501. ),
  7502. 'value' => array(
  7503. // 'description' => 'TODO: please describe this field!',
  7504. 'type' => 'text',
  7505. 'not null' => '',
  7506. ),
  7507. 'rank' => array(
  7508. // 'description' => 'TODO: please describe this field!',
  7509. 'type' => 'int',
  7510. 'not null' => '1',
  7511. 'default' => '0',
  7512. ),
  7513. ),
  7514. 'primary key' => array(
  7515. '0' => 'control_id',
  7516. ),
  7517. 'unique keys' => array(
  7518. ),
  7519. 'indexes' => array(
  7520. 'control_idx1' => array(
  7521. '0' => 'type_id',
  7522. ),
  7523. 'control_idx2' => array(
  7524. '0' => 'assay_id',
  7525. ),
  7526. 'control_idx3' => array(
  7527. '0' => 'tableinfo_id',
  7528. ),
  7529. 'control_idx4' => array(
  7530. '0' => 'row_id',
  7531. ),
  7532. ),
  7533. 'foreign keys' => array(
  7534. ),
  7535. );
  7536. return $description;
  7537. }
  7538. /**
  7539. * Implements hook_biomaterialprop_schema()
  7540. * Purpose: To describe the structure of biomaterialprop to tripal
  7541. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7542. * @see tripal_core.api.inc: tripal_core_chado_update()
  7543. * @see tripal_core.api.inc: tripal_core_chado_select()
  7544. *
  7545. * @return
  7546. * An array describing the current table
  7547. *
  7548. * @ingroup tripal_schema_api
  7549. *
  7550. */
  7551. function tripal_core_chado_biomaterialprop_schema () {
  7552. $description = array();
  7553. $description = array(
  7554. 'table' => 'biomaterialprop',
  7555. // 'description' => 'TODO: please describe this table!',
  7556. 'fields' => array(
  7557. 'biomaterialprop_id' => array(
  7558. // 'description' => 'TODO: please describe this field!',
  7559. 'type' => 'serial',
  7560. 'not null' => '1',
  7561. ),
  7562. 'biomaterial_id' => array(
  7563. // 'description' => 'TODO: please describe this field!',
  7564. 'type' => 'int',
  7565. 'not null' => '1',
  7566. ),
  7567. 'type_id' => array(
  7568. // 'description' => 'TODO: please describe this field!',
  7569. 'type' => 'int',
  7570. 'not null' => '1',
  7571. ),
  7572. 'value' => array(
  7573. // 'description' => 'TODO: please describe this field!',
  7574. 'type' => 'text',
  7575. 'not null' => '',
  7576. ),
  7577. 'rank' => array(
  7578. // 'description' => 'TODO: please describe this field!',
  7579. 'type' => 'int',
  7580. 'not null' => '1',
  7581. 'default' => '0',
  7582. ),
  7583. ),
  7584. 'primary key' => array(
  7585. '0' => 'biomaterialprop_id',
  7586. ),
  7587. 'unique keys' => array(
  7588. 'biomaterialprop_c1' => array(
  7589. '0' => 'biomaterial_id',
  7590. '1' => 'type_id',
  7591. '2' => 'rank',
  7592. ),
  7593. ),
  7594. 'indexes' => array(
  7595. 'biomaterialprop_idx1' => array(
  7596. '0' => 'biomaterial_id',
  7597. ),
  7598. 'biomaterialprop_idx2' => array(
  7599. '0' => 'type_id',
  7600. ),
  7601. ),
  7602. 'foreign keys' => array(
  7603. ),
  7604. );
  7605. return $description;
  7606. }
  7607. /**
  7608. * Implements hook_biomaterial_treatment_schema()
  7609. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7610. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7611. * @see tripal_core.api.inc: tripal_core_chado_update()
  7612. * @see tripal_core.api.inc: tripal_core_chado_select()
  7613. *
  7614. * @return
  7615. * An array describing the current table
  7616. *
  7617. * @ingroup tripal_schema_api
  7618. *
  7619. */
  7620. function tripal_core_chado_biomaterial_treatment_schema () {
  7621. $description = array();
  7622. $description = array(
  7623. 'table' => 'biomaterial_treatment',
  7624. // 'description' => 'TODO: please describe this table!',
  7625. 'fields' => array(
  7626. 'biomaterial_treatment_id' => array(
  7627. // 'description' => 'TODO: please describe this field!',
  7628. 'type' => 'serial',
  7629. 'not null' => '1',
  7630. ),
  7631. 'biomaterial_id' => array(
  7632. // 'description' => 'TODO: please describe this field!',
  7633. 'type' => 'int',
  7634. 'not null' => '1',
  7635. ),
  7636. 'treatment_id' => array(
  7637. // 'description' => 'TODO: please describe this field!',
  7638. 'type' => 'int',
  7639. 'not null' => '1',
  7640. ),
  7641. 'unittype_id' => array(
  7642. // 'description' => 'TODO: please describe this field!',
  7643. 'type' => 'int',
  7644. 'not null' => '',
  7645. ),
  7646. 'value' => array(
  7647. // 'description' => 'TODO: please describe this field!',
  7648. 'type' => 'float',
  7649. 'not null' => '',
  7650. ),
  7651. 'rank' => array(
  7652. // 'description' => 'TODO: please describe this field!',
  7653. 'type' => 'int',
  7654. 'not null' => '1',
  7655. 'default' => '0',
  7656. ),
  7657. ),
  7658. 'primary key' => array(
  7659. '0' => 'biomaterial_treatment_id',
  7660. ),
  7661. 'unique keys' => array(
  7662. 'biomaterial_treatment_c1' => array(
  7663. '0' => 'biomaterial_id',
  7664. '1' => 'treatment_id',
  7665. ),
  7666. ),
  7667. 'indexes' => array(
  7668. 'biomaterial_treatment_idx1' => array(
  7669. '0' => 'biomaterial_id',
  7670. ),
  7671. 'biomaterial_treatment_idx2' => array(
  7672. '0' => 'treatment_id',
  7673. ),
  7674. 'biomaterial_treatment_idx3' => array(
  7675. '0' => 'unittype_id',
  7676. ),
  7677. ),
  7678. 'foreign keys' => array(
  7679. ),
  7680. );
  7681. return $description;
  7682. }
  7683. /**
  7684. * Implements hook_acquisition_relationship_schema()
  7685. * Purpose: To describe the structure of acquisition_relationship to tripal
  7686. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7687. * @see tripal_core.api.inc: tripal_core_chado_update()
  7688. * @see tripal_core.api.inc: tripal_core_chado_select()
  7689. *
  7690. * @return
  7691. * An array describing the current table
  7692. *
  7693. * @ingroup tripal_schema_api
  7694. *
  7695. */
  7696. function tripal_core_chado_acquisition_relationship_schema () {
  7697. $description = array();
  7698. $description = array(
  7699. 'table' => 'acquisition_relationship',
  7700. // 'description' => 'TODO: please describe this table!',
  7701. 'fields' => array(
  7702. 'acquisition_relationship_id' => array(
  7703. // 'description' => 'TODO: please describe this field!',
  7704. 'type' => 'serial',
  7705. 'not null' => '1',
  7706. ),
  7707. 'subject_id' => array(
  7708. // 'description' => 'TODO: please describe this field!',
  7709. 'type' => 'int',
  7710. 'not null' => '1',
  7711. ),
  7712. 'type_id' => array(
  7713. // 'description' => 'TODO: please describe this field!',
  7714. 'type' => 'int',
  7715. 'not null' => '1',
  7716. ),
  7717. 'object_id' => array(
  7718. // 'description' => 'TODO: please describe this field!',
  7719. 'type' => 'int',
  7720. 'not null' => '1',
  7721. ),
  7722. 'value' => array(
  7723. // 'description' => 'TODO: please describe this field!',
  7724. 'type' => 'text',
  7725. 'not null' => '',
  7726. ),
  7727. 'rank' => array(
  7728. // 'description' => 'TODO: please describe this field!',
  7729. 'type' => 'int',
  7730. 'not null' => '1',
  7731. 'default' => '0',
  7732. ),
  7733. ),
  7734. 'primary key' => array(
  7735. '0' => 'acquisition_relationship_id',
  7736. ),
  7737. 'unique keys' => array(
  7738. 'acquisition_relationship_c1' => array(
  7739. '0' => 'subject_id',
  7740. '1' => 'object_id',
  7741. '2' => 'type_id',
  7742. '3' => 'rank',
  7743. ),
  7744. ),
  7745. 'indexes' => array(
  7746. 'acquisition_relationship_idx1' => array(
  7747. '0' => 'subject_id',
  7748. ),
  7749. 'acquisition_relationship_idx2' => array(
  7750. '0' => 'type_id',
  7751. ),
  7752. 'acquisition_relationship_idx3' => array(
  7753. '0' => 'object_id',
  7754. ),
  7755. ),
  7756. 'foreign keys' => array(
  7757. ),
  7758. );
  7759. return $description;
  7760. }
  7761. /**
  7762. * Implements hook_acquisition_schema()
  7763. * Purpose: To describe the structure of acquisition to tripal
  7764. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7765. * @see tripal_core.api.inc: tripal_core_chado_update()
  7766. * @see tripal_core.api.inc: tripal_core_chado_select()
  7767. *
  7768. * @return
  7769. * An array describing the current table
  7770. *
  7771. * @ingroup tripal_schema_api
  7772. *
  7773. */
  7774. function tripal_core_chado_acquisition_schema () {
  7775. $description = array();
  7776. $description = array(
  7777. 'table' => 'acquisition',
  7778. // 'description' => 'TODO: please describe this table!',
  7779. 'fields' => array(
  7780. 'acquisition_id' => array(
  7781. // 'description' => 'TODO: please describe this field!',
  7782. 'type' => 'serial',
  7783. 'not null' => '1',
  7784. ),
  7785. 'assay_id' => array(
  7786. // 'description' => 'TODO: please describe this field!',
  7787. 'type' => 'int',
  7788. 'not null' => '1',
  7789. ),
  7790. 'protocol_id' => array(
  7791. // 'description' => 'TODO: please describe this field!',
  7792. 'type' => 'int',
  7793. 'not null' => '',
  7794. ),
  7795. 'channel_id' => array(
  7796. // 'description' => 'TODO: please describe this field!',
  7797. 'type' => 'int',
  7798. 'not null' => '',
  7799. ),
  7800. 'acquisitiondate' => array(
  7801. // 'description' => 'TODO: please describe this field!',
  7802. 'type' => 'datetime',
  7803. 'not null' => '',
  7804. 'default' => 'ow(',
  7805. ),
  7806. 'name' => array(
  7807. // 'description' => 'TODO: please describe this field!',
  7808. 'type' => 'text',
  7809. 'not null' => '',
  7810. ),
  7811. 'uri' => array(
  7812. // 'description' => 'TODO: please describe this field!',
  7813. 'type' => 'text',
  7814. 'not null' => '',
  7815. ),
  7816. ),
  7817. 'primary key' => array(
  7818. '0' => 'acquisition_id',
  7819. ),
  7820. 'unique keys' => array(
  7821. 'acquisition_c1' => array(
  7822. '0' => 'name',
  7823. ),
  7824. ),
  7825. 'indexes' => array(
  7826. 'acquisition_idx1' => array(
  7827. '0' => 'assay_id',
  7828. ),
  7829. 'acquisition_idx2' => array(
  7830. '0' => 'protocol_id',
  7831. ),
  7832. 'acquisition_idx3' => array(
  7833. '0' => 'channel_id',
  7834. ),
  7835. ),
  7836. 'foreign keys' => array(
  7837. ),
  7838. );
  7839. return $description;
  7840. }
  7841. /**
  7842. * Implements hook_acquisitionprop_schema()
  7843. * Purpose: To describe the structure of acquisitionprop to tripal
  7844. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7845. * @see tripal_core.api.inc: tripal_core_chado_update()
  7846. * @see tripal_core.api.inc: tripal_core_chado_select()
  7847. *
  7848. * @return
  7849. * An array describing the current table
  7850. *
  7851. * @ingroup tripal_schema_api
  7852. *
  7853. */
  7854. function tripal_core_chado_acquisitionprop_schema () {
  7855. $description = array();
  7856. $description = array(
  7857. 'table' => 'acquisitionprop',
  7858. // 'description' => 'TODO: please describe this table!',
  7859. 'fields' => array(
  7860. 'acquisitionprop_id' => array(
  7861. // 'description' => 'TODO: please describe this field!',
  7862. 'type' => 'serial',
  7863. 'not null' => '1',
  7864. ),
  7865. 'acquisition_id' => array(
  7866. // 'description' => 'TODO: please describe this field!',
  7867. 'type' => 'int',
  7868. 'not null' => '1',
  7869. ),
  7870. 'type_id' => array(
  7871. // 'description' => 'TODO: please describe this field!',
  7872. 'type' => 'int',
  7873. 'not null' => '1',
  7874. ),
  7875. 'value' => array(
  7876. // 'description' => 'TODO: please describe this field!',
  7877. 'type' => 'text',
  7878. 'not null' => '',
  7879. ),
  7880. 'rank' => array(
  7881. // 'description' => 'TODO: please describe this field!',
  7882. 'type' => 'int',
  7883. 'not null' => '1',
  7884. 'default' => '0',
  7885. ),
  7886. ),
  7887. 'primary key' => array(
  7888. '0' => 'acquisitionprop_id',
  7889. ),
  7890. 'unique keys' => array(
  7891. 'acquisitionprop_c1' => array(
  7892. '0' => 'acquisition_id',
  7893. '1' => 'type_id',
  7894. '2' => 'rank',
  7895. ),
  7896. ),
  7897. 'indexes' => array(
  7898. 'acquisitionprop_idx1' => array(
  7899. '0' => 'acquisition_id',
  7900. ),
  7901. 'acquisitionprop_idx2' => array(
  7902. '0' => 'type_id',
  7903. ),
  7904. ),
  7905. 'foreign keys' => array(
  7906. ),
  7907. );
  7908. return $description;
  7909. }
  7910. /**
  7911. * Implements hook_all_feature_names_schema()
  7912. * Purpose: To describe the structure of all_feature_names to tripal
  7913. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7914. * @see tripal_core.api.inc: tripal_core_chado_update()
  7915. * @see tripal_core.api.inc: tripal_core_chado_select()
  7916. *
  7917. * @return
  7918. * An array describing the current table
  7919. *
  7920. * @ingroup tripal_schema_api
  7921. *
  7922. */
  7923. function tripal_core_chado_all_feature_names_schema () {
  7924. $description = array();
  7925. $description = array(
  7926. 'table' => 'all_feature_names',
  7927. // 'description' => 'TODO: please describe this table!',
  7928. 'fields' => array(
  7929. 'feature_id' => array(
  7930. // 'description' => 'TODO: please describe this field!',
  7931. 'type' => 'int',
  7932. 'not null' => '',
  7933. ),
  7934. 'name' => array(
  7935. // 'description' => 'TODO: please describe this field!',
  7936. 'type' => 'varchar',
  7937. 'length' => '255',
  7938. 'not null' => '',
  7939. ),
  7940. 'organism_id' => array(
  7941. // 'description' => 'TODO: please describe this field!',
  7942. 'type' => 'int',
  7943. 'not null' => '',
  7944. ),
  7945. ),
  7946. 'primary key' => array(
  7947. ),
  7948. 'unique keys' => array(
  7949. ),
  7950. 'indexes' => array(
  7951. ),
  7952. 'foreign keys' => array(
  7953. ),
  7954. );
  7955. return $description;
  7956. }
  7957. /**
  7958. * Implements hook_analysis_schema()
  7959. * Purpose: To describe the structure of analysis to tripal
  7960. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7961. * @see tripal_core.api.inc: tripal_core_chado_update()
  7962. * @see tripal_core.api.inc: tripal_core_chado_select()
  7963. *
  7964. * @return
  7965. * An array describing the current table
  7966. *
  7967. * @ingroup tripal_schema_api
  7968. *
  7969. */
  7970. function tripal_core_chado_analysis_schema () {
  7971. $description = array();
  7972. $description = array(
  7973. 'table' => 'analysis',
  7974. // 'description' => 'TODO: please describe this table!',
  7975. 'fields' => array(
  7976. 'analysis_id' => array(
  7977. // 'description' => 'TODO: please describe this field!',
  7978. 'type' => 'serial',
  7979. 'not null' => '1',
  7980. ),
  7981. 'name' => array(
  7982. // 'description' => 'TODO: please describe this field!',
  7983. 'type' => 'varchar',
  7984. 'length' => '255',
  7985. 'not null' => '',
  7986. ),
  7987. 'description' => array(
  7988. // 'description' => 'TODO: please describe this field!',
  7989. 'type' => 'text',
  7990. 'not null' => '',
  7991. ),
  7992. 'program' => array(
  7993. // 'description' => 'TODO: please describe this field!',
  7994. 'type' => 'varchar',
  7995. 'length' => '255',
  7996. 'not null' => '1',
  7997. ),
  7998. 'programversion' => array(
  7999. // 'description' => 'TODO: please describe this field!',
  8000. 'type' => 'varchar',
  8001. 'length' => '255',
  8002. 'not null' => '1',
  8003. ),
  8004. 'algorithm' => array(
  8005. // 'description' => 'TODO: please describe this field!',
  8006. 'type' => 'varchar',
  8007. 'length' => '255',
  8008. 'not null' => '',
  8009. ),
  8010. 'sourcename' => array(
  8011. // 'description' => 'TODO: please describe this field!',
  8012. 'type' => 'varchar',
  8013. 'length' => '255',
  8014. 'not null' => '',
  8015. ),
  8016. 'sourceversion' => array(
  8017. // 'description' => 'TODO: please describe this field!',
  8018. 'type' => 'varchar',
  8019. 'length' => '255',
  8020. 'not null' => '',
  8021. ),
  8022. 'sourceuri' => array(
  8023. // 'description' => 'TODO: please describe this field!',
  8024. 'type' => 'text',
  8025. 'not null' => '',
  8026. ),
  8027. 'timeexecuted' => array(
  8028. // 'description' => 'TODO: please describe this field!',
  8029. 'type' => 'datetime',
  8030. 'not null' => '1',
  8031. 'default' => 'ow(',
  8032. ),
  8033. ),
  8034. 'primary key' => array(
  8035. '0' => 'analysis_id',
  8036. ),
  8037. 'unique keys' => array(
  8038. 'analysis_c1' => array(
  8039. '0' => 'program',
  8040. '1' => 'programversion',
  8041. '2' => 'sourcename',
  8042. ),
  8043. ),
  8044. 'indexes' => array(
  8045. ),
  8046. 'foreign keys' => array(
  8047. ),
  8048. );
  8049. return $description;
  8050. }
  8051. /**
  8052. * Implements hook_analysisfeature_schema()
  8053. * Purpose: To describe the structure of analysisfeature to tripal
  8054. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8055. * @see tripal_core.api.inc: tripal_core_chado_update()
  8056. * @see tripal_core.api.inc: tripal_core_chado_select()
  8057. *
  8058. * @return
  8059. * An array describing the current table
  8060. *
  8061. * @ingroup tripal_schema_api
  8062. *
  8063. */
  8064. function tripal_core_chado_analysisfeature_schema () {
  8065. $description = array();
  8066. $description = array(
  8067. 'table' => 'analysisfeature',
  8068. // 'description' => 'TODO: please describe this table!',
  8069. 'fields' => array(
  8070. 'analysisfeature_id' => array(
  8071. // 'description' => 'TODO: please describe this field!',
  8072. 'type' => 'serial',
  8073. 'not null' => '1',
  8074. ),
  8075. 'feature_id' => array(
  8076. // 'description' => 'TODO: please describe this field!',
  8077. 'type' => 'int',
  8078. 'not null' => '1',
  8079. ),
  8080. 'analysis_id' => array(
  8081. // 'description' => 'TODO: please describe this field!',
  8082. 'type' => 'int',
  8083. 'not null' => '1',
  8084. ),
  8085. 'rawscore' => array(
  8086. // 'description' => 'TODO: please describe this field!',
  8087. 'type' => 'float',
  8088. 'size' => 'big',
  8089. 'not null' => '',
  8090. ),
  8091. 'normscore' => array(
  8092. // 'description' => 'TODO: please describe this field!',
  8093. 'type' => 'float',
  8094. 'size' => 'big',
  8095. 'not null' => '',
  8096. ),
  8097. 'significance' => array(
  8098. // 'description' => 'TODO: please describe this field!',
  8099. 'type' => 'float',
  8100. 'size' => 'big',
  8101. 'not null' => '',
  8102. ),
  8103. 'identity' => array(
  8104. // 'description' => 'TODO: please describe this field!',
  8105. 'type' => 'float',
  8106. 'size' => 'big',
  8107. 'not null' => '',
  8108. ),
  8109. ),
  8110. 'primary key' => array(
  8111. '0' => 'analysisfeature_id',
  8112. ),
  8113. 'unique keys' => array(
  8114. 'analysisfeature_c1' => array(
  8115. '0' => 'feature_id',
  8116. '1' => 'analysis_id',
  8117. ),
  8118. ),
  8119. 'indexes' => array(
  8120. 'analysisfeature_idx1' => array(
  8121. '0' => 'feature_id',
  8122. ),
  8123. 'analysisfeature_idx2' => array(
  8124. '0' => 'analysis_id',
  8125. ),
  8126. ),
  8127. 'foreign keys' => array(
  8128. ),
  8129. );
  8130. return $description;
  8131. }
  8132. /**
  8133. * Implements hook_analysisfeatureprop_schema()
  8134. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8135. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8136. * @see tripal_core.api.inc: tripal_core_chado_update()
  8137. * @see tripal_core.api.inc: tripal_core_chado_select()
  8138. *
  8139. * @return
  8140. * An array describing the current table
  8141. *
  8142. * @ingroup tripal_schema_api
  8143. *
  8144. */
  8145. function tripal_core_chado_analysisfeatureprop_schema () {
  8146. $description = array();
  8147. $description = array(
  8148. 'table' => 'analysisfeatureprop',
  8149. // 'description' => 'TODO: please describe this table!',
  8150. 'fields' => array(
  8151. 'analysisfeatureprop_id' => array(
  8152. // 'description' => 'TODO: please describe this field!',
  8153. 'type' => 'serial',
  8154. 'not null' => '1',
  8155. ),
  8156. 'analysisfeature_id' => array(
  8157. // 'description' => 'TODO: please describe this field!',
  8158. 'type' => 'int',
  8159. 'not null' => '1',
  8160. ),
  8161. 'type_id' => array(
  8162. // 'description' => 'TODO: please describe this field!',
  8163. 'type' => 'int',
  8164. 'not null' => '1',
  8165. ),
  8166. 'value' => array(
  8167. // 'description' => 'TODO: please describe this field!',
  8168. 'type' => 'text',
  8169. 'not null' => '',
  8170. ),
  8171. 'rank' => array(
  8172. // 'description' => 'TODO: please describe this field!',
  8173. 'type' => 'int',
  8174. 'not null' => '1',
  8175. ),
  8176. ),
  8177. 'primary key' => array(
  8178. '0' => 'analysisfeatureprop_id',
  8179. ),
  8180. 'unique keys' => array(
  8181. 'analysisfeature_id_type_id_rank' => array(
  8182. '0' => 'analysisfeature_id',
  8183. '1' => 'type_id',
  8184. '2' => 'rank',
  8185. ),
  8186. ),
  8187. 'indexes' => array(
  8188. ),
  8189. 'foreign keys' => array(
  8190. ),
  8191. );
  8192. return $description;
  8193. }
  8194. /**
  8195. * Implements hook_assayprop_schema()
  8196. * Purpose: To describe the structure of assayprop to tripal
  8197. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8198. * @see tripal_core.api.inc: tripal_core_chado_update()
  8199. * @see tripal_core.api.inc: tripal_core_chado_select()
  8200. *
  8201. * @return
  8202. * An array describing the current table
  8203. *
  8204. * @ingroup tripal_schema_api
  8205. *
  8206. */
  8207. function tripal_core_chado_assayprop_schema () {
  8208. $description = array();
  8209. $description = array(
  8210. 'table' => 'assayprop',
  8211. // 'description' => 'TODO: please describe this table!',
  8212. 'fields' => array(
  8213. 'assayprop_id' => array(
  8214. // 'description' => 'TODO: please describe this field!',
  8215. 'type' => 'serial',
  8216. 'not null' => '1',
  8217. ),
  8218. 'assay_id' => array(
  8219. // 'description' => 'TODO: please describe this field!',
  8220. 'type' => 'int',
  8221. 'not null' => '1',
  8222. ),
  8223. 'type_id' => array(
  8224. // 'description' => 'TODO: please describe this field!',
  8225. 'type' => 'int',
  8226. 'not null' => '1',
  8227. ),
  8228. 'value' => array(
  8229. // 'description' => 'TODO: please describe this field!',
  8230. 'type' => 'text',
  8231. 'not null' => '',
  8232. ),
  8233. 'rank' => array(
  8234. // 'description' => 'TODO: please describe this field!',
  8235. 'type' => 'int',
  8236. 'not null' => '1',
  8237. 'default' => '0',
  8238. ),
  8239. ),
  8240. 'primary key' => array(
  8241. '0' => 'assayprop_id',
  8242. ),
  8243. 'unique keys' => array(
  8244. 'assayprop_c1' => array(
  8245. '0' => 'assay_id',
  8246. '1' => 'type_id',
  8247. '2' => 'rank',
  8248. ),
  8249. ),
  8250. 'indexes' => array(
  8251. 'assayprop_idx1' => array(
  8252. '0' => 'assay_id',
  8253. ),
  8254. 'assayprop_idx2' => array(
  8255. '0' => 'type_id',
  8256. ),
  8257. ),
  8258. 'foreign keys' => array(
  8259. ),
  8260. );
  8261. return $description;
  8262. }
  8263. /**
  8264. * Implements hook_biomaterial_schema()
  8265. * Purpose: To describe the structure of biomaterial to tripal
  8266. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8267. * @see tripal_core.api.inc: tripal_core_chado_update()
  8268. * @see tripal_core.api.inc: tripal_core_chado_select()
  8269. *
  8270. * @return
  8271. * An array describing the current table
  8272. *
  8273. * @ingroup tripal_schema_api
  8274. *
  8275. */
  8276. function tripal_core_chado_biomaterial_schema () {
  8277. $description = array();
  8278. $description = array(
  8279. 'table' => 'biomaterial',
  8280. // 'description' => 'TODO: please describe this table!',
  8281. 'fields' => array(
  8282. 'biomaterial_id' => array(
  8283. // 'description' => 'TODO: please describe this field!',
  8284. 'type' => 'serial',
  8285. 'not null' => '1',
  8286. ),
  8287. 'taxon_id' => array(
  8288. // 'description' => 'TODO: please describe this field!',
  8289. 'type' => 'int',
  8290. 'not null' => '',
  8291. ),
  8292. 'biosourceprovider_id' => array(
  8293. // 'description' => 'TODO: please describe this field!',
  8294. 'type' => 'int',
  8295. 'not null' => '',
  8296. ),
  8297. 'dbxref_id' => array(
  8298. // 'description' => 'TODO: please describe this field!',
  8299. 'type' => 'int',
  8300. 'not null' => '',
  8301. ),
  8302. 'name' => array(
  8303. // 'description' => 'TODO: please describe this field!',
  8304. 'type' => 'text',
  8305. 'not null' => '',
  8306. ),
  8307. 'description' => array(
  8308. // 'description' => 'TODO: please describe this field!',
  8309. 'type' => 'text',
  8310. 'not null' => '',
  8311. ),
  8312. ),
  8313. 'primary key' => array(
  8314. '0' => 'biomaterial_id',
  8315. ),
  8316. 'unique keys' => array(
  8317. 'biomaterial_c1' => array(
  8318. '0' => 'name',
  8319. ),
  8320. ),
  8321. 'indexes' => array(
  8322. 'biomaterial_idx1' => array(
  8323. '0' => 'taxon_id',
  8324. ),
  8325. 'biomaterial_idx2' => array(
  8326. '0' => 'biosourceprovider_id',
  8327. ),
  8328. 'biomaterial_idx3' => array(
  8329. '0' => 'dbxref_id',
  8330. ),
  8331. ),
  8332. 'foreign keys' => array(
  8333. ),
  8334. );
  8335. return $description;
  8336. }
  8337. /**
  8338. * Implements hook_biomaterial_dbxref_schema()
  8339. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8340. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8341. * @see tripal_core.api.inc: tripal_core_chado_update()
  8342. * @see tripal_core.api.inc: tripal_core_chado_select()
  8343. *
  8344. * @return
  8345. * An array describing the current table
  8346. *
  8347. * @ingroup tripal_schema_api
  8348. *
  8349. */
  8350. function tripal_core_chado_biomaterial_dbxref_schema () {
  8351. $description = array();
  8352. $description = array(
  8353. 'table' => 'biomaterial_dbxref',
  8354. // 'description' => 'TODO: please describe this table!',
  8355. 'fields' => array(
  8356. 'biomaterial_dbxref_id' => array(
  8357. // 'description' => 'TODO: please describe this field!',
  8358. 'type' => 'serial',
  8359. 'not null' => '1',
  8360. ),
  8361. 'biomaterial_id' => array(
  8362. // 'description' => 'TODO: please describe this field!',
  8363. 'type' => 'int',
  8364. 'not null' => '1',
  8365. ),
  8366. 'dbxref_id' => array(
  8367. // 'description' => 'TODO: please describe this field!',
  8368. 'type' => 'int',
  8369. 'not null' => '1',
  8370. ),
  8371. ),
  8372. 'primary key' => array(
  8373. '0' => 'biomaterial_dbxref_id',
  8374. ),
  8375. 'unique keys' => array(
  8376. 'biomaterial_dbxref_c1' => array(
  8377. '0' => 'biomaterial_id',
  8378. '1' => 'dbxref_id',
  8379. ),
  8380. ),
  8381. 'indexes' => array(
  8382. 'biomaterial_dbxref_idx1' => array(
  8383. '0' => 'biomaterial_id',
  8384. ),
  8385. 'biomaterial_dbxref_idx2' => array(
  8386. '0' => 'dbxref_id',
  8387. ),
  8388. ),
  8389. 'foreign keys' => array(
  8390. ),
  8391. );
  8392. return $description;
  8393. }
  8394. /**
  8395. * Implements hook_biomaterial_relationship_schema()
  8396. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8397. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8398. * @see tripal_core.api.inc: tripal_core_chado_update()
  8399. * @see tripal_core.api.inc: tripal_core_chado_select()
  8400. *
  8401. * @return
  8402. * An array describing the current table
  8403. *
  8404. * @ingroup tripal_schema_api
  8405. *
  8406. */
  8407. function tripal_core_chado_biomaterial_relationship_schema () {
  8408. $description = array();
  8409. $description = array(
  8410. 'table' => 'biomaterial_relationship',
  8411. // 'description' => 'TODO: please describe this table!',
  8412. 'fields' => array(
  8413. 'biomaterial_relationship_id' => array(
  8414. // 'description' => 'TODO: please describe this field!',
  8415. 'type' => 'serial',
  8416. 'not null' => '1',
  8417. ),
  8418. 'subject_id' => array(
  8419. // 'description' => 'TODO: please describe this field!',
  8420. 'type' => 'int',
  8421. 'not null' => '1',
  8422. ),
  8423. 'type_id' => array(
  8424. // 'description' => 'TODO: please describe this field!',
  8425. 'type' => 'int',
  8426. 'not null' => '1',
  8427. ),
  8428. 'object_id' => array(
  8429. // 'description' => 'TODO: please describe this field!',
  8430. 'type' => 'int',
  8431. 'not null' => '1',
  8432. ),
  8433. ),
  8434. 'primary key' => array(
  8435. '0' => 'biomaterial_relationship_id',
  8436. ),
  8437. 'unique keys' => array(
  8438. 'biomaterial_relationship_c1' => array(
  8439. '0' => 'subject_id',
  8440. '1' => 'object_id',
  8441. '2' => 'type_id',
  8442. ),
  8443. ),
  8444. 'indexes' => array(
  8445. 'biomaterial_relationship_idx1' => array(
  8446. '0' => 'subject_id',
  8447. ),
  8448. 'biomaterial_relationship_idx2' => array(
  8449. '0' => 'object_id',
  8450. ),
  8451. 'biomaterial_relationship_idx3' => array(
  8452. '0' => 'type_id',
  8453. ),
  8454. ),
  8455. 'foreign keys' => array(
  8456. ),
  8457. );
  8458. return $description;
  8459. }
  8460. /**
  8461. * Implements hook_assay_project_schema()
  8462. * Purpose: To describe the structure of assay_project to tripal
  8463. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8464. * @see tripal_core.api.inc: tripal_core_chado_update()
  8465. * @see tripal_core.api.inc: tripal_core_chado_select()
  8466. *
  8467. * @return
  8468. * An array describing the current table
  8469. *
  8470. * @ingroup tripal_schema_api
  8471. *
  8472. */
  8473. function tripal_core_chado_assay_project_schema () {
  8474. $description = array();
  8475. $description = array(
  8476. 'table' => 'assay_project',
  8477. // 'description' => 'TODO: please describe this table!',
  8478. 'fields' => array(
  8479. 'assay_project_id' => array(
  8480. // 'description' => 'TODO: please describe this field!',
  8481. 'type' => 'serial',
  8482. 'not null' => '1',
  8483. ),
  8484. 'assay_id' => array(
  8485. // 'description' => 'TODO: please describe this field!',
  8486. 'type' => 'int',
  8487. 'not null' => '1',
  8488. ),
  8489. 'project_id' => array(
  8490. // 'description' => 'TODO: please describe this field!',
  8491. 'type' => 'int',
  8492. 'not null' => '1',
  8493. ),
  8494. ),
  8495. 'primary key' => array(
  8496. '0' => 'assay_project_id',
  8497. ),
  8498. 'unique keys' => array(
  8499. 'assay_project_c1' => array(
  8500. '0' => 'assay_id',
  8501. '1' => 'project_id',
  8502. ),
  8503. ),
  8504. 'indexes' => array(
  8505. 'assay_project_idx1' => array(
  8506. '0' => 'assay_id',
  8507. ),
  8508. 'assay_project_idx2' => array(
  8509. '0' => 'project_id',
  8510. ),
  8511. ),
  8512. 'foreign keys' => array(
  8513. ),
  8514. );
  8515. return $description;
  8516. }
  8517. /**
  8518. * Implements hook_assay_biomaterial_schema()
  8519. * Purpose: To describe the structure of assay_biomaterial to tripal
  8520. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8521. * @see tripal_core.api.inc: tripal_core_chado_update()
  8522. * @see tripal_core.api.inc: tripal_core_chado_select()
  8523. *
  8524. * @return
  8525. * An array describing the current table
  8526. *
  8527. * @ingroup tripal_schema_api
  8528. *
  8529. */
  8530. function tripal_core_chado_assay_biomaterial_schema () {
  8531. $description = array();
  8532. $description = array(
  8533. 'table' => 'assay_biomaterial',
  8534. // 'description' => 'TODO: please describe this table!',
  8535. 'fields' => array(
  8536. 'assay_biomaterial_id' => array(
  8537. // 'description' => 'TODO: please describe this field!',
  8538. 'type' => 'serial',
  8539. 'not null' => '1',
  8540. ),
  8541. 'assay_id' => array(
  8542. // 'description' => 'TODO: please describe this field!',
  8543. 'type' => 'int',
  8544. 'not null' => '1',
  8545. ),
  8546. 'biomaterial_id' => array(
  8547. // 'description' => 'TODO: please describe this field!',
  8548. 'type' => 'int',
  8549. 'not null' => '1',
  8550. ),
  8551. 'channel_id' => array(
  8552. // 'description' => 'TODO: please describe this field!',
  8553. 'type' => 'int',
  8554. 'not null' => '',
  8555. ),
  8556. 'rank' => array(
  8557. // 'description' => 'TODO: please describe this field!',
  8558. 'type' => 'int',
  8559. 'not null' => '1',
  8560. 'default' => '0',
  8561. ),
  8562. ),
  8563. 'primary key' => array(
  8564. '0' => 'assay_biomaterial_id',
  8565. ),
  8566. 'unique keys' => array(
  8567. 'assay_biomaterial_c1' => array(
  8568. '0' => 'assay_id',
  8569. '1' => 'biomaterial_id',
  8570. '2' => 'channel_id',
  8571. '3' => 'rank',
  8572. ),
  8573. ),
  8574. 'indexes' => array(
  8575. 'assay_biomaterial_idx1' => array(
  8576. '0' => 'assay_id',
  8577. ),
  8578. 'assay_biomaterial_idx2' => array(
  8579. '0' => 'biomaterial_id',
  8580. ),
  8581. 'assay_biomaterial_idx3' => array(
  8582. '0' => 'channel_id',
  8583. ),
  8584. ),
  8585. 'foreign keys' => array(
  8586. ),
  8587. );
  8588. return $description;
  8589. }
  8590. /**
  8591. * Implements hook_analysisprop_schema()
  8592. * Purpose: To describe the structure of analysisprop to tripal
  8593. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8594. * @see tripal_core.api.inc: tripal_core_chado_update()
  8595. * @see tripal_core.api.inc: tripal_core_chado_select()
  8596. *
  8597. * @return
  8598. * An array describing the current table
  8599. *
  8600. * @ingroup tripal_schema_api
  8601. *
  8602. */
  8603. function tripal_core_chado_analysisprop_schema () {
  8604. $description = array();
  8605. $description = array(
  8606. 'table' => 'analysisprop',
  8607. // 'description' => 'TODO: please describe this table!',
  8608. 'fields' => array(
  8609. 'analysisprop_id' => array(
  8610. // 'description' => 'TODO: please describe this field!',
  8611. 'type' => 'serial',
  8612. 'not null' => '1',
  8613. ),
  8614. 'analysis_id' => array(
  8615. // 'description' => 'TODO: please describe this field!',
  8616. 'type' => 'int',
  8617. 'not null' => '1',
  8618. ),
  8619. 'type_id' => array(
  8620. // 'description' => 'TODO: please describe this field!',
  8621. 'type' => 'int',
  8622. 'not null' => '1',
  8623. ),
  8624. 'value' => array(
  8625. // 'description' => 'TODO: please describe this field!',
  8626. 'type' => 'text',
  8627. 'not null' => '',
  8628. ),
  8629. 'rank' => array(
  8630. // 'description' => 'TODO: please describe this field!',
  8631. 'type' => 'int',
  8632. 'not null' => '1',
  8633. 'default' => '0',
  8634. ),
  8635. ),
  8636. 'primary key' => array(
  8637. '0' => 'analysisprop_id',
  8638. ),
  8639. 'unique keys' => array(
  8640. 'analysisprop_c1' => array(
  8641. '0' => 'analysis_id',
  8642. '1' => 'type_id',
  8643. '2' => 'rank',
  8644. ),
  8645. ),
  8646. 'indexes' => array(
  8647. 'analysisprop_idx1' => array(
  8648. '0' => 'analysis_id',
  8649. ),
  8650. 'analysisprop_idx2' => array(
  8651. '0' => 'type_id',
  8652. ),
  8653. ),
  8654. 'foreign keys' => array(
  8655. ),
  8656. );
  8657. return $description;
  8658. }
  8659. /**
  8660. * Implements hook_arraydesign_schema()
  8661. * Purpose: To describe the structure of arraydesign to tripal
  8662. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8663. * @see tripal_core.api.inc: tripal_core_chado_update()
  8664. * @see tripal_core.api.inc: tripal_core_chado_select()
  8665. *
  8666. * @return
  8667. * An array describing the current table
  8668. *
  8669. * @ingroup tripal_schema_api
  8670. *
  8671. */
  8672. function tripal_core_chado_arraydesign_schema () {
  8673. $description = array();
  8674. $description = array(
  8675. 'table' => 'arraydesign',
  8676. // 'description' => 'TODO: please describe this table!',
  8677. 'fields' => array(
  8678. 'arraydesign_id' => array(
  8679. // 'description' => 'TODO: please describe this field!',
  8680. 'type' => 'serial',
  8681. 'not null' => '1',
  8682. ),
  8683. 'manufacturer_id' => array(
  8684. // 'description' => 'TODO: please describe this field!',
  8685. 'type' => 'int',
  8686. 'not null' => '1',
  8687. ),
  8688. 'platformtype_id' => array(
  8689. // 'description' => 'TODO: please describe this field!',
  8690. 'type' => 'int',
  8691. 'not null' => '1',
  8692. ),
  8693. 'substratetype_id' => array(
  8694. // 'description' => 'TODO: please describe this field!',
  8695. 'type' => 'int',
  8696. 'not null' => '',
  8697. ),
  8698. 'protocol_id' => array(
  8699. // 'description' => 'TODO: please describe this field!',
  8700. 'type' => 'int',
  8701. 'not null' => '',
  8702. ),
  8703. 'dbxref_id' => array(
  8704. // 'description' => 'TODO: please describe this field!',
  8705. 'type' => 'int',
  8706. 'not null' => '',
  8707. ),
  8708. 'name' => array(
  8709. // 'description' => 'TODO: please describe this field!',
  8710. 'type' => 'text',
  8711. 'not null' => '1',
  8712. ),
  8713. 'version' => array(
  8714. // 'description' => 'TODO: please describe this field!',
  8715. 'type' => 'text',
  8716. 'not null' => '',
  8717. ),
  8718. 'description' => array(
  8719. // 'description' => 'TODO: please describe this field!',
  8720. 'type' => 'text',
  8721. 'not null' => '',
  8722. ),
  8723. 'array_dimensions' => array(
  8724. // 'description' => 'TODO: please describe this field!',
  8725. 'type' => 'text',
  8726. 'not null' => '',
  8727. ),
  8728. 'element_dimensions' => array(
  8729. // 'description' => 'TODO: please describe this field!',
  8730. 'type' => 'text',
  8731. 'not null' => '',
  8732. ),
  8733. 'num_of_elements' => array(
  8734. // 'description' => 'TODO: please describe this field!',
  8735. 'type' => 'int',
  8736. 'not null' => '',
  8737. ),
  8738. 'num_array_columns' => array(
  8739. // 'description' => 'TODO: please describe this field!',
  8740. 'type' => 'int',
  8741. 'not null' => '',
  8742. ),
  8743. 'num_array_rows' => array(
  8744. // 'description' => 'TODO: please describe this field!',
  8745. 'type' => 'int',
  8746. 'not null' => '',
  8747. ),
  8748. 'num_grid_columns' => array(
  8749. // 'description' => 'TODO: please describe this field!',
  8750. 'type' => 'int',
  8751. 'not null' => '',
  8752. ),
  8753. 'num_grid_rows' => array(
  8754. // 'description' => 'TODO: please describe this field!',
  8755. 'type' => 'int',
  8756. 'not null' => '',
  8757. ),
  8758. 'num_sub_columns' => array(
  8759. // 'description' => 'TODO: please describe this field!',
  8760. 'type' => 'int',
  8761. 'not null' => '',
  8762. ),
  8763. 'num_sub_rows' => array(
  8764. // 'description' => 'TODO: please describe this field!',
  8765. 'type' => 'int',
  8766. 'not null' => '',
  8767. ),
  8768. ),
  8769. 'primary key' => array(
  8770. '0' => 'arraydesign_id',
  8771. ),
  8772. 'unique keys' => array(
  8773. 'arraydesign_c1' => array(
  8774. '0' => 'name',
  8775. ),
  8776. ),
  8777. 'indexes' => array(
  8778. 'arraydesign_idx1' => array(
  8779. '0' => 'manufacturer_id',
  8780. ),
  8781. 'arraydesign_idx2' => array(
  8782. '0' => 'platformtype_id',
  8783. ),
  8784. 'arraydesign_idx3' => array(
  8785. '0' => 'substratetype_id',
  8786. ),
  8787. 'arraydesign_idx4' => array(
  8788. '0' => 'protocol_id',
  8789. ),
  8790. 'arraydesign_idx5' => array(
  8791. '0' => 'dbxref_id',
  8792. ),
  8793. ),
  8794. 'foreign keys' => array(
  8795. ),
  8796. );
  8797. return $description;
  8798. }
  8799. /**
  8800. * Implements hook_arraydesignprop_schema()
  8801. * Purpose: To describe the structure of arraydesignprop to tripal
  8802. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8803. * @see tripal_core.api.inc: tripal_core_chado_update()
  8804. * @see tripal_core.api.inc: tripal_core_chado_select()
  8805. *
  8806. * @return
  8807. * An array describing the current table
  8808. *
  8809. * @ingroup tripal_schema_api
  8810. *
  8811. */
  8812. function tripal_core_chado_arraydesignprop_schema () {
  8813. $description = array();
  8814. $description = array(
  8815. 'table' => 'arraydesignprop',
  8816. // 'description' => 'TODO: please describe this table!',
  8817. 'fields' => array(
  8818. 'arraydesignprop_id' => array(
  8819. // 'description' => 'TODO: please describe this field!',
  8820. 'type' => 'serial',
  8821. 'not null' => '1',
  8822. ),
  8823. 'arraydesign_id' => array(
  8824. // 'description' => 'TODO: please describe this field!',
  8825. 'type' => 'int',
  8826. 'not null' => '1',
  8827. ),
  8828. 'type_id' => array(
  8829. // 'description' => 'TODO: please describe this field!',
  8830. 'type' => 'int',
  8831. 'not null' => '1',
  8832. ),
  8833. 'value' => array(
  8834. // 'description' => 'TODO: please describe this field!',
  8835. 'type' => 'text',
  8836. 'not null' => '',
  8837. ),
  8838. 'rank' => array(
  8839. // 'description' => 'TODO: please describe this field!',
  8840. 'type' => 'int',
  8841. 'not null' => '1',
  8842. 'default' => '0',
  8843. ),
  8844. ),
  8845. 'primary key' => array(
  8846. '0' => 'arraydesignprop_id',
  8847. ),
  8848. 'unique keys' => array(
  8849. 'arraydesignprop_c1' => array(
  8850. '0' => 'arraydesign_id',
  8851. '1' => 'type_id',
  8852. '2' => 'rank',
  8853. ),
  8854. ),
  8855. 'indexes' => array(
  8856. 'arraydesignprop_idx1' => array(
  8857. '0' => 'arraydesign_id',
  8858. ),
  8859. 'arraydesignprop_idx2' => array(
  8860. '0' => 'type_id',
  8861. ),
  8862. ),
  8863. 'foreign keys' => array(
  8864. ),
  8865. );
  8866. return $description;
  8867. }
  8868. /**
  8869. * Implements hook_assay_schema()
  8870. * Purpose: To describe the structure of assay to tripal
  8871. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8872. * @see tripal_core.api.inc: tripal_core_chado_update()
  8873. * @see tripal_core.api.inc: tripal_core_chado_select()
  8874. *
  8875. * @return
  8876. * An array describing the current table
  8877. *
  8878. * @ingroup tripal_schema_api
  8879. *
  8880. */
  8881. function tripal_core_chado_assay_schema () {
  8882. $description = array();
  8883. $description = array(
  8884. 'table' => 'assay',
  8885. // 'description' => 'TODO: please describe this table!',
  8886. 'fields' => array(
  8887. 'assay_id' => array(
  8888. // 'description' => 'TODO: please describe this field!',
  8889. 'type' => 'serial',
  8890. 'not null' => '1',
  8891. ),
  8892. 'arraydesign_id' => array(
  8893. // 'description' => 'TODO: please describe this field!',
  8894. 'type' => 'int',
  8895. 'not null' => '1',
  8896. ),
  8897. 'protocol_id' => array(
  8898. // 'description' => 'TODO: please describe this field!',
  8899. 'type' => 'int',
  8900. 'not null' => '',
  8901. ),
  8902. 'assaydate' => array(
  8903. // 'description' => 'TODO: please describe this field!',
  8904. 'type' => 'datetime',
  8905. 'not null' => '',
  8906. 'default' => 'ow(',
  8907. ),
  8908. 'arrayidentifier' => array(
  8909. // 'description' => 'TODO: please describe this field!',
  8910. 'type' => 'text',
  8911. 'not null' => '',
  8912. ),
  8913. 'arraybatchidentifier' => array(
  8914. // 'description' => 'TODO: please describe this field!',
  8915. 'type' => 'text',
  8916. 'not null' => '',
  8917. ),
  8918. 'operator_id' => array(
  8919. // 'description' => 'TODO: please describe this field!',
  8920. 'type' => 'int',
  8921. 'not null' => '1',
  8922. ),
  8923. 'dbxref_id' => array(
  8924. // 'description' => 'TODO: please describe this field!',
  8925. 'type' => 'int',
  8926. 'not null' => '',
  8927. ),
  8928. 'name' => array(
  8929. // 'description' => 'TODO: please describe this field!',
  8930. 'type' => 'text',
  8931. 'not null' => '',
  8932. ),
  8933. 'description' => array(
  8934. // 'description' => 'TODO: please describe this field!',
  8935. 'type' => 'text',
  8936. 'not null' => '',
  8937. ),
  8938. ),
  8939. 'primary key' => array(
  8940. '0' => 'assay_id',
  8941. ),
  8942. 'unique keys' => array(
  8943. 'assay_c1' => array(
  8944. '0' => 'name',
  8945. ),
  8946. ),
  8947. 'indexes' => array(
  8948. 'assay_idx1' => array(
  8949. '0' => 'arraydesign_id',
  8950. ),
  8951. 'assay_idx2' => array(
  8952. '0' => 'protocol_id',
  8953. ),
  8954. 'assay_idx3' => array(
  8955. '0' => 'operator_id',
  8956. ),
  8957. 'assay_idx4' => array(
  8958. '0' => 'dbxref_id',
  8959. ),
  8960. ),
  8961. 'foreign keys' => array(
  8962. ),
  8963. );
  8964. return $description;
  8965. }
  8966. /**
  8967. * Implements hook_cv_root_schema()
  8968. * Purpose: To describe the structure of cv_root to tripal
  8969. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8970. * @see tripal_core.api.inc: tripal_core_chado_update()
  8971. * @see tripal_core.api.inc: tripal_core_chado_select()
  8972. *
  8973. * @return
  8974. * An array describing the current table
  8975. *
  8976. * @ingroup tripal_schema_api
  8977. *
  8978. */
  8979. function tripal_core_chado_cv_root_schema () {
  8980. $description = array();
  8981. $description = array(
  8982. 'table' => 'cv_root',
  8983. // 'description' => 'TODO: please describe this table!',
  8984. 'fields' => array(
  8985. 'cv_id' => array(
  8986. // 'description' => 'TODO: please describe this field!',
  8987. 'type' => 'int',
  8988. 'not null' => '',
  8989. ),
  8990. 'root_cvterm_id' => array(
  8991. // 'description' => 'TODO: please describe this field!',
  8992. 'type' => 'int',
  8993. 'not null' => '',
  8994. ),
  8995. ),
  8996. 'primary key' => array(
  8997. ),
  8998. 'unique keys' => array(
  8999. ),
  9000. 'indexes' => array(
  9001. ),
  9002. 'foreign keys' => array(
  9003. ),
  9004. );
  9005. return $description;
  9006. }
  9007. /**
  9008. * Implements hook_cvterm_schema()
  9009. * Purpose: To describe the structure of cvterm to tripal
  9010. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9011. * @see tripal_core.api.inc: tripal_core_chado_update()
  9012. * @see tripal_core.api.inc: tripal_core_chado_select()
  9013. *
  9014. * @return
  9015. * An array describing the current table
  9016. *
  9017. * @ingroup tripal_schema_api
  9018. *
  9019. */
  9020. function tripal_core_chado_cvterm_schema () {
  9021. $description = array();
  9022. $description = array(
  9023. 'table' => 'cvterm',
  9024. // 'description' => 'TODO: please describe this table!',
  9025. 'fields' => array(
  9026. 'cvterm_id' => array(
  9027. // 'description' => 'TODO: please describe this field!',
  9028. 'type' => 'serial',
  9029. 'not null' => '1',
  9030. ),
  9031. 'cv_id' => array(
  9032. // 'description' => 'TODO: please describe this field!',
  9033. 'type' => 'int',
  9034. 'not null' => '1',
  9035. ),
  9036. 'name' => array(
  9037. // 'description' => 'TODO: please describe this field!',
  9038. 'type' => 'varchar',
  9039. 'length' => '1024',
  9040. 'not null' => '1',
  9041. ),
  9042. 'definition' => array(
  9043. // 'description' => 'TODO: please describe this field!',
  9044. 'type' => 'text',
  9045. 'not null' => '',
  9046. ),
  9047. 'dbxref_id' => array(
  9048. // 'description' => 'TODO: please describe this field!',
  9049. 'type' => 'int',
  9050. 'not null' => '1',
  9051. ),
  9052. 'is_obsolete' => array(
  9053. // 'description' => 'TODO: please describe this field!',
  9054. 'type' => 'int',
  9055. 'not null' => '1',
  9056. 'default' => '0',
  9057. ),
  9058. 'is_relationshiptype' => array(
  9059. // 'description' => 'TODO: please describe this field!',
  9060. 'type' => 'int',
  9061. 'not null' => '1',
  9062. 'default' => '0',
  9063. ),
  9064. ),
  9065. 'primary key' => array(
  9066. '0' => 'cvterm_id',
  9067. ),
  9068. 'unique keys' => array(
  9069. 'cvterm_c1' => array(
  9070. '0' => 'name',
  9071. '1' => 'cv_id',
  9072. '2' => 'is_obsolete',
  9073. ),
  9074. 'cvterm_c2' => array(
  9075. '0' => 'dbxref_id',
  9076. ),
  9077. ),
  9078. 'indexes' => array(
  9079. 'cvterm_idx1' => array(
  9080. '0' => 'cv_id',
  9081. ),
  9082. 'cvterm_idx2' => array(
  9083. '0' => 'name',
  9084. ),
  9085. 'cvterm_idx3' => array(
  9086. '0' => 'dbxref_id',
  9087. ),
  9088. ),
  9089. 'foreign keys' => array(
  9090. ),
  9091. );
  9092. return $description;
  9093. }
  9094. /**
  9095. * Implements hook_feature_dbxref_schema()
  9096. * Purpose: To describe the structure of feature_dbxref to tripal
  9097. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9098. * @see tripal_core.api.inc: tripal_core_chado_update()
  9099. * @see tripal_core.api.inc: tripal_core_chado_select()
  9100. *
  9101. * @return
  9102. * An array describing the current table
  9103. *
  9104. * @ingroup tripal_schema_api
  9105. *
  9106. */
  9107. function tripal_core_chado_feature_dbxref_schema () {
  9108. $description = array();
  9109. $description = array(
  9110. 'table' => 'feature_dbxref',
  9111. // 'description' => 'TODO: please describe this table!',
  9112. 'fields' => array(
  9113. 'feature_dbxref_id' => array(
  9114. // 'description' => 'TODO: please describe this field!',
  9115. 'type' => 'serial',
  9116. 'not null' => '1',
  9117. ),
  9118. 'feature_id' => array(
  9119. // 'description' => 'TODO: please describe this field!',
  9120. 'type' => 'int',
  9121. 'not null' => '1',
  9122. ),
  9123. 'dbxref_id' => array(
  9124. // 'description' => 'TODO: please describe this field!',
  9125. 'type' => 'int',
  9126. 'not null' => '1',
  9127. ),
  9128. 'is_current' => array(
  9129. // 'description' => 'TODO: please describe this field!',
  9130. 'type' => 'boolean',
  9131. 'not null' => '1',
  9132. 'default' => 'ru',
  9133. ),
  9134. ),
  9135. 'primary key' => array(
  9136. '0' => 'feature_dbxref_id',
  9137. ),
  9138. 'unique keys' => array(
  9139. 'feature_dbxref_c1' => array(
  9140. '0' => 'feature_id',
  9141. '1' => 'dbxref_id',
  9142. ),
  9143. ),
  9144. 'indexes' => array(
  9145. 'feature_dbxref_idx1' => array(
  9146. '0' => 'feature_id',
  9147. ),
  9148. 'feature_dbxref_idx2' => array(
  9149. '0' => 'dbxref_id',
  9150. ),
  9151. ),
  9152. 'foreign keys' => array(
  9153. ),
  9154. );
  9155. return $description;
  9156. }
  9157. /**
  9158. * Implements hook_feature_cvtermprop_schema()
  9159. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9160. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9161. * @see tripal_core.api.inc: tripal_core_chado_update()
  9162. * @see tripal_core.api.inc: tripal_core_chado_select()
  9163. *
  9164. * @return
  9165. * An array describing the current table
  9166. *
  9167. * @ingroup tripal_schema_api
  9168. *
  9169. */
  9170. function tripal_core_chado_feature_cvtermprop_schema () {
  9171. $description = array();
  9172. $description = array(
  9173. 'table' => 'feature_cvtermprop',
  9174. // 'description' => 'TODO: please describe this table!',
  9175. 'fields' => array(
  9176. 'feature_cvtermprop_id' => array(
  9177. // 'description' => 'TODO: please describe this field!',
  9178. 'type' => 'serial',
  9179. 'not null' => '1',
  9180. ),
  9181. 'feature_cvterm_id' => array(
  9182. // 'description' => 'TODO: please describe this field!',
  9183. 'type' => 'int',
  9184. 'not null' => '1',
  9185. ),
  9186. 'type_id' => array(
  9187. // 'description' => 'TODO: please describe this field!',
  9188. 'type' => 'int',
  9189. 'not null' => '1',
  9190. ),
  9191. 'value' => array(
  9192. // 'description' => 'TODO: please describe this field!',
  9193. 'type' => 'text',
  9194. 'not null' => '',
  9195. ),
  9196. 'rank' => array(
  9197. // 'description' => 'TODO: please describe this field!',
  9198. 'type' => 'int',
  9199. 'not null' => '1',
  9200. 'default' => '0',
  9201. ),
  9202. ),
  9203. 'primary key' => array(
  9204. '0' => 'feature_cvtermprop_id',
  9205. ),
  9206. 'unique keys' => array(
  9207. 'feature_cvtermprop_c1' => array(
  9208. '0' => 'feature_cvterm_id',
  9209. '1' => 'type_id',
  9210. '2' => 'rank',
  9211. ),
  9212. ),
  9213. 'indexes' => array(
  9214. 'feature_cvtermprop_idx1' => array(
  9215. '0' => 'feature_cvterm_id',
  9216. ),
  9217. 'feature_cvtermprop_idx2' => array(
  9218. '0' => 'type_id',
  9219. ),
  9220. ),
  9221. 'foreign keys' => array(
  9222. ),
  9223. );
  9224. return $description;
  9225. }
  9226. /**
  9227. * Implements hook_feature_difference_schema()
  9228. * Purpose: To describe the structure of feature_difference to tripal
  9229. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9230. * @see tripal_core.api.inc: tripal_core_chado_update()
  9231. * @see tripal_core.api.inc: tripal_core_chado_select()
  9232. *
  9233. * @return
  9234. * An array describing the current table
  9235. *
  9236. * @ingroup tripal_schema_api
  9237. *
  9238. */
  9239. function tripal_core_chado_feature_difference_schema () {
  9240. $description = array();
  9241. $description = array(
  9242. 'table' => 'feature_difference',
  9243. // 'description' => 'TODO: please describe this table!',
  9244. 'fields' => array(
  9245. 'subject_id' => array(
  9246. // 'description' => 'TODO: please describe this field!',
  9247. 'type' => 'int',
  9248. 'not null' => '',
  9249. ),
  9250. 'object_id' => array(
  9251. // 'description' => 'TODO: please describe this field!',
  9252. 'type' => 'int',
  9253. 'not null' => '',
  9254. ),
  9255. 'srcfeature_id' => array(
  9256. // 'description' => 'TODO: please describe this field!',
  9257. 'type' => 'int',
  9258. 'size' => 'small',
  9259. 'not null' => '',
  9260. ),
  9261. 'fmin' => array(
  9262. // 'description' => 'TODO: please describe this field!',
  9263. 'type' => 'int',
  9264. 'not null' => '',
  9265. ),
  9266. 'fmax' => array(
  9267. // 'description' => 'TODO: please describe this field!',
  9268. 'type' => 'int',
  9269. 'not null' => '',
  9270. ),
  9271. 'strand' => array(
  9272. // 'description' => 'TODO: please describe this field!',
  9273. 'type' => 'int',
  9274. 'not null' => '',
  9275. ),
  9276. ),
  9277. 'primary key' => array(
  9278. ),
  9279. 'unique keys' => array(
  9280. ),
  9281. 'indexes' => array(
  9282. ),
  9283. 'foreign keys' => array(
  9284. ),
  9285. );
  9286. return $description;
  9287. }
  9288. /**
  9289. * Implements hook_feature_disjoint_schema()
  9290. * Purpose: To describe the structure of feature_disjoint to tripal
  9291. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9292. * @see tripal_core.api.inc: tripal_core_chado_update()
  9293. * @see tripal_core.api.inc: tripal_core_chado_select()
  9294. *
  9295. * @return
  9296. * An array describing the current table
  9297. *
  9298. * @ingroup tripal_schema_api
  9299. *
  9300. */
  9301. function tripal_core_chado_feature_disjoint_schema () {
  9302. $description = array();
  9303. $description = array(
  9304. 'table' => 'feature_disjoint',
  9305. // 'description' => 'TODO: please describe this table!',
  9306. 'fields' => array(
  9307. 'subject_id' => array(
  9308. // 'description' => 'TODO: please describe this field!',
  9309. 'type' => 'int',
  9310. 'not null' => '',
  9311. ),
  9312. 'object_id' => array(
  9313. // 'description' => 'TODO: please describe this field!',
  9314. 'type' => 'int',
  9315. 'not null' => '',
  9316. ),
  9317. ),
  9318. 'primary key' => array(
  9319. ),
  9320. 'unique keys' => array(
  9321. ),
  9322. 'indexes' => array(
  9323. ),
  9324. 'foreign keys' => array(
  9325. ),
  9326. );
  9327. return $description;
  9328. }
  9329. /**
  9330. * Implements hook_feature_distance_schema()
  9331. * Purpose: To describe the structure of feature_distance to tripal
  9332. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9333. * @see tripal_core.api.inc: tripal_core_chado_update()
  9334. * @see tripal_core.api.inc: tripal_core_chado_select()
  9335. *
  9336. * @return
  9337. * An array describing the current table
  9338. *
  9339. * @ingroup tripal_schema_api
  9340. *
  9341. */
  9342. function tripal_core_chado_feature_distance_schema () {
  9343. $description = array();
  9344. $description = array(
  9345. 'table' => 'feature_distance',
  9346. // 'description' => 'TODO: please describe this table!',
  9347. 'fields' => array(
  9348. 'subject_id' => array(
  9349. // 'description' => 'TODO: please describe this field!',
  9350. 'type' => 'int',
  9351. 'not null' => '',
  9352. ),
  9353. 'object_id' => array(
  9354. // 'description' => 'TODO: please describe this field!',
  9355. 'type' => 'int',
  9356. 'not null' => '',
  9357. ),
  9358. 'srcfeature_id' => array(
  9359. // 'description' => 'TODO: please describe this field!',
  9360. 'type' => 'int',
  9361. 'not null' => '',
  9362. ),
  9363. 'subject_strand' => array(
  9364. // 'description' => 'TODO: please describe this field!',
  9365. 'type' => 'int',
  9366. 'size' => 'small',
  9367. 'not null' => '',
  9368. ),
  9369. 'object_strand' => array(
  9370. // 'description' => 'TODO: please describe this field!',
  9371. 'type' => 'int',
  9372. 'size' => 'small',
  9373. 'not null' => '',
  9374. ),
  9375. 'distance' => array(
  9376. // 'description' => 'TODO: please describe this field!',
  9377. 'type' => 'int',
  9378. 'not null' => '',
  9379. ),
  9380. ),
  9381. 'primary key' => array(
  9382. ),
  9383. 'unique keys' => array(
  9384. ),
  9385. 'indexes' => array(
  9386. ),
  9387. 'foreign keys' => array(
  9388. ),
  9389. );
  9390. return $description;
  9391. }
  9392. /**
  9393. * Implements hook_feature_cvterm_pub_schema()
  9394. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9395. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9396. * @see tripal_core.api.inc: tripal_core_chado_update()
  9397. * @see tripal_core.api.inc: tripal_core_chado_select()
  9398. *
  9399. * @return
  9400. * An array describing the current table
  9401. *
  9402. * @ingroup tripal_schema_api
  9403. *
  9404. */
  9405. function tripal_core_chado_feature_cvterm_pub_schema () {
  9406. $description = array();
  9407. $description = array(
  9408. 'table' => 'feature_cvterm_pub',
  9409. // 'description' => 'TODO: please describe this table!',
  9410. 'fields' => array(
  9411. 'feature_cvterm_pub_id' => array(
  9412. // 'description' => 'TODO: please describe this field!',
  9413. 'type' => 'serial',
  9414. 'not null' => '1',
  9415. ),
  9416. 'feature_cvterm_id' => array(
  9417. // 'description' => 'TODO: please describe this field!',
  9418. 'type' => 'int',
  9419. 'not null' => '1',
  9420. ),
  9421. 'pub_id' => array(
  9422. // 'description' => 'TODO: please describe this field!',
  9423. 'type' => 'int',
  9424. 'not null' => '1',
  9425. ),
  9426. ),
  9427. 'primary key' => array(
  9428. '0' => 'feature_cvterm_pub_id',
  9429. ),
  9430. 'unique keys' => array(
  9431. 'feature_cvterm_pub_c1' => array(
  9432. '0' => 'feature_cvterm_id',
  9433. '1' => 'pub_id',
  9434. ),
  9435. ),
  9436. 'indexes' => array(
  9437. 'feature_cvterm_pub_idx1' => array(
  9438. '0' => 'feature_cvterm_id',
  9439. ),
  9440. 'feature_cvterm_pub_idx2' => array(
  9441. '0' => 'pub_id',
  9442. ),
  9443. ),
  9444. 'foreign keys' => array(
  9445. ),
  9446. );
  9447. return $description;
  9448. }
  9449. /**
  9450. * Implements hook_feature_cvterm_dbxref_schema()
  9451. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9452. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9453. * @see tripal_core.api.inc: tripal_core_chado_update()
  9454. * @see tripal_core.api.inc: tripal_core_chado_select()
  9455. *
  9456. * @return
  9457. * An array describing the current table
  9458. *
  9459. * @ingroup tripal_schema_api
  9460. *
  9461. */
  9462. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9463. $description = array();
  9464. $description = array(
  9465. 'table' => 'feature_cvterm_dbxref',
  9466. // 'description' => 'TODO: please describe this table!',
  9467. 'fields' => array(
  9468. 'feature_cvterm_dbxref_id' => array(
  9469. // 'description' => 'TODO: please describe this field!',
  9470. 'type' => 'serial',
  9471. 'not null' => '1',
  9472. ),
  9473. 'feature_cvterm_id' => array(
  9474. // 'description' => 'TODO: please describe this field!',
  9475. 'type' => 'int',
  9476. 'not null' => '1',
  9477. ),
  9478. 'dbxref_id' => array(
  9479. // 'description' => 'TODO: please describe this field!',
  9480. 'type' => 'int',
  9481. 'not null' => '1',
  9482. ),
  9483. ),
  9484. 'primary key' => array(
  9485. '0' => 'feature_cvterm_dbxref_id',
  9486. ),
  9487. 'unique keys' => array(
  9488. 'feature_cvterm_dbxref_c1' => array(
  9489. '0' => 'feature_cvterm_id',
  9490. '1' => 'dbxref_id',
  9491. ),
  9492. ),
  9493. 'indexes' => array(
  9494. 'feature_cvterm_dbxref_idx1' => array(
  9495. '0' => 'feature_cvterm_id',
  9496. ),
  9497. 'feature_cvterm_dbxref_idx2' => array(
  9498. '0' => 'dbxref_id',
  9499. ),
  9500. ),
  9501. 'foreign keys' => array(
  9502. ),
  9503. );
  9504. return $description;
  9505. }
  9506. /**
  9507. * Implements hook_f_type_schema()
  9508. * Purpose: To describe the structure of f_type to tripal
  9509. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9510. * @see tripal_core.api.inc: tripal_core_chado_update()
  9511. * @see tripal_core.api.inc: tripal_core_chado_select()
  9512. *
  9513. * @return
  9514. * An array describing the current table
  9515. *
  9516. * @ingroup tripal_schema_api
  9517. *
  9518. */
  9519. function tripal_core_chado_f_type_schema () {
  9520. $description = array();
  9521. $description = array(
  9522. 'table' => 'f_type',
  9523. // 'description' => 'TODO: please describe this table!',
  9524. 'fields' => array(
  9525. 'feature_id' => array(
  9526. // 'description' => 'TODO: please describe this field!',
  9527. 'type' => 'int',
  9528. 'not null' => '',
  9529. ),
  9530. 'name' => array(
  9531. // 'description' => 'TODO: please describe this field!',
  9532. 'type' => 'varchar',
  9533. 'length' => '255',
  9534. 'not null' => '',
  9535. ),
  9536. 'dbxref_id' => array(
  9537. // 'description' => 'TODO: please describe this field!',
  9538. 'type' => 'int',
  9539. 'not null' => '',
  9540. ),
  9541. 'type' => array(
  9542. // 'description' => 'TODO: please describe this field!',
  9543. 'type' => 'varchar',
  9544. 'length' => '1024',
  9545. 'not null' => '',
  9546. ),
  9547. 'residues' => array(
  9548. // 'description' => 'TODO: please describe this field!',
  9549. 'type' => 'text',
  9550. 'not null' => '',
  9551. ),
  9552. 'seqlen' => array(
  9553. // 'description' => 'TODO: please describe this field!',
  9554. 'type' => 'int',
  9555. 'not null' => '',
  9556. ),
  9557. 'md5checksum' => array(
  9558. // 'description' => 'TODO: please describe this field!',
  9559. 'type' => 'char',
  9560. 'length' => '32',
  9561. 'not null' => '',
  9562. ),
  9563. 'type_id' => array(
  9564. // 'description' => 'TODO: please describe this field!',
  9565. 'type' => 'int',
  9566. 'not null' => '',
  9567. ),
  9568. 'timeaccessioned' => array(
  9569. // 'description' => 'TODO: please describe this field!',
  9570. 'type' => 'datetime',
  9571. 'not null' => '',
  9572. ),
  9573. 'timelastmodified' => array(
  9574. // 'description' => 'TODO: please describe this field!',
  9575. 'type' => 'datetime',
  9576. 'not null' => '',
  9577. ),
  9578. ),
  9579. 'primary key' => array(
  9580. ),
  9581. 'unique keys' => array(
  9582. ),
  9583. 'indexes' => array(
  9584. ),
  9585. 'foreign keys' => array(
  9586. ),
  9587. );
  9588. return $description;
  9589. }
  9590. /**
  9591. * Implements hook_feature_schema()
  9592. * Purpose: To describe the structure of feature to tripal
  9593. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9594. * @see tripal_core.api.inc: tripal_core_chado_update()
  9595. * @see tripal_core.api.inc: tripal_core_chado_select()
  9596. *
  9597. * @return
  9598. * An array describing the current table
  9599. *
  9600. * @ingroup tripal_schema_api
  9601. *
  9602. */
  9603. function tripal_core_chado_feature_schema () {
  9604. $description = array();
  9605. $description = array(
  9606. 'table' => 'feature',
  9607. // 'description' => 'TODO: please describe this table!',
  9608. 'fields' => array(
  9609. 'feature_id' => array(
  9610. // 'description' => 'TODO: please describe this field!',
  9611. 'type' => 'serial',
  9612. 'not null' => '1',
  9613. ),
  9614. 'dbxref_id' => array(
  9615. // 'description' => 'TODO: please describe this field!',
  9616. 'type' => 'int',
  9617. 'not null' => '',
  9618. ),
  9619. 'organism_id' => array(
  9620. // 'description' => 'TODO: please describe this field!',
  9621. 'type' => 'int',
  9622. 'not null' => '1',
  9623. ),
  9624. 'name' => array(
  9625. // 'description' => 'TODO: please describe this field!',
  9626. 'type' => 'varchar',
  9627. 'length' => '255',
  9628. 'not null' => '',
  9629. ),
  9630. 'uniquename' => array(
  9631. // 'description' => 'TODO: please describe this field!',
  9632. 'type' => 'text',
  9633. 'not null' => '1',
  9634. ),
  9635. 'residues' => array(
  9636. // 'description' => 'TODO: please describe this field!',
  9637. 'type' => 'text',
  9638. 'not null' => '',
  9639. ),
  9640. 'seqlen' => array(
  9641. // 'description' => 'TODO: please describe this field!',
  9642. 'type' => 'int',
  9643. 'not null' => '',
  9644. ),
  9645. 'md5checksum' => array(
  9646. // 'description' => 'TODO: please describe this field!',
  9647. 'type' => 'char',
  9648. 'length' => '32',
  9649. 'not null' => '',
  9650. ),
  9651. 'type_id' => array(
  9652. // 'description' => 'TODO: please describe this field!',
  9653. 'type' => 'int',
  9654. 'not null' => '1',
  9655. ),
  9656. 'is_analysis' => array(
  9657. // 'description' => 'TODO: please describe this field!',
  9658. 'type' => 'boolean',
  9659. 'not null' => '1',
  9660. 'default' => 'als',
  9661. ),
  9662. 'is_obsolete' => array(
  9663. // 'description' => 'TODO: please describe this field!',
  9664. 'type' => 'boolean',
  9665. 'not null' => '1',
  9666. 'default' => 'als',
  9667. ),
  9668. 'timeaccessioned' => array(
  9669. // 'description' => 'TODO: please describe this field!',
  9670. 'type' => 'datetime',
  9671. 'not null' => '1',
  9672. 'default' => 'ow(',
  9673. ),
  9674. 'timelastmodified' => array(
  9675. // 'description' => 'TODO: please describe this field!',
  9676. 'type' => 'datetime',
  9677. 'not null' => '1',
  9678. 'default' => 'ow(',
  9679. ),
  9680. ),
  9681. 'primary key' => array(
  9682. '0' => 'feature_id',
  9683. ),
  9684. 'unique keys' => array(
  9685. 'feature_c1' => array(
  9686. '0' => 'organism_id',
  9687. '1' => 'uniquename',
  9688. '2' => 'type_id',
  9689. ),
  9690. ),
  9691. 'indexes' => array(
  9692. 'feature_idx1' => array(
  9693. '0' => 'dbxref_id',
  9694. ),
  9695. 'feature_idx2' => array(
  9696. '0' => 'organism_id',
  9697. ),
  9698. 'feature_idx3' => array(
  9699. '0' => 'type_id',
  9700. ),
  9701. 'feature_idx4' => array(
  9702. '0' => 'uniquename',
  9703. ),
  9704. 'feature_name_ind1' => array(
  9705. '0' => 'name',
  9706. ),
  9707. ),
  9708. 'foreign keys' => array(
  9709. ),
  9710. );
  9711. return $description;
  9712. }
  9713. /**
  9714. * Implements hook_feature_contains_schema()
  9715. * Purpose: To describe the structure of feature_contains to tripal
  9716. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9717. * @see tripal_core.api.inc: tripal_core_chado_update()
  9718. * @see tripal_core.api.inc: tripal_core_chado_select()
  9719. *
  9720. * @return
  9721. * An array describing the current table
  9722. *
  9723. * @ingroup tripal_schema_api
  9724. *
  9725. */
  9726. function tripal_core_chado_feature_contains_schema () {
  9727. $description = array();
  9728. $description = array(
  9729. 'table' => 'feature_contains',
  9730. // 'description' => 'TODO: please describe this table!',
  9731. 'fields' => array(
  9732. 'subject_id' => array(
  9733. // 'description' => 'TODO: please describe this field!',
  9734. 'type' => 'int',
  9735. 'not null' => '',
  9736. ),
  9737. 'object_id' => array(
  9738. // 'description' => 'TODO: please describe this field!',
  9739. 'type' => 'int',
  9740. 'not null' => '',
  9741. ),
  9742. ),
  9743. 'primary key' => array(
  9744. ),
  9745. 'unique keys' => array(
  9746. ),
  9747. 'indexes' => array(
  9748. ),
  9749. 'foreign keys' => array(
  9750. ),
  9751. );
  9752. return $description;
  9753. }
  9754. /**
  9755. * Implements hook_feature_cvterm_schema()
  9756. * Purpose: To describe the structure of feature_cvterm to tripal
  9757. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9758. * @see tripal_core.api.inc: tripal_core_chado_update()
  9759. * @see tripal_core.api.inc: tripal_core_chado_select()
  9760. *
  9761. * @return
  9762. * An array describing the current table
  9763. *
  9764. * @ingroup tripal_schema_api
  9765. *
  9766. */
  9767. function tripal_core_chado_feature_cvterm_schema () {
  9768. $description = array();
  9769. $description = array(
  9770. 'table' => 'feature_cvterm',
  9771. // 'description' => 'TODO: please describe this table!',
  9772. 'fields' => array(
  9773. 'feature_cvterm_id' => array(
  9774. // 'description' => 'TODO: please describe this field!',
  9775. 'type' => 'serial',
  9776. 'not null' => '1',
  9777. ),
  9778. 'feature_id' => array(
  9779. // 'description' => 'TODO: please describe this field!',
  9780. 'type' => 'int',
  9781. 'not null' => '1',
  9782. ),
  9783. 'cvterm_id' => array(
  9784. // 'description' => 'TODO: please describe this field!',
  9785. 'type' => 'int',
  9786. 'not null' => '1',
  9787. ),
  9788. 'pub_id' => array(
  9789. // 'description' => 'TODO: please describe this field!',
  9790. 'type' => 'int',
  9791. 'not null' => '1',
  9792. ),
  9793. 'is_not' => array(
  9794. // 'description' => 'TODO: please describe this field!',
  9795. 'type' => 'boolean',
  9796. 'not null' => '1',
  9797. 'default' => 'als',
  9798. ),
  9799. 'rank' => array(
  9800. // 'description' => 'TODO: please describe this field!',
  9801. 'type' => 'int',
  9802. 'not null' => '1',
  9803. 'default' => '0',
  9804. ),
  9805. ),
  9806. 'primary key' => array(
  9807. '0' => 'feature_cvterm_id',
  9808. ),
  9809. 'unique keys' => array(
  9810. 'feature_cvterm_c1' => array(
  9811. '0' => 'feature_id',
  9812. '1' => 'cvterm_id',
  9813. '2' => 'pub_id',
  9814. '3' => 'rank',
  9815. ),
  9816. ),
  9817. 'indexes' => array(
  9818. 'feature_cvterm_idx1' => array(
  9819. '0' => 'feature_id',
  9820. ),
  9821. 'feature_cvterm_idx2' => array(
  9822. '0' => 'cvterm_id',
  9823. ),
  9824. 'feature_cvterm_idx3' => array(
  9825. '0' => 'pub_id',
  9826. ),
  9827. ),
  9828. 'foreign keys' => array(
  9829. ),
  9830. );
  9831. return $description;
  9832. }
  9833. /**
  9834. * Implements hook_feature_expression_schema()
  9835. * Purpose: To describe the structure of feature_expression to tripal
  9836. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9837. * @see tripal_core.api.inc: tripal_core_chado_update()
  9838. * @see tripal_core.api.inc: tripal_core_chado_select()
  9839. *
  9840. * @return
  9841. * An array describing the current table
  9842. *
  9843. * @ingroup tripal_schema_api
  9844. *
  9845. */
  9846. function tripal_core_chado_feature_expression_schema () {
  9847. $description = array();
  9848. $description = array(
  9849. 'table' => 'feature_expression',
  9850. // 'description' => 'TODO: please describe this table!',
  9851. 'fields' => array(
  9852. 'feature_expression_id' => array(
  9853. // 'description' => 'TODO: please describe this field!',
  9854. 'type' => 'serial',
  9855. 'not null' => '1',
  9856. ),
  9857. 'expression_id' => array(
  9858. // 'description' => 'TODO: please describe this field!',
  9859. 'type' => 'int',
  9860. 'not null' => '1',
  9861. ),
  9862. 'feature_id' => array(
  9863. // 'description' => 'TODO: please describe this field!',
  9864. 'type' => 'int',
  9865. 'not null' => '1',
  9866. ),
  9867. 'pub_id' => array(
  9868. // 'description' => 'TODO: please describe this field!',
  9869. 'type' => 'int',
  9870. 'not null' => '1',
  9871. ),
  9872. ),
  9873. 'primary key' => array(
  9874. '0' => 'feature_expression_id',
  9875. ),
  9876. 'unique keys' => array(
  9877. 'feature_expression_c1' => array(
  9878. '0' => 'expression_id',
  9879. '1' => 'feature_id',
  9880. '2' => 'pub_id',
  9881. ),
  9882. ),
  9883. 'indexes' => array(
  9884. 'feature_expression_idx1' => array(
  9885. '0' => 'expression_id',
  9886. ),
  9887. 'feature_expression_idx2' => array(
  9888. '0' => 'feature_id',
  9889. ),
  9890. 'feature_expression_idx3' => array(
  9891. '0' => 'pub_id',
  9892. ),
  9893. ),
  9894. 'foreign keys' => array(
  9895. ),
  9896. );
  9897. return $description;
  9898. }
  9899. /**
  9900. * Implements hook_feature_expressionprop_schema()
  9901. * Purpose: To describe the structure of feature_expressionprop to tripal
  9902. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9903. * @see tripal_core.api.inc: tripal_core_chado_update()
  9904. * @see tripal_core.api.inc: tripal_core_chado_select()
  9905. *
  9906. * @return
  9907. * An array describing the current table
  9908. *
  9909. * @ingroup tripal_schema_api
  9910. *
  9911. */
  9912. function tripal_core_chado_feature_expressionprop_schema () {
  9913. $description = array();
  9914. $description = array(
  9915. 'table' => 'feature_expressionprop',
  9916. // 'description' => 'TODO: please describe this table!',
  9917. 'fields' => array(
  9918. 'feature_expressionprop_id' => array(
  9919. // 'description' => 'TODO: please describe this field!',
  9920. 'type' => 'serial',
  9921. 'not null' => '1',
  9922. ),
  9923. 'feature_expression_id' => array(
  9924. // 'description' => 'TODO: please describe this field!',
  9925. 'type' => 'int',
  9926. 'not null' => '1',
  9927. ),
  9928. 'type_id' => array(
  9929. // 'description' => 'TODO: please describe this field!',
  9930. 'type' => 'int',
  9931. 'not null' => '1',
  9932. ),
  9933. 'value' => array(
  9934. // 'description' => 'TODO: please describe this field!',
  9935. 'type' => 'text',
  9936. 'not null' => '',
  9937. ),
  9938. 'rank' => array(
  9939. // 'description' => 'TODO: please describe this field!',
  9940. 'type' => 'int',
  9941. 'not null' => '1',
  9942. 'default' => '0',
  9943. ),
  9944. ),
  9945. 'primary key' => array(
  9946. '0' => 'feature_expressionprop_id',
  9947. ),
  9948. 'unique keys' => array(
  9949. 'feature_expressionprop_c1' => array(
  9950. '0' => 'feature_expression_id',
  9951. '1' => 'type_id',
  9952. '2' => 'rank',
  9953. ),
  9954. ),
  9955. 'indexes' => array(
  9956. 'feature_expressionprop_idx1' => array(
  9957. '0' => 'feature_expression_id',
  9958. ),
  9959. 'feature_expressionprop_idx2' => array(
  9960. '0' => 'type_id',
  9961. ),
  9962. ),
  9963. 'foreign keys' => array(
  9964. ),
  9965. );
  9966. return $description;
  9967. }
  9968. /**
  9969. * Implements hook_feature_pubprop_schema()
  9970. * Purpose: To describe the structure of feature_pubprop to tripal
  9971. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9972. * @see tripal_core.api.inc: tripal_core_chado_update()
  9973. * @see tripal_core.api.inc: tripal_core_chado_select()
  9974. *
  9975. * @return
  9976. * An array describing the current table
  9977. *
  9978. * @ingroup tripal_schema_api
  9979. *
  9980. */
  9981. function tripal_core_chado_feature_pubprop_schema () {
  9982. $description = array();
  9983. $description = array(
  9984. 'table' => 'feature_pubprop',
  9985. // 'description' => 'TODO: please describe this table!',
  9986. 'fields' => array(
  9987. 'feature_pubprop_id' => array(
  9988. // 'description' => 'TODO: please describe this field!',
  9989. 'type' => 'serial',
  9990. 'not null' => '1',
  9991. ),
  9992. 'feature_pub_id' => array(
  9993. // 'description' => 'TODO: please describe this field!',
  9994. 'type' => 'int',
  9995. 'not null' => '1',
  9996. ),
  9997. 'type_id' => array(
  9998. // 'description' => 'TODO: please describe this field!',
  9999. 'type' => 'int',
  10000. 'not null' => '1',
  10001. ),
  10002. 'value' => array(
  10003. // 'description' => 'TODO: please describe this field!',
  10004. 'type' => 'text',
  10005. 'not null' => '',
  10006. ),
  10007. 'rank' => array(
  10008. // 'description' => 'TODO: please describe this field!',
  10009. 'type' => 'int',
  10010. 'not null' => '1',
  10011. 'default' => '0',
  10012. ),
  10013. ),
  10014. 'primary key' => array(
  10015. '0' => 'feature_pubprop_id',
  10016. ),
  10017. 'unique keys' => array(
  10018. 'feature_pubprop_c1' => array(
  10019. '0' => 'feature_pub_id',
  10020. '1' => 'type_id',
  10021. '2' => 'rank',
  10022. ),
  10023. ),
  10024. 'indexes' => array(
  10025. 'feature_pubprop_idx1' => array(
  10026. '0' => 'feature_pub_id',
  10027. ),
  10028. ),
  10029. 'foreign keys' => array(
  10030. ),
  10031. );
  10032. return $description;
  10033. }
  10034. /**
  10035. * Implements hook_feature_relationship_schema()
  10036. * Purpose: To describe the structure of feature_relationship to tripal
  10037. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10038. * @see tripal_core.api.inc: tripal_core_chado_update()
  10039. * @see tripal_core.api.inc: tripal_core_chado_select()
  10040. *
  10041. * @return
  10042. * An array describing the current table
  10043. *
  10044. * @ingroup tripal_schema_api
  10045. *
  10046. */
  10047. function tripal_core_chado_feature_relationship_schema () {
  10048. $description = array();
  10049. $description = array(
  10050. 'table' => 'feature_relationship',
  10051. // 'description' => 'TODO: please describe this table!',
  10052. 'fields' => array(
  10053. 'feature_relationship_id' => array(
  10054. // 'description' => 'TODO: please describe this field!',
  10055. 'type' => 'serial',
  10056. 'not null' => '1',
  10057. ),
  10058. 'subject_id' => array(
  10059. // 'description' => 'TODO: please describe this field!',
  10060. 'type' => 'int',
  10061. 'not null' => '1',
  10062. ),
  10063. 'object_id' => array(
  10064. // 'description' => 'TODO: please describe this field!',
  10065. 'type' => 'int',
  10066. 'not null' => '1',
  10067. ),
  10068. 'type_id' => array(
  10069. // 'description' => 'TODO: please describe this field!',
  10070. 'type' => 'int',
  10071. 'not null' => '1',
  10072. ),
  10073. 'value' => array(
  10074. // 'description' => 'TODO: please describe this field!',
  10075. 'type' => 'text',
  10076. 'not null' => '',
  10077. ),
  10078. 'rank' => array(
  10079. // 'description' => 'TODO: please describe this field!',
  10080. 'type' => 'int',
  10081. 'not null' => '1',
  10082. 'default' => '0',
  10083. ),
  10084. ),
  10085. 'primary key' => array(
  10086. '0' => 'feature_relationship_id',
  10087. ),
  10088. 'unique keys' => array(
  10089. 'feature_relationship_c1' => array(
  10090. '0' => 'subject_id',
  10091. '1' => 'object_id',
  10092. '2' => 'type_id',
  10093. '3' => 'rank',
  10094. ),
  10095. ),
  10096. 'indexes' => array(
  10097. 'feature_relationship_idx1' => array(
  10098. '0' => 'subject_id',
  10099. ),
  10100. 'feature_relationship_idx2' => array(
  10101. '0' => 'object_id',
  10102. ),
  10103. 'feature_relationship_idx3' => array(
  10104. '0' => 'type_id',
  10105. ),
  10106. ),
  10107. 'foreign keys' => array(
  10108. ),
  10109. );
  10110. return $description;
  10111. }
  10112. /**
  10113. * Implements hook_feature_relationship_pub_schema()
  10114. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10115. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10116. * @see tripal_core.api.inc: tripal_core_chado_update()
  10117. * @see tripal_core.api.inc: tripal_core_chado_select()
  10118. *
  10119. * @return
  10120. * An array describing the current table
  10121. *
  10122. * @ingroup tripal_schema_api
  10123. *
  10124. */
  10125. function tripal_core_chado_feature_relationship_pub_schema () {
  10126. $description = array();
  10127. $description = array(
  10128. 'table' => 'feature_relationship_pub',
  10129. // 'description' => 'TODO: please describe this table!',
  10130. 'fields' => array(
  10131. 'feature_relationship_pub_id' => array(
  10132. // 'description' => 'TODO: please describe this field!',
  10133. 'type' => 'serial',
  10134. 'not null' => '1',
  10135. ),
  10136. 'feature_relationship_id' => array(
  10137. // 'description' => 'TODO: please describe this field!',
  10138. 'type' => 'int',
  10139. 'not null' => '1',
  10140. ),
  10141. 'pub_id' => array(
  10142. // 'description' => 'TODO: please describe this field!',
  10143. 'type' => 'int',
  10144. 'not null' => '1',
  10145. ),
  10146. ),
  10147. 'primary key' => array(
  10148. '0' => 'feature_relationship_pub_id',
  10149. ),
  10150. 'unique keys' => array(
  10151. 'feature_relationship_pub_c1' => array(
  10152. '0' => 'feature_relationship_id',
  10153. '1' => 'pub_id',
  10154. ),
  10155. ),
  10156. 'indexes' => array(
  10157. 'feature_relationship_pub_idx1' => array(
  10158. '0' => 'feature_relationship_id',
  10159. ),
  10160. 'feature_relationship_pub_idx2' => array(
  10161. '0' => 'pub_id',
  10162. ),
  10163. ),
  10164. 'foreign keys' => array(
  10165. ),
  10166. );
  10167. return $description;
  10168. }
  10169. /**
  10170. * Implements hook_feature_relationshipprop_schema()
  10171. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10172. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10173. * @see tripal_core.api.inc: tripal_core_chado_update()
  10174. * @see tripal_core.api.inc: tripal_core_chado_select()
  10175. *
  10176. * @return
  10177. * An array describing the current table
  10178. *
  10179. * @ingroup tripal_schema_api
  10180. *
  10181. */
  10182. function tripal_core_chado_feature_relationshipprop_schema () {
  10183. $description = array();
  10184. $description = array(
  10185. 'table' => 'feature_relationshipprop',
  10186. // 'description' => 'TODO: please describe this table!',
  10187. 'fields' => array(
  10188. 'feature_relationshipprop_id' => array(
  10189. // 'description' => 'TODO: please describe this field!',
  10190. 'type' => 'serial',
  10191. 'not null' => '1',
  10192. ),
  10193. 'feature_relationship_id' => array(
  10194. // 'description' => 'TODO: please describe this field!',
  10195. 'type' => 'int',
  10196. 'not null' => '1',
  10197. ),
  10198. 'type_id' => array(
  10199. // 'description' => 'TODO: please describe this field!',
  10200. 'type' => 'int',
  10201. 'not null' => '1',
  10202. ),
  10203. 'value' => array(
  10204. // 'description' => 'TODO: please describe this field!',
  10205. 'type' => 'text',
  10206. 'not null' => '',
  10207. ),
  10208. 'rank' => array(
  10209. // 'description' => 'TODO: please describe this field!',
  10210. 'type' => 'int',
  10211. 'not null' => '1',
  10212. 'default' => '0',
  10213. ),
  10214. ),
  10215. 'primary key' => array(
  10216. '0' => 'feature_relationshipprop_id',
  10217. ),
  10218. 'unique keys' => array(
  10219. 'feature_relationshipprop_c1' => array(
  10220. '0' => 'feature_relationship_id',
  10221. '1' => 'type_id',
  10222. '2' => 'rank',
  10223. ),
  10224. ),
  10225. 'indexes' => array(
  10226. 'feature_relationshipprop_idx1' => array(
  10227. '0' => 'feature_relationship_id',
  10228. ),
  10229. 'feature_relationshipprop_idx2' => array(
  10230. '0' => 'type_id',
  10231. ),
  10232. ),
  10233. 'foreign keys' => array(
  10234. ),
  10235. );
  10236. return $description;
  10237. }
  10238. /**
  10239. * Implements hook_feature_pub_schema()
  10240. * Purpose: To describe the structure of feature_pub to tripal
  10241. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10242. * @see tripal_core.api.inc: tripal_core_chado_update()
  10243. * @see tripal_core.api.inc: tripal_core_chado_select()
  10244. *
  10245. * @return
  10246. * An array describing the current table
  10247. *
  10248. * @ingroup tripal_schema_api
  10249. *
  10250. */
  10251. function tripal_core_chado_feature_pub_schema () {
  10252. $description = array();
  10253. $description = array(
  10254. 'table' => 'feature_pub',
  10255. // 'description' => 'TODO: please describe this table!',
  10256. 'fields' => array(
  10257. 'feature_pub_id' => array(
  10258. // 'description' => 'TODO: please describe this field!',
  10259. 'type' => 'serial',
  10260. 'not null' => '1',
  10261. ),
  10262. 'feature_id' => array(
  10263. // 'description' => 'TODO: please describe this field!',
  10264. 'type' => 'int',
  10265. 'not null' => '1',
  10266. ),
  10267. 'pub_id' => array(
  10268. // 'description' => 'TODO: please describe this field!',
  10269. 'type' => 'int',
  10270. 'not null' => '1',
  10271. ),
  10272. ),
  10273. 'primary key' => array(
  10274. '0' => 'feature_pub_id',
  10275. ),
  10276. 'unique keys' => array(
  10277. 'feature_pub_c1' => array(
  10278. '0' => 'feature_id',
  10279. '1' => 'pub_id',
  10280. ),
  10281. ),
  10282. 'indexes' => array(
  10283. 'feature_pub_idx1' => array(
  10284. '0' => 'feature_id',
  10285. ),
  10286. 'feature_pub_idx2' => array(
  10287. '0' => 'pub_id',
  10288. ),
  10289. ),
  10290. 'foreign keys' => array(
  10291. ),
  10292. );
  10293. return $description;
  10294. }
  10295. /**
  10296. * Implements hook_feature_phenotype_schema()
  10297. * Purpose: To describe the structure of feature_phenotype to tripal
  10298. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10299. * @see tripal_core.api.inc: tripal_core_chado_update()
  10300. * @see tripal_core.api.inc: tripal_core_chado_select()
  10301. *
  10302. * @return
  10303. * An array describing the current table
  10304. *
  10305. * @ingroup tripal_schema_api
  10306. *
  10307. */
  10308. function tripal_core_chado_feature_phenotype_schema () {
  10309. $description = array();
  10310. $description = array(
  10311. 'table' => 'feature_phenotype',
  10312. // 'description' => 'TODO: please describe this table!',
  10313. 'fields' => array(
  10314. 'feature_phenotype_id' => array(
  10315. // 'description' => 'TODO: please describe this field!',
  10316. 'type' => 'serial',
  10317. 'not null' => '1',
  10318. ),
  10319. 'feature_id' => array(
  10320. // 'description' => 'TODO: please describe this field!',
  10321. 'type' => 'int',
  10322. 'not null' => '1',
  10323. ),
  10324. 'phenotype_id' => array(
  10325. // 'description' => 'TODO: please describe this field!',
  10326. 'type' => 'int',
  10327. 'not null' => '1',
  10328. ),
  10329. ),
  10330. 'primary key' => array(
  10331. '0' => 'feature_phenotype_id',
  10332. ),
  10333. 'unique keys' => array(
  10334. 'feature_phenotype_c1' => array(
  10335. '0' => 'feature_id',
  10336. '1' => 'phenotype_id',
  10337. ),
  10338. ),
  10339. 'indexes' => array(
  10340. 'feature_phenotype_idx1' => array(
  10341. '0' => 'feature_id',
  10342. ),
  10343. 'feature_phenotype_idx2' => array(
  10344. '0' => 'phenotype_id',
  10345. ),
  10346. ),
  10347. 'foreign keys' => array(
  10348. ),
  10349. );
  10350. return $description;
  10351. }
  10352. /**
  10353. * Implements hook_feature_genotype_schema()
  10354. * Purpose: To describe the structure of feature_genotype to tripal
  10355. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10356. * @see tripal_core.api.inc: tripal_core_chado_update()
  10357. * @see tripal_core.api.inc: tripal_core_chado_select()
  10358. *
  10359. * @return
  10360. * An array describing the current table
  10361. *
  10362. * @ingroup tripal_schema_api
  10363. *
  10364. */
  10365. function tripal_core_chado_feature_genotype_schema () {
  10366. $description = array();
  10367. $description = array(
  10368. 'table' => 'feature_genotype',
  10369. // 'description' => 'TODO: please describe this table!',
  10370. 'fields' => array(
  10371. 'feature_genotype_id' => array(
  10372. // 'description' => 'TODO: please describe this field!',
  10373. 'type' => 'serial',
  10374. 'not null' => '1',
  10375. ),
  10376. 'feature_id' => array(
  10377. // 'description' => 'TODO: please describe this field!',
  10378. 'type' => 'int',
  10379. 'not null' => '1',
  10380. ),
  10381. 'genotype_id' => array(
  10382. // 'description' => 'TODO: please describe this field!',
  10383. 'type' => 'int',
  10384. 'not null' => '1',
  10385. ),
  10386. 'chromosome_id' => array(
  10387. // 'description' => 'TODO: please describe this field!',
  10388. 'type' => 'int',
  10389. 'not null' => '',
  10390. ),
  10391. 'rank' => array(
  10392. // 'description' => 'TODO: please describe this field!',
  10393. 'type' => 'int',
  10394. 'not null' => '1',
  10395. ),
  10396. 'cgroup' => array(
  10397. // 'description' => 'TODO: please describe this field!',
  10398. 'type' => 'int',
  10399. 'not null' => '1',
  10400. ),
  10401. 'cvterm_id' => array(
  10402. // 'description' => 'TODO: please describe this field!',
  10403. 'type' => 'int',
  10404. 'not null' => '1',
  10405. ),
  10406. ),
  10407. 'primary key' => array(
  10408. '0' => 'feature_genotype_id',
  10409. ),
  10410. 'unique keys' => array(
  10411. 'feature_genotype_c1' => array(
  10412. '0' => 'feature_id',
  10413. '1' => 'genotype_id',
  10414. '2' => 'cvterm_id',
  10415. '3' => 'chromosome_id',
  10416. '4' => 'rank',
  10417. '5' => 'cgroup',
  10418. ),
  10419. ),
  10420. 'indexes' => array(
  10421. 'feature_genotype_idx1' => array(
  10422. '0' => 'feature_id',
  10423. ),
  10424. 'feature_genotype_idx2' => array(
  10425. '0' => 'genotype_id',
  10426. ),
  10427. ),
  10428. 'foreign keys' => array(
  10429. ),
  10430. );
  10431. return $description;
  10432. }
  10433. /**
  10434. * Implements hook_feature_intersection_schema()
  10435. * Purpose: To describe the structure of feature_intersection to tripal
  10436. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10437. * @see tripal_core.api.inc: tripal_core_chado_update()
  10438. * @see tripal_core.api.inc: tripal_core_chado_select()
  10439. *
  10440. * @return
  10441. * An array describing the current table
  10442. *
  10443. * @ingroup tripal_schema_api
  10444. *
  10445. */
  10446. function tripal_core_chado_feature_intersection_schema () {
  10447. $description = array();
  10448. $description = array(
  10449. 'table' => 'feature_intersection',
  10450. // 'description' => 'TODO: please describe this table!',
  10451. 'fields' => array(
  10452. 'subject_id' => array(
  10453. // 'description' => 'TODO: please describe this field!',
  10454. 'type' => 'int',
  10455. 'not null' => '',
  10456. ),
  10457. 'object_id' => array(
  10458. // 'description' => 'TODO: please describe this field!',
  10459. 'type' => 'int',
  10460. 'not null' => '',
  10461. ),
  10462. 'srcfeature_id' => array(
  10463. // 'description' => 'TODO: please describe this field!',
  10464. 'type' => 'int',
  10465. 'not null' => '',
  10466. ),
  10467. 'subject_strand' => array(
  10468. // 'description' => 'TODO: please describe this field!',
  10469. 'type' => 'int',
  10470. 'size' => 'small',
  10471. 'not null' => '',
  10472. ),
  10473. 'object_strand' => array(
  10474. // 'description' => 'TODO: please describe this field!',
  10475. 'type' => 'int',
  10476. 'size' => 'small',
  10477. 'not null' => '',
  10478. ),
  10479. 'fmin' => array(
  10480. // 'description' => 'TODO: please describe this field!',
  10481. 'type' => 'int',
  10482. 'not null' => '',
  10483. ),
  10484. 'fmax' => array(
  10485. // 'description' => 'TODO: please describe this field!',
  10486. 'type' => 'int',
  10487. 'not null' => '',
  10488. ),
  10489. ),
  10490. 'primary key' => array(
  10491. ),
  10492. 'unique keys' => array(
  10493. ),
  10494. 'indexes' => array(
  10495. ),
  10496. 'foreign keys' => array(
  10497. ),
  10498. );
  10499. return $description;
  10500. }
  10501. /**
  10502. * Implements hook_feature_meets_schema()
  10503. * Purpose: To describe the structure of feature_meets to tripal
  10504. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10505. * @see tripal_core.api.inc: tripal_core_chado_update()
  10506. * @see tripal_core.api.inc: tripal_core_chado_select()
  10507. *
  10508. * @return
  10509. * An array describing the current table
  10510. *
  10511. * @ingroup tripal_schema_api
  10512. *
  10513. */
  10514. function tripal_core_chado_feature_meets_schema () {
  10515. $description = array();
  10516. $description = array(
  10517. 'table' => 'feature_meets',
  10518. // 'description' => 'TODO: please describe this table!',
  10519. 'fields' => array(
  10520. 'subject_id' => array(
  10521. // 'description' => 'TODO: please describe this field!',
  10522. 'type' => 'int',
  10523. 'not null' => '',
  10524. ),
  10525. 'object_id' => array(
  10526. // 'description' => 'TODO: please describe this field!',
  10527. 'type' => 'int',
  10528. 'not null' => '',
  10529. ),
  10530. ),
  10531. 'primary key' => array(
  10532. ),
  10533. 'unique keys' => array(
  10534. ),
  10535. 'indexes' => array(
  10536. ),
  10537. 'foreign keys' => array(
  10538. ),
  10539. );
  10540. return $description;
  10541. }
  10542. /**
  10543. * Implements hook_feature_meets_on_same_strand_schema()
  10544. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10545. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10546. * @see tripal_core.api.inc: tripal_core_chado_update()
  10547. * @see tripal_core.api.inc: tripal_core_chado_select()
  10548. *
  10549. * @return
  10550. * An array describing the current table
  10551. *
  10552. * @ingroup tripal_schema_api
  10553. *
  10554. */
  10555. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10556. $description = array();
  10557. $description = array(
  10558. 'table' => 'feature_meets_on_same_strand',
  10559. // 'description' => 'TODO: please describe this table!',
  10560. 'fields' => array(
  10561. 'subject_id' => array(
  10562. // 'description' => 'TODO: please describe this field!',
  10563. 'type' => 'int',
  10564. 'not null' => '',
  10565. ),
  10566. 'object_id' => array(
  10567. // 'description' => 'TODO: please describe this field!',
  10568. 'type' => 'int',
  10569. 'not null' => '',
  10570. ),
  10571. ),
  10572. 'primary key' => array(
  10573. ),
  10574. 'unique keys' => array(
  10575. ),
  10576. 'indexes' => array(
  10577. ),
  10578. 'foreign keys' => array(
  10579. ),
  10580. );
  10581. return $description;
  10582. }
  10583. /**
  10584. * Implements hook_f_loc_schema()
  10585. * Purpose: To describe the structure of f_loc to tripal
  10586. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10587. * @see tripal_core.api.inc: tripal_core_chado_update()
  10588. * @see tripal_core.api.inc: tripal_core_chado_select()
  10589. *
  10590. * @return
  10591. * An array describing the current table
  10592. *
  10593. * @ingroup tripal_schema_api
  10594. *
  10595. */
  10596. function tripal_core_chado_f_loc_schema () {
  10597. $description = array();
  10598. $description = array(
  10599. 'table' => 'f_loc',
  10600. // 'description' => 'TODO: please describe this table!',
  10601. 'fields' => array(
  10602. 'feature_id' => array(
  10603. // 'description' => 'TODO: please describe this field!',
  10604. 'type' => 'int',
  10605. 'not null' => '',
  10606. ),
  10607. 'name' => array(
  10608. // 'description' => 'TODO: please describe this field!',
  10609. 'type' => 'varchar',
  10610. 'length' => '255',
  10611. 'not null' => '',
  10612. ),
  10613. 'dbxref_id' => array(
  10614. // 'description' => 'TODO: please describe this field!',
  10615. 'type' => 'int',
  10616. 'not null' => '',
  10617. ),
  10618. 'nbeg' => array(
  10619. // 'description' => 'TODO: please describe this field!',
  10620. 'type' => 'int',
  10621. 'not null' => '',
  10622. ),
  10623. 'nend' => array(
  10624. // 'description' => 'TODO: please describe this field!',
  10625. 'type' => 'int',
  10626. 'not null' => '',
  10627. ),
  10628. 'strand' => array(
  10629. // 'description' => 'TODO: please describe this field!',
  10630. 'type' => 'int',
  10631. 'size' => 'small',
  10632. 'not null' => '',
  10633. ),
  10634. ),
  10635. 'primary key' => array(
  10636. ),
  10637. 'unique keys' => array(
  10638. ),
  10639. 'indexes' => array(
  10640. ),
  10641. 'foreign keys' => array(
  10642. ),
  10643. );
  10644. return $description;
  10645. }
  10646. /**
  10647. * Implements hook_expressionprop_schema()
  10648. * Purpose: To describe the structure of expressionprop to tripal
  10649. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10650. * @see tripal_core.api.inc: tripal_core_chado_update()
  10651. * @see tripal_core.api.inc: tripal_core_chado_select()
  10652. *
  10653. * @return
  10654. * An array describing the current table
  10655. *
  10656. * @ingroup tripal_schema_api
  10657. *
  10658. */
  10659. function tripal_core_chado_expressionprop_schema () {
  10660. $description = array();
  10661. $description = array(
  10662. 'table' => 'expressionprop',
  10663. // 'description' => 'TODO: please describe this table!',
  10664. 'fields' => array(
  10665. 'expressionprop_id' => array(
  10666. // 'description' => 'TODO: please describe this field!',
  10667. 'type' => 'serial',
  10668. 'not null' => '1',
  10669. ),
  10670. 'expression_id' => array(
  10671. // 'description' => 'TODO: please describe this field!',
  10672. 'type' => 'int',
  10673. 'not null' => '1',
  10674. ),
  10675. 'type_id' => array(
  10676. // 'description' => 'TODO: please describe this field!',
  10677. 'type' => 'int',
  10678. 'not null' => '1',
  10679. ),
  10680. 'value' => array(
  10681. // 'description' => 'TODO: please describe this field!',
  10682. 'type' => 'text',
  10683. 'not null' => '',
  10684. ),
  10685. 'rank' => array(
  10686. // 'description' => 'TODO: please describe this field!',
  10687. 'type' => 'int',
  10688. 'not null' => '1',
  10689. 'default' => '0',
  10690. ),
  10691. ),
  10692. 'primary key' => array(
  10693. '0' => 'expressionprop_id',
  10694. ),
  10695. 'unique keys' => array(
  10696. 'expressionprop_c1' => array(
  10697. '0' => 'expression_id',
  10698. '1' => 'type_id',
  10699. '2' => 'rank',
  10700. ),
  10701. ),
  10702. 'indexes' => array(
  10703. 'expressionprop_idx1' => array(
  10704. '0' => 'expression_id',
  10705. ),
  10706. 'expressionprop_idx2' => array(
  10707. '0' => 'type_id',
  10708. ),
  10709. ),
  10710. 'foreign keys' => array(
  10711. ),
  10712. );
  10713. return $description;
  10714. }
  10715. /**
  10716. * Implements hook_db_dbxref_count_schema()
  10717. * Purpose: To describe the structure of db_dbxref_count to tripal
  10718. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10719. * @see tripal_core.api.inc: tripal_core_chado_update()
  10720. * @see tripal_core.api.inc: tripal_core_chado_select()
  10721. *
  10722. * @return
  10723. * An array describing the current table
  10724. *
  10725. * @ingroup tripal_schema_api
  10726. *
  10727. */
  10728. function tripal_core_chado_db_dbxref_count_schema () {
  10729. $description = array();
  10730. $description = array(
  10731. 'table' => 'db_dbxref_count',
  10732. // 'description' => 'TODO: please describe this table!',
  10733. 'fields' => array(
  10734. 'name' => array(
  10735. // 'description' => 'TODO: please describe this field!',
  10736. 'type' => 'varchar',
  10737. 'length' => '255',
  10738. 'not null' => '',
  10739. ),
  10740. 'num_dbxrefs' => array(
  10741. // 'description' => 'TODO: please describe this field!',
  10742. 'type' => 'int',
  10743. 'size' => 'big',
  10744. 'not null' => '',
  10745. ),
  10746. ),
  10747. 'primary key' => array(
  10748. ),
  10749. 'unique keys' => array(
  10750. ),
  10751. 'indexes' => array(
  10752. ),
  10753. 'foreign keys' => array(
  10754. ),
  10755. );
  10756. return $description;
  10757. }
  10758. /**
  10759. * Implements hook_dbxref_schema()
  10760. * Purpose: To describe the structure of dbxref to tripal
  10761. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10762. * @see tripal_core.api.inc: tripal_core_chado_update()
  10763. * @see tripal_core.api.inc: tripal_core_chado_select()
  10764. *
  10765. * @return
  10766. * An array describing the current table
  10767. *
  10768. * @ingroup tripal_schema_api
  10769. *
  10770. */
  10771. function tripal_core_chado_dbxref_schema () {
  10772. $description = array();
  10773. $description = array(
  10774. 'table' => 'dbxref',
  10775. // 'description' => 'TODO: please describe this table!',
  10776. 'fields' => array(
  10777. 'dbxref_id' => array(
  10778. // 'description' => 'TODO: please describe this field!',
  10779. 'type' => 'serial',
  10780. 'not null' => '1',
  10781. ),
  10782. 'db_id' => array(
  10783. // 'description' => 'TODO: please describe this field!',
  10784. 'type' => 'int',
  10785. 'not null' => '1',
  10786. ),
  10787. 'accession' => array(
  10788. // 'description' => 'TODO: please describe this field!',
  10789. 'type' => 'varchar',
  10790. 'length' => '255',
  10791. 'not null' => '1',
  10792. ),
  10793. 'version' => array(
  10794. // 'description' => 'TODO: please describe this field!',
  10795. 'type' => 'varchar',
  10796. 'length' => '255',
  10797. 'not null' => '1',
  10798. 'default' => '',
  10799. ),
  10800. 'description' => array(
  10801. // 'description' => 'TODO: please describe this field!',
  10802. 'type' => 'text',
  10803. 'not null' => '',
  10804. ),
  10805. ),
  10806. 'primary key' => array(
  10807. '0' => 'dbxref_id',
  10808. ),
  10809. 'unique keys' => array(
  10810. 'dbxref_c1' => array(
  10811. '0' => 'db_id',
  10812. '1' => 'accession',
  10813. '2' => 'version',
  10814. ),
  10815. ),
  10816. 'indexes' => array(
  10817. 'dbxref_idx1' => array(
  10818. '0' => 'db_id',
  10819. ),
  10820. 'dbxref_idx2' => array(
  10821. '0' => 'accession',
  10822. ),
  10823. 'dbxref_idx3' => array(
  10824. '0' => 'version',
  10825. ),
  10826. ),
  10827. 'foreign keys' => array(
  10828. ),
  10829. );
  10830. return $description;
  10831. }
  10832. /**
  10833. * Implements hook_dbxrefprop_schema()
  10834. * Purpose: To describe the structure of dbxrefprop to tripal
  10835. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10836. * @see tripal_core.api.inc: tripal_core_chado_update()
  10837. * @see tripal_core.api.inc: tripal_core_chado_select()
  10838. *
  10839. * @return
  10840. * An array describing the current table
  10841. *
  10842. * @ingroup tripal_schema_api
  10843. *
  10844. */
  10845. function tripal_core_chado_dbxrefprop_schema () {
  10846. $description = array();
  10847. $description = array(
  10848. 'table' => 'dbxrefprop',
  10849. // 'description' => 'TODO: please describe this table!',
  10850. 'fields' => array(
  10851. 'dbxrefprop_id' => array(
  10852. // 'description' => 'TODO: please describe this field!',
  10853. 'type' => 'serial',
  10854. 'not null' => '1',
  10855. ),
  10856. 'dbxref_id' => array(
  10857. // 'description' => 'TODO: please describe this field!',
  10858. 'type' => 'int',
  10859. 'not null' => '1',
  10860. ),
  10861. 'type_id' => array(
  10862. // 'description' => 'TODO: please describe this field!',
  10863. 'type' => 'int',
  10864. 'not null' => '1',
  10865. ),
  10866. 'value' => array(
  10867. // 'description' => 'TODO: please describe this field!',
  10868. 'type' => 'text',
  10869. 'not null' => '1',
  10870. 'default' => '',
  10871. ),
  10872. 'rank' => array(
  10873. // 'description' => 'TODO: please describe this field!',
  10874. 'type' => 'int',
  10875. 'not null' => '1',
  10876. 'default' => '0',
  10877. ),
  10878. ),
  10879. 'primary key' => array(
  10880. '0' => 'dbxrefprop_id',
  10881. ),
  10882. 'unique keys' => array(
  10883. 'dbxrefprop_c1' => array(
  10884. '0' => 'dbxref_id',
  10885. '1' => 'type_id',
  10886. '2' => 'rank',
  10887. ),
  10888. ),
  10889. 'indexes' => array(
  10890. 'dbxrefprop_idx1' => array(
  10891. '0' => 'dbxref_id',
  10892. ),
  10893. 'dbxrefprop_idx2' => array(
  10894. '0' => 'type_id',
  10895. ),
  10896. ),
  10897. 'foreign keys' => array(
  10898. ),
  10899. );
  10900. return $description;
  10901. }
  10902. /**
  10903. * Implements hook_dfeatureloc_schema()
  10904. * Purpose: To describe the structure of dfeatureloc to tripal
  10905. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10906. * @see tripal_core.api.inc: tripal_core_chado_update()
  10907. * @see tripal_core.api.inc: tripal_core_chado_select()
  10908. *
  10909. * @return
  10910. * An array describing the current table
  10911. *
  10912. * @ingroup tripal_schema_api
  10913. *
  10914. */
  10915. function tripal_core_chado_dfeatureloc_schema () {
  10916. $description = array();
  10917. $description = array(
  10918. 'table' => 'dfeatureloc',
  10919. // 'description' => 'TODO: please describe this table!',
  10920. 'fields' => array(
  10921. 'featureloc_id' => array(
  10922. // 'description' => 'TODO: please describe this field!',
  10923. 'type' => 'int',
  10924. 'not null' => '',
  10925. ),
  10926. 'feature_id' => array(
  10927. // 'description' => 'TODO: please describe this field!',
  10928. 'type' => 'int',
  10929. 'not null' => '',
  10930. ),
  10931. 'srcfeature_id' => array(
  10932. // 'description' => 'TODO: please describe this field!',
  10933. 'type' => 'int',
  10934. 'not null' => '',
  10935. ),
  10936. 'nbeg' => array(
  10937. // 'description' => 'TODO: please describe this field!',
  10938. 'type' => 'int',
  10939. 'not null' => '',
  10940. ),
  10941. 'is_nbeg_partial' => array(
  10942. // 'description' => 'TODO: please describe this field!',
  10943. 'type' => 'boolean',
  10944. 'not null' => '',
  10945. ),
  10946. 'nend' => array(
  10947. // 'description' => 'TODO: please describe this field!',
  10948. 'type' => 'int',
  10949. 'not null' => '',
  10950. ),
  10951. 'is_nend_partial' => array(
  10952. // 'description' => 'TODO: please describe this field!',
  10953. 'type' => 'boolean',
  10954. 'not null' => '',
  10955. ),
  10956. 'strand' => array(
  10957. // 'description' => 'TODO: please describe this field!',
  10958. 'type' => 'int',
  10959. 'size' => 'small',
  10960. 'not null' => '',
  10961. ),
  10962. 'phase' => array(
  10963. // 'description' => 'TODO: please describe this field!',
  10964. 'type' => 'int',
  10965. 'not null' => '',
  10966. ),
  10967. 'residue_info' => array(
  10968. // 'description' => 'TODO: please describe this field!',
  10969. 'type' => 'text',
  10970. 'not null' => '',
  10971. ),
  10972. 'locgroup' => array(
  10973. // 'description' => 'TODO: please describe this field!',
  10974. 'type' => 'int',
  10975. 'not null' => '',
  10976. ),
  10977. 'rank' => array(
  10978. // 'description' => 'TODO: please describe this field!',
  10979. 'type' => 'int',
  10980. 'not null' => '',
  10981. ),
  10982. ),
  10983. 'primary key' => array(
  10984. ),
  10985. 'unique keys' => array(
  10986. ),
  10987. 'indexes' => array(
  10988. ),
  10989. 'foreign keys' => array(
  10990. ),
  10991. );
  10992. return $description;
  10993. }
  10994. /**
  10995. * Implements hook_db_schema()
  10996. * Purpose: To describe the structure of db to tripal
  10997. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10998. * @see tripal_core.api.inc: tripal_core_chado_update()
  10999. * @see tripal_core.api.inc: tripal_core_chado_select()
  11000. *
  11001. * @return
  11002. * An array describing the current table
  11003. *
  11004. * @ingroup tripal_schema_api
  11005. *
  11006. */
  11007. function tripal_core_chado_db_schema () {
  11008. $description = array();
  11009. $description = array(
  11010. 'table' => 'db',
  11011. // 'description' => 'TODO: please describe this table!',
  11012. 'fields' => array(
  11013. 'db_id' => array(
  11014. // 'description' => 'TODO: please describe this field!',
  11015. 'type' => 'serial',
  11016. 'not null' => '1',
  11017. ),
  11018. 'name' => array(
  11019. // 'description' => 'TODO: please describe this field!',
  11020. 'type' => 'varchar',
  11021. 'length' => '255',
  11022. 'not null' => '1',
  11023. ),
  11024. 'description' => array(
  11025. // 'description' => 'TODO: please describe this field!',
  11026. 'type' => 'varchar',
  11027. 'length' => '255',
  11028. 'not null' => '',
  11029. ),
  11030. 'urlprefix' => array(
  11031. // 'description' => 'TODO: please describe this field!',
  11032. 'type' => 'varchar',
  11033. 'length' => '255',
  11034. 'not null' => '',
  11035. ),
  11036. 'url' => array(
  11037. // 'description' => 'TODO: please describe this field!',
  11038. 'type' => 'varchar',
  11039. 'length' => '255',
  11040. 'not null' => '',
  11041. ),
  11042. ),
  11043. 'primary key' => array(
  11044. '0' => 'db_id',
  11045. ),
  11046. 'unique keys' => array(
  11047. 'db_c1' => array(
  11048. '0' => 'name',
  11049. ),
  11050. ),
  11051. 'indexes' => array(
  11052. ),
  11053. 'foreign keys' => array(
  11054. ),
  11055. );
  11056. return $description;
  11057. }
  11058. /**
  11059. * Implements hook_cvtermsynonym_schema()
  11060. * Purpose: To describe the structure of cvtermsynonym to tripal
  11061. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11062. * @see tripal_core.api.inc: tripal_core_chado_update()
  11063. * @see tripal_core.api.inc: tripal_core_chado_select()
  11064. *
  11065. * @return
  11066. * An array describing the current table
  11067. *
  11068. * @ingroup tripal_schema_api
  11069. *
  11070. */
  11071. function tripal_core_chado_cvtermsynonym_schema () {
  11072. $description = array();
  11073. $description = array(
  11074. 'table' => 'cvtermsynonym',
  11075. // 'description' => 'TODO: please describe this table!',
  11076. 'fields' => array(
  11077. 'cvtermsynonym_id' => array(
  11078. // 'description' => 'TODO: please describe this field!',
  11079. 'type' => 'serial',
  11080. 'not null' => '1',
  11081. ),
  11082. 'cvterm_id' => array(
  11083. // 'description' => 'TODO: please describe this field!',
  11084. 'type' => 'int',
  11085. 'not null' => '1',
  11086. ),
  11087. 'synonym' => array(
  11088. // 'description' => 'TODO: please describe this field!',
  11089. 'type' => 'varchar',
  11090. 'length' => '1024',
  11091. 'not null' => '1',
  11092. ),
  11093. 'type_id' => array(
  11094. // 'description' => 'TODO: please describe this field!',
  11095. 'type' => 'int',
  11096. 'not null' => '',
  11097. ),
  11098. ),
  11099. 'primary key' => array(
  11100. '0' => 'cvtermsynonym_id',
  11101. ),
  11102. 'unique keys' => array(
  11103. 'cvtermsynonym_c1' => array(
  11104. '0' => 'cvterm_id',
  11105. '1' => 'synonym',
  11106. ),
  11107. ),
  11108. 'indexes' => array(
  11109. 'cvtermsynonym_idx1' => array(
  11110. '0' => 'cvterm_id',
  11111. ),
  11112. ),
  11113. 'foreign keys' => array(
  11114. ),
  11115. );
  11116. return $description;
  11117. }
  11118. /**
  11119. * Implements hook_cvterm_dbxref_schema()
  11120. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11121. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11122. * @see tripal_core.api.inc: tripal_core_chado_update()
  11123. * @see tripal_core.api.inc: tripal_core_chado_select()
  11124. *
  11125. * @return
  11126. * An array describing the current table
  11127. *
  11128. * @ingroup tripal_schema_api
  11129. *
  11130. */
  11131. function tripal_core_chado_cvterm_dbxref_schema () {
  11132. $description = array();
  11133. $description = array(
  11134. 'table' => 'cvterm_dbxref',
  11135. // 'description' => 'TODO: please describe this table!',
  11136. 'fields' => array(
  11137. 'cvterm_dbxref_id' => array(
  11138. // 'description' => 'TODO: please describe this field!',
  11139. 'type' => 'serial',
  11140. 'not null' => '1',
  11141. ),
  11142. 'cvterm_id' => array(
  11143. // 'description' => 'TODO: please describe this field!',
  11144. 'type' => 'int',
  11145. 'not null' => '1',
  11146. ),
  11147. 'dbxref_id' => array(
  11148. // 'description' => 'TODO: please describe this field!',
  11149. 'type' => 'int',
  11150. 'not null' => '1',
  11151. ),
  11152. 'is_for_definition' => array(
  11153. // 'description' => 'TODO: please describe this field!',
  11154. 'type' => 'int',
  11155. 'not null' => '1',
  11156. 'default' => '0',
  11157. ),
  11158. ),
  11159. 'primary key' => array(
  11160. '0' => 'cvterm_dbxref_id',
  11161. ),
  11162. 'unique keys' => array(
  11163. 'cvterm_dbxref_c1' => array(
  11164. '0' => 'cvterm_id',
  11165. '1' => 'dbxref_id',
  11166. ),
  11167. ),
  11168. 'indexes' => array(
  11169. 'cvterm_dbxref_idx1' => array(
  11170. '0' => 'cvterm_id',
  11171. ),
  11172. 'cvterm_dbxref_idx2' => array(
  11173. '0' => 'dbxref_id',
  11174. ),
  11175. ),
  11176. 'foreign keys' => array(
  11177. ),
  11178. );
  11179. return $description;
  11180. }
  11181. /**
  11182. * Implements hook_cvterm_relationship_schema()
  11183. * Purpose: To describe the structure of cvterm_relationship to tripal
  11184. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11185. * @see tripal_core.api.inc: tripal_core_chado_update()
  11186. * @see tripal_core.api.inc: tripal_core_chado_select()
  11187. *
  11188. * @return
  11189. * An array describing the current table
  11190. *
  11191. * @ingroup tripal_schema_api
  11192. *
  11193. */
  11194. function tripal_core_chado_cvterm_relationship_schema () {
  11195. $description = array();
  11196. $description = array(
  11197. 'table' => 'cvterm_relationship',
  11198. // 'description' => 'TODO: please describe this table!',
  11199. 'fields' => array(
  11200. 'cvterm_relationship_id' => array(
  11201. // 'description' => 'TODO: please describe this field!',
  11202. 'type' => 'serial',
  11203. 'not null' => '1',
  11204. ),
  11205. 'type_id' => array(
  11206. // 'description' => 'TODO: please describe this field!',
  11207. 'type' => 'int',
  11208. 'not null' => '1',
  11209. ),
  11210. 'subject_id' => array(
  11211. // 'description' => 'TODO: please describe this field!',
  11212. 'type' => 'int',
  11213. 'not null' => '1',
  11214. ),
  11215. 'object_id' => array(
  11216. // 'description' => 'TODO: please describe this field!',
  11217. 'type' => 'int',
  11218. 'not null' => '1',
  11219. ),
  11220. ),
  11221. 'primary key' => array(
  11222. '0' => 'cvterm_relationship_id',
  11223. ),
  11224. 'unique keys' => array(
  11225. 'cvterm_relationship_c1' => array(
  11226. '0' => 'subject_id',
  11227. '1' => 'object_id',
  11228. '2' => 'type_id',
  11229. ),
  11230. ),
  11231. 'indexes' => array(
  11232. 'cvterm_relationship_idx1' => array(
  11233. '0' => 'type_id',
  11234. ),
  11235. 'cvterm_relationship_idx2' => array(
  11236. '0' => 'subject_id',
  11237. ),
  11238. 'cvterm_relationship_idx3' => array(
  11239. '0' => 'object_id',
  11240. ),
  11241. ),
  11242. 'foreign keys' => array(
  11243. ),
  11244. );
  11245. return $description;
  11246. }
  11247. /**
  11248. * Implements hook_cvtermpath_schema()
  11249. * Purpose: To describe the structure of cvtermpath to tripal
  11250. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11251. * @see tripal_core.api.inc: tripal_core_chado_update()
  11252. * @see tripal_core.api.inc: tripal_core_chado_select()
  11253. *
  11254. * @return
  11255. * An array describing the current table
  11256. *
  11257. * @ingroup tripal_schema_api
  11258. *
  11259. */
  11260. function tripal_core_chado_cvtermpath_schema () {
  11261. $description = array();
  11262. $description = array(
  11263. 'table' => 'cvtermpath',
  11264. // 'description' => 'TODO: please describe this table!',
  11265. 'fields' => array(
  11266. 'cvtermpath_id' => array(
  11267. // 'description' => 'TODO: please describe this field!',
  11268. 'type' => 'serial',
  11269. 'not null' => '1',
  11270. ),
  11271. 'type_id' => array(
  11272. // 'description' => 'TODO: please describe this field!',
  11273. 'type' => 'int',
  11274. 'not null' => '',
  11275. ),
  11276. 'subject_id' => array(
  11277. // 'description' => 'TODO: please describe this field!',
  11278. 'type' => 'int',
  11279. 'not null' => '1',
  11280. ),
  11281. 'object_id' => array(
  11282. // 'description' => 'TODO: please describe this field!',
  11283. 'type' => 'int',
  11284. 'not null' => '1',
  11285. ),
  11286. 'cv_id' => array(
  11287. // 'description' => 'TODO: please describe this field!',
  11288. 'type' => 'int',
  11289. 'not null' => '1',
  11290. ),
  11291. 'pathdistance' => array(
  11292. // 'description' => 'TODO: please describe this field!',
  11293. 'type' => 'int',
  11294. 'not null' => '',
  11295. ),
  11296. ),
  11297. 'primary key' => array(
  11298. '0' => 'cvtermpath_id',
  11299. ),
  11300. 'unique keys' => array(
  11301. 'cvtermpath_c1' => array(
  11302. '0' => 'subject_id',
  11303. '1' => 'object_id',
  11304. '2' => 'type_id',
  11305. '3' => 'pathdistance',
  11306. ),
  11307. ),
  11308. 'indexes' => array(
  11309. 'cvtermpath_idx1' => array(
  11310. '0' => 'type_id',
  11311. ),
  11312. 'cvtermpath_idx2' => array(
  11313. '0' => 'subject_id',
  11314. ),
  11315. 'cvtermpath_idx3' => array(
  11316. '0' => 'object_id',
  11317. ),
  11318. 'cvtermpath_idx4' => array(
  11319. '0' => 'cv_id',
  11320. ),
  11321. ),
  11322. 'foreign keys' => array(
  11323. ),
  11324. );
  11325. return $description;
  11326. }
  11327. /**
  11328. * Implements hook_cvtermprop_schema()
  11329. * Purpose: To describe the structure of cvtermprop to tripal
  11330. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11331. * @see tripal_core.api.inc: tripal_core_chado_update()
  11332. * @see tripal_core.api.inc: tripal_core_chado_select()
  11333. *
  11334. * @return
  11335. * An array describing the current table
  11336. *
  11337. * @ingroup tripal_schema_api
  11338. *
  11339. */
  11340. function tripal_core_chado_cvtermprop_schema () {
  11341. $description = array();
  11342. $description = array(
  11343. 'table' => 'cvtermprop',
  11344. // 'description' => 'TODO: please describe this table!',
  11345. 'fields' => array(
  11346. 'cvtermprop_id' => array(
  11347. // 'description' => 'TODO: please describe this field!',
  11348. 'type' => 'serial',
  11349. 'not null' => '1',
  11350. ),
  11351. 'cvterm_id' => array(
  11352. // 'description' => 'TODO: please describe this field!',
  11353. 'type' => 'int',
  11354. 'not null' => '1',
  11355. ),
  11356. 'type_id' => array(
  11357. // 'description' => 'TODO: please describe this field!',
  11358. 'type' => 'int',
  11359. 'not null' => '1',
  11360. ),
  11361. 'value' => array(
  11362. // 'description' => 'TODO: please describe this field!',
  11363. 'type' => 'text',
  11364. 'not null' => '1',
  11365. 'default' => '',
  11366. ),
  11367. 'rank' => array(
  11368. // 'description' => 'TODO: please describe this field!',
  11369. 'type' => 'int',
  11370. 'not null' => '1',
  11371. 'default' => '0',
  11372. ),
  11373. ),
  11374. 'primary key' => array(
  11375. '0' => 'cvtermprop_id',
  11376. ),
  11377. 'unique keys' => array(
  11378. 'cvterm_id' => array(
  11379. '0' => 'cvterm_id',
  11380. '1' => 'type_id',
  11381. '2' => 'value',
  11382. '3' => 'rank',
  11383. ),
  11384. ),
  11385. 'indexes' => array(
  11386. 'cvtermprop_idx1' => array(
  11387. '0' => 'cvterm_id',
  11388. ),
  11389. 'cvtermprop_idx2' => array(
  11390. '0' => 'type_id',
  11391. ),
  11392. ),
  11393. 'foreign keys' => array(
  11394. ),
  11395. );
  11396. return $description;
  11397. }
  11398. /**
  11399. * Implements hook_eimage_schema()
  11400. * Purpose: To describe the structure of eimage to tripal
  11401. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11402. * @see tripal_core.api.inc: tripal_core_chado_update()
  11403. * @see tripal_core.api.inc: tripal_core_chado_select()
  11404. *
  11405. * @return
  11406. * An array describing the current table
  11407. *
  11408. * @ingroup tripal_schema_api
  11409. *
  11410. */
  11411. function tripal_core_chado_eimage_schema () {
  11412. $description = array();
  11413. $description = array(
  11414. 'table' => 'eimage',
  11415. // 'description' => 'TODO: please describe this table!',
  11416. 'fields' => array(
  11417. 'eimage_id' => array(
  11418. // 'description' => 'TODO: please describe this field!',
  11419. 'type' => 'serial',
  11420. 'not null' => '1',
  11421. ),
  11422. 'eimage_data' => array(
  11423. // 'description' => 'TODO: please describe this field!',
  11424. 'type' => 'text',
  11425. 'not null' => '',
  11426. ),
  11427. 'eimage_type' => array(
  11428. // 'description' => 'TODO: please describe this field!',
  11429. 'type' => 'varchar',
  11430. 'length' => '255',
  11431. 'not null' => '1',
  11432. ),
  11433. 'image_uri' => array(
  11434. // 'description' => 'TODO: please describe this field!',
  11435. 'type' => 'varchar',
  11436. 'length' => '255',
  11437. 'not null' => '',
  11438. ),
  11439. ),
  11440. 'primary key' => array(
  11441. '0' => 'eimage_id',
  11442. ),
  11443. 'unique keys' => array(
  11444. ),
  11445. 'indexes' => array(
  11446. ),
  11447. 'foreign keys' => array(
  11448. ),
  11449. );
  11450. return $description;
  11451. }
  11452. /**
  11453. * Implements hook_element_schema()
  11454. * Purpose: To describe the structure of element to tripal
  11455. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11456. * @see tripal_core.api.inc: tripal_core_chado_update()
  11457. * @see tripal_core.api.inc: tripal_core_chado_select()
  11458. *
  11459. * @return
  11460. * An array describing the current table
  11461. *
  11462. * @ingroup tripal_schema_api
  11463. *
  11464. */
  11465. function tripal_core_chado_element_schema () {
  11466. $description = array();
  11467. $description = array(
  11468. 'table' => 'element',
  11469. // 'description' => 'TODO: please describe this table!',
  11470. 'fields' => array(
  11471. 'element_id' => array(
  11472. // 'description' => 'TODO: please describe this field!',
  11473. 'type' => 'serial',
  11474. 'not null' => '1',
  11475. ),
  11476. 'feature_id' => array(
  11477. // 'description' => 'TODO: please describe this field!',
  11478. 'type' => 'int',
  11479. 'not null' => '',
  11480. ),
  11481. 'arraydesign_id' => array(
  11482. // 'description' => 'TODO: please describe this field!',
  11483. 'type' => 'int',
  11484. 'not null' => '1',
  11485. ),
  11486. 'type_id' => array(
  11487. // 'description' => 'TODO: please describe this field!',
  11488. 'type' => 'int',
  11489. 'not null' => '',
  11490. ),
  11491. 'dbxref_id' => array(
  11492. // 'description' => 'TODO: please describe this field!',
  11493. 'type' => 'int',
  11494. 'not null' => '',
  11495. ),
  11496. ),
  11497. 'primary key' => array(
  11498. '0' => 'element_id',
  11499. ),
  11500. 'unique keys' => array(
  11501. 'element_c1' => array(
  11502. '0' => 'feature_id',
  11503. '1' => 'arraydesign_id',
  11504. ),
  11505. ),
  11506. 'indexes' => array(
  11507. 'element_idx1' => array(
  11508. '0' => 'feature_id',
  11509. ),
  11510. 'element_idx2' => array(
  11511. '0' => 'arraydesign_id',
  11512. ),
  11513. 'element_idx3' => array(
  11514. '0' => 'type_id',
  11515. ),
  11516. 'element_idx4' => array(
  11517. '0' => 'dbxref_id',
  11518. ),
  11519. ),
  11520. 'foreign keys' => array(
  11521. ),
  11522. );
  11523. return $description;
  11524. }
  11525. /**
  11526. * Implements hook_expression_cvterm_schema()
  11527. * Purpose: To describe the structure of expression_cvterm to tripal
  11528. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11529. * @see tripal_core.api.inc: tripal_core_chado_update()
  11530. * @see tripal_core.api.inc: tripal_core_chado_select()
  11531. *
  11532. * @return
  11533. * An array describing the current table
  11534. *
  11535. * @ingroup tripal_schema_api
  11536. *
  11537. */
  11538. function tripal_core_chado_expression_cvterm_schema () {
  11539. $description = array();
  11540. $description = array(
  11541. 'table' => 'expression_cvterm',
  11542. // 'description' => 'TODO: please describe this table!',
  11543. 'fields' => array(
  11544. 'expression_cvterm_id' => array(
  11545. // 'description' => 'TODO: please describe this field!',
  11546. 'type' => 'serial',
  11547. 'not null' => '1',
  11548. ),
  11549. 'expression_id' => array(
  11550. // 'description' => 'TODO: please describe this field!',
  11551. 'type' => 'int',
  11552. 'not null' => '1',
  11553. ),
  11554. 'cvterm_id' => array(
  11555. // 'description' => 'TODO: please describe this field!',
  11556. 'type' => 'int',
  11557. 'not null' => '1',
  11558. ),
  11559. 'rank' => array(
  11560. // 'description' => 'TODO: please describe this field!',
  11561. 'type' => 'int',
  11562. 'not null' => '1',
  11563. 'default' => '0',
  11564. ),
  11565. 'cvterm_type_id' => array(
  11566. // 'description' => 'TODO: please describe this field!',
  11567. 'type' => 'int',
  11568. 'not null' => '1',
  11569. ),
  11570. ),
  11571. 'primary key' => array(
  11572. '0' => 'expression_cvterm_id',
  11573. ),
  11574. 'unique keys' => array(
  11575. 'expression_cvterm_c1' => array(
  11576. '0' => 'expression_id',
  11577. '1' => 'cvterm_id',
  11578. '2' => 'cvterm_type_id',
  11579. ),
  11580. ),
  11581. 'indexes' => array(
  11582. 'expression_cvterm_idx1' => array(
  11583. '0' => 'expression_id',
  11584. ),
  11585. 'expression_cvterm_idx2' => array(
  11586. '0' => 'cvterm_id',
  11587. ),
  11588. 'expression_cvterm_idx3' => array(
  11589. '0' => 'cvterm_type_id',
  11590. ),
  11591. ),
  11592. 'foreign keys' => array(
  11593. ),
  11594. );
  11595. return $description;
  11596. }
  11597. /**
  11598. * Implements hook_expression_cvtermprop_schema()
  11599. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11600. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11601. * @see tripal_core.api.inc: tripal_core_chado_update()
  11602. * @see tripal_core.api.inc: tripal_core_chado_select()
  11603. *
  11604. * @return
  11605. * An array describing the current table
  11606. *
  11607. * @ingroup tripal_schema_api
  11608. *
  11609. */
  11610. function tripal_core_chado_expression_cvtermprop_schema () {
  11611. $description = array();
  11612. $description = array(
  11613. 'table' => 'expression_cvtermprop',
  11614. // 'description' => 'TODO: please describe this table!',
  11615. 'fields' => array(
  11616. 'expression_cvtermprop_id' => array(
  11617. // 'description' => 'TODO: please describe this field!',
  11618. 'type' => 'serial',
  11619. 'not null' => '1',
  11620. ),
  11621. 'expression_cvterm_id' => array(
  11622. // 'description' => 'TODO: please describe this field!',
  11623. 'type' => 'int',
  11624. 'not null' => '1',
  11625. ),
  11626. 'type_id' => array(
  11627. // 'description' => 'TODO: please describe this field!',
  11628. 'type' => 'int',
  11629. 'not null' => '1',
  11630. ),
  11631. 'value' => array(
  11632. // 'description' => 'TODO: please describe this field!',
  11633. 'type' => 'text',
  11634. 'not null' => '',
  11635. ),
  11636. 'rank' => array(
  11637. // 'description' => 'TODO: please describe this field!',
  11638. 'type' => 'int',
  11639. 'not null' => '1',
  11640. 'default' => '0',
  11641. ),
  11642. ),
  11643. 'primary key' => array(
  11644. '0' => 'expression_cvtermprop_id',
  11645. ),
  11646. 'unique keys' => array(
  11647. 'expression_cvtermprop_c1' => array(
  11648. '0' => 'expression_cvterm_id',
  11649. '1' => 'type_id',
  11650. '2' => 'rank',
  11651. ),
  11652. ),
  11653. 'indexes' => array(
  11654. 'expression_cvtermprop_idx1' => array(
  11655. '0' => 'expression_cvterm_id',
  11656. ),
  11657. 'expression_cvtermprop_idx2' => array(
  11658. '0' => 'type_id',
  11659. ),
  11660. ),
  11661. 'foreign keys' => array(
  11662. ),
  11663. );
  11664. return $description;
  11665. }
  11666. /**
  11667. * Implements hook_expression_image_schema()
  11668. * Purpose: To describe the structure of expression_image to tripal
  11669. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11670. * @see tripal_core.api.inc: tripal_core_chado_update()
  11671. * @see tripal_core.api.inc: tripal_core_chado_select()
  11672. *
  11673. * @return
  11674. * An array describing the current table
  11675. *
  11676. * @ingroup tripal_schema_api
  11677. *
  11678. */
  11679. function tripal_core_chado_expression_image_schema () {
  11680. $description = array();
  11681. $description = array(
  11682. 'table' => 'expression_image',
  11683. // 'description' => 'TODO: please describe this table!',
  11684. 'fields' => array(
  11685. 'expression_image_id' => array(
  11686. // 'description' => 'TODO: please describe this field!',
  11687. 'type' => 'serial',
  11688. 'not null' => '1',
  11689. ),
  11690. 'expression_id' => array(
  11691. // 'description' => 'TODO: please describe this field!',
  11692. 'type' => 'int',
  11693. 'not null' => '1',
  11694. ),
  11695. 'eimage_id' => array(
  11696. // 'description' => 'TODO: please describe this field!',
  11697. 'type' => 'int',
  11698. 'not null' => '1',
  11699. ),
  11700. ),
  11701. 'primary key' => array(
  11702. '0' => 'expression_image_id',
  11703. ),
  11704. 'unique keys' => array(
  11705. 'expression_image_c1' => array(
  11706. '0' => 'expression_id',
  11707. '1' => 'eimage_id',
  11708. ),
  11709. ),
  11710. 'indexes' => array(
  11711. 'expression_image_idx1' => array(
  11712. '0' => 'expression_id',
  11713. ),
  11714. 'expression_image_idx2' => array(
  11715. '0' => 'eimage_id',
  11716. ),
  11717. ),
  11718. 'foreign keys' => array(
  11719. ),
  11720. );
  11721. return $description;
  11722. }
  11723. /**
  11724. * Implements hook_expression_pub_schema()
  11725. * Purpose: To describe the structure of expression_pub to tripal
  11726. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11727. * @see tripal_core.api.inc: tripal_core_chado_update()
  11728. * @see tripal_core.api.inc: tripal_core_chado_select()
  11729. *
  11730. * @return
  11731. * An array describing the current table
  11732. *
  11733. * @ingroup tripal_schema_api
  11734. *
  11735. */
  11736. function tripal_core_chado_expression_pub_schema () {
  11737. $description = array();
  11738. $description = array(
  11739. 'table' => 'expression_pub',
  11740. // 'description' => 'TODO: please describe this table!',
  11741. 'fields' => array(
  11742. 'expression_pub_id' => array(
  11743. // 'description' => 'TODO: please describe this field!',
  11744. 'type' => 'serial',
  11745. 'not null' => '1',
  11746. ),
  11747. 'expression_id' => array(
  11748. // 'description' => 'TODO: please describe this field!',
  11749. 'type' => 'int',
  11750. 'not null' => '1',
  11751. ),
  11752. 'pub_id' => array(
  11753. // 'description' => 'TODO: please describe this field!',
  11754. 'type' => 'int',
  11755. 'not null' => '1',
  11756. ),
  11757. ),
  11758. 'primary key' => array(
  11759. '0' => 'expression_pub_id',
  11760. ),
  11761. 'unique keys' => array(
  11762. 'expression_pub_c1' => array(
  11763. '0' => 'expression_id',
  11764. '1' => 'pub_id',
  11765. ),
  11766. ),
  11767. 'indexes' => array(
  11768. 'expression_pub_idx1' => array(
  11769. '0' => 'expression_id',
  11770. ),
  11771. 'expression_pub_idx2' => array(
  11772. '0' => 'pub_id',
  11773. ),
  11774. ),
  11775. 'foreign keys' => array(
  11776. ),
  11777. );
  11778. return $description;
  11779. }
  11780. /**
  11781. * Implements hook_expression_schema()
  11782. * Purpose: To describe the structure of expression to tripal
  11783. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11784. * @see tripal_core.api.inc: tripal_core_chado_update()
  11785. * @see tripal_core.api.inc: tripal_core_chado_select()
  11786. *
  11787. * @return
  11788. * An array describing the current table
  11789. *
  11790. * @ingroup tripal_schema_api
  11791. *
  11792. */
  11793. function tripal_core_chado_expression_schema () {
  11794. $description = array();
  11795. $description = array(
  11796. 'table' => 'expression',
  11797. // 'description' => 'TODO: please describe this table!',
  11798. 'fields' => array(
  11799. 'expression_id' => array(
  11800. // 'description' => 'TODO: please describe this field!',
  11801. 'type' => 'serial',
  11802. 'not null' => '1',
  11803. ),
  11804. 'uniquename' => array(
  11805. // 'description' => 'TODO: please describe this field!',
  11806. 'type' => 'text',
  11807. 'not null' => '1',
  11808. ),
  11809. 'md5checksum' => array(
  11810. // 'description' => 'TODO: please describe this field!',
  11811. 'type' => 'char',
  11812. 'length' => '32',
  11813. 'not null' => '',
  11814. ),
  11815. 'description' => array(
  11816. // 'description' => 'TODO: please describe this field!',
  11817. 'type' => 'text',
  11818. 'not null' => '',
  11819. ),
  11820. ),
  11821. 'primary key' => array(
  11822. '0' => 'expression_id',
  11823. ),
  11824. 'unique keys' => array(
  11825. 'expression_c1' => array(
  11826. '0' => 'uniquename',
  11827. ),
  11828. ),
  11829. 'indexes' => array(
  11830. ),
  11831. 'foreign keys' => array(
  11832. ),
  11833. );
  11834. return $description;
  11835. }
  11836. /**
  11837. * Implements hook_environment_cvterm_schema()
  11838. * Purpose: To describe the structure of environment_cvterm to tripal
  11839. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11840. * @see tripal_core.api.inc: tripal_core_chado_update()
  11841. * @see tripal_core.api.inc: tripal_core_chado_select()
  11842. *
  11843. * @return
  11844. * An array describing the current table
  11845. *
  11846. * @ingroup tripal_schema_api
  11847. *
  11848. */
  11849. function tripal_core_chado_environment_cvterm_schema () {
  11850. $description = array();
  11851. $description = array(
  11852. 'table' => 'environment_cvterm',
  11853. // 'description' => 'TODO: please describe this table!',
  11854. 'fields' => array(
  11855. 'environment_cvterm_id' => array(
  11856. // 'description' => 'TODO: please describe this field!',
  11857. 'type' => 'serial',
  11858. 'not null' => '1',
  11859. ),
  11860. 'environment_id' => array(
  11861. // 'description' => 'TODO: please describe this field!',
  11862. 'type' => 'int',
  11863. 'not null' => '1',
  11864. ),
  11865. 'cvterm_id' => array(
  11866. // 'description' => 'TODO: please describe this field!',
  11867. 'type' => 'int',
  11868. 'not null' => '1',
  11869. ),
  11870. ),
  11871. 'primary key' => array(
  11872. '0' => 'environment_cvterm_id',
  11873. ),
  11874. 'unique keys' => array(
  11875. 'environment_cvterm_c1' => array(
  11876. '0' => 'environment_id',
  11877. '1' => 'cvterm_id',
  11878. ),
  11879. ),
  11880. 'indexes' => array(
  11881. 'environment_cvterm_idx1' => array(
  11882. '0' => 'environment_id',
  11883. ),
  11884. 'environment_cvterm_idx2' => array(
  11885. '0' => 'cvterm_id',
  11886. ),
  11887. ),
  11888. 'foreign keys' => array(
  11889. ),
  11890. );
  11891. return $description;
  11892. }
  11893. /**
  11894. * Implements hook_element_relationship_schema()
  11895. * Purpose: To describe the structure of element_relationship to tripal
  11896. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11897. * @see tripal_core.api.inc: tripal_core_chado_update()
  11898. * @see tripal_core.api.inc: tripal_core_chado_select()
  11899. *
  11900. * @return
  11901. * An array describing the current table
  11902. *
  11903. * @ingroup tripal_schema_api
  11904. *
  11905. */
  11906. function tripal_core_chado_element_relationship_schema () {
  11907. $description = array();
  11908. $description = array(
  11909. 'table' => 'element_relationship',
  11910. // 'description' => 'TODO: please describe this table!',
  11911. 'fields' => array(
  11912. 'element_relationship_id' => array(
  11913. // 'description' => 'TODO: please describe this field!',
  11914. 'type' => 'serial',
  11915. 'not null' => '1',
  11916. ),
  11917. 'subject_id' => array(
  11918. // 'description' => 'TODO: please describe this field!',
  11919. 'type' => 'int',
  11920. 'not null' => '1',
  11921. ),
  11922. 'type_id' => array(
  11923. // 'description' => 'TODO: please describe this field!',
  11924. 'type' => 'int',
  11925. 'not null' => '1',
  11926. ),
  11927. 'object_id' => array(
  11928. // 'description' => 'TODO: please describe this field!',
  11929. 'type' => 'int',
  11930. 'not null' => '1',
  11931. ),
  11932. 'value' => array(
  11933. // 'description' => 'TODO: please describe this field!',
  11934. 'type' => 'text',
  11935. 'not null' => '',
  11936. ),
  11937. 'rank' => array(
  11938. // 'description' => 'TODO: please describe this field!',
  11939. 'type' => 'int',
  11940. 'not null' => '1',
  11941. 'default' => '0',
  11942. ),
  11943. ),
  11944. 'primary key' => array(
  11945. '0' => 'element_relationship_id',
  11946. ),
  11947. 'unique keys' => array(
  11948. 'element_relationship_c1' => array(
  11949. '0' => 'subject_id',
  11950. '1' => 'object_id',
  11951. '2' => 'type_id',
  11952. '3' => 'rank',
  11953. ),
  11954. ),
  11955. 'indexes' => array(
  11956. 'element_relationship_idx1' => array(
  11957. '0' => 'subject_id',
  11958. ),
  11959. 'element_relationship_idx2' => array(
  11960. '0' => 'type_id',
  11961. ),
  11962. 'element_relationship_idx3' => array(
  11963. '0' => 'object_id',
  11964. ),
  11965. 'element_relationship_idx4' => array(
  11966. '0' => 'value',
  11967. ),
  11968. ),
  11969. 'foreign keys' => array(
  11970. ),
  11971. );
  11972. return $description;
  11973. }
  11974. /**
  11975. * Implements hook_elementresult_schema()
  11976. * Purpose: To describe the structure of elementresult to tripal
  11977. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11978. * @see tripal_core.api.inc: tripal_core_chado_update()
  11979. * @see tripal_core.api.inc: tripal_core_chado_select()
  11980. *
  11981. * @return
  11982. * An array describing the current table
  11983. *
  11984. * @ingroup tripal_schema_api
  11985. *
  11986. */
  11987. function tripal_core_chado_elementresult_schema () {
  11988. $description = array();
  11989. $description = array(
  11990. 'table' => 'elementresult',
  11991. // 'description' => 'TODO: please describe this table!',
  11992. 'fields' => array(
  11993. 'elementresult_id' => array(
  11994. // 'description' => 'TODO: please describe this field!',
  11995. 'type' => 'serial',
  11996. 'not null' => '1',
  11997. ),
  11998. 'element_id' => array(
  11999. // 'description' => 'TODO: please describe this field!',
  12000. 'type' => 'int',
  12001. 'not null' => '1',
  12002. ),
  12003. 'quantification_id' => array(
  12004. // 'description' => 'TODO: please describe this field!',
  12005. 'type' => 'int',
  12006. 'not null' => '1',
  12007. ),
  12008. 'signal' => array(
  12009. // 'description' => 'TODO: please describe this field!',
  12010. 'type' => 'float',
  12011. 'size' => 'big',
  12012. 'not null' => '1',
  12013. ),
  12014. ),
  12015. 'primary key' => array(
  12016. '0' => 'elementresult_id',
  12017. ),
  12018. 'unique keys' => array(
  12019. 'elementresult_c1' => array(
  12020. '0' => 'element_id',
  12021. '1' => 'quantification_id',
  12022. ),
  12023. ),
  12024. 'indexes' => array(
  12025. 'elementresult_idx1' => array(
  12026. '0' => 'element_id',
  12027. ),
  12028. 'elementresult_idx2' => array(
  12029. '0' => 'quantification_id',
  12030. ),
  12031. 'elementresult_idx3' => array(
  12032. '0' => 'signal',
  12033. ),
  12034. ),
  12035. 'foreign keys' => array(
  12036. ),
  12037. );
  12038. return $description;
  12039. }
  12040. /**
  12041. * Implements hook_elementresult_relationship_schema()
  12042. * Purpose: To describe the structure of elementresult_relationship to tripal
  12043. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12044. * @see tripal_core.api.inc: tripal_core_chado_update()
  12045. * @see tripal_core.api.inc: tripal_core_chado_select()
  12046. *
  12047. * @return
  12048. * An array describing the current table
  12049. *
  12050. * @ingroup tripal_schema_api
  12051. *
  12052. */
  12053. function tripal_core_chado_elementresult_relationship_schema () {
  12054. $description = array();
  12055. $description = array(
  12056. 'table' => 'elementresult_relationship',
  12057. // 'description' => 'TODO: please describe this table!',
  12058. 'fields' => array(
  12059. 'elementresult_relationship_id' => array(
  12060. // 'description' => 'TODO: please describe this field!',
  12061. 'type' => 'serial',
  12062. 'not null' => '1',
  12063. ),
  12064. 'subject_id' => array(
  12065. // 'description' => 'TODO: please describe this field!',
  12066. 'type' => 'int',
  12067. 'not null' => '1',
  12068. ),
  12069. 'type_id' => array(
  12070. // 'description' => 'TODO: please describe this field!',
  12071. 'type' => 'int',
  12072. 'not null' => '1',
  12073. ),
  12074. 'object_id' => array(
  12075. // 'description' => 'TODO: please describe this field!',
  12076. 'type' => 'int',
  12077. 'not null' => '1',
  12078. ),
  12079. 'value' => array(
  12080. // 'description' => 'TODO: please describe this field!',
  12081. 'type' => 'text',
  12082. 'not null' => '',
  12083. ),
  12084. 'rank' => array(
  12085. // 'description' => 'TODO: please describe this field!',
  12086. 'type' => 'int',
  12087. 'not null' => '1',
  12088. 'default' => '0',
  12089. ),
  12090. ),
  12091. 'primary key' => array(
  12092. '0' => 'elementresult_relationship_id',
  12093. ),
  12094. 'unique keys' => array(
  12095. 'elementresult_relationship_c1' => array(
  12096. '0' => 'subject_id',
  12097. '1' => 'object_id',
  12098. '2' => 'type_id',
  12099. '3' => 'rank',
  12100. ),
  12101. ),
  12102. 'indexes' => array(
  12103. 'elementresult_relationship_idx1' => array(
  12104. '0' => 'subject_id',
  12105. ),
  12106. 'elementresult_relationship_idx2' => array(
  12107. '0' => 'type_id',
  12108. ),
  12109. 'elementresult_relationship_idx3' => array(
  12110. '0' => 'object_id',
  12111. ),
  12112. 'elementresult_relationship_idx4' => array(
  12113. '0' => 'value',
  12114. ),
  12115. ),
  12116. 'foreign keys' => array(
  12117. ),
  12118. );
  12119. return $description;
  12120. }
  12121. /**
  12122. * Implements hook_environment_schema()
  12123. * Purpose: To describe the structure of environment to tripal
  12124. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12125. * @see tripal_core.api.inc: tripal_core_chado_update()
  12126. * @see tripal_core.api.inc: tripal_core_chado_select()
  12127. *
  12128. * @return
  12129. * An array describing the current table
  12130. *
  12131. * @ingroup tripal_schema_api
  12132. *
  12133. */
  12134. function tripal_core_chado_environment_schema () {
  12135. $description = array();
  12136. $description = array(
  12137. 'table' => 'environment',
  12138. // 'description' => 'TODO: please describe this table!',
  12139. 'fields' => array(
  12140. 'environment_id' => array(
  12141. // 'description' => 'TODO: please describe this field!',
  12142. 'type' => 'serial',
  12143. 'not null' => '1',
  12144. ),
  12145. 'uniquename' => array(
  12146. // 'description' => 'TODO: please describe this field!',
  12147. 'type' => 'text',
  12148. 'not null' => '1',
  12149. ),
  12150. 'description' => array(
  12151. // 'description' => 'TODO: please describe this field!',
  12152. 'type' => 'text',
  12153. 'not null' => '',
  12154. ),
  12155. ),
  12156. 'primary key' => array(
  12157. '0' => 'environment_id',
  12158. ),
  12159. 'unique keys' => array(
  12160. 'environment_c1' => array(
  12161. '0' => 'uniquename',
  12162. ),
  12163. ),
  12164. 'indexes' => array(
  12165. 'environment_idx1' => array(
  12166. '0' => 'uniquename',
  12167. ),
  12168. ),
  12169. 'foreign keys' => array(
  12170. ),
  12171. );
  12172. return $description;
  12173. }