tripal_core.schema.api.inc 327 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716
  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. ),
  8630. 'primary key' => array(
  8631. '0' => 'analysisprop_id',
  8632. ),
  8633. 'unique keys' => array(
  8634. 'analysisprop_c1' => array(
  8635. '0' => 'analysis_id',
  8636. '1' => 'type_id',
  8637. ),
  8638. ),
  8639. 'indexes' => array(
  8640. 'analysisprop_idx1' => array(
  8641. '0' => 'analysis_id',
  8642. ),
  8643. 'analysisprop_idx2' => array(
  8644. '0' => 'type_id',
  8645. ),
  8646. ),
  8647. 'foreign keys' => array(
  8648. ),
  8649. );
  8650. return $description;
  8651. }
  8652. /**
  8653. * Implements hook_arraydesign_schema()
  8654. * Purpose: To describe the structure of arraydesign to tripal
  8655. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8656. * @see tripal_core.api.inc: tripal_core_chado_update()
  8657. * @see tripal_core.api.inc: tripal_core_chado_select()
  8658. *
  8659. * @return
  8660. * An array describing the current table
  8661. *
  8662. * @ingroup tripal_schema_api
  8663. *
  8664. */
  8665. function tripal_core_chado_arraydesign_schema () {
  8666. $description = array();
  8667. $description = array(
  8668. 'table' => 'arraydesign',
  8669. // 'description' => 'TODO: please describe this table!',
  8670. 'fields' => array(
  8671. 'arraydesign_id' => array(
  8672. // 'description' => 'TODO: please describe this field!',
  8673. 'type' => 'serial',
  8674. 'not null' => '1',
  8675. ),
  8676. 'manufacturer_id' => array(
  8677. // 'description' => 'TODO: please describe this field!',
  8678. 'type' => 'int',
  8679. 'not null' => '1',
  8680. ),
  8681. 'platformtype_id' => array(
  8682. // 'description' => 'TODO: please describe this field!',
  8683. 'type' => 'int',
  8684. 'not null' => '1',
  8685. ),
  8686. 'substratetype_id' => array(
  8687. // 'description' => 'TODO: please describe this field!',
  8688. 'type' => 'int',
  8689. 'not null' => '',
  8690. ),
  8691. 'protocol_id' => array(
  8692. // 'description' => 'TODO: please describe this field!',
  8693. 'type' => 'int',
  8694. 'not null' => '',
  8695. ),
  8696. 'dbxref_id' => array(
  8697. // 'description' => 'TODO: please describe this field!',
  8698. 'type' => 'int',
  8699. 'not null' => '',
  8700. ),
  8701. 'name' => array(
  8702. // 'description' => 'TODO: please describe this field!',
  8703. 'type' => 'text',
  8704. 'not null' => '1',
  8705. ),
  8706. 'version' => array(
  8707. // 'description' => 'TODO: please describe this field!',
  8708. 'type' => 'text',
  8709. 'not null' => '',
  8710. ),
  8711. 'description' => array(
  8712. // 'description' => 'TODO: please describe this field!',
  8713. 'type' => 'text',
  8714. 'not null' => '',
  8715. ),
  8716. 'array_dimensions' => array(
  8717. // 'description' => 'TODO: please describe this field!',
  8718. 'type' => 'text',
  8719. 'not null' => '',
  8720. ),
  8721. 'element_dimensions' => array(
  8722. // 'description' => 'TODO: please describe this field!',
  8723. 'type' => 'text',
  8724. 'not null' => '',
  8725. ),
  8726. 'num_of_elements' => array(
  8727. // 'description' => 'TODO: please describe this field!',
  8728. 'type' => 'int',
  8729. 'not null' => '',
  8730. ),
  8731. 'num_array_columns' => array(
  8732. // 'description' => 'TODO: please describe this field!',
  8733. 'type' => 'int',
  8734. 'not null' => '',
  8735. ),
  8736. 'num_array_rows' => array(
  8737. // 'description' => 'TODO: please describe this field!',
  8738. 'type' => 'int',
  8739. 'not null' => '',
  8740. ),
  8741. 'num_grid_columns' => array(
  8742. // 'description' => 'TODO: please describe this field!',
  8743. 'type' => 'int',
  8744. 'not null' => '',
  8745. ),
  8746. 'num_grid_rows' => array(
  8747. // 'description' => 'TODO: please describe this field!',
  8748. 'type' => 'int',
  8749. 'not null' => '',
  8750. ),
  8751. 'num_sub_columns' => array(
  8752. // 'description' => 'TODO: please describe this field!',
  8753. 'type' => 'int',
  8754. 'not null' => '',
  8755. ),
  8756. 'num_sub_rows' => array(
  8757. // 'description' => 'TODO: please describe this field!',
  8758. 'type' => 'int',
  8759. 'not null' => '',
  8760. ),
  8761. ),
  8762. 'primary key' => array(
  8763. '0' => 'arraydesign_id',
  8764. ),
  8765. 'unique keys' => array(
  8766. 'arraydesign_c1' => array(
  8767. '0' => 'name',
  8768. ),
  8769. ),
  8770. 'indexes' => array(
  8771. 'arraydesign_idx1' => array(
  8772. '0' => 'manufacturer_id',
  8773. ),
  8774. 'arraydesign_idx2' => array(
  8775. '0' => 'platformtype_id',
  8776. ),
  8777. 'arraydesign_idx3' => array(
  8778. '0' => 'substratetype_id',
  8779. ),
  8780. 'arraydesign_idx4' => array(
  8781. '0' => 'protocol_id',
  8782. ),
  8783. 'arraydesign_idx5' => array(
  8784. '0' => 'dbxref_id',
  8785. ),
  8786. ),
  8787. 'foreign keys' => array(
  8788. ),
  8789. );
  8790. return $description;
  8791. }
  8792. /**
  8793. * Implements hook_arraydesignprop_schema()
  8794. * Purpose: To describe the structure of arraydesignprop to tripal
  8795. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8796. * @see tripal_core.api.inc: tripal_core_chado_update()
  8797. * @see tripal_core.api.inc: tripal_core_chado_select()
  8798. *
  8799. * @return
  8800. * An array describing the current table
  8801. *
  8802. * @ingroup tripal_schema_api
  8803. *
  8804. */
  8805. function tripal_core_chado_arraydesignprop_schema () {
  8806. $description = array();
  8807. $description = array(
  8808. 'table' => 'arraydesignprop',
  8809. // 'description' => 'TODO: please describe this table!',
  8810. 'fields' => array(
  8811. 'arraydesignprop_id' => array(
  8812. // 'description' => 'TODO: please describe this field!',
  8813. 'type' => 'serial',
  8814. 'not null' => '1',
  8815. ),
  8816. 'arraydesign_id' => array(
  8817. // 'description' => 'TODO: please describe this field!',
  8818. 'type' => 'int',
  8819. 'not null' => '1',
  8820. ),
  8821. 'type_id' => array(
  8822. // 'description' => 'TODO: please describe this field!',
  8823. 'type' => 'int',
  8824. 'not null' => '1',
  8825. ),
  8826. 'value' => array(
  8827. // 'description' => 'TODO: please describe this field!',
  8828. 'type' => 'text',
  8829. 'not null' => '',
  8830. ),
  8831. 'rank' => array(
  8832. // 'description' => 'TODO: please describe this field!',
  8833. 'type' => 'int',
  8834. 'not null' => '1',
  8835. 'default' => '0',
  8836. ),
  8837. ),
  8838. 'primary key' => array(
  8839. '0' => 'arraydesignprop_id',
  8840. ),
  8841. 'unique keys' => array(
  8842. 'arraydesignprop_c1' => array(
  8843. '0' => 'arraydesign_id',
  8844. '1' => 'type_id',
  8845. '2' => 'rank',
  8846. ),
  8847. ),
  8848. 'indexes' => array(
  8849. 'arraydesignprop_idx1' => array(
  8850. '0' => 'arraydesign_id',
  8851. ),
  8852. 'arraydesignprop_idx2' => array(
  8853. '0' => 'type_id',
  8854. ),
  8855. ),
  8856. 'foreign keys' => array(
  8857. ),
  8858. );
  8859. return $description;
  8860. }
  8861. /**
  8862. * Implements hook_assay_schema()
  8863. * Purpose: To describe the structure of assay to tripal
  8864. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8865. * @see tripal_core.api.inc: tripal_core_chado_update()
  8866. * @see tripal_core.api.inc: tripal_core_chado_select()
  8867. *
  8868. * @return
  8869. * An array describing the current table
  8870. *
  8871. * @ingroup tripal_schema_api
  8872. *
  8873. */
  8874. function tripal_core_chado_assay_schema () {
  8875. $description = array();
  8876. $description = array(
  8877. 'table' => 'assay',
  8878. // 'description' => 'TODO: please describe this table!',
  8879. 'fields' => array(
  8880. 'assay_id' => array(
  8881. // 'description' => 'TODO: please describe this field!',
  8882. 'type' => 'serial',
  8883. 'not null' => '1',
  8884. ),
  8885. 'arraydesign_id' => array(
  8886. // 'description' => 'TODO: please describe this field!',
  8887. 'type' => 'int',
  8888. 'not null' => '1',
  8889. ),
  8890. 'protocol_id' => array(
  8891. // 'description' => 'TODO: please describe this field!',
  8892. 'type' => 'int',
  8893. 'not null' => '',
  8894. ),
  8895. 'assaydate' => array(
  8896. // 'description' => 'TODO: please describe this field!',
  8897. 'type' => 'datetime',
  8898. 'not null' => '',
  8899. 'default' => 'ow(',
  8900. ),
  8901. 'arrayidentifier' => array(
  8902. // 'description' => 'TODO: please describe this field!',
  8903. 'type' => 'text',
  8904. 'not null' => '',
  8905. ),
  8906. 'arraybatchidentifier' => array(
  8907. // 'description' => 'TODO: please describe this field!',
  8908. 'type' => 'text',
  8909. 'not null' => '',
  8910. ),
  8911. 'operator_id' => array(
  8912. // 'description' => 'TODO: please describe this field!',
  8913. 'type' => 'int',
  8914. 'not null' => '1',
  8915. ),
  8916. 'dbxref_id' => array(
  8917. // 'description' => 'TODO: please describe this field!',
  8918. 'type' => 'int',
  8919. 'not null' => '',
  8920. ),
  8921. 'name' => array(
  8922. // 'description' => 'TODO: please describe this field!',
  8923. 'type' => 'text',
  8924. 'not null' => '',
  8925. ),
  8926. 'description' => array(
  8927. // 'description' => 'TODO: please describe this field!',
  8928. 'type' => 'text',
  8929. 'not null' => '',
  8930. ),
  8931. ),
  8932. 'primary key' => array(
  8933. '0' => 'assay_id',
  8934. ),
  8935. 'unique keys' => array(
  8936. 'assay_c1' => array(
  8937. '0' => 'name',
  8938. ),
  8939. ),
  8940. 'indexes' => array(
  8941. 'assay_idx1' => array(
  8942. '0' => 'arraydesign_id',
  8943. ),
  8944. 'assay_idx2' => array(
  8945. '0' => 'protocol_id',
  8946. ),
  8947. 'assay_idx3' => array(
  8948. '0' => 'operator_id',
  8949. ),
  8950. 'assay_idx4' => array(
  8951. '0' => 'dbxref_id',
  8952. ),
  8953. ),
  8954. 'foreign keys' => array(
  8955. ),
  8956. );
  8957. return $description;
  8958. }
  8959. /**
  8960. * Implements hook_cv_root_schema()
  8961. * Purpose: To describe the structure of cv_root to tripal
  8962. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8963. * @see tripal_core.api.inc: tripal_core_chado_update()
  8964. * @see tripal_core.api.inc: tripal_core_chado_select()
  8965. *
  8966. * @return
  8967. * An array describing the current table
  8968. *
  8969. * @ingroup tripal_schema_api
  8970. *
  8971. */
  8972. function tripal_core_chado_cv_root_schema () {
  8973. $description = array();
  8974. $description = array(
  8975. 'table' => 'cv_root',
  8976. // 'description' => 'TODO: please describe this table!',
  8977. 'fields' => array(
  8978. 'cv_id' => array(
  8979. // 'description' => 'TODO: please describe this field!',
  8980. 'type' => 'int',
  8981. 'not null' => '',
  8982. ),
  8983. 'root_cvterm_id' => array(
  8984. // 'description' => 'TODO: please describe this field!',
  8985. 'type' => 'int',
  8986. 'not null' => '',
  8987. ),
  8988. ),
  8989. 'primary key' => array(
  8990. ),
  8991. 'unique keys' => array(
  8992. ),
  8993. 'indexes' => array(
  8994. ),
  8995. 'foreign keys' => array(
  8996. ),
  8997. );
  8998. return $description;
  8999. }
  9000. /**
  9001. * Implements hook_cvterm_schema()
  9002. * Purpose: To describe the structure of cvterm to tripal
  9003. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9004. * @see tripal_core.api.inc: tripal_core_chado_update()
  9005. * @see tripal_core.api.inc: tripal_core_chado_select()
  9006. *
  9007. * @return
  9008. * An array describing the current table
  9009. *
  9010. * @ingroup tripal_schema_api
  9011. *
  9012. */
  9013. function tripal_core_chado_cvterm_schema () {
  9014. $description = array();
  9015. $description = array(
  9016. 'table' => 'cvterm',
  9017. // 'description' => 'TODO: please describe this table!',
  9018. 'fields' => array(
  9019. 'cvterm_id' => array(
  9020. // 'description' => 'TODO: please describe this field!',
  9021. 'type' => 'serial',
  9022. 'not null' => '1',
  9023. ),
  9024. 'cv_id' => array(
  9025. // 'description' => 'TODO: please describe this field!',
  9026. 'type' => 'int',
  9027. 'not null' => '1',
  9028. ),
  9029. 'name' => array(
  9030. // 'description' => 'TODO: please describe this field!',
  9031. 'type' => 'varchar',
  9032. 'length' => '1024',
  9033. 'not null' => '1',
  9034. ),
  9035. 'definition' => array(
  9036. // 'description' => 'TODO: please describe this field!',
  9037. 'type' => 'text',
  9038. 'not null' => '',
  9039. ),
  9040. 'dbxref_id' => array(
  9041. // 'description' => 'TODO: please describe this field!',
  9042. 'type' => 'int',
  9043. 'not null' => '1',
  9044. ),
  9045. 'is_obsolete' => array(
  9046. // 'description' => 'TODO: please describe this field!',
  9047. 'type' => 'int',
  9048. 'not null' => '1',
  9049. 'default' => '0',
  9050. ),
  9051. 'is_relationshiptype' => array(
  9052. // 'description' => 'TODO: please describe this field!',
  9053. 'type' => 'int',
  9054. 'not null' => '1',
  9055. 'default' => '0',
  9056. ),
  9057. ),
  9058. 'primary key' => array(
  9059. '0' => 'cvterm_id',
  9060. ),
  9061. 'unique keys' => array(
  9062. 'cvterm_c1' => array(
  9063. '0' => 'name',
  9064. '1' => 'cv_id',
  9065. '2' => 'is_obsolete',
  9066. ),
  9067. 'cvterm_c2' => array(
  9068. '0' => 'dbxref_id',
  9069. ),
  9070. ),
  9071. 'indexes' => array(
  9072. 'cvterm_idx1' => array(
  9073. '0' => 'cv_id',
  9074. ),
  9075. 'cvterm_idx2' => array(
  9076. '0' => 'name',
  9077. ),
  9078. 'cvterm_idx3' => array(
  9079. '0' => 'dbxref_id',
  9080. ),
  9081. ),
  9082. 'foreign keys' => array(
  9083. ),
  9084. );
  9085. return $description;
  9086. }
  9087. /**
  9088. * Implements hook_feature_dbxref_schema()
  9089. * Purpose: To describe the structure of feature_dbxref to tripal
  9090. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9091. * @see tripal_core.api.inc: tripal_core_chado_update()
  9092. * @see tripal_core.api.inc: tripal_core_chado_select()
  9093. *
  9094. * @return
  9095. * An array describing the current table
  9096. *
  9097. * @ingroup tripal_schema_api
  9098. *
  9099. */
  9100. function tripal_core_chado_feature_dbxref_schema () {
  9101. $description = array();
  9102. $description = array(
  9103. 'table' => 'feature_dbxref',
  9104. // 'description' => 'TODO: please describe this table!',
  9105. 'fields' => array(
  9106. 'feature_dbxref_id' => array(
  9107. // 'description' => 'TODO: please describe this field!',
  9108. 'type' => 'serial',
  9109. 'not null' => '1',
  9110. ),
  9111. 'feature_id' => array(
  9112. // 'description' => 'TODO: please describe this field!',
  9113. 'type' => 'int',
  9114. 'not null' => '1',
  9115. ),
  9116. 'dbxref_id' => array(
  9117. // 'description' => 'TODO: please describe this field!',
  9118. 'type' => 'int',
  9119. 'not null' => '1',
  9120. ),
  9121. 'is_current' => array(
  9122. // 'description' => 'TODO: please describe this field!',
  9123. 'type' => 'boolean',
  9124. 'not null' => '1',
  9125. 'default' => 'ru',
  9126. ),
  9127. ),
  9128. 'primary key' => array(
  9129. '0' => 'feature_dbxref_id',
  9130. ),
  9131. 'unique keys' => array(
  9132. 'feature_dbxref_c1' => array(
  9133. '0' => 'feature_id',
  9134. '1' => 'dbxref_id',
  9135. ),
  9136. ),
  9137. 'indexes' => array(
  9138. 'feature_dbxref_idx1' => array(
  9139. '0' => 'feature_id',
  9140. ),
  9141. 'feature_dbxref_idx2' => array(
  9142. '0' => 'dbxref_id',
  9143. ),
  9144. ),
  9145. 'foreign keys' => array(
  9146. ),
  9147. );
  9148. return $description;
  9149. }
  9150. /**
  9151. * Implements hook_feature_cvtermprop_schema()
  9152. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9153. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9154. * @see tripal_core.api.inc: tripal_core_chado_update()
  9155. * @see tripal_core.api.inc: tripal_core_chado_select()
  9156. *
  9157. * @return
  9158. * An array describing the current table
  9159. *
  9160. * @ingroup tripal_schema_api
  9161. *
  9162. */
  9163. function tripal_core_chado_feature_cvtermprop_schema () {
  9164. $description = array();
  9165. $description = array(
  9166. 'table' => 'feature_cvtermprop',
  9167. // 'description' => 'TODO: please describe this table!',
  9168. 'fields' => array(
  9169. 'feature_cvtermprop_id' => array(
  9170. // 'description' => 'TODO: please describe this field!',
  9171. 'type' => 'serial',
  9172. 'not null' => '1',
  9173. ),
  9174. 'feature_cvterm_id' => array(
  9175. // 'description' => 'TODO: please describe this field!',
  9176. 'type' => 'int',
  9177. 'not null' => '1',
  9178. ),
  9179. 'type_id' => array(
  9180. // 'description' => 'TODO: please describe this field!',
  9181. 'type' => 'int',
  9182. 'not null' => '1',
  9183. ),
  9184. 'value' => array(
  9185. // 'description' => 'TODO: please describe this field!',
  9186. 'type' => 'text',
  9187. 'not null' => '',
  9188. ),
  9189. 'rank' => array(
  9190. // 'description' => 'TODO: please describe this field!',
  9191. 'type' => 'int',
  9192. 'not null' => '1',
  9193. 'default' => '0',
  9194. ),
  9195. ),
  9196. 'primary key' => array(
  9197. '0' => 'feature_cvtermprop_id',
  9198. ),
  9199. 'unique keys' => array(
  9200. 'feature_cvtermprop_c1' => array(
  9201. '0' => 'feature_cvterm_id',
  9202. '1' => 'type_id',
  9203. '2' => 'rank',
  9204. ),
  9205. ),
  9206. 'indexes' => array(
  9207. 'feature_cvtermprop_idx1' => array(
  9208. '0' => 'feature_cvterm_id',
  9209. ),
  9210. 'feature_cvtermprop_idx2' => array(
  9211. '0' => 'type_id',
  9212. ),
  9213. ),
  9214. 'foreign keys' => array(
  9215. ),
  9216. );
  9217. return $description;
  9218. }
  9219. /**
  9220. * Implements hook_feature_difference_schema()
  9221. * Purpose: To describe the structure of feature_difference to tripal
  9222. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9223. * @see tripal_core.api.inc: tripal_core_chado_update()
  9224. * @see tripal_core.api.inc: tripal_core_chado_select()
  9225. *
  9226. * @return
  9227. * An array describing the current table
  9228. *
  9229. * @ingroup tripal_schema_api
  9230. *
  9231. */
  9232. function tripal_core_chado_feature_difference_schema () {
  9233. $description = array();
  9234. $description = array(
  9235. 'table' => 'feature_difference',
  9236. // 'description' => 'TODO: please describe this table!',
  9237. 'fields' => array(
  9238. 'subject_id' => array(
  9239. // 'description' => 'TODO: please describe this field!',
  9240. 'type' => 'int',
  9241. 'not null' => '',
  9242. ),
  9243. 'object_id' => array(
  9244. // 'description' => 'TODO: please describe this field!',
  9245. 'type' => 'int',
  9246. 'not null' => '',
  9247. ),
  9248. 'srcfeature_id' => array(
  9249. // 'description' => 'TODO: please describe this field!',
  9250. 'type' => 'int',
  9251. 'size' => 'small',
  9252. 'not null' => '',
  9253. ),
  9254. 'fmin' => array(
  9255. // 'description' => 'TODO: please describe this field!',
  9256. 'type' => 'int',
  9257. 'not null' => '',
  9258. ),
  9259. 'fmax' => array(
  9260. // 'description' => 'TODO: please describe this field!',
  9261. 'type' => 'int',
  9262. 'not null' => '',
  9263. ),
  9264. 'strand' => array(
  9265. // 'description' => 'TODO: please describe this field!',
  9266. 'type' => 'int',
  9267. 'not null' => '',
  9268. ),
  9269. ),
  9270. 'primary key' => array(
  9271. ),
  9272. 'unique keys' => array(
  9273. ),
  9274. 'indexes' => array(
  9275. ),
  9276. 'foreign keys' => array(
  9277. ),
  9278. );
  9279. return $description;
  9280. }
  9281. /**
  9282. * Implements hook_feature_disjoint_schema()
  9283. * Purpose: To describe the structure of feature_disjoint to tripal
  9284. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9285. * @see tripal_core.api.inc: tripal_core_chado_update()
  9286. * @see tripal_core.api.inc: tripal_core_chado_select()
  9287. *
  9288. * @return
  9289. * An array describing the current table
  9290. *
  9291. * @ingroup tripal_schema_api
  9292. *
  9293. */
  9294. function tripal_core_chado_feature_disjoint_schema () {
  9295. $description = array();
  9296. $description = array(
  9297. 'table' => 'feature_disjoint',
  9298. // 'description' => 'TODO: please describe this table!',
  9299. 'fields' => array(
  9300. 'subject_id' => array(
  9301. // 'description' => 'TODO: please describe this field!',
  9302. 'type' => 'int',
  9303. 'not null' => '',
  9304. ),
  9305. 'object_id' => array(
  9306. // 'description' => 'TODO: please describe this field!',
  9307. 'type' => 'int',
  9308. 'not null' => '',
  9309. ),
  9310. ),
  9311. 'primary key' => array(
  9312. ),
  9313. 'unique keys' => array(
  9314. ),
  9315. 'indexes' => array(
  9316. ),
  9317. 'foreign keys' => array(
  9318. ),
  9319. );
  9320. return $description;
  9321. }
  9322. /**
  9323. * Implements hook_feature_distance_schema()
  9324. * Purpose: To describe the structure of feature_distance to tripal
  9325. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9326. * @see tripal_core.api.inc: tripal_core_chado_update()
  9327. * @see tripal_core.api.inc: tripal_core_chado_select()
  9328. *
  9329. * @return
  9330. * An array describing the current table
  9331. *
  9332. * @ingroup tripal_schema_api
  9333. *
  9334. */
  9335. function tripal_core_chado_feature_distance_schema () {
  9336. $description = array();
  9337. $description = array(
  9338. 'table' => 'feature_distance',
  9339. // 'description' => 'TODO: please describe this table!',
  9340. 'fields' => array(
  9341. 'subject_id' => array(
  9342. // 'description' => 'TODO: please describe this field!',
  9343. 'type' => 'int',
  9344. 'not null' => '',
  9345. ),
  9346. 'object_id' => array(
  9347. // 'description' => 'TODO: please describe this field!',
  9348. 'type' => 'int',
  9349. 'not null' => '',
  9350. ),
  9351. 'srcfeature_id' => array(
  9352. // 'description' => 'TODO: please describe this field!',
  9353. 'type' => 'int',
  9354. 'not null' => '',
  9355. ),
  9356. 'subject_strand' => array(
  9357. // 'description' => 'TODO: please describe this field!',
  9358. 'type' => 'int',
  9359. 'size' => 'small',
  9360. 'not null' => '',
  9361. ),
  9362. 'object_strand' => array(
  9363. // 'description' => 'TODO: please describe this field!',
  9364. 'type' => 'int',
  9365. 'size' => 'small',
  9366. 'not null' => '',
  9367. ),
  9368. 'distance' => array(
  9369. // 'description' => 'TODO: please describe this field!',
  9370. 'type' => 'int',
  9371. 'not null' => '',
  9372. ),
  9373. ),
  9374. 'primary key' => array(
  9375. ),
  9376. 'unique keys' => array(
  9377. ),
  9378. 'indexes' => array(
  9379. ),
  9380. 'foreign keys' => array(
  9381. ),
  9382. );
  9383. return $description;
  9384. }
  9385. /**
  9386. * Implements hook_feature_cvterm_pub_schema()
  9387. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9388. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9389. * @see tripal_core.api.inc: tripal_core_chado_update()
  9390. * @see tripal_core.api.inc: tripal_core_chado_select()
  9391. *
  9392. * @return
  9393. * An array describing the current table
  9394. *
  9395. * @ingroup tripal_schema_api
  9396. *
  9397. */
  9398. function tripal_core_chado_feature_cvterm_pub_schema () {
  9399. $description = array();
  9400. $description = array(
  9401. 'table' => 'feature_cvterm_pub',
  9402. // 'description' => 'TODO: please describe this table!',
  9403. 'fields' => array(
  9404. 'feature_cvterm_pub_id' => array(
  9405. // 'description' => 'TODO: please describe this field!',
  9406. 'type' => 'serial',
  9407. 'not null' => '1',
  9408. ),
  9409. 'feature_cvterm_id' => array(
  9410. // 'description' => 'TODO: please describe this field!',
  9411. 'type' => 'int',
  9412. 'not null' => '1',
  9413. ),
  9414. 'pub_id' => array(
  9415. // 'description' => 'TODO: please describe this field!',
  9416. 'type' => 'int',
  9417. 'not null' => '1',
  9418. ),
  9419. ),
  9420. 'primary key' => array(
  9421. '0' => 'feature_cvterm_pub_id',
  9422. ),
  9423. 'unique keys' => array(
  9424. 'feature_cvterm_pub_c1' => array(
  9425. '0' => 'feature_cvterm_id',
  9426. '1' => 'pub_id',
  9427. ),
  9428. ),
  9429. 'indexes' => array(
  9430. 'feature_cvterm_pub_idx1' => array(
  9431. '0' => 'feature_cvterm_id',
  9432. ),
  9433. 'feature_cvterm_pub_idx2' => array(
  9434. '0' => 'pub_id',
  9435. ),
  9436. ),
  9437. 'foreign keys' => array(
  9438. ),
  9439. );
  9440. return $description;
  9441. }
  9442. /**
  9443. * Implements hook_feature_cvterm_dbxref_schema()
  9444. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9445. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9446. * @see tripal_core.api.inc: tripal_core_chado_update()
  9447. * @see tripal_core.api.inc: tripal_core_chado_select()
  9448. *
  9449. * @return
  9450. * An array describing the current table
  9451. *
  9452. * @ingroup tripal_schema_api
  9453. *
  9454. */
  9455. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9456. $description = array();
  9457. $description = array(
  9458. 'table' => 'feature_cvterm_dbxref',
  9459. // 'description' => 'TODO: please describe this table!',
  9460. 'fields' => array(
  9461. 'feature_cvterm_dbxref_id' => array(
  9462. // 'description' => 'TODO: please describe this field!',
  9463. 'type' => 'serial',
  9464. 'not null' => '1',
  9465. ),
  9466. 'feature_cvterm_id' => array(
  9467. // 'description' => 'TODO: please describe this field!',
  9468. 'type' => 'int',
  9469. 'not null' => '1',
  9470. ),
  9471. 'dbxref_id' => array(
  9472. // 'description' => 'TODO: please describe this field!',
  9473. 'type' => 'int',
  9474. 'not null' => '1',
  9475. ),
  9476. ),
  9477. 'primary key' => array(
  9478. '0' => 'feature_cvterm_dbxref_id',
  9479. ),
  9480. 'unique keys' => array(
  9481. 'feature_cvterm_dbxref_c1' => array(
  9482. '0' => 'feature_cvterm_id',
  9483. '1' => 'dbxref_id',
  9484. ),
  9485. ),
  9486. 'indexes' => array(
  9487. 'feature_cvterm_dbxref_idx1' => array(
  9488. '0' => 'feature_cvterm_id',
  9489. ),
  9490. 'feature_cvterm_dbxref_idx2' => array(
  9491. '0' => 'dbxref_id',
  9492. ),
  9493. ),
  9494. 'foreign keys' => array(
  9495. ),
  9496. );
  9497. return $description;
  9498. }
  9499. /**
  9500. * Implements hook_f_type_schema()
  9501. * Purpose: To describe the structure of f_type to tripal
  9502. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9503. * @see tripal_core.api.inc: tripal_core_chado_update()
  9504. * @see tripal_core.api.inc: tripal_core_chado_select()
  9505. *
  9506. * @return
  9507. * An array describing the current table
  9508. *
  9509. * @ingroup tripal_schema_api
  9510. *
  9511. */
  9512. function tripal_core_chado_f_type_schema () {
  9513. $description = array();
  9514. $description = array(
  9515. 'table' => 'f_type',
  9516. // 'description' => 'TODO: please describe this table!',
  9517. 'fields' => array(
  9518. 'feature_id' => array(
  9519. // 'description' => 'TODO: please describe this field!',
  9520. 'type' => 'int',
  9521. 'not null' => '',
  9522. ),
  9523. 'name' => array(
  9524. // 'description' => 'TODO: please describe this field!',
  9525. 'type' => 'varchar',
  9526. 'length' => '255',
  9527. 'not null' => '',
  9528. ),
  9529. 'dbxref_id' => array(
  9530. // 'description' => 'TODO: please describe this field!',
  9531. 'type' => 'int',
  9532. 'not null' => '',
  9533. ),
  9534. 'type' => array(
  9535. // 'description' => 'TODO: please describe this field!',
  9536. 'type' => 'varchar',
  9537. 'length' => '1024',
  9538. 'not null' => '',
  9539. ),
  9540. 'residues' => array(
  9541. // 'description' => 'TODO: please describe this field!',
  9542. 'type' => 'text',
  9543. 'not null' => '',
  9544. ),
  9545. 'seqlen' => array(
  9546. // 'description' => 'TODO: please describe this field!',
  9547. 'type' => 'int',
  9548. 'not null' => '',
  9549. ),
  9550. 'md5checksum' => array(
  9551. // 'description' => 'TODO: please describe this field!',
  9552. 'type' => 'char',
  9553. 'length' => '32',
  9554. 'not null' => '',
  9555. ),
  9556. 'type_id' => array(
  9557. // 'description' => 'TODO: please describe this field!',
  9558. 'type' => 'int',
  9559. 'not null' => '',
  9560. ),
  9561. 'timeaccessioned' => array(
  9562. // 'description' => 'TODO: please describe this field!',
  9563. 'type' => 'datetime',
  9564. 'not null' => '',
  9565. ),
  9566. 'timelastmodified' => array(
  9567. // 'description' => 'TODO: please describe this field!',
  9568. 'type' => 'datetime',
  9569. 'not null' => '',
  9570. ),
  9571. ),
  9572. 'primary key' => array(
  9573. ),
  9574. 'unique keys' => array(
  9575. ),
  9576. 'indexes' => array(
  9577. ),
  9578. 'foreign keys' => array(
  9579. ),
  9580. );
  9581. return $description;
  9582. }
  9583. /**
  9584. * Implements hook_feature_schema()
  9585. * Purpose: To describe the structure of feature to tripal
  9586. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9587. * @see tripal_core.api.inc: tripal_core_chado_update()
  9588. * @see tripal_core.api.inc: tripal_core_chado_select()
  9589. *
  9590. * @return
  9591. * An array describing the current table
  9592. *
  9593. * @ingroup tripal_schema_api
  9594. *
  9595. */
  9596. function tripal_core_chado_feature_schema () {
  9597. $description = array();
  9598. $description = array(
  9599. 'table' => 'feature',
  9600. // 'description' => 'TODO: please describe this table!',
  9601. 'fields' => array(
  9602. 'feature_id' => array(
  9603. // 'description' => 'TODO: please describe this field!',
  9604. 'type' => 'serial',
  9605. 'not null' => '1',
  9606. ),
  9607. 'dbxref_id' => array(
  9608. // 'description' => 'TODO: please describe this field!',
  9609. 'type' => 'int',
  9610. 'not null' => '',
  9611. ),
  9612. 'organism_id' => array(
  9613. // 'description' => 'TODO: please describe this field!',
  9614. 'type' => 'int',
  9615. 'not null' => '1',
  9616. ),
  9617. 'name' => array(
  9618. // 'description' => 'TODO: please describe this field!',
  9619. 'type' => 'varchar',
  9620. 'length' => '255',
  9621. 'not null' => '',
  9622. ),
  9623. 'uniquename' => array(
  9624. // 'description' => 'TODO: please describe this field!',
  9625. 'type' => 'text',
  9626. 'not null' => '1',
  9627. ),
  9628. 'residues' => array(
  9629. // 'description' => 'TODO: please describe this field!',
  9630. 'type' => 'text',
  9631. 'not null' => '',
  9632. ),
  9633. 'seqlen' => array(
  9634. // 'description' => 'TODO: please describe this field!',
  9635. 'type' => 'int',
  9636. 'not null' => '',
  9637. ),
  9638. 'md5checksum' => array(
  9639. // 'description' => 'TODO: please describe this field!',
  9640. 'type' => 'char',
  9641. 'length' => '32',
  9642. 'not null' => '',
  9643. ),
  9644. 'type_id' => array(
  9645. // 'description' => 'TODO: please describe this field!',
  9646. 'type' => 'int',
  9647. 'not null' => '1',
  9648. ),
  9649. 'is_analysis' => array(
  9650. // 'description' => 'TODO: please describe this field!',
  9651. 'type' => 'boolean',
  9652. 'not null' => '1',
  9653. 'default' => 'als',
  9654. ),
  9655. 'is_obsolete' => array(
  9656. // 'description' => 'TODO: please describe this field!',
  9657. 'type' => 'boolean',
  9658. 'not null' => '1',
  9659. 'default' => 'als',
  9660. ),
  9661. 'timeaccessioned' => array(
  9662. // 'description' => 'TODO: please describe this field!',
  9663. 'type' => 'datetime',
  9664. 'not null' => '1',
  9665. 'default' => 'ow(',
  9666. ),
  9667. 'timelastmodified' => array(
  9668. // 'description' => 'TODO: please describe this field!',
  9669. 'type' => 'datetime',
  9670. 'not null' => '1',
  9671. 'default' => 'ow(',
  9672. ),
  9673. ),
  9674. 'primary key' => array(
  9675. '0' => 'feature_id',
  9676. ),
  9677. 'unique keys' => array(
  9678. 'feature_c1' => array(
  9679. '0' => 'organism_id',
  9680. '1' => 'uniquename',
  9681. '2' => 'type_id',
  9682. ),
  9683. ),
  9684. 'indexes' => array(
  9685. 'feature_idx1' => array(
  9686. '0' => 'dbxref_id',
  9687. ),
  9688. 'feature_idx2' => array(
  9689. '0' => 'organism_id',
  9690. ),
  9691. 'feature_idx3' => array(
  9692. '0' => 'type_id',
  9693. ),
  9694. 'feature_idx4' => array(
  9695. '0' => 'uniquename',
  9696. ),
  9697. 'feature_name_ind1' => array(
  9698. '0' => 'name',
  9699. ),
  9700. ),
  9701. 'foreign keys' => array(
  9702. ),
  9703. );
  9704. return $description;
  9705. }
  9706. /**
  9707. * Implements hook_feature_contains_schema()
  9708. * Purpose: To describe the structure of feature_contains to tripal
  9709. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9710. * @see tripal_core.api.inc: tripal_core_chado_update()
  9711. * @see tripal_core.api.inc: tripal_core_chado_select()
  9712. *
  9713. * @return
  9714. * An array describing the current table
  9715. *
  9716. * @ingroup tripal_schema_api
  9717. *
  9718. */
  9719. function tripal_core_chado_feature_contains_schema () {
  9720. $description = array();
  9721. $description = array(
  9722. 'table' => 'feature_contains',
  9723. // 'description' => 'TODO: please describe this table!',
  9724. 'fields' => array(
  9725. 'subject_id' => array(
  9726. // 'description' => 'TODO: please describe this field!',
  9727. 'type' => 'int',
  9728. 'not null' => '',
  9729. ),
  9730. 'object_id' => array(
  9731. // 'description' => 'TODO: please describe this field!',
  9732. 'type' => 'int',
  9733. 'not null' => '',
  9734. ),
  9735. ),
  9736. 'primary key' => array(
  9737. ),
  9738. 'unique keys' => array(
  9739. ),
  9740. 'indexes' => array(
  9741. ),
  9742. 'foreign keys' => array(
  9743. ),
  9744. );
  9745. return $description;
  9746. }
  9747. /**
  9748. * Implements hook_feature_cvterm_schema()
  9749. * Purpose: To describe the structure of feature_cvterm to tripal
  9750. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9751. * @see tripal_core.api.inc: tripal_core_chado_update()
  9752. * @see tripal_core.api.inc: tripal_core_chado_select()
  9753. *
  9754. * @return
  9755. * An array describing the current table
  9756. *
  9757. * @ingroup tripal_schema_api
  9758. *
  9759. */
  9760. function tripal_core_chado_feature_cvterm_schema () {
  9761. $description = array();
  9762. $description = array(
  9763. 'table' => 'feature_cvterm',
  9764. // 'description' => 'TODO: please describe this table!',
  9765. 'fields' => array(
  9766. 'feature_cvterm_id' => array(
  9767. // 'description' => 'TODO: please describe this field!',
  9768. 'type' => 'serial',
  9769. 'not null' => '1',
  9770. ),
  9771. 'feature_id' => array(
  9772. // 'description' => 'TODO: please describe this field!',
  9773. 'type' => 'int',
  9774. 'not null' => '1',
  9775. ),
  9776. 'cvterm_id' => array(
  9777. // 'description' => 'TODO: please describe this field!',
  9778. 'type' => 'int',
  9779. 'not null' => '1',
  9780. ),
  9781. 'pub_id' => array(
  9782. // 'description' => 'TODO: please describe this field!',
  9783. 'type' => 'int',
  9784. 'not null' => '1',
  9785. ),
  9786. 'is_not' => array(
  9787. // 'description' => 'TODO: please describe this field!',
  9788. 'type' => 'boolean',
  9789. 'not null' => '1',
  9790. 'default' => 'als',
  9791. ),
  9792. 'rank' => array(
  9793. // 'description' => 'TODO: please describe this field!',
  9794. 'type' => 'int',
  9795. 'not null' => '1',
  9796. 'default' => '0',
  9797. ),
  9798. ),
  9799. 'primary key' => array(
  9800. '0' => 'feature_cvterm_id',
  9801. ),
  9802. 'unique keys' => array(
  9803. 'feature_cvterm_c1' => array(
  9804. '0' => 'feature_id',
  9805. '1' => 'cvterm_id',
  9806. '2' => 'pub_id',
  9807. '3' => 'rank',
  9808. ),
  9809. ),
  9810. 'indexes' => array(
  9811. 'feature_cvterm_idx1' => array(
  9812. '0' => 'feature_id',
  9813. ),
  9814. 'feature_cvterm_idx2' => array(
  9815. '0' => 'cvterm_id',
  9816. ),
  9817. 'feature_cvterm_idx3' => array(
  9818. '0' => 'pub_id',
  9819. ),
  9820. ),
  9821. 'foreign keys' => array(
  9822. ),
  9823. );
  9824. return $description;
  9825. }
  9826. /**
  9827. * Implements hook_feature_expression_schema()
  9828. * Purpose: To describe the structure of feature_expression to tripal
  9829. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9830. * @see tripal_core.api.inc: tripal_core_chado_update()
  9831. * @see tripal_core.api.inc: tripal_core_chado_select()
  9832. *
  9833. * @return
  9834. * An array describing the current table
  9835. *
  9836. * @ingroup tripal_schema_api
  9837. *
  9838. */
  9839. function tripal_core_chado_feature_expression_schema () {
  9840. $description = array();
  9841. $description = array(
  9842. 'table' => 'feature_expression',
  9843. // 'description' => 'TODO: please describe this table!',
  9844. 'fields' => array(
  9845. 'feature_expression_id' => array(
  9846. // 'description' => 'TODO: please describe this field!',
  9847. 'type' => 'serial',
  9848. 'not null' => '1',
  9849. ),
  9850. 'expression_id' => array(
  9851. // 'description' => 'TODO: please describe this field!',
  9852. 'type' => 'int',
  9853. 'not null' => '1',
  9854. ),
  9855. 'feature_id' => array(
  9856. // 'description' => 'TODO: please describe this field!',
  9857. 'type' => 'int',
  9858. 'not null' => '1',
  9859. ),
  9860. 'pub_id' => array(
  9861. // 'description' => 'TODO: please describe this field!',
  9862. 'type' => 'int',
  9863. 'not null' => '1',
  9864. ),
  9865. ),
  9866. 'primary key' => array(
  9867. '0' => 'feature_expression_id',
  9868. ),
  9869. 'unique keys' => array(
  9870. 'feature_expression_c1' => array(
  9871. '0' => 'expression_id',
  9872. '1' => 'feature_id',
  9873. '2' => 'pub_id',
  9874. ),
  9875. ),
  9876. 'indexes' => array(
  9877. 'feature_expression_idx1' => array(
  9878. '0' => 'expression_id',
  9879. ),
  9880. 'feature_expression_idx2' => array(
  9881. '0' => 'feature_id',
  9882. ),
  9883. 'feature_expression_idx3' => array(
  9884. '0' => 'pub_id',
  9885. ),
  9886. ),
  9887. 'foreign keys' => array(
  9888. ),
  9889. );
  9890. return $description;
  9891. }
  9892. /**
  9893. * Implements hook_feature_expressionprop_schema()
  9894. * Purpose: To describe the structure of feature_expressionprop to tripal
  9895. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9896. * @see tripal_core.api.inc: tripal_core_chado_update()
  9897. * @see tripal_core.api.inc: tripal_core_chado_select()
  9898. *
  9899. * @return
  9900. * An array describing the current table
  9901. *
  9902. * @ingroup tripal_schema_api
  9903. *
  9904. */
  9905. function tripal_core_chado_feature_expressionprop_schema () {
  9906. $description = array();
  9907. $description = array(
  9908. 'table' => 'feature_expressionprop',
  9909. // 'description' => 'TODO: please describe this table!',
  9910. 'fields' => array(
  9911. 'feature_expressionprop_id' => array(
  9912. // 'description' => 'TODO: please describe this field!',
  9913. 'type' => 'serial',
  9914. 'not null' => '1',
  9915. ),
  9916. 'feature_expression_id' => array(
  9917. // 'description' => 'TODO: please describe this field!',
  9918. 'type' => 'int',
  9919. 'not null' => '1',
  9920. ),
  9921. 'type_id' => array(
  9922. // 'description' => 'TODO: please describe this field!',
  9923. 'type' => 'int',
  9924. 'not null' => '1',
  9925. ),
  9926. 'value' => array(
  9927. // 'description' => 'TODO: please describe this field!',
  9928. 'type' => 'text',
  9929. 'not null' => '',
  9930. ),
  9931. 'rank' => array(
  9932. // 'description' => 'TODO: please describe this field!',
  9933. 'type' => 'int',
  9934. 'not null' => '1',
  9935. 'default' => '0',
  9936. ),
  9937. ),
  9938. 'primary key' => array(
  9939. '0' => 'feature_expressionprop_id',
  9940. ),
  9941. 'unique keys' => array(
  9942. 'feature_expressionprop_c1' => array(
  9943. '0' => 'feature_expression_id',
  9944. '1' => 'type_id',
  9945. '2' => 'rank',
  9946. ),
  9947. ),
  9948. 'indexes' => array(
  9949. 'feature_expressionprop_idx1' => array(
  9950. '0' => 'feature_expression_id',
  9951. ),
  9952. 'feature_expressionprop_idx2' => array(
  9953. '0' => 'type_id',
  9954. ),
  9955. ),
  9956. 'foreign keys' => array(
  9957. ),
  9958. );
  9959. return $description;
  9960. }
  9961. /**
  9962. * Implements hook_feature_pubprop_schema()
  9963. * Purpose: To describe the structure of feature_pubprop to tripal
  9964. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9965. * @see tripal_core.api.inc: tripal_core_chado_update()
  9966. * @see tripal_core.api.inc: tripal_core_chado_select()
  9967. *
  9968. * @return
  9969. * An array describing the current table
  9970. *
  9971. * @ingroup tripal_schema_api
  9972. *
  9973. */
  9974. function tripal_core_chado_feature_pubprop_schema () {
  9975. $description = array();
  9976. $description = array(
  9977. 'table' => 'feature_pubprop',
  9978. // 'description' => 'TODO: please describe this table!',
  9979. 'fields' => array(
  9980. 'feature_pubprop_id' => array(
  9981. // 'description' => 'TODO: please describe this field!',
  9982. 'type' => 'serial',
  9983. 'not null' => '1',
  9984. ),
  9985. 'feature_pub_id' => array(
  9986. // 'description' => 'TODO: please describe this field!',
  9987. 'type' => 'int',
  9988. 'not null' => '1',
  9989. ),
  9990. 'type_id' => array(
  9991. // 'description' => 'TODO: please describe this field!',
  9992. 'type' => 'int',
  9993. 'not null' => '1',
  9994. ),
  9995. 'value' => array(
  9996. // 'description' => 'TODO: please describe this field!',
  9997. 'type' => 'text',
  9998. 'not null' => '',
  9999. ),
  10000. 'rank' => array(
  10001. // 'description' => 'TODO: please describe this field!',
  10002. 'type' => 'int',
  10003. 'not null' => '1',
  10004. 'default' => '0',
  10005. ),
  10006. ),
  10007. 'primary key' => array(
  10008. '0' => 'feature_pubprop_id',
  10009. ),
  10010. 'unique keys' => array(
  10011. 'feature_pubprop_c1' => array(
  10012. '0' => 'feature_pub_id',
  10013. '1' => 'type_id',
  10014. '2' => 'rank',
  10015. ),
  10016. ),
  10017. 'indexes' => array(
  10018. 'feature_pubprop_idx1' => array(
  10019. '0' => 'feature_pub_id',
  10020. ),
  10021. ),
  10022. 'foreign keys' => array(
  10023. ),
  10024. );
  10025. return $description;
  10026. }
  10027. /**
  10028. * Implements hook_feature_relationship_schema()
  10029. * Purpose: To describe the structure of feature_relationship to tripal
  10030. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10031. * @see tripal_core.api.inc: tripal_core_chado_update()
  10032. * @see tripal_core.api.inc: tripal_core_chado_select()
  10033. *
  10034. * @return
  10035. * An array describing the current table
  10036. *
  10037. * @ingroup tripal_schema_api
  10038. *
  10039. */
  10040. function tripal_core_chado_feature_relationship_schema () {
  10041. $description = array();
  10042. $description = array(
  10043. 'table' => 'feature_relationship',
  10044. // 'description' => 'TODO: please describe this table!',
  10045. 'fields' => array(
  10046. 'feature_relationship_id' => array(
  10047. // 'description' => 'TODO: please describe this field!',
  10048. 'type' => 'serial',
  10049. 'not null' => '1',
  10050. ),
  10051. 'subject_id' => array(
  10052. // 'description' => 'TODO: please describe this field!',
  10053. 'type' => 'int',
  10054. 'not null' => '1',
  10055. ),
  10056. 'object_id' => array(
  10057. // 'description' => 'TODO: please describe this field!',
  10058. 'type' => 'int',
  10059. 'not null' => '1',
  10060. ),
  10061. 'type_id' => array(
  10062. // 'description' => 'TODO: please describe this field!',
  10063. 'type' => 'int',
  10064. 'not null' => '1',
  10065. ),
  10066. 'value' => array(
  10067. // 'description' => 'TODO: please describe this field!',
  10068. 'type' => 'text',
  10069. 'not null' => '',
  10070. ),
  10071. 'rank' => array(
  10072. // 'description' => 'TODO: please describe this field!',
  10073. 'type' => 'int',
  10074. 'not null' => '1',
  10075. 'default' => '0',
  10076. ),
  10077. ),
  10078. 'primary key' => array(
  10079. '0' => 'feature_relationship_id',
  10080. ),
  10081. 'unique keys' => array(
  10082. 'feature_relationship_c1' => array(
  10083. '0' => 'subject_id',
  10084. '1' => 'object_id',
  10085. '2' => 'type_id',
  10086. '3' => 'rank',
  10087. ),
  10088. ),
  10089. 'indexes' => array(
  10090. 'feature_relationship_idx1' => array(
  10091. '0' => 'subject_id',
  10092. ),
  10093. 'feature_relationship_idx2' => array(
  10094. '0' => 'object_id',
  10095. ),
  10096. 'feature_relationship_idx3' => array(
  10097. '0' => 'type_id',
  10098. ),
  10099. ),
  10100. 'foreign keys' => array(
  10101. ),
  10102. );
  10103. return $description;
  10104. }
  10105. /**
  10106. * Implements hook_feature_relationship_pub_schema()
  10107. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10108. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10109. * @see tripal_core.api.inc: tripal_core_chado_update()
  10110. * @see tripal_core.api.inc: tripal_core_chado_select()
  10111. *
  10112. * @return
  10113. * An array describing the current table
  10114. *
  10115. * @ingroup tripal_schema_api
  10116. *
  10117. */
  10118. function tripal_core_chado_feature_relationship_pub_schema () {
  10119. $description = array();
  10120. $description = array(
  10121. 'table' => 'feature_relationship_pub',
  10122. // 'description' => 'TODO: please describe this table!',
  10123. 'fields' => array(
  10124. 'feature_relationship_pub_id' => array(
  10125. // 'description' => 'TODO: please describe this field!',
  10126. 'type' => 'serial',
  10127. 'not null' => '1',
  10128. ),
  10129. 'feature_relationship_id' => array(
  10130. // 'description' => 'TODO: please describe this field!',
  10131. 'type' => 'int',
  10132. 'not null' => '1',
  10133. ),
  10134. 'pub_id' => array(
  10135. // 'description' => 'TODO: please describe this field!',
  10136. 'type' => 'int',
  10137. 'not null' => '1',
  10138. ),
  10139. ),
  10140. 'primary key' => array(
  10141. '0' => 'feature_relationship_pub_id',
  10142. ),
  10143. 'unique keys' => array(
  10144. 'feature_relationship_pub_c1' => array(
  10145. '0' => 'feature_relationship_id',
  10146. '1' => 'pub_id',
  10147. ),
  10148. ),
  10149. 'indexes' => array(
  10150. 'feature_relationship_pub_idx1' => array(
  10151. '0' => 'feature_relationship_id',
  10152. ),
  10153. 'feature_relationship_pub_idx2' => array(
  10154. '0' => 'pub_id',
  10155. ),
  10156. ),
  10157. 'foreign keys' => array(
  10158. ),
  10159. );
  10160. return $description;
  10161. }
  10162. /**
  10163. * Implements hook_feature_relationshipprop_schema()
  10164. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10165. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10166. * @see tripal_core.api.inc: tripal_core_chado_update()
  10167. * @see tripal_core.api.inc: tripal_core_chado_select()
  10168. *
  10169. * @return
  10170. * An array describing the current table
  10171. *
  10172. * @ingroup tripal_schema_api
  10173. *
  10174. */
  10175. function tripal_core_chado_feature_relationshipprop_schema () {
  10176. $description = array();
  10177. $description = array(
  10178. 'table' => 'feature_relationshipprop',
  10179. // 'description' => 'TODO: please describe this table!',
  10180. 'fields' => array(
  10181. 'feature_relationshipprop_id' => array(
  10182. // 'description' => 'TODO: please describe this field!',
  10183. 'type' => 'serial',
  10184. 'not null' => '1',
  10185. ),
  10186. 'feature_relationship_id' => array(
  10187. // 'description' => 'TODO: please describe this field!',
  10188. 'type' => 'int',
  10189. 'not null' => '1',
  10190. ),
  10191. 'type_id' => array(
  10192. // 'description' => 'TODO: please describe this field!',
  10193. 'type' => 'int',
  10194. 'not null' => '1',
  10195. ),
  10196. 'value' => array(
  10197. // 'description' => 'TODO: please describe this field!',
  10198. 'type' => 'text',
  10199. 'not null' => '',
  10200. ),
  10201. 'rank' => array(
  10202. // 'description' => 'TODO: please describe this field!',
  10203. 'type' => 'int',
  10204. 'not null' => '1',
  10205. 'default' => '0',
  10206. ),
  10207. ),
  10208. 'primary key' => array(
  10209. '0' => 'feature_relationshipprop_id',
  10210. ),
  10211. 'unique keys' => array(
  10212. 'feature_relationshipprop_c1' => array(
  10213. '0' => 'feature_relationship_id',
  10214. '1' => 'type_id',
  10215. '2' => 'rank',
  10216. ),
  10217. ),
  10218. 'indexes' => array(
  10219. 'feature_relationshipprop_idx1' => array(
  10220. '0' => 'feature_relationship_id',
  10221. ),
  10222. 'feature_relationshipprop_idx2' => array(
  10223. '0' => 'type_id',
  10224. ),
  10225. ),
  10226. 'foreign keys' => array(
  10227. ),
  10228. );
  10229. return $description;
  10230. }
  10231. /**
  10232. * Implements hook_feature_pub_schema()
  10233. * Purpose: To describe the structure of feature_pub to tripal
  10234. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10235. * @see tripal_core.api.inc: tripal_core_chado_update()
  10236. * @see tripal_core.api.inc: tripal_core_chado_select()
  10237. *
  10238. * @return
  10239. * An array describing the current table
  10240. *
  10241. * @ingroup tripal_schema_api
  10242. *
  10243. */
  10244. function tripal_core_chado_feature_pub_schema () {
  10245. $description = array();
  10246. $description = array(
  10247. 'table' => 'feature_pub',
  10248. // 'description' => 'TODO: please describe this table!',
  10249. 'fields' => array(
  10250. 'feature_pub_id' => array(
  10251. // 'description' => 'TODO: please describe this field!',
  10252. 'type' => 'serial',
  10253. 'not null' => '1',
  10254. ),
  10255. 'feature_id' => array(
  10256. // 'description' => 'TODO: please describe this field!',
  10257. 'type' => 'int',
  10258. 'not null' => '1',
  10259. ),
  10260. 'pub_id' => array(
  10261. // 'description' => 'TODO: please describe this field!',
  10262. 'type' => 'int',
  10263. 'not null' => '1',
  10264. ),
  10265. ),
  10266. 'primary key' => array(
  10267. '0' => 'feature_pub_id',
  10268. ),
  10269. 'unique keys' => array(
  10270. 'feature_pub_c1' => array(
  10271. '0' => 'feature_id',
  10272. '1' => 'pub_id',
  10273. ),
  10274. ),
  10275. 'indexes' => array(
  10276. 'feature_pub_idx1' => array(
  10277. '0' => 'feature_id',
  10278. ),
  10279. 'feature_pub_idx2' => array(
  10280. '0' => 'pub_id',
  10281. ),
  10282. ),
  10283. 'foreign keys' => array(
  10284. ),
  10285. );
  10286. return $description;
  10287. }
  10288. /**
  10289. * Implements hook_feature_phenotype_schema()
  10290. * Purpose: To describe the structure of feature_phenotype to tripal
  10291. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10292. * @see tripal_core.api.inc: tripal_core_chado_update()
  10293. * @see tripal_core.api.inc: tripal_core_chado_select()
  10294. *
  10295. * @return
  10296. * An array describing the current table
  10297. *
  10298. * @ingroup tripal_schema_api
  10299. *
  10300. */
  10301. function tripal_core_chado_feature_phenotype_schema () {
  10302. $description = array();
  10303. $description = array(
  10304. 'table' => 'feature_phenotype',
  10305. // 'description' => 'TODO: please describe this table!',
  10306. 'fields' => array(
  10307. 'feature_phenotype_id' => array(
  10308. // 'description' => 'TODO: please describe this field!',
  10309. 'type' => 'serial',
  10310. 'not null' => '1',
  10311. ),
  10312. 'feature_id' => array(
  10313. // 'description' => 'TODO: please describe this field!',
  10314. 'type' => 'int',
  10315. 'not null' => '1',
  10316. ),
  10317. 'phenotype_id' => array(
  10318. // 'description' => 'TODO: please describe this field!',
  10319. 'type' => 'int',
  10320. 'not null' => '1',
  10321. ),
  10322. ),
  10323. 'primary key' => array(
  10324. '0' => 'feature_phenotype_id',
  10325. ),
  10326. 'unique keys' => array(
  10327. 'feature_phenotype_c1' => array(
  10328. '0' => 'feature_id',
  10329. '1' => 'phenotype_id',
  10330. ),
  10331. ),
  10332. 'indexes' => array(
  10333. 'feature_phenotype_idx1' => array(
  10334. '0' => 'feature_id',
  10335. ),
  10336. 'feature_phenotype_idx2' => array(
  10337. '0' => 'phenotype_id',
  10338. ),
  10339. ),
  10340. 'foreign keys' => array(
  10341. ),
  10342. );
  10343. return $description;
  10344. }
  10345. /**
  10346. * Implements hook_feature_genotype_schema()
  10347. * Purpose: To describe the structure of feature_genotype to tripal
  10348. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10349. * @see tripal_core.api.inc: tripal_core_chado_update()
  10350. * @see tripal_core.api.inc: tripal_core_chado_select()
  10351. *
  10352. * @return
  10353. * An array describing the current table
  10354. *
  10355. * @ingroup tripal_schema_api
  10356. *
  10357. */
  10358. function tripal_core_chado_feature_genotype_schema () {
  10359. $description = array();
  10360. $description = array(
  10361. 'table' => 'feature_genotype',
  10362. // 'description' => 'TODO: please describe this table!',
  10363. 'fields' => array(
  10364. 'feature_genotype_id' => array(
  10365. // 'description' => 'TODO: please describe this field!',
  10366. 'type' => 'serial',
  10367. 'not null' => '1',
  10368. ),
  10369. 'feature_id' => array(
  10370. // 'description' => 'TODO: please describe this field!',
  10371. 'type' => 'int',
  10372. 'not null' => '1',
  10373. ),
  10374. 'genotype_id' => array(
  10375. // 'description' => 'TODO: please describe this field!',
  10376. 'type' => 'int',
  10377. 'not null' => '1',
  10378. ),
  10379. 'chromosome_id' => array(
  10380. // 'description' => 'TODO: please describe this field!',
  10381. 'type' => 'int',
  10382. 'not null' => '',
  10383. ),
  10384. 'rank' => array(
  10385. // 'description' => 'TODO: please describe this field!',
  10386. 'type' => 'int',
  10387. 'not null' => '1',
  10388. ),
  10389. 'cgroup' => array(
  10390. // 'description' => 'TODO: please describe this field!',
  10391. 'type' => 'int',
  10392. 'not null' => '1',
  10393. ),
  10394. 'cvterm_id' => array(
  10395. // 'description' => 'TODO: please describe this field!',
  10396. 'type' => 'int',
  10397. 'not null' => '1',
  10398. ),
  10399. ),
  10400. 'primary key' => array(
  10401. '0' => 'feature_genotype_id',
  10402. ),
  10403. 'unique keys' => array(
  10404. 'feature_genotype_c1' => array(
  10405. '0' => 'feature_id',
  10406. '1' => 'genotype_id',
  10407. '2' => 'cvterm_id',
  10408. '3' => 'chromosome_id',
  10409. '4' => 'rank',
  10410. '5' => 'cgroup',
  10411. ),
  10412. ),
  10413. 'indexes' => array(
  10414. 'feature_genotype_idx1' => array(
  10415. '0' => 'feature_id',
  10416. ),
  10417. 'feature_genotype_idx2' => array(
  10418. '0' => 'genotype_id',
  10419. ),
  10420. ),
  10421. 'foreign keys' => array(
  10422. ),
  10423. );
  10424. return $description;
  10425. }
  10426. /**
  10427. * Implements hook_feature_intersection_schema()
  10428. * Purpose: To describe the structure of feature_intersection to tripal
  10429. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10430. * @see tripal_core.api.inc: tripal_core_chado_update()
  10431. * @see tripal_core.api.inc: tripal_core_chado_select()
  10432. *
  10433. * @return
  10434. * An array describing the current table
  10435. *
  10436. * @ingroup tripal_schema_api
  10437. *
  10438. */
  10439. function tripal_core_chado_feature_intersection_schema () {
  10440. $description = array();
  10441. $description = array(
  10442. 'table' => 'feature_intersection',
  10443. // 'description' => 'TODO: please describe this table!',
  10444. 'fields' => array(
  10445. 'subject_id' => array(
  10446. // 'description' => 'TODO: please describe this field!',
  10447. 'type' => 'int',
  10448. 'not null' => '',
  10449. ),
  10450. 'object_id' => array(
  10451. // 'description' => 'TODO: please describe this field!',
  10452. 'type' => 'int',
  10453. 'not null' => '',
  10454. ),
  10455. 'srcfeature_id' => array(
  10456. // 'description' => 'TODO: please describe this field!',
  10457. 'type' => 'int',
  10458. 'not null' => '',
  10459. ),
  10460. 'subject_strand' => array(
  10461. // 'description' => 'TODO: please describe this field!',
  10462. 'type' => 'int',
  10463. 'size' => 'small',
  10464. 'not null' => '',
  10465. ),
  10466. 'object_strand' => array(
  10467. // 'description' => 'TODO: please describe this field!',
  10468. 'type' => 'int',
  10469. 'size' => 'small',
  10470. 'not null' => '',
  10471. ),
  10472. 'fmin' => array(
  10473. // 'description' => 'TODO: please describe this field!',
  10474. 'type' => 'int',
  10475. 'not null' => '',
  10476. ),
  10477. 'fmax' => array(
  10478. // 'description' => 'TODO: please describe this field!',
  10479. 'type' => 'int',
  10480. 'not null' => '',
  10481. ),
  10482. ),
  10483. 'primary key' => array(
  10484. ),
  10485. 'unique keys' => array(
  10486. ),
  10487. 'indexes' => array(
  10488. ),
  10489. 'foreign keys' => array(
  10490. ),
  10491. );
  10492. return $description;
  10493. }
  10494. /**
  10495. * Implements hook_feature_meets_schema()
  10496. * Purpose: To describe the structure of feature_meets to tripal
  10497. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10498. * @see tripal_core.api.inc: tripal_core_chado_update()
  10499. * @see tripal_core.api.inc: tripal_core_chado_select()
  10500. *
  10501. * @return
  10502. * An array describing the current table
  10503. *
  10504. * @ingroup tripal_schema_api
  10505. *
  10506. */
  10507. function tripal_core_chado_feature_meets_schema () {
  10508. $description = array();
  10509. $description = array(
  10510. 'table' => 'feature_meets',
  10511. // 'description' => 'TODO: please describe this table!',
  10512. 'fields' => array(
  10513. 'subject_id' => array(
  10514. // 'description' => 'TODO: please describe this field!',
  10515. 'type' => 'int',
  10516. 'not null' => '',
  10517. ),
  10518. 'object_id' => array(
  10519. // 'description' => 'TODO: please describe this field!',
  10520. 'type' => 'int',
  10521. 'not null' => '',
  10522. ),
  10523. ),
  10524. 'primary key' => array(
  10525. ),
  10526. 'unique keys' => array(
  10527. ),
  10528. 'indexes' => array(
  10529. ),
  10530. 'foreign keys' => array(
  10531. ),
  10532. );
  10533. return $description;
  10534. }
  10535. /**
  10536. * Implements hook_feature_meets_on_same_strand_schema()
  10537. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10538. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10539. * @see tripal_core.api.inc: tripal_core_chado_update()
  10540. * @see tripal_core.api.inc: tripal_core_chado_select()
  10541. *
  10542. * @return
  10543. * An array describing the current table
  10544. *
  10545. * @ingroup tripal_schema_api
  10546. *
  10547. */
  10548. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10549. $description = array();
  10550. $description = array(
  10551. 'table' => 'feature_meets_on_same_strand',
  10552. // 'description' => 'TODO: please describe this table!',
  10553. 'fields' => array(
  10554. 'subject_id' => array(
  10555. // 'description' => 'TODO: please describe this field!',
  10556. 'type' => 'int',
  10557. 'not null' => '',
  10558. ),
  10559. 'object_id' => array(
  10560. // 'description' => 'TODO: please describe this field!',
  10561. 'type' => 'int',
  10562. 'not null' => '',
  10563. ),
  10564. ),
  10565. 'primary key' => array(
  10566. ),
  10567. 'unique keys' => array(
  10568. ),
  10569. 'indexes' => array(
  10570. ),
  10571. 'foreign keys' => array(
  10572. ),
  10573. );
  10574. return $description;
  10575. }
  10576. /**
  10577. * Implements hook_f_loc_schema()
  10578. * Purpose: To describe the structure of f_loc to tripal
  10579. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10580. * @see tripal_core.api.inc: tripal_core_chado_update()
  10581. * @see tripal_core.api.inc: tripal_core_chado_select()
  10582. *
  10583. * @return
  10584. * An array describing the current table
  10585. *
  10586. * @ingroup tripal_schema_api
  10587. *
  10588. */
  10589. function tripal_core_chado_f_loc_schema () {
  10590. $description = array();
  10591. $description = array(
  10592. 'table' => 'f_loc',
  10593. // 'description' => 'TODO: please describe this table!',
  10594. 'fields' => array(
  10595. 'feature_id' => array(
  10596. // 'description' => 'TODO: please describe this field!',
  10597. 'type' => 'int',
  10598. 'not null' => '',
  10599. ),
  10600. 'name' => array(
  10601. // 'description' => 'TODO: please describe this field!',
  10602. 'type' => 'varchar',
  10603. 'length' => '255',
  10604. 'not null' => '',
  10605. ),
  10606. 'dbxref_id' => array(
  10607. // 'description' => 'TODO: please describe this field!',
  10608. 'type' => 'int',
  10609. 'not null' => '',
  10610. ),
  10611. 'nbeg' => array(
  10612. // 'description' => 'TODO: please describe this field!',
  10613. 'type' => 'int',
  10614. 'not null' => '',
  10615. ),
  10616. 'nend' => array(
  10617. // 'description' => 'TODO: please describe this field!',
  10618. 'type' => 'int',
  10619. 'not null' => '',
  10620. ),
  10621. 'strand' => array(
  10622. // 'description' => 'TODO: please describe this field!',
  10623. 'type' => 'int',
  10624. 'size' => 'small',
  10625. 'not null' => '',
  10626. ),
  10627. ),
  10628. 'primary key' => array(
  10629. ),
  10630. 'unique keys' => array(
  10631. ),
  10632. 'indexes' => array(
  10633. ),
  10634. 'foreign keys' => array(
  10635. ),
  10636. );
  10637. return $description;
  10638. }
  10639. /**
  10640. * Implements hook_expressionprop_schema()
  10641. * Purpose: To describe the structure of expressionprop to tripal
  10642. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10643. * @see tripal_core.api.inc: tripal_core_chado_update()
  10644. * @see tripal_core.api.inc: tripal_core_chado_select()
  10645. *
  10646. * @return
  10647. * An array describing the current table
  10648. *
  10649. * @ingroup tripal_schema_api
  10650. *
  10651. */
  10652. function tripal_core_chado_expressionprop_schema () {
  10653. $description = array();
  10654. $description = array(
  10655. 'table' => 'expressionprop',
  10656. // 'description' => 'TODO: please describe this table!',
  10657. 'fields' => array(
  10658. 'expressionprop_id' => array(
  10659. // 'description' => 'TODO: please describe this field!',
  10660. 'type' => 'serial',
  10661. 'not null' => '1',
  10662. ),
  10663. 'expression_id' => array(
  10664. // 'description' => 'TODO: please describe this field!',
  10665. 'type' => 'int',
  10666. 'not null' => '1',
  10667. ),
  10668. 'type_id' => array(
  10669. // 'description' => 'TODO: please describe this field!',
  10670. 'type' => 'int',
  10671. 'not null' => '1',
  10672. ),
  10673. 'value' => array(
  10674. // 'description' => 'TODO: please describe this field!',
  10675. 'type' => 'text',
  10676. 'not null' => '',
  10677. ),
  10678. 'rank' => array(
  10679. // 'description' => 'TODO: please describe this field!',
  10680. 'type' => 'int',
  10681. 'not null' => '1',
  10682. 'default' => '0',
  10683. ),
  10684. ),
  10685. 'primary key' => array(
  10686. '0' => 'expressionprop_id',
  10687. ),
  10688. 'unique keys' => array(
  10689. 'expressionprop_c1' => array(
  10690. '0' => 'expression_id',
  10691. '1' => 'type_id',
  10692. '2' => 'rank',
  10693. ),
  10694. ),
  10695. 'indexes' => array(
  10696. 'expressionprop_idx1' => array(
  10697. '0' => 'expression_id',
  10698. ),
  10699. 'expressionprop_idx2' => array(
  10700. '0' => 'type_id',
  10701. ),
  10702. ),
  10703. 'foreign keys' => array(
  10704. ),
  10705. );
  10706. return $description;
  10707. }
  10708. /**
  10709. * Implements hook_db_dbxref_count_schema()
  10710. * Purpose: To describe the structure of db_dbxref_count to tripal
  10711. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10712. * @see tripal_core.api.inc: tripal_core_chado_update()
  10713. * @see tripal_core.api.inc: tripal_core_chado_select()
  10714. *
  10715. * @return
  10716. * An array describing the current table
  10717. *
  10718. * @ingroup tripal_schema_api
  10719. *
  10720. */
  10721. function tripal_core_chado_db_dbxref_count_schema () {
  10722. $description = array();
  10723. $description = array(
  10724. 'table' => 'db_dbxref_count',
  10725. // 'description' => 'TODO: please describe this table!',
  10726. 'fields' => array(
  10727. 'name' => array(
  10728. // 'description' => 'TODO: please describe this field!',
  10729. 'type' => 'varchar',
  10730. 'length' => '255',
  10731. 'not null' => '',
  10732. ),
  10733. 'num_dbxrefs' => array(
  10734. // 'description' => 'TODO: please describe this field!',
  10735. 'type' => 'int',
  10736. 'size' => 'big',
  10737. 'not null' => '',
  10738. ),
  10739. ),
  10740. 'primary key' => array(
  10741. ),
  10742. 'unique keys' => array(
  10743. ),
  10744. 'indexes' => array(
  10745. ),
  10746. 'foreign keys' => array(
  10747. ),
  10748. );
  10749. return $description;
  10750. }
  10751. /**
  10752. * Implements hook_dbxref_schema()
  10753. * Purpose: To describe the structure of dbxref to tripal
  10754. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10755. * @see tripal_core.api.inc: tripal_core_chado_update()
  10756. * @see tripal_core.api.inc: tripal_core_chado_select()
  10757. *
  10758. * @return
  10759. * An array describing the current table
  10760. *
  10761. * @ingroup tripal_schema_api
  10762. *
  10763. */
  10764. function tripal_core_chado_dbxref_schema () {
  10765. $description = array();
  10766. $description = array(
  10767. 'table' => 'dbxref',
  10768. // 'description' => 'TODO: please describe this table!',
  10769. 'fields' => array(
  10770. 'dbxref_id' => array(
  10771. // 'description' => 'TODO: please describe this field!',
  10772. 'type' => 'serial',
  10773. 'not null' => '1',
  10774. ),
  10775. 'db_id' => array(
  10776. // 'description' => 'TODO: please describe this field!',
  10777. 'type' => 'int',
  10778. 'not null' => '1',
  10779. ),
  10780. 'accession' => array(
  10781. // 'description' => 'TODO: please describe this field!',
  10782. 'type' => 'varchar',
  10783. 'length' => '255',
  10784. 'not null' => '1',
  10785. ),
  10786. 'version' => array(
  10787. // 'description' => 'TODO: please describe this field!',
  10788. 'type' => 'varchar',
  10789. 'length' => '255',
  10790. 'not null' => '1',
  10791. 'default' => '',
  10792. ),
  10793. 'description' => array(
  10794. // 'description' => 'TODO: please describe this field!',
  10795. 'type' => 'text',
  10796. 'not null' => '',
  10797. ),
  10798. ),
  10799. 'primary key' => array(
  10800. '0' => 'dbxref_id',
  10801. ),
  10802. 'unique keys' => array(
  10803. 'dbxref_c1' => array(
  10804. '0' => 'db_id',
  10805. '1' => 'accession',
  10806. '2' => 'version',
  10807. ),
  10808. ),
  10809. 'indexes' => array(
  10810. 'dbxref_idx1' => array(
  10811. '0' => 'db_id',
  10812. ),
  10813. 'dbxref_idx2' => array(
  10814. '0' => 'accession',
  10815. ),
  10816. 'dbxref_idx3' => array(
  10817. '0' => 'version',
  10818. ),
  10819. ),
  10820. 'foreign keys' => array(
  10821. ),
  10822. );
  10823. return $description;
  10824. }
  10825. /**
  10826. * Implements hook_dbxrefprop_schema()
  10827. * Purpose: To describe the structure of dbxrefprop to tripal
  10828. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10829. * @see tripal_core.api.inc: tripal_core_chado_update()
  10830. * @see tripal_core.api.inc: tripal_core_chado_select()
  10831. *
  10832. * @return
  10833. * An array describing the current table
  10834. *
  10835. * @ingroup tripal_schema_api
  10836. *
  10837. */
  10838. function tripal_core_chado_dbxrefprop_schema () {
  10839. $description = array();
  10840. $description = array(
  10841. 'table' => 'dbxrefprop',
  10842. // 'description' => 'TODO: please describe this table!',
  10843. 'fields' => array(
  10844. 'dbxrefprop_id' => array(
  10845. // 'description' => 'TODO: please describe this field!',
  10846. 'type' => 'serial',
  10847. 'not null' => '1',
  10848. ),
  10849. 'dbxref_id' => array(
  10850. // 'description' => 'TODO: please describe this field!',
  10851. 'type' => 'int',
  10852. 'not null' => '1',
  10853. ),
  10854. 'type_id' => array(
  10855. // 'description' => 'TODO: please describe this field!',
  10856. 'type' => 'int',
  10857. 'not null' => '1',
  10858. ),
  10859. 'value' => array(
  10860. // 'description' => 'TODO: please describe this field!',
  10861. 'type' => 'text',
  10862. 'not null' => '1',
  10863. 'default' => '',
  10864. ),
  10865. 'rank' => array(
  10866. // 'description' => 'TODO: please describe this field!',
  10867. 'type' => 'int',
  10868. 'not null' => '1',
  10869. 'default' => '0',
  10870. ),
  10871. ),
  10872. 'primary key' => array(
  10873. '0' => 'dbxrefprop_id',
  10874. ),
  10875. 'unique keys' => array(
  10876. 'dbxrefprop_c1' => array(
  10877. '0' => 'dbxref_id',
  10878. '1' => 'type_id',
  10879. '2' => 'rank',
  10880. ),
  10881. ),
  10882. 'indexes' => array(
  10883. 'dbxrefprop_idx1' => array(
  10884. '0' => 'dbxref_id',
  10885. ),
  10886. 'dbxrefprop_idx2' => array(
  10887. '0' => 'type_id',
  10888. ),
  10889. ),
  10890. 'foreign keys' => array(
  10891. ),
  10892. );
  10893. return $description;
  10894. }
  10895. /**
  10896. * Implements hook_dfeatureloc_schema()
  10897. * Purpose: To describe the structure of dfeatureloc to tripal
  10898. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10899. * @see tripal_core.api.inc: tripal_core_chado_update()
  10900. * @see tripal_core.api.inc: tripal_core_chado_select()
  10901. *
  10902. * @return
  10903. * An array describing the current table
  10904. *
  10905. * @ingroup tripal_schema_api
  10906. *
  10907. */
  10908. function tripal_core_chado_dfeatureloc_schema () {
  10909. $description = array();
  10910. $description = array(
  10911. 'table' => 'dfeatureloc',
  10912. // 'description' => 'TODO: please describe this table!',
  10913. 'fields' => array(
  10914. 'featureloc_id' => array(
  10915. // 'description' => 'TODO: please describe this field!',
  10916. 'type' => 'int',
  10917. 'not null' => '',
  10918. ),
  10919. 'feature_id' => array(
  10920. // 'description' => 'TODO: please describe this field!',
  10921. 'type' => 'int',
  10922. 'not null' => '',
  10923. ),
  10924. 'srcfeature_id' => array(
  10925. // 'description' => 'TODO: please describe this field!',
  10926. 'type' => 'int',
  10927. 'not null' => '',
  10928. ),
  10929. 'nbeg' => array(
  10930. // 'description' => 'TODO: please describe this field!',
  10931. 'type' => 'int',
  10932. 'not null' => '',
  10933. ),
  10934. 'is_nbeg_partial' => array(
  10935. // 'description' => 'TODO: please describe this field!',
  10936. 'type' => 'boolean',
  10937. 'not null' => '',
  10938. ),
  10939. 'nend' => array(
  10940. // 'description' => 'TODO: please describe this field!',
  10941. 'type' => 'int',
  10942. 'not null' => '',
  10943. ),
  10944. 'is_nend_partial' => array(
  10945. // 'description' => 'TODO: please describe this field!',
  10946. 'type' => 'boolean',
  10947. 'not null' => '',
  10948. ),
  10949. 'strand' => array(
  10950. // 'description' => 'TODO: please describe this field!',
  10951. 'type' => 'int',
  10952. 'size' => 'small',
  10953. 'not null' => '',
  10954. ),
  10955. 'phase' => array(
  10956. // 'description' => 'TODO: please describe this field!',
  10957. 'type' => 'int',
  10958. 'not null' => '',
  10959. ),
  10960. 'residue_info' => array(
  10961. // 'description' => 'TODO: please describe this field!',
  10962. 'type' => 'text',
  10963. 'not null' => '',
  10964. ),
  10965. 'locgroup' => array(
  10966. // 'description' => 'TODO: please describe this field!',
  10967. 'type' => 'int',
  10968. 'not null' => '',
  10969. ),
  10970. 'rank' => array(
  10971. // 'description' => 'TODO: please describe this field!',
  10972. 'type' => 'int',
  10973. 'not null' => '',
  10974. ),
  10975. ),
  10976. 'primary key' => array(
  10977. ),
  10978. 'unique keys' => array(
  10979. ),
  10980. 'indexes' => array(
  10981. ),
  10982. 'foreign keys' => array(
  10983. ),
  10984. );
  10985. return $description;
  10986. }
  10987. /**
  10988. * Implements hook_db_schema()
  10989. * Purpose: To describe the structure of db to tripal
  10990. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10991. * @see tripal_core.api.inc: tripal_core_chado_update()
  10992. * @see tripal_core.api.inc: tripal_core_chado_select()
  10993. *
  10994. * @return
  10995. * An array describing the current table
  10996. *
  10997. * @ingroup tripal_schema_api
  10998. *
  10999. */
  11000. function tripal_core_chado_db_schema () {
  11001. $description = array();
  11002. $description = array(
  11003. 'table' => 'db',
  11004. // 'description' => 'TODO: please describe this table!',
  11005. 'fields' => array(
  11006. 'db_id' => array(
  11007. // 'description' => 'TODO: please describe this field!',
  11008. 'type' => 'serial',
  11009. 'not null' => '1',
  11010. ),
  11011. 'name' => array(
  11012. // 'description' => 'TODO: please describe this field!',
  11013. 'type' => 'varchar',
  11014. 'length' => '255',
  11015. 'not null' => '1',
  11016. ),
  11017. 'description' => array(
  11018. // 'description' => 'TODO: please describe this field!',
  11019. 'type' => 'varchar',
  11020. 'length' => '255',
  11021. 'not null' => '',
  11022. ),
  11023. 'urlprefix' => array(
  11024. // 'description' => 'TODO: please describe this field!',
  11025. 'type' => 'varchar',
  11026. 'length' => '255',
  11027. 'not null' => '',
  11028. ),
  11029. 'url' => array(
  11030. // 'description' => 'TODO: please describe this field!',
  11031. 'type' => 'varchar',
  11032. 'length' => '255',
  11033. 'not null' => '',
  11034. ),
  11035. ),
  11036. 'primary key' => array(
  11037. '0' => 'db_id',
  11038. ),
  11039. 'unique keys' => array(
  11040. 'db_c1' => array(
  11041. '0' => 'name',
  11042. ),
  11043. ),
  11044. 'indexes' => array(
  11045. ),
  11046. 'foreign keys' => array(
  11047. ),
  11048. );
  11049. return $description;
  11050. }
  11051. /**
  11052. * Implements hook_cvtermsynonym_schema()
  11053. * Purpose: To describe the structure of cvtermsynonym to tripal
  11054. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11055. * @see tripal_core.api.inc: tripal_core_chado_update()
  11056. * @see tripal_core.api.inc: tripal_core_chado_select()
  11057. *
  11058. * @return
  11059. * An array describing the current table
  11060. *
  11061. * @ingroup tripal_schema_api
  11062. *
  11063. */
  11064. function tripal_core_chado_cvtermsynonym_schema () {
  11065. $description = array();
  11066. $description = array(
  11067. 'table' => 'cvtermsynonym',
  11068. // 'description' => 'TODO: please describe this table!',
  11069. 'fields' => array(
  11070. 'cvtermsynonym_id' => array(
  11071. // 'description' => 'TODO: please describe this field!',
  11072. 'type' => 'serial',
  11073. 'not null' => '1',
  11074. ),
  11075. 'cvterm_id' => array(
  11076. // 'description' => 'TODO: please describe this field!',
  11077. 'type' => 'int',
  11078. 'not null' => '1',
  11079. ),
  11080. 'synonym' => array(
  11081. // 'description' => 'TODO: please describe this field!',
  11082. 'type' => 'varchar',
  11083. 'length' => '1024',
  11084. 'not null' => '1',
  11085. ),
  11086. 'type_id' => array(
  11087. // 'description' => 'TODO: please describe this field!',
  11088. 'type' => 'int',
  11089. 'not null' => '',
  11090. ),
  11091. ),
  11092. 'primary key' => array(
  11093. '0' => 'cvtermsynonym_id',
  11094. ),
  11095. 'unique keys' => array(
  11096. 'cvtermsynonym_c1' => array(
  11097. '0' => 'cvterm_id',
  11098. '1' => 'synonym',
  11099. ),
  11100. ),
  11101. 'indexes' => array(
  11102. 'cvtermsynonym_idx1' => array(
  11103. '0' => 'cvterm_id',
  11104. ),
  11105. ),
  11106. 'foreign keys' => array(
  11107. ),
  11108. );
  11109. return $description;
  11110. }
  11111. /**
  11112. * Implements hook_cvterm_dbxref_schema()
  11113. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11114. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11115. * @see tripal_core.api.inc: tripal_core_chado_update()
  11116. * @see tripal_core.api.inc: tripal_core_chado_select()
  11117. *
  11118. * @return
  11119. * An array describing the current table
  11120. *
  11121. * @ingroup tripal_schema_api
  11122. *
  11123. */
  11124. function tripal_core_chado_cvterm_dbxref_schema () {
  11125. $description = array();
  11126. $description = array(
  11127. 'table' => 'cvterm_dbxref',
  11128. // 'description' => 'TODO: please describe this table!',
  11129. 'fields' => array(
  11130. 'cvterm_dbxref_id' => array(
  11131. // 'description' => 'TODO: please describe this field!',
  11132. 'type' => 'serial',
  11133. 'not null' => '1',
  11134. ),
  11135. 'cvterm_id' => array(
  11136. // 'description' => 'TODO: please describe this field!',
  11137. 'type' => 'int',
  11138. 'not null' => '1',
  11139. ),
  11140. 'dbxref_id' => array(
  11141. // 'description' => 'TODO: please describe this field!',
  11142. 'type' => 'int',
  11143. 'not null' => '1',
  11144. ),
  11145. 'is_for_definition' => array(
  11146. // 'description' => 'TODO: please describe this field!',
  11147. 'type' => 'int',
  11148. 'not null' => '1',
  11149. 'default' => '0',
  11150. ),
  11151. ),
  11152. 'primary key' => array(
  11153. '0' => 'cvterm_dbxref_id',
  11154. ),
  11155. 'unique keys' => array(
  11156. 'cvterm_dbxref_c1' => array(
  11157. '0' => 'cvterm_id',
  11158. '1' => 'dbxref_id',
  11159. ),
  11160. ),
  11161. 'indexes' => array(
  11162. 'cvterm_dbxref_idx1' => array(
  11163. '0' => 'cvterm_id',
  11164. ),
  11165. 'cvterm_dbxref_idx2' => array(
  11166. '0' => 'dbxref_id',
  11167. ),
  11168. ),
  11169. 'foreign keys' => array(
  11170. ),
  11171. );
  11172. return $description;
  11173. }
  11174. /**
  11175. * Implements hook_cvterm_relationship_schema()
  11176. * Purpose: To describe the structure of cvterm_relationship to tripal
  11177. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11178. * @see tripal_core.api.inc: tripal_core_chado_update()
  11179. * @see tripal_core.api.inc: tripal_core_chado_select()
  11180. *
  11181. * @return
  11182. * An array describing the current table
  11183. *
  11184. * @ingroup tripal_schema_api
  11185. *
  11186. */
  11187. function tripal_core_chado_cvterm_relationship_schema () {
  11188. $description = array();
  11189. $description = array(
  11190. 'table' => 'cvterm_relationship',
  11191. // 'description' => 'TODO: please describe this table!',
  11192. 'fields' => array(
  11193. 'cvterm_relationship_id' => array(
  11194. // 'description' => 'TODO: please describe this field!',
  11195. 'type' => 'serial',
  11196. 'not null' => '1',
  11197. ),
  11198. 'type_id' => array(
  11199. // 'description' => 'TODO: please describe this field!',
  11200. 'type' => 'int',
  11201. 'not null' => '1',
  11202. ),
  11203. 'subject_id' => array(
  11204. // 'description' => 'TODO: please describe this field!',
  11205. 'type' => 'int',
  11206. 'not null' => '1',
  11207. ),
  11208. 'object_id' => array(
  11209. // 'description' => 'TODO: please describe this field!',
  11210. 'type' => 'int',
  11211. 'not null' => '1',
  11212. ),
  11213. ),
  11214. 'primary key' => array(
  11215. '0' => 'cvterm_relationship_id',
  11216. ),
  11217. 'unique keys' => array(
  11218. 'cvterm_relationship_c1' => array(
  11219. '0' => 'subject_id',
  11220. '1' => 'object_id',
  11221. '2' => 'type_id',
  11222. ),
  11223. ),
  11224. 'indexes' => array(
  11225. 'cvterm_relationship_idx1' => array(
  11226. '0' => 'type_id',
  11227. ),
  11228. 'cvterm_relationship_idx2' => array(
  11229. '0' => 'subject_id',
  11230. ),
  11231. 'cvterm_relationship_idx3' => array(
  11232. '0' => 'object_id',
  11233. ),
  11234. ),
  11235. 'foreign keys' => array(
  11236. ),
  11237. );
  11238. return $description;
  11239. }
  11240. /**
  11241. * Implements hook_cvtermpath_schema()
  11242. * Purpose: To describe the structure of cvtermpath to tripal
  11243. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11244. * @see tripal_core.api.inc: tripal_core_chado_update()
  11245. * @see tripal_core.api.inc: tripal_core_chado_select()
  11246. *
  11247. * @return
  11248. * An array describing the current table
  11249. *
  11250. * @ingroup tripal_schema_api
  11251. *
  11252. */
  11253. function tripal_core_chado_cvtermpath_schema () {
  11254. $description = array();
  11255. $description = array(
  11256. 'table' => 'cvtermpath',
  11257. // 'description' => 'TODO: please describe this table!',
  11258. 'fields' => array(
  11259. 'cvtermpath_id' => array(
  11260. // 'description' => 'TODO: please describe this field!',
  11261. 'type' => 'serial',
  11262. 'not null' => '1',
  11263. ),
  11264. 'type_id' => array(
  11265. // 'description' => 'TODO: please describe this field!',
  11266. 'type' => 'int',
  11267. 'not null' => '',
  11268. ),
  11269. 'subject_id' => array(
  11270. // 'description' => 'TODO: please describe this field!',
  11271. 'type' => 'int',
  11272. 'not null' => '1',
  11273. ),
  11274. 'object_id' => array(
  11275. // 'description' => 'TODO: please describe this field!',
  11276. 'type' => 'int',
  11277. 'not null' => '1',
  11278. ),
  11279. 'cv_id' => array(
  11280. // 'description' => 'TODO: please describe this field!',
  11281. 'type' => 'int',
  11282. 'not null' => '1',
  11283. ),
  11284. 'pathdistance' => array(
  11285. // 'description' => 'TODO: please describe this field!',
  11286. 'type' => 'int',
  11287. 'not null' => '',
  11288. ),
  11289. ),
  11290. 'primary key' => array(
  11291. '0' => 'cvtermpath_id',
  11292. ),
  11293. 'unique keys' => array(
  11294. 'cvtermpath_c1' => array(
  11295. '0' => 'subject_id',
  11296. '1' => 'object_id',
  11297. '2' => 'type_id',
  11298. '3' => 'pathdistance',
  11299. ),
  11300. ),
  11301. 'indexes' => array(
  11302. 'cvtermpath_idx1' => array(
  11303. '0' => 'type_id',
  11304. ),
  11305. 'cvtermpath_idx2' => array(
  11306. '0' => 'subject_id',
  11307. ),
  11308. 'cvtermpath_idx3' => array(
  11309. '0' => 'object_id',
  11310. ),
  11311. 'cvtermpath_idx4' => array(
  11312. '0' => 'cv_id',
  11313. ),
  11314. ),
  11315. 'foreign keys' => array(
  11316. ),
  11317. );
  11318. return $description;
  11319. }
  11320. /**
  11321. * Implements hook_cvtermprop_schema()
  11322. * Purpose: To describe the structure of cvtermprop to tripal
  11323. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11324. * @see tripal_core.api.inc: tripal_core_chado_update()
  11325. * @see tripal_core.api.inc: tripal_core_chado_select()
  11326. *
  11327. * @return
  11328. * An array describing the current table
  11329. *
  11330. * @ingroup tripal_schema_api
  11331. *
  11332. */
  11333. function tripal_core_chado_cvtermprop_schema () {
  11334. $description = array();
  11335. $description = array(
  11336. 'table' => 'cvtermprop',
  11337. // 'description' => 'TODO: please describe this table!',
  11338. 'fields' => array(
  11339. 'cvtermprop_id' => array(
  11340. // 'description' => 'TODO: please describe this field!',
  11341. 'type' => 'serial',
  11342. 'not null' => '1',
  11343. ),
  11344. 'cvterm_id' => array(
  11345. // 'description' => 'TODO: please describe this field!',
  11346. 'type' => 'int',
  11347. 'not null' => '1',
  11348. ),
  11349. 'type_id' => array(
  11350. // 'description' => 'TODO: please describe this field!',
  11351. 'type' => 'int',
  11352. 'not null' => '1',
  11353. ),
  11354. 'value' => array(
  11355. // 'description' => 'TODO: please describe this field!',
  11356. 'type' => 'text',
  11357. 'not null' => '1',
  11358. 'default' => '',
  11359. ),
  11360. 'rank' => array(
  11361. // 'description' => 'TODO: please describe this field!',
  11362. 'type' => 'int',
  11363. 'not null' => '1',
  11364. 'default' => '0',
  11365. ),
  11366. ),
  11367. 'primary key' => array(
  11368. '0' => 'cvtermprop_id',
  11369. ),
  11370. 'unique keys' => array(
  11371. 'cvterm_id' => array(
  11372. '0' => 'cvterm_id',
  11373. '1' => 'type_id',
  11374. '2' => 'value',
  11375. '3' => 'rank',
  11376. ),
  11377. ),
  11378. 'indexes' => array(
  11379. 'cvtermprop_idx1' => array(
  11380. '0' => 'cvterm_id',
  11381. ),
  11382. 'cvtermprop_idx2' => array(
  11383. '0' => 'type_id',
  11384. ),
  11385. ),
  11386. 'foreign keys' => array(
  11387. ),
  11388. );
  11389. return $description;
  11390. }
  11391. /**
  11392. * Implements hook_eimage_schema()
  11393. * Purpose: To describe the structure of eimage to tripal
  11394. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11395. * @see tripal_core.api.inc: tripal_core_chado_update()
  11396. * @see tripal_core.api.inc: tripal_core_chado_select()
  11397. *
  11398. * @return
  11399. * An array describing the current table
  11400. *
  11401. * @ingroup tripal_schema_api
  11402. *
  11403. */
  11404. function tripal_core_chado_eimage_schema () {
  11405. $description = array();
  11406. $description = array(
  11407. 'table' => 'eimage',
  11408. // 'description' => 'TODO: please describe this table!',
  11409. 'fields' => array(
  11410. 'eimage_id' => array(
  11411. // 'description' => 'TODO: please describe this field!',
  11412. 'type' => 'serial',
  11413. 'not null' => '1',
  11414. ),
  11415. 'eimage_data' => array(
  11416. // 'description' => 'TODO: please describe this field!',
  11417. 'type' => 'text',
  11418. 'not null' => '',
  11419. ),
  11420. 'eimage_type' => array(
  11421. // 'description' => 'TODO: please describe this field!',
  11422. 'type' => 'varchar',
  11423. 'length' => '255',
  11424. 'not null' => '1',
  11425. ),
  11426. 'image_uri' => array(
  11427. // 'description' => 'TODO: please describe this field!',
  11428. 'type' => 'varchar',
  11429. 'length' => '255',
  11430. 'not null' => '',
  11431. ),
  11432. ),
  11433. 'primary key' => array(
  11434. '0' => 'eimage_id',
  11435. ),
  11436. 'unique keys' => array(
  11437. ),
  11438. 'indexes' => array(
  11439. ),
  11440. 'foreign keys' => array(
  11441. ),
  11442. );
  11443. return $description;
  11444. }
  11445. /**
  11446. * Implements hook_element_schema()
  11447. * Purpose: To describe the structure of element to tripal
  11448. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11449. * @see tripal_core.api.inc: tripal_core_chado_update()
  11450. * @see tripal_core.api.inc: tripal_core_chado_select()
  11451. *
  11452. * @return
  11453. * An array describing the current table
  11454. *
  11455. * @ingroup tripal_schema_api
  11456. *
  11457. */
  11458. function tripal_core_chado_element_schema () {
  11459. $description = array();
  11460. $description = array(
  11461. 'table' => 'element',
  11462. // 'description' => 'TODO: please describe this table!',
  11463. 'fields' => array(
  11464. 'element_id' => array(
  11465. // 'description' => 'TODO: please describe this field!',
  11466. 'type' => 'serial',
  11467. 'not null' => '1',
  11468. ),
  11469. 'feature_id' => array(
  11470. // 'description' => 'TODO: please describe this field!',
  11471. 'type' => 'int',
  11472. 'not null' => '',
  11473. ),
  11474. 'arraydesign_id' => array(
  11475. // 'description' => 'TODO: please describe this field!',
  11476. 'type' => 'int',
  11477. 'not null' => '1',
  11478. ),
  11479. 'type_id' => array(
  11480. // 'description' => 'TODO: please describe this field!',
  11481. 'type' => 'int',
  11482. 'not null' => '',
  11483. ),
  11484. 'dbxref_id' => array(
  11485. // 'description' => 'TODO: please describe this field!',
  11486. 'type' => 'int',
  11487. 'not null' => '',
  11488. ),
  11489. ),
  11490. 'primary key' => array(
  11491. '0' => 'element_id',
  11492. ),
  11493. 'unique keys' => array(
  11494. 'element_c1' => array(
  11495. '0' => 'feature_id',
  11496. '1' => 'arraydesign_id',
  11497. ),
  11498. ),
  11499. 'indexes' => array(
  11500. 'element_idx1' => array(
  11501. '0' => 'feature_id',
  11502. ),
  11503. 'element_idx2' => array(
  11504. '0' => 'arraydesign_id',
  11505. ),
  11506. 'element_idx3' => array(
  11507. '0' => 'type_id',
  11508. ),
  11509. 'element_idx4' => array(
  11510. '0' => 'dbxref_id',
  11511. ),
  11512. ),
  11513. 'foreign keys' => array(
  11514. ),
  11515. );
  11516. return $description;
  11517. }
  11518. /**
  11519. * Implements hook_expression_cvterm_schema()
  11520. * Purpose: To describe the structure of expression_cvterm to tripal
  11521. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11522. * @see tripal_core.api.inc: tripal_core_chado_update()
  11523. * @see tripal_core.api.inc: tripal_core_chado_select()
  11524. *
  11525. * @return
  11526. * An array describing the current table
  11527. *
  11528. * @ingroup tripal_schema_api
  11529. *
  11530. */
  11531. function tripal_core_chado_expression_cvterm_schema () {
  11532. $description = array();
  11533. $description = array(
  11534. 'table' => 'expression_cvterm',
  11535. // 'description' => 'TODO: please describe this table!',
  11536. 'fields' => array(
  11537. 'expression_cvterm_id' => array(
  11538. // 'description' => 'TODO: please describe this field!',
  11539. 'type' => 'serial',
  11540. 'not null' => '1',
  11541. ),
  11542. 'expression_id' => array(
  11543. // 'description' => 'TODO: please describe this field!',
  11544. 'type' => 'int',
  11545. 'not null' => '1',
  11546. ),
  11547. 'cvterm_id' => array(
  11548. // 'description' => 'TODO: please describe this field!',
  11549. 'type' => 'int',
  11550. 'not null' => '1',
  11551. ),
  11552. 'rank' => array(
  11553. // 'description' => 'TODO: please describe this field!',
  11554. 'type' => 'int',
  11555. 'not null' => '1',
  11556. 'default' => '0',
  11557. ),
  11558. 'cvterm_type_id' => array(
  11559. // 'description' => 'TODO: please describe this field!',
  11560. 'type' => 'int',
  11561. 'not null' => '1',
  11562. ),
  11563. ),
  11564. 'primary key' => array(
  11565. '0' => 'expression_cvterm_id',
  11566. ),
  11567. 'unique keys' => array(
  11568. 'expression_cvterm_c1' => array(
  11569. '0' => 'expression_id',
  11570. '1' => 'cvterm_id',
  11571. '2' => 'cvterm_type_id',
  11572. ),
  11573. ),
  11574. 'indexes' => array(
  11575. 'expression_cvterm_idx1' => array(
  11576. '0' => 'expression_id',
  11577. ),
  11578. 'expression_cvterm_idx2' => array(
  11579. '0' => 'cvterm_id',
  11580. ),
  11581. 'expression_cvterm_idx3' => array(
  11582. '0' => 'cvterm_type_id',
  11583. ),
  11584. ),
  11585. 'foreign keys' => array(
  11586. ),
  11587. );
  11588. return $description;
  11589. }
  11590. /**
  11591. * Implements hook_expression_cvtermprop_schema()
  11592. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11593. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11594. * @see tripal_core.api.inc: tripal_core_chado_update()
  11595. * @see tripal_core.api.inc: tripal_core_chado_select()
  11596. *
  11597. * @return
  11598. * An array describing the current table
  11599. *
  11600. * @ingroup tripal_schema_api
  11601. *
  11602. */
  11603. function tripal_core_chado_expression_cvtermprop_schema () {
  11604. $description = array();
  11605. $description = array(
  11606. 'table' => 'expression_cvtermprop',
  11607. // 'description' => 'TODO: please describe this table!',
  11608. 'fields' => array(
  11609. 'expression_cvtermprop_id' => array(
  11610. // 'description' => 'TODO: please describe this field!',
  11611. 'type' => 'serial',
  11612. 'not null' => '1',
  11613. ),
  11614. 'expression_cvterm_id' => array(
  11615. // 'description' => 'TODO: please describe this field!',
  11616. 'type' => 'int',
  11617. 'not null' => '1',
  11618. ),
  11619. 'type_id' => array(
  11620. // 'description' => 'TODO: please describe this field!',
  11621. 'type' => 'int',
  11622. 'not null' => '1',
  11623. ),
  11624. 'value' => array(
  11625. // 'description' => 'TODO: please describe this field!',
  11626. 'type' => 'text',
  11627. 'not null' => '',
  11628. ),
  11629. 'rank' => array(
  11630. // 'description' => 'TODO: please describe this field!',
  11631. 'type' => 'int',
  11632. 'not null' => '1',
  11633. 'default' => '0',
  11634. ),
  11635. ),
  11636. 'primary key' => array(
  11637. '0' => 'expression_cvtermprop_id',
  11638. ),
  11639. 'unique keys' => array(
  11640. 'expression_cvtermprop_c1' => array(
  11641. '0' => 'expression_cvterm_id',
  11642. '1' => 'type_id',
  11643. '2' => 'rank',
  11644. ),
  11645. ),
  11646. 'indexes' => array(
  11647. 'expression_cvtermprop_idx1' => array(
  11648. '0' => 'expression_cvterm_id',
  11649. ),
  11650. 'expression_cvtermprop_idx2' => array(
  11651. '0' => 'type_id',
  11652. ),
  11653. ),
  11654. 'foreign keys' => array(
  11655. ),
  11656. );
  11657. return $description;
  11658. }
  11659. /**
  11660. * Implements hook_expression_image_schema()
  11661. * Purpose: To describe the structure of expression_image to tripal
  11662. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11663. * @see tripal_core.api.inc: tripal_core_chado_update()
  11664. * @see tripal_core.api.inc: tripal_core_chado_select()
  11665. *
  11666. * @return
  11667. * An array describing the current table
  11668. *
  11669. * @ingroup tripal_schema_api
  11670. *
  11671. */
  11672. function tripal_core_chado_expression_image_schema () {
  11673. $description = array();
  11674. $description = array(
  11675. 'table' => 'expression_image',
  11676. // 'description' => 'TODO: please describe this table!',
  11677. 'fields' => array(
  11678. 'expression_image_id' => array(
  11679. // 'description' => 'TODO: please describe this field!',
  11680. 'type' => 'serial',
  11681. 'not null' => '1',
  11682. ),
  11683. 'expression_id' => array(
  11684. // 'description' => 'TODO: please describe this field!',
  11685. 'type' => 'int',
  11686. 'not null' => '1',
  11687. ),
  11688. 'eimage_id' => array(
  11689. // 'description' => 'TODO: please describe this field!',
  11690. 'type' => 'int',
  11691. 'not null' => '1',
  11692. ),
  11693. ),
  11694. 'primary key' => array(
  11695. '0' => 'expression_image_id',
  11696. ),
  11697. 'unique keys' => array(
  11698. 'expression_image_c1' => array(
  11699. '0' => 'expression_id',
  11700. '1' => 'eimage_id',
  11701. ),
  11702. ),
  11703. 'indexes' => array(
  11704. 'expression_image_idx1' => array(
  11705. '0' => 'expression_id',
  11706. ),
  11707. 'expression_image_idx2' => array(
  11708. '0' => 'eimage_id',
  11709. ),
  11710. ),
  11711. 'foreign keys' => array(
  11712. ),
  11713. );
  11714. return $description;
  11715. }
  11716. /**
  11717. * Implements hook_expression_pub_schema()
  11718. * Purpose: To describe the structure of expression_pub to tripal
  11719. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11720. * @see tripal_core.api.inc: tripal_core_chado_update()
  11721. * @see tripal_core.api.inc: tripal_core_chado_select()
  11722. *
  11723. * @return
  11724. * An array describing the current table
  11725. *
  11726. * @ingroup tripal_schema_api
  11727. *
  11728. */
  11729. function tripal_core_chado_expression_pub_schema () {
  11730. $description = array();
  11731. $description = array(
  11732. 'table' => 'expression_pub',
  11733. // 'description' => 'TODO: please describe this table!',
  11734. 'fields' => array(
  11735. 'expression_pub_id' => array(
  11736. // 'description' => 'TODO: please describe this field!',
  11737. 'type' => 'serial',
  11738. 'not null' => '1',
  11739. ),
  11740. 'expression_id' => array(
  11741. // 'description' => 'TODO: please describe this field!',
  11742. 'type' => 'int',
  11743. 'not null' => '1',
  11744. ),
  11745. 'pub_id' => array(
  11746. // 'description' => 'TODO: please describe this field!',
  11747. 'type' => 'int',
  11748. 'not null' => '1',
  11749. ),
  11750. ),
  11751. 'primary key' => array(
  11752. '0' => 'expression_pub_id',
  11753. ),
  11754. 'unique keys' => array(
  11755. 'expression_pub_c1' => array(
  11756. '0' => 'expression_id',
  11757. '1' => 'pub_id',
  11758. ),
  11759. ),
  11760. 'indexes' => array(
  11761. 'expression_pub_idx1' => array(
  11762. '0' => 'expression_id',
  11763. ),
  11764. 'expression_pub_idx2' => array(
  11765. '0' => 'pub_id',
  11766. ),
  11767. ),
  11768. 'foreign keys' => array(
  11769. ),
  11770. );
  11771. return $description;
  11772. }
  11773. /**
  11774. * Implements hook_expression_schema()
  11775. * Purpose: To describe the structure of expression to tripal
  11776. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11777. * @see tripal_core.api.inc: tripal_core_chado_update()
  11778. * @see tripal_core.api.inc: tripal_core_chado_select()
  11779. *
  11780. * @return
  11781. * An array describing the current table
  11782. *
  11783. * @ingroup tripal_schema_api
  11784. *
  11785. */
  11786. function tripal_core_chado_expression_schema () {
  11787. $description = array();
  11788. $description = array(
  11789. 'table' => 'expression',
  11790. // 'description' => 'TODO: please describe this table!',
  11791. 'fields' => array(
  11792. 'expression_id' => array(
  11793. // 'description' => 'TODO: please describe this field!',
  11794. 'type' => 'serial',
  11795. 'not null' => '1',
  11796. ),
  11797. 'uniquename' => array(
  11798. // 'description' => 'TODO: please describe this field!',
  11799. 'type' => 'text',
  11800. 'not null' => '1',
  11801. ),
  11802. 'md5checksum' => array(
  11803. // 'description' => 'TODO: please describe this field!',
  11804. 'type' => 'char',
  11805. 'length' => '32',
  11806. 'not null' => '',
  11807. ),
  11808. 'description' => array(
  11809. // 'description' => 'TODO: please describe this field!',
  11810. 'type' => 'text',
  11811. 'not null' => '',
  11812. ),
  11813. ),
  11814. 'primary key' => array(
  11815. '0' => 'expression_id',
  11816. ),
  11817. 'unique keys' => array(
  11818. 'expression_c1' => array(
  11819. '0' => 'uniquename',
  11820. ),
  11821. ),
  11822. 'indexes' => array(
  11823. ),
  11824. 'foreign keys' => array(
  11825. ),
  11826. );
  11827. return $description;
  11828. }
  11829. /**
  11830. * Implements hook_environment_cvterm_schema()
  11831. * Purpose: To describe the structure of environment_cvterm to tripal
  11832. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11833. * @see tripal_core.api.inc: tripal_core_chado_update()
  11834. * @see tripal_core.api.inc: tripal_core_chado_select()
  11835. *
  11836. * @return
  11837. * An array describing the current table
  11838. *
  11839. * @ingroup tripal_schema_api
  11840. *
  11841. */
  11842. function tripal_core_chado_environment_cvterm_schema () {
  11843. $description = array();
  11844. $description = array(
  11845. 'table' => 'environment_cvterm',
  11846. // 'description' => 'TODO: please describe this table!',
  11847. 'fields' => array(
  11848. 'environment_cvterm_id' => array(
  11849. // 'description' => 'TODO: please describe this field!',
  11850. 'type' => 'serial',
  11851. 'not null' => '1',
  11852. ),
  11853. 'environment_id' => array(
  11854. // 'description' => 'TODO: please describe this field!',
  11855. 'type' => 'int',
  11856. 'not null' => '1',
  11857. ),
  11858. 'cvterm_id' => array(
  11859. // 'description' => 'TODO: please describe this field!',
  11860. 'type' => 'int',
  11861. 'not null' => '1',
  11862. ),
  11863. ),
  11864. 'primary key' => array(
  11865. '0' => 'environment_cvterm_id',
  11866. ),
  11867. 'unique keys' => array(
  11868. 'environment_cvterm_c1' => array(
  11869. '0' => 'environment_id',
  11870. '1' => 'cvterm_id',
  11871. ),
  11872. ),
  11873. 'indexes' => array(
  11874. 'environment_cvterm_idx1' => array(
  11875. '0' => 'environment_id',
  11876. ),
  11877. 'environment_cvterm_idx2' => array(
  11878. '0' => 'cvterm_id',
  11879. ),
  11880. ),
  11881. 'foreign keys' => array(
  11882. ),
  11883. );
  11884. return $description;
  11885. }
  11886. /**
  11887. * Implements hook_element_relationship_schema()
  11888. * Purpose: To describe the structure of element_relationship to tripal
  11889. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11890. * @see tripal_core.api.inc: tripal_core_chado_update()
  11891. * @see tripal_core.api.inc: tripal_core_chado_select()
  11892. *
  11893. * @return
  11894. * An array describing the current table
  11895. *
  11896. * @ingroup tripal_schema_api
  11897. *
  11898. */
  11899. function tripal_core_chado_element_relationship_schema () {
  11900. $description = array();
  11901. $description = array(
  11902. 'table' => 'element_relationship',
  11903. // 'description' => 'TODO: please describe this table!',
  11904. 'fields' => array(
  11905. 'element_relationship_id' => array(
  11906. // 'description' => 'TODO: please describe this field!',
  11907. 'type' => 'serial',
  11908. 'not null' => '1',
  11909. ),
  11910. 'subject_id' => array(
  11911. // 'description' => 'TODO: please describe this field!',
  11912. 'type' => 'int',
  11913. 'not null' => '1',
  11914. ),
  11915. 'type_id' => array(
  11916. // 'description' => 'TODO: please describe this field!',
  11917. 'type' => 'int',
  11918. 'not null' => '1',
  11919. ),
  11920. 'object_id' => array(
  11921. // 'description' => 'TODO: please describe this field!',
  11922. 'type' => 'int',
  11923. 'not null' => '1',
  11924. ),
  11925. 'value' => array(
  11926. // 'description' => 'TODO: please describe this field!',
  11927. 'type' => 'text',
  11928. 'not null' => '',
  11929. ),
  11930. 'rank' => array(
  11931. // 'description' => 'TODO: please describe this field!',
  11932. 'type' => 'int',
  11933. 'not null' => '1',
  11934. 'default' => '0',
  11935. ),
  11936. ),
  11937. 'primary key' => array(
  11938. '0' => 'element_relationship_id',
  11939. ),
  11940. 'unique keys' => array(
  11941. 'element_relationship_c1' => array(
  11942. '0' => 'subject_id',
  11943. '1' => 'object_id',
  11944. '2' => 'type_id',
  11945. '3' => 'rank',
  11946. ),
  11947. ),
  11948. 'indexes' => array(
  11949. 'element_relationship_idx1' => array(
  11950. '0' => 'subject_id',
  11951. ),
  11952. 'element_relationship_idx2' => array(
  11953. '0' => 'type_id',
  11954. ),
  11955. 'element_relationship_idx3' => array(
  11956. '0' => 'object_id',
  11957. ),
  11958. 'element_relationship_idx4' => array(
  11959. '0' => 'value',
  11960. ),
  11961. ),
  11962. 'foreign keys' => array(
  11963. ),
  11964. );
  11965. return $description;
  11966. }
  11967. /**
  11968. * Implements hook_elementresult_schema()
  11969. * Purpose: To describe the structure of elementresult to tripal
  11970. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11971. * @see tripal_core.api.inc: tripal_core_chado_update()
  11972. * @see tripal_core.api.inc: tripal_core_chado_select()
  11973. *
  11974. * @return
  11975. * An array describing the current table
  11976. *
  11977. * @ingroup tripal_schema_api
  11978. *
  11979. */
  11980. function tripal_core_chado_elementresult_schema () {
  11981. $description = array();
  11982. $description = array(
  11983. 'table' => 'elementresult',
  11984. // 'description' => 'TODO: please describe this table!',
  11985. 'fields' => array(
  11986. 'elementresult_id' => array(
  11987. // 'description' => 'TODO: please describe this field!',
  11988. 'type' => 'serial',
  11989. 'not null' => '1',
  11990. ),
  11991. 'element_id' => array(
  11992. // 'description' => 'TODO: please describe this field!',
  11993. 'type' => 'int',
  11994. 'not null' => '1',
  11995. ),
  11996. 'quantification_id' => array(
  11997. // 'description' => 'TODO: please describe this field!',
  11998. 'type' => 'int',
  11999. 'not null' => '1',
  12000. ),
  12001. 'signal' => array(
  12002. // 'description' => 'TODO: please describe this field!',
  12003. 'type' => 'float',
  12004. 'size' => 'big',
  12005. 'not null' => '1',
  12006. ),
  12007. ),
  12008. 'primary key' => array(
  12009. '0' => 'elementresult_id',
  12010. ),
  12011. 'unique keys' => array(
  12012. 'elementresult_c1' => array(
  12013. '0' => 'element_id',
  12014. '1' => 'quantification_id',
  12015. ),
  12016. ),
  12017. 'indexes' => array(
  12018. 'elementresult_idx1' => array(
  12019. '0' => 'element_id',
  12020. ),
  12021. 'elementresult_idx2' => array(
  12022. '0' => 'quantification_id',
  12023. ),
  12024. 'elementresult_idx3' => array(
  12025. '0' => 'signal',
  12026. ),
  12027. ),
  12028. 'foreign keys' => array(
  12029. ),
  12030. );
  12031. return $description;
  12032. }
  12033. /**
  12034. * Implements hook_elementresult_relationship_schema()
  12035. * Purpose: To describe the structure of elementresult_relationship to tripal
  12036. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12037. * @see tripal_core.api.inc: tripal_core_chado_update()
  12038. * @see tripal_core.api.inc: tripal_core_chado_select()
  12039. *
  12040. * @return
  12041. * An array describing the current table
  12042. *
  12043. * @ingroup tripal_schema_api
  12044. *
  12045. */
  12046. function tripal_core_chado_elementresult_relationship_schema () {
  12047. $description = array();
  12048. $description = array(
  12049. 'table' => 'elementresult_relationship',
  12050. // 'description' => 'TODO: please describe this table!',
  12051. 'fields' => array(
  12052. 'elementresult_relationship_id' => array(
  12053. // 'description' => 'TODO: please describe this field!',
  12054. 'type' => 'serial',
  12055. 'not null' => '1',
  12056. ),
  12057. 'subject_id' => array(
  12058. // 'description' => 'TODO: please describe this field!',
  12059. 'type' => 'int',
  12060. 'not null' => '1',
  12061. ),
  12062. 'type_id' => array(
  12063. // 'description' => 'TODO: please describe this field!',
  12064. 'type' => 'int',
  12065. 'not null' => '1',
  12066. ),
  12067. 'object_id' => array(
  12068. // 'description' => 'TODO: please describe this field!',
  12069. 'type' => 'int',
  12070. 'not null' => '1',
  12071. ),
  12072. 'value' => array(
  12073. // 'description' => 'TODO: please describe this field!',
  12074. 'type' => 'text',
  12075. 'not null' => '',
  12076. ),
  12077. 'rank' => array(
  12078. // 'description' => 'TODO: please describe this field!',
  12079. 'type' => 'int',
  12080. 'not null' => '1',
  12081. 'default' => '0',
  12082. ),
  12083. ),
  12084. 'primary key' => array(
  12085. '0' => 'elementresult_relationship_id',
  12086. ),
  12087. 'unique keys' => array(
  12088. 'elementresult_relationship_c1' => array(
  12089. '0' => 'subject_id',
  12090. '1' => 'object_id',
  12091. '2' => 'type_id',
  12092. '3' => 'rank',
  12093. ),
  12094. ),
  12095. 'indexes' => array(
  12096. 'elementresult_relationship_idx1' => array(
  12097. '0' => 'subject_id',
  12098. ),
  12099. 'elementresult_relationship_idx2' => array(
  12100. '0' => 'type_id',
  12101. ),
  12102. 'elementresult_relationship_idx3' => array(
  12103. '0' => 'object_id',
  12104. ),
  12105. 'elementresult_relationship_idx4' => array(
  12106. '0' => 'value',
  12107. ),
  12108. ),
  12109. 'foreign keys' => array(
  12110. ),
  12111. );
  12112. return $description;
  12113. }
  12114. /**
  12115. * Implements hook_environment_schema()
  12116. * Purpose: To describe the structure of environment to tripal
  12117. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12118. * @see tripal_core.api.inc: tripal_core_chado_update()
  12119. * @see tripal_core.api.inc: tripal_core_chado_select()
  12120. *
  12121. * @return
  12122. * An array describing the current table
  12123. *
  12124. * @ingroup tripal_schema_api
  12125. *
  12126. */
  12127. function tripal_core_chado_environment_schema () {
  12128. $description = array();
  12129. $description = array(
  12130. 'table' => 'environment',
  12131. // 'description' => 'TODO: please describe this table!',
  12132. 'fields' => array(
  12133. 'environment_id' => array(
  12134. // 'description' => 'TODO: please describe this field!',
  12135. 'type' => 'serial',
  12136. 'not null' => '1',
  12137. ),
  12138. 'uniquename' => array(
  12139. // 'description' => 'TODO: please describe this field!',
  12140. 'type' => 'text',
  12141. 'not null' => '1',
  12142. ),
  12143. 'description' => array(
  12144. // 'description' => 'TODO: please describe this field!',
  12145. 'type' => 'text',
  12146. 'not null' => '',
  12147. ),
  12148. ),
  12149. 'primary key' => array(
  12150. '0' => 'environment_id',
  12151. ),
  12152. 'unique keys' => array(
  12153. 'environment_c1' => array(
  12154. '0' => 'uniquename',
  12155. ),
  12156. ),
  12157. 'indexes' => array(
  12158. 'environment_idx1' => array(
  12159. '0' => 'uniquename',
  12160. ),
  12161. ),
  12162. 'foreign keys' => array(
  12163. ),
  12164. );
  12165. return $description;
  12166. }