Julia wrapper to the Medical Text Indexer Java API
Travis CI | Coverage | License |
---|---|---|
using Pkg
Pkg.add("https://github.com/bcbi/MTIWrapper.jl.git")
using MTIWrapper
mti_dir = "./"
MTIWrapper.install_web_api(mti_dir)
input_file = MTIWrapper.abstracts_to_request_file(df, out_file, uid_column = :pmid, abstract_column= :abstract_text)
MTIWrapper.mti_batch_query(mti_dir, ENV["NCBI_EMAIL"], ENV["UMLS_USER"], ENV["UMLS_PSSWD"],
input_file, output_file)
header = ["uid","term", "cui", "score", "type", "misc", "location", "path"]
df = CSV.read(output_file, header = header, datarow=3, delim='|')
Format: PMID|Term|CUI|Score|Type|Misc|Location|Path(s)
PMID - PubMed assigned unique identifier. If freetext, this is "0".
Term - MeSH Term. If the term has an asterisk ("*") at the beginning, it denotes that the term was identified as coming from the Title section of a document. This is an optional output item and requires the "-starMHTI" option being specified.
CUI - Concept Unique Identifier for the MeSH Term.
Score - MTI score for this term.
Type - Type of the term: MH - MeSH Heading HM - Heading Mapped to ET - Entry Term NM - Supplemental Concept SH - MeSH SubHeading CT - MeSH CheckTag
Misc - If ET, this explains the replacement. If not, blank.
Location - If term comes from MMI, we have location information showing where the term came from within the text. "TI" - Title, "AB" - Abstract or "TI;AB" - comes from both Title and Abstract.
Path(s) - One or more designators showing which of the pathways recommended the term.
MM - MetaMap's MMI
RC - PubMed Related Citations
TG - John Wilbur's Trigram Method