This is an archive of past discussions about Module:Infobox gene. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
This appears to be due to an edit I did for Tarsmf, alias BgeeDB, back in October. Looking at the code, I don't know enough Lua to figure out how to unwrap the Bgee link from around the bulleted list. Hopeful that Tarsmf will be able to fix this. P.I. Ellsworth - ed.put'r there14:22, 12 February 2022 (UTC)
Okay, the October edits that added Bgee have been removed until editor Tarsmf can test them further. And btw, the Linter errors have disappeared from those two articles. P.I. Ellsworth - ed.put'r there22:38, 12 February 2022 (UTC)
Bgee edit request from October 2021
Template-protected edit request on 13 October 2021
Changes to include gene expression calls via "expressed in" statements from Wikidata / Bgee database
The code below adds into the Wikipedia "infobox gene" the "expressed in" assertions of human genes available in Wikidata from the Bgee database (www.bgee.org) to the "RNA expression pattern" section in the infobox. These assertions per gene are at most the top 10 anatomic entities (tissues) where a gene is expressed.
Let us take as an example the WikidataRELN gene, the code below gets "expressed in" Wikidata property values and assign them to a "Bgee DB" row in the section "RNA expression pattern" of the infobox at Reelin gene.
Click on show in the "RNA expression pattern" section to see changes
Change: add new function to render Bgee DB "expressed in" data from Wikidata
--Get the render elements title, collapse option, collapsed anatomic entities, --and anatomic entity list for the Bgee gene expression rendering.p.renderBgeeExpression=function(expressed_in_tissues)--create list of expressed in anatomic entitieslocalbgee_title="Bgee"bgee_title="[https://bgee.org/ "..bgee_title.."]"localbgee_links=localNotApplicableStrlocalbgee_collapse="none"localbgee_default="Top expressed in"localsplit_bgee=mw.text.split(expressed_in_tissues,localSeparatorStr)localbgee_link_list={}localresultsfork,vinipairs(split_bgee)doifstring.match(v,'%w+')andv~=localNotApplicableStrthenbgee_link_list[#bgee_link_list+1]="\n* "..vendend--if less than 11 don't create collapsible listiftable.getn(bgee_link_list)<11thenifbgee_default==nilandtable.getn(bgee_link_list)==0thenbgee_links=localNotApplicableStrendelsebgee_collapse="collapsible collapsed"bgee_default=bgee_default..'<br>'..table.remove(bgee_link_list,1)..'<br>'..table.remove(bgee_link_list,1)..'<br>'..table.remove(bgee_link_list,1)..'<br>'..table.remove(bgee_link_list,1)..'<br>'..table.remove(bgee_link_list,1)..'<br>'--get first 5 elements in table and use for displayendifbgee_link_list[#bgee_link_list]thenbgee_links=table.concat(bgee_link_list,"<br>")endresults={bgee_title,bgee_collapse,bgee_default,bgee_links}returnresultsend
Change: add Bgee database to the RNA expression render function
This function should replace the current one starting at line 1104.
CHANGE
To editor Paine Ellsworth:Thank you all very much for noticing the ambiguity issue. To avoid any kind of ambiguity I have removed the links to Wikipedia pages. Is it okay for you? Thanks for taking care! Tarsmf (talk) 07:34, 25 October 2021 (UTC)
Wish I knew more detail about LUA, but if we have your assurance that the sandbox code has been improved and will not load dab pages with a lot of article links, then yes I'm okay with it. So to be clear, you're saying that the sandbox code is ready to go? P.I. Ellsworth - ed.put'r there09:45, 25 October 2021 (UTC)
To editor Paine Ellsworth: and To editor Jonesey95: Thanks for reporting the issues. I have corrected them, please let me know if there is any other concern. The latest code is available in the sandbox at Module:Infobox gene/sandbox and tested with the reported examples at Module talk:Infobox gene/testcases. Sorry for not being able to correct it promptly, I have just seen this bug report today (I have to check why I am not receiving email notifications from Wikipedia). Tarsmf (talk) 16:48, 18 February 2022 (UTC)