Loading AI tools
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. |
Archive 1 | Archive 2 |
The rendering of bgee_default is broken at SPI1. Something in the logic is creating a URL link that attempts to wrap around a five-element bulleted list. This problem is also observable at Allograft inflammatory factor 1. – Jonesey95 (talk) 17:42, 11 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 databaseThe 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. The code is available in the sandbox at https://en.wikipedia.org/wiki/Module:Infobox_gene/sandbox and tested in https://en.wikipedia.org/w/index.php?title=Module_talk:Infobox_gene/testcases infobox gene testcase talk.
BgeeDB (talk) 14:13, 13 October 2021 (UTC)
References
|
To make it a little easier for editor Tarsmf the October edit request has been included above in the collapsed section. P.I. Ellsworth - ed. put'r there 22:56, 12 February 2022 (UTC)
To editor Tarsmf: the Bgee code has been re-added to Module:Infobox gene/sandbox and the SPI1 & AIF1 infoboxes have been set up as test cases at Module talk:Infobox gene/testcases so you can see what was happening in the "RNA expression pattern" sections of the iboxes. P.I. Ellsworth - ed. put'r there 05:33, 14 February 2022 (UTC)
To editors Tarsmf and Jonesey95: looks like this has been repaired, so the Bgee edits have been reinstated in this template. Testing should continue so that any future anomalies will be quickly fixed. P.I. Ellsworth - ed. put'r there 00:47, 20 February 2022 (UTC)
A few articles (examples: C2orf16, MKKS) are showing: "Lua error in Module:Infobox_gene at line 1153: attempt to concatenate local 'ensembl_id' (a nil value)."
That is because line 1150 is:
local ensembl_id = string.match(ensembl,"%a+%d+")
but the pattern was not found so nil
was returned. Line 167 set ensembl:
local ensembl = check_values(p.getValue, {entity, "P594", localNotApplicableStr})
That's probably because MKKS (Q18032762) has no Ensembl gene ID (P594) entry. At any rate, if there is a default ensembl value that would help, it could easily be added by appending or "WHATEVER"
to line 167.
By the way, the module has 18 global variables due to missing "local". I could fix them if wanted as they are undesirable. Johnuniq (talk) 02:57, 20 February 2022 (UTC)
The sandbox works better at the two articles cited, C2orf16 & MKKS. Question is, what might be broken elsewhere? Sandbox seems to be okay at the AIF1 article as well, which is curious as to why it gives the Lua error on the test cases page, but not in the article? P.I. Ellsworth - ed. put'r there 09:55, 20 February 2022 (UTC)
I've done some more cleaning in Module:Infobox gene/sandbox. Please let me know if anyone really likes how it was before but I think the whitespace changes accord with how most modules are written.
I mentioned that global variables are a problem. As an example, search to find:
uniprot__mm_collapse = "none"
That has a typo (double underscore) which means the line effectively does nothing. I'm not sure if the line should be deleted or if the typo should be fixed.
I fixed a couple of easy globals but there are several others that require knowledge of the logic of the module. For example, see p.getPDB = function(protein_entities)
which uses the undefined propertyID
. Presumably that should be a function parameter?
Another problem is in p.getAliasFromGenomeAssembly = function(entity, prefix)
which has the line
else output = location
where location
is undefined.
There are a few variables which appear to be intended as global to the module. For example, root
and titleBGcolor
. I assume that no other module needs access to these globals, so there should be some lines at the top (before any functions) with
local root, titleBGcolor
(or put them on separate lines with a comment on each indicating its purpose). Johnuniq (talk) 02:42, 21 February 2022 (UTC)
The code available at Module:Infobox_gene/sandbox includes gene expression data into the "RNA expression pattern section" for the orthologous gene in Mouse of a given Human gene.
At the code level, mainly the following functions in the code had changes:
function p.renderRNAexpression(...)
...
end
function p.renderExpressionList(bgee_expression, bgee_default)
...
end
Tests were successfully performed according to the use cases at Module_talk:Infobox_gene/testcases.
All changes comparing the sandbox and the deployed Wikipedia gene article pages can be visualised at https://en.wikipedia.org/w/index.php?title=Module%3AInfobox_gene%2Fsandbox&type=revision&diff=1088153740&oldid=1074398347 Tarsmf (talk) 13:48, 16 May 2022 (UTC)
This edit request to Module:Infobox gene has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change Line 2833 from
result_GOID = entity:formatPropertyValues(propertyID_child, mw.wikibase.entity.claimRanks).value
to
result_GOID = entity:formatPropertyValues(propertyID_child, {mw.wikibase.entity.claimRanks.RANK_NORMAL}).value
This should fix an issue where items with depreciated GOIDs listed in Wikidata generate non-functional links with unexpected display text, such as what is visible on Lactoferrin. WelpThatWorked (talk) 15:17, 21 July 2022 (UTC)
@Paine Ellsworth: Thanks for including the mouse gene expression and updating Bgee links. A side effect of these edits is that the "RNA expression pattern" is displayed uncollapsed and the "Orthologs" data is displayed collapsed. In my opinion, the "RNA expression pattern" data, while useful is probably of lower importance than the external links to Entrez, UniProt, etc. contained in the "Orthologs" table. Furthermore, the "Orthologs" data in the past has never been collapsed. I have been able to collapse the "RNA expression pattern" table in this edit. But I cannot figure out how to uncollapse the "Orthologs" table. (Your edits did not seem to involve this table, so I am really puzzled why this table is now collapsed). I would appreciate if you could restore the "Orthologs" data to its default uncollapsed state. Thanks. Boghog (talk) 09:24, 24 July 2022 (UTC)
Initial disclaimer: I am the Lead Developer of Expression Atlas and Single Cell Expression Atlas web applications (https://www.ebi.ac.uk/people/person/alfonso-munoz-pomer-fuentes/).
A couple of years ago a proposal to add Expression Atlas to the infobox was briefly discussed. I’d like to bring the topic back, and gauge how much interest there is in the community. I’ve been hacking around the Lua code and I got to add three useful links for a given gene: bulk baseline expression (e.g. mRNA-seq experiments), bulk differential expression (e.g. microarray experiments) and single-cell expression (single cell RNA-seq).
See an example below. Feel free to offer any suggestions. I’m not very knowledgeable in Lua, but I tried to follow the conventions I saw in the module.
File:Infobox gene (sandbox) with Expression Atlas links.png – Alfonso Muñoz-Pomer Fuentes (talk) 16:44, 4 August 2022 (UTC)
This edit request to Module:Infobox gene has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Error: [778:86] invalid escape sequence near '\:' مهدی بهرامی مطلق (talk) 16:29, 2 March 2023 (UTC)
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.