Module:Infobox gene: Difference between revisions

Content deleted Content added
Undid revision 726279046 by 70.95.134.121 (talk)
added mitocondrial to chromosome trim
Line 2,265:
local out = ''
if string.find(string_to_trim, 'chromosome') then
out = string_to_trim:gsubstring.match("chromosome"string_to_trim, "%d+")--removeextract number from chromosomestring
if out == nil then
out = out:gsub(" ", "")--remove spaces before or after
out = string.match(string_to_trim, "X") or string.match(string_to_trim, "Y")
end
end
if string.find(string_to_trim, 'mouse.chromosome') then
end
out = string_to_trim:gsub("mouse chromosome", "")--remove chromosome
if string.find(string_to_trim, 'mouse.chromosomemitochondrial') then
out = out:gsub(" ", "")--remove spaces before or after
out = "M"
end
return out
end