Posts

Showing posts from 2008

Clinicaltrials.gov trials excel macro

This is a script for gathering data from clinicaltrials.gov Simply copy and paste the NCTID's in a column of the spreadsheet for example NCT00264901 NCT00239681 NCT00153101 NCT00255645 NCT00279045 NCT00071331 NCT00379769 select these values in the column and run the following VBA macro against it. it will produce Sub getCTXML_phase_title_sponsor_official() ' ' Converts each text hyperlink selected into a working hyperlink On Error Resume Next ActiveWorkbook.Application.ScreenUpdating = False Dim XMLDOC As New MSXML2.DOMDocument60 Dim xnodesls As IXMLDOMNodeList Dim xnode As IXMLDOMNode Dim addr As String Dim Text As String Dim xstring As String Dim xstringPhase As String Dim xstringSponsor As String Dim xstringCondition As String Dim xstringIntervention As String Dim xstringInvestigator As String Dim xstringTitle As String Dim xstringStatus As String Dim xCell As Range For Each xCell In Selection If InStr(xCell.Tex...
Script to find drug names from pub med publications The following tables are used for input. The first table contains the column title. We will highlight this column and loop through the rows to find matching drugs, chemicals or biological compounds. The second table is a table of Preferred Terms and Synonyms that will be used to search the titles with. Call this table titletable in Excel pubmedid tite issn year journal 19065303 In Memoriam: Gloria Gallo M.D. 1744-2818 2008 Amyloid : the international journal of experimental and clinical investigation : the official journal of the International Society of Amyloidosis NA 19065529 [Analysis of the GNB3 gene 825C/T polymorphism in non-obese and obese Chinese.] 1003-9406 2008 Zhonghua yi xue yi chuan xue za zhi = Zhonghua yixue yichuanxue zazhi = Chinese journal of medical genetics NA 19065556 Visible 405 nm SLD light photo-destroys ...

Install Logic Pro 8 on old mac G4

You bought the Logic Pro software, you install it on your new iMac, but you want that old G4 with OS 10.4 to run Logic Pro too. So you try to install it from the DVD - surprise, the installer quits and complains that your not so bad G4 isn't up to spec to run Logic Pro. Well here is a nifty hack. 1.open up terminal 2.type "cd /Volumes" 3.type "cd Logic\ Pro/" 4.type "cd installer" 5.type "installer -pkg Logic Pro.mpkg /Applications" The installer will fail - haha - but the Application will install and you can run it. Haha!

Excel VBA scripts for bioinformatics

'' ' For listing citations from PUBMED UIDs ' ' Jad C 2008 ' this VBA script creates standard citations from pubmed UID's ' ' Use: paste a list of Pubmed UID's in a column in a worksheet, select the range and ' trigger this macro ' ' Output: ' 15778725 Spencer A Bone Marrow Transplant 2005 ' '' Option Explicit Sub citation_maker() ' On Error Resume Next Dim xDoc As New MSXML2.DOMDocument Dim xstring As String Dim xCell As Range Dim xtitle As String Dim xdateY As String Dim xdateM As String Dim xdateD As String Dim xissn As String Dim xjournalName As String Dim xjournalIssue As String Dim xjournalVol As String Dim xmedlinePg As String Dim xmedlineTA As String Dim xDiseaseState As String Dim xAffiliation As String Dim xAuth As String Dim authlist As String For Each xCell In Selection Application.StatusBar = "getting : " + xCell.Text xDoc.validateOnParse = False xDoc.async = False Dim numAuths As In...

Simple python script to list files in a directory.

print files names in a directory... easy but useful. import os dir = os.getcwd() f = open( "_list.txt" , "w" ) count = 0 for item in os.listdir(dir):         print item + "\n",         f.writelines( item + "\n" ),         count = count+1 f.writelines( "the number of documents is %d" % count ), print "the number of documents is %d" % count , f.close()

Python and Biotext mining

I've been working with python a lot lately for getting documents and I've written python utility programs to make some of my daily tasks easier for extracting data from pubmed. I was using the packages from Biopython to query the pubmed server, but to be honest, it was taking way too long to return results so I created my own and it's fast enough to retrieve # for each pumbed id get the elemets from the xml for oid in ls:     try :         dom = minidom.parse(urllib.urlopen("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id="+oid+"&retmode=xml"))         pmid = dom.getElementsByTagName("PMID")[0].childNodes[0].data         journalname = dom.getElementsByTagName("MedlineTA")[0].childNodes[0].data         authorname = dom.getElementsByTagName("AuthorList")[0].getEleme...