Skip to content

Instantly share code, notes, and snippets.

@tucotuco
Last active December 18, 2015 17:19
Show Gist options
  • Save tucotuco/5817630 to your computer and use it in GitHub Desktop.
Save tucotuco/5817630 to your computer and use it in GitHub Desktop.
Darwin Core record tissue detector. Looking for tissue indicators in the Darwin Core term 'preparations'.
def has_tissue(rec):
if rec.has_key('preparations'):
tissuetokens = ["+t", "tiss", "blood", "dmso", "dna", "extract", "froz",
"forzen", "freez", "heart", "muscle", "higado", "kidney",
"liver", "lung", "nitrogen", "pectoral", "ri\x96on",
"kidney", "rnalater", "sample", "sangre", "toe", "spleen"]
for token in tissuetokens:
if token in rec['preparations'].lower():
return True
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment