Module talk:Infobox gene

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconInfoboxes
WikiProject iconThis module is within the scope of WikiProject Infoboxes, a collaborative effort to improve the coverage of Infoboxes on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
WikiProject iconMolecular Biology: Genetics Template‑class
WikiProject iconThis module is within the scope of WikiProject Molecular Biology, a collaborative effort to improve the coverage of Molecular Biology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis module does not require a rating on Wikipedia's content assessment scale.
Taskforce icon
This module is supported by the Genetics task force.

Template-protected edit request on 2 March 2023[edit]

Error: [778:86] invalid escape sequence near '\:' مهدی بهرامی مطلق (talk) 16:29, 2 March 2023 (UTC)[reply]

Not sure where you saw this error, but I believe \: and \; are not required, please check diff — Martin (MSGJ · talk) 21:51, 3 March 2023 (UTC)[reply]
That was a massive and very productive edit! I didn't check all the details but it looked good and fixed the reported problem. Johnuniq (talk) 01:10, 4 March 2023 (UTC)[reply]
Had my Lua-challenged mind puzzled! Seems that the error is found in the [edit screen]. Click on the red x-box at the bottom of the edit screen to actually see the error. That does not appear in the sandbox's edit screen. P.I. Ellsworth , ed. put'er there 07:42, 4 March 2023 (UTC)[reply]
 Done * Pppery * it has begun... 22:14, 4 March 2023 (UTC)[reply]

Human UniProt search error[edit]

I am not sure if this is a problem in Infobox gene or Wikidata, but the rendering of the Human UniProt search link in Mucin-1 is not right. Does anyone have any idea how to fix this? Thanks. Boghog (talk) 06:43, 26 April 2023 (UTC)[reply]

 Done The problem was in Wikidata. Only one UniProt ID should be associated with the human protein, not two. Fixed in this edit. Boghog (talk) 06:50, 26 April 2023 (UTC)[reply]

Edit request 15 January 2024[edit]

Modify Bgee links[edit]

The Bgee links changed. To avoid redirections, please include "www" in the URLs as shown below. Thank you very much for your help.

Diff:

local bgee_gene_page = "https://bgee.org/gene/"
+
local bgee_gene_page = "https://www.bgee.org/gene/"
bgee_title = "[https://bgee.org/ " .. bgee_title .. "]"
+
bgee_title = "[https://www.bgee.org/ " .. bgee_title .. "]"

Tarsmf (talk) 16:21, 15 January 2024 (UTC)[reply]

 Done. Tested at FOXS1. – Jonesey95 (talk) 00:27, 16 January 2024 (UTC)[reply]

Edit request 22 May 2024[edit]

Description of suggested change:

Improve External IDs readability. In the 'Identifiers tab, external IDs are difficult to read because there is no semicolon separating them. The code below adds semicolons between IDs. In addition, it also adds another external ID of the OMA database that is complementary to HomoloGene with richer information about homologous genes. It was tested here: Module_talk:Infobox_gene/testcases. Thank you very much for your help!

Diff: (Line numbers below are just an approximation)

Suggestion to add this trim function (to remove empty spaces) in line 23 or in any place on top of the code:

