Skip to content

Instantly share code, notes, and snippets.

View hpiwowar's full-sized avatar

Heather Piwowar hpiwowar

View GitHub Profile
(((Somatosensory Cortex[mesh]) OR somatosensory[Title/Abstract] OR "primary motor"[Title/Abstract] OR "primary visual"[Title/Abstract] OR sensorimotor[Title/Abstract] OR "motor area"[Title/Abstract] OR oxygenation[Title/Abstract] OR (Motor Cortex[mesh]) OR "visual cortex"[Title/Abstract] OR (Acoustic Stimulation[mesh])) NOT (memory[Title/Abstract] OR Memory[mesh] OR (Prefrontal Cortex[mesh]) OR Cognition[mesh] OR prefrontal[Title/Abstract] OR dorsolateral[Title/Abstract]))
AND (("humans"[mesh] AND "magnetic resonance imaging"[mesh] AND Journal Article[ptyp] NOT "mental disorders"[mesh] AND ("fmri"[Title/Abstract] OR "Functional MRI"[Title/Abstract] OR "Functional magnetic resonance imaging"[Title/Abstract] OR "Functional MR Imaging"[Title/Abstract])) NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp] OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp] OR Comment[ptyp] OR Corrected and Republished Article[ptyp]) AND ("1991"[PDAT] : "2009"[PDAT]) AND English[lang])
(((Temporal Lobe[mesh]) OR (Prefrontal Cortex[mesh]) OR (Pattern Recognition, Visual[mesh]) OR (Visual Perception[mesh]) OR semantic[Title/Abstract] OR "left inferior"[Title/Abstract] OR memory[Title/Abstract] OR Memory[mesh]) NOT (motor_cortex[Title/Abstract] OR primary_motor[Title/Abstract] OR Somatosensory Cortex[mesh] OR visual_cortex[Title/Abstract] OR somatosensory[Title/Abstract] OR Motor Cortex[mesh])) AND (("humans"[mesh] AND "magnetic resonance imaging"[mesh] AND Journal Article[ptyp] NOT "mental disorders"[mesh] AND ("fmri"[Title/Abstract] OR "Functional MRI"[Title/Abstract] OR "Functional magnetic resonance imaging"[Title/Abstract] OR "Functional MR Imaging"[Title/Abstract])) NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp] OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp] OR Comment[ptyp] OR Corrected and Republished Article[ptyp]) AND ("1991"[PDAT] : "2009"[PDAT]) AND English[lang])
((Amygdala OR Emotional OR emotionally[Title/Abstract] OR (Facial Expression[mesh]) OR faces[Title/Abstract] OR facial[Title/Abstract] OR Affect[mesh]) NOT (visual[Title/Abstract] OR (Motor Cortex[mesh]) OR superior_temporal[Title/Abstract] OR movement[Title/Abstract] OR (Visual Cortex[mesh]) OR occipital[Title/Abstract])) AND
((("humans"[mesh] AND "magnetic resonance imaging"[mesh] AND Journal Article[ptyp] NOT "mental disorders"[mesh] AND ("fmri"[Title/Abstract] OR "Functional MRI"[Title/Abstract] OR "Functional magnetic resonance imaging"[Title/Abstract] OR "Functional MR Imaging"[Title/Abstract])) NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp] OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp] OR Comment[ptyp] OR Corrected and Republished Article[ptyp]) AND ("1991"[PDAT] : "2009"[PDAT]) AND English[lang]))
import urllib2
import datasources
from datasources import pubmed
from datasources import urlopener
def test_get_pmids_from_gist_query():
gist_url = "http://gist.github.com/raw/377863/fba998429b36d07c304a28a07c4dfde592b0c4f7/sensorimotor_fmri_pubmed_query.txt"
response = get_pmids_from_gist_query(gist_url)
assert_equals(response[0:5], ['20092581', '20055536', '20053105', '20053076', '20037218'])
assert_equals(len(response), 2851)
import nose
from nose.tools import assert_equals
from tests import slow, online, notimplemented, acceptance
import urllib2
import random
import datasources
from datasources import pubmed
from datasources import urlopener
humans[mesh] AND "magnetic resonance imaging"[mesh]
NOT "magnetic resonance imaging/ethics"[mesh]
NOT "mental disorders"[mesh]
AND (fmri[Title/Abstract] OR "Functional MRI"[Title/Abstract]
OR "Functional magnetic resonance imaging"[Title/Abstract]
OR "Functional MR Imaging"[Title/Abstract])
AND Journal Article[ptyp] AND English[lang]
NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp]
OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp]
OR Comment[ptyp] OR Corrected and Republished Article[ptyp])
humans[mesh] AND "magnetic resonance imaging"[mesh]
NOT "magnetic resonance imaging/ethics"[mesh]
AND "mental disorders"[mesh]
AND (fmri[Title/Abstract] OR "Functional MRI"[Title/Abstract]
OR "Functional magnetic resonance imaging"[Title/Abstract]
OR "Functional MR Imaging"[Title/Abstract])
AND Journal Article[ptyp] AND English[lang]
NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp]
OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp]
OR Comment[ptyp] OR Corrected and Republished Article[ptyp])
import os
import time
import re
import nose
from nose.tools import assert_equals
from collections import defaultdict
import EUtils
from EUtils import HistoryClient, ThinClient
import dataset
import datasources
library(Hmisc)
journdat = read.csv("~/Downloads/JournalData.csv", as.is=TRUE, na.strings="N/A")
journdat$is.Environmental.Sciences = 0
journdat$is.Environmental.Sciences[grep("*Environmental Sciences*", journdat$ISI.Category)] = 1
summary(Policy.request...require.code ~ Impact.Factor + Policy.has.instructions.for.how.to.cite.data. + Subscription.Model + is.Environmental.Sciences, journdat)
response = summary(Policy.request...require.code ~ Impact.Factor + Policy.has.instructions.for.how.to.cite.data. + Subscription.Model + is.Environmental.Sciences, journdat)
dotchart2.CIs =
function (data, labels, groups = NULL, gdata = NA, horizontal = TRUE,
pch = 16, xlab = "", ylab = "", auxdata, auxgdata = NULL,
auxtitle, lty = if (.R.) 1 else 2, lines = TRUE, dotsize = 0.8,
cex = par("cex"), cex.labels = cex, cex.group.labels = cex.labels *
1.25, sort. = TRUE, add = FALSE, dotfont = par("font"),
groupfont = 2, reset.par = add, xaxis = TRUE, width.factor = 1.1,
lcolor = if (.R.) "gray" else par("col"), ...)
{
if (.R. && !add) {