Last active
December 18, 2015 17:19
-
-
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'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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