+
local function trim(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end

Line 196

p.renderIdentifiers(aliases, hgnc_id, gene_symbol, homologene_id, omim_id, mgi_id, ChEMBL_id, IUPHAR_id, ec_no, entrez_gene)
+
p.renderIdentifiers(aliases, hgnc_id, gene_symbol, homologene_id, omim_id, mgi_id, ChEMBL_id, IUPHAR_id, ec_no, entrez_gene, ensembl)

Line 399

function p.renderIdentifiers(aliases, hgnc_id, gene_symbol, homologene_id, omim_id, mgi_id, ChEMBL_id, IUPHAR_id, ec_no, entrez_gene)
+
function p.renderIdentifiers(aliases, hgnc_id, gene_symbol, homologene_id, omim_id, mgi_id, ChEMBL_id, IUPHAR_id, ec_no, entrez_gene, ensembl)

Line 433

omim = string.gsub(omim, ", $"," ") --remove comma from end
+
omim = trim(string.gsub(omim, ", $","")) --remove comma from end

Line 446

homolo = string.gsub(homolo, ", $"," ") --remove comma from end
+
homolo = trim(string.gsub(homolo, ", $","")) --remove comma from end
genecards = genecards.."[https://www.genecards.org/cgi-bin/carddisp.pl?gene="..gene_symbol.." "..gene_symbol.."] "
+
genecards = genecards.."[https://www.genecards.org/cgi-bin/carddisp.pl?gene="..gene_symbol.." "..gene_symbol.."]"

Line 463

mgi = string.gsub(mgi, ", $"," ")--remove comma from end
+
mgi = trim(string.gsub(mgi, ", $","")) --remove comma from end
ChEMBL = "[[ChEMBL]]"..": ".."[https://www.ebi.ac.uk/chembldb/index.php/target/inspect/CHEMBL"..ChEMBL_id.." "..ChEMBL_id.."] "
+
ChEMBL = "[[ChEMBL]]"..": ".."[https://www.ebi.ac.uk/chembldb/index.php/target/inspect/CHEMBL"..ChEMBL_id.." "..ChEMBL_id.."]"
IUPHAR = "[[International_Union_of_Basic_and_Clinical_Pharmacology|IUPHAR]]"..": ".."[http://www.guidetopharmacology.org/GRAC/ObjectDisplayForward?objectId="..IUPHAR_id.." "..IUPHAR_id.."] " --**lclz**
+
IUPHAR = "[[International_Union_of_Basic_and_Clinical_Pharmacology|IUPHAR]]"..": ".."[http://www.guidetopharmacology.org/GRAC/ObjectDisplayForward?objectId="..IUPHAR_id.." "..IUPHAR_id.."]" --**lclz**

Line 478

local EC = "[https://www.genome.jp/dbget-bin/www_bget?enzyme+" .. link_ec_no .. " " .. ec_no .. "]"
+
local EC = "[https://www.genome.jp/dbget-bin/www_bget?enzyme+" .. link_ec_no .. " " .. ec_no .. "]" local oma = "[[Orthologous_MAtrix|OMA]]:" oma = oma.."[https://omabrowser.org/oma/vps/"..mw.text.split(ensembl,",")[1].." "..gene_symbol.." - orthologs]" external_id_table = {omim, mgi, homolo, ChEMBL, IUPHAR, genecards, oma} external_id_processed_table = {} for i, v in ipairs(external_id_table) do if (v ~= "") then

external_id_processed_table[#external_id_processed_table + 1] = v

end end external_ids = tostring(table.concat(external_id_processed_table, "; "))

Line 528

:wikitext(omim) :wikitext(mgi) :wikitext(homolo) :wikitext(ChEMBL) :wikitext(IUPHAR) :wikitext(genecards)
+
:wikitext(external_ids)

Tarsmf (talk) 11:39, 24 May 2024 (UTC)[reply]

@Tarsmf if I may suggest, you could use table.concat(table, "; ") to add the semi-colons is a more efficient manner — Martin (MSGJ · talk) 21:41, 23 May 2024 (UTC)[reply]
Thanks a lot @MSGJ for the suggestion! I have implemented your suggestion in the Module:Infobox gene/sandbox and updated my request above, tested here Module talk:Infobox gene/testcases. However, note that we cannot simply add a ';' for each item of the table since some of them are empty strings depending on the gene wikipedia article. Therefore, we still need to filter out the empty string before implementing the concatenation. Tarsmf (talk) 11:40, 24 May 2024 (UTC)[reply]
Looks good,  Done — Martin (MSGJ · talk) 12:02, 24 May 2024 (UTC)[reply]

Could you double-check your recent edit to Module:Infobox gene? It appears to have caused a nonsense redlinked category for Category:Genes on human chromosome, which is currently showing up on about 487 pages alongside the expected "Genes on human chromosome XX" categories. Thanks. Bearcat (talk) 13:32, 25 May 2024 (UTC)[reply]

@Tarsmf please can you comment on this? — Martin (MSGJ · talk) 18:24, 25 May 2024 (UTC)[reply]
Yes, sorry for this, I am checking it now. @MSGJ may you also confirm that the code changed was only the suggested above? I am asking it because I worked in a sandbox version that might have some other changes that were not done by me. Thanks! Tarsmf (talk) 07:12, 27 May 2024 (UTC)[reply]
I found this Wikipedia:Categories for discussion/Log/2023 August 15#Category:Genes on human chromosome. Actually, the "Category:Genes on human chromosome" was merged to Category:Human genes, and it should not exist anymore. What do you think, @MSGJ and @Bearcat? Tarsmf (talk) 07:26, 27 May 2024 (UTC)[reply]
@MSGJ, I think I see the issue now, there are some lines in the code that were changed but none of them were requested by me last week. See the comparison at [code change history](https://en.wikipedia.org/w/index.php?title=Module%3AInfobox_gene&diff=1225430113&oldid=1219546506). Then to solve this issue and possibly others, please revert to the previous version (18th April 2024 by Ruslik0) the following changes in the history above assigned in your @MSGJ last commit in Line 138, Line 409, Line 1,124, Line 1,138, Line 1,422. Note that the code change that is making the issue reported by @Bearcat is mainly Line 1,422 change. Line 1,124 and Line 1,138 are also very important changes to modify back to the previous version. Tarsmf (talk) 07:58, 27 May 2024 (UTC)[reply]