科学网

 找回密码
  注册

tag 标签: import

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

import 提升导致 Fundebug 报错:“请配置 apikey”
stefanzan 2019-3-1 11:18
摘要: 解释一下“请配置 apikey”报错的原因。 部分 Fundebug 用户使用 import 来导入 js 文件时,出现了”请配置 apikey”的报错,这是由于 import 提升导致的,下面我会详细解释一下这一点。 import 提升 关于 import 提升,我们可以参考阮一峰的 《ECMAScript 6 入门》 。 import 命令具有提升效果,会提升到整个模块的头部,首先执行。 foo(); import { foo } from my_module ; 上面的代码不会报错,因为 import 的执行早于 foo 的调用。这种行为的本质是,import 命令是编译阶段执行的,在代码运行之前。 因此, 即使我们把 import 语句写在后面,它仍然会在其他语句之前执行 。 import 提升为何导致 Fundebug 报错? Fundebug 用户应该清楚,在接入 fundebug-javascript 插件之后,需要配置 apikey,如下: import * as fundebug from fundebug-javascript ; fundebug.apikey = API-KEY ; 假设我们还需要 import 一个 test.js 文件,这个文件会抛出一个 Error,如下: // test.js throw new Error ( test ); 一切看起来没有问题: // main.js import * as fundebug from fundebug-javascript ; fundebug.apikey = API-KEY ; import ./test ; 但是,根据 import 提升,代码的实际执行顺序如下: // main.js import * as fundebug from fundebug-javascript ; import ./test ; fundebug.apikey = API-KEY ; 这种情况下,第二行代码就会抛出错误,导致 apikey 复制语句不会执行,从而导致报错:“请配置 apikey”。 这个问题并不需要解决 出于测试的目的,用户会去 import 一个立即报错的 js 文件,类似于前文提到的 test.js。但是实际开发中,我们不可能这样做,否则应用会立即崩溃,更谈不上部署了。 我们写这篇博客的目的仅仅是解释一下原因,并分享一个非常简单的知识点“import 提升”。 如何规避这个问题? 仅供参考,实际上没有必要这样做。 新建一个配置文件 config.js ,在这个文件中配置 apikey: fundebug.apikey = API-KEY ; import 配置文件: // main.js import * as fundebug from fundebug-javascript ; import ./config ; import ./test ; 这种情况下,配置 apikey 的语句被 import 代替了,也就不存在所谓”import 提升”的问题,Fundebug 将可以正常报错。 最后,感谢 Fundebug 用户 龙哥 的反馈和协助! 参考 《ECMAScript 6 入门》 Fundebug 文档 - JavaScript 错误监控插件 关于Fundebug Fundebug 专注于JavaScript、微信小程序、微信小游戏、支付宝小程序、React Native、Node.js和Java线上应用实时BUG监控。 自从2016年双十一正式上线,Fundebug累计处理了10亿+错误事件,付费客户有Google、360、金山软件、百姓网等众多品牌企业。欢迎大家 免费试用 ! 版权声明 转载时请注明作者 Fundebug 以及本文地址: https://blog.fundebug.com/2019/02/26/import-cause-fundebug-apikey-error/
个人分类: Fundebug|1406 次阅读|0 个评论
Nature neurosci——科学家将iPSC分化为小胶质细胞
CZC 2017-3-15 07:31
Nature neurosci——科学家将iPSC分化为小胶质细胞 诱导多功能干细胞(iPSC)是从成熟体细胞转变而来的具有多向分化能力的干细胞。小胶质细胞是中枢神经系统中的免疫细胞,类似于其他组织的吞噬细胞。小胶质细胞对于大脑的结构和功能的维持都非常的关键,而且小胶质细胞参与多种神经系统疾病的发生。小胶质细胞既往被发现具有抗肿瘤的作用,那么如果将小胶质细胞造出来再注射入脑肿瘤部位是不是能够治疗脑肿瘤呢?研究人员发现了的确移植iPSC衍生来的小胶质细胞后,脑肿瘤小鼠的生存期显著延长。 人类的iPSC分化为小胶质细胞: 2. 分化后的小胶质细胞(iPSC-MG)具有人类小胶质细胞的表型和基因型: 3. 人类iPSC-MG具有类似于小胶质细胞的功能特征: 4. 小鼠iPSC经过2个步骤分化为小胶质细胞: 5. 小鼠iPSC-MG具有类似于新生小鼠小胶质细胞的表型和基因表达特征: 6. 小鼠iPSC-MG具有类似于新生小鼠小胶质细胞的功能特征: 7. 小鼠新生MG和iPSC-MG移植入脑肿瘤小鼠后可以显著的延长其生存期: 总结 这项研究报道了将人和小鼠iPSC分化为小胶质细胞的方法,此外还揭示了iPSC来源小胶质细胞对于脑部肿瘤的潜在治疗作用。 经典文章回顾 Science——科学家发现我们的大脑如何感觉“稍纵即逝”和“度日如年” Neuron—科学家发现细胞“垃圾回收站”促进大脑结构更新 Nature neuroscience——新研究揭示口渴和好盐的神经生物学机制 2016年阿尔茨海默病10大研究进展 2016年帕金森病10大研究进展 Cell——肠道菌群加重帕金森病运动障碍和神经炎症过程 地中海饮食最健康的神经科学分析 八种食物提高记忆力,增强脑活力! 预防老年性痴呆症,先从这些小事做起! 睡眠不足增加肥胖风险的神经科学解释 运动是大脑的最佳保健品 预防痴呆和脑中风,减少PM2.5是我们可以做的 益生菌也能够治疗痴呆、抑郁症和精神分离症? 喜欢我,关注我 拉到最上方标题下,点击上方蓝字关注 搜索公众号名称:神经科学临床和基础 也请你推荐给你身边的医学朋友,感谢你~
个人分类: 神经科学临床和基础|4490 次阅读|0 个评论
Neuron——杏仁核CRF信号通路参与恐惧​记忆的习得而非表达
CZC 2017-1-27 13:53
Neuron——杏仁核CRF信号通路参与恐惧记忆的习得而非表达 我们的情绪都是由大脑控制的,可是至今为止大脑是如何调控我们的每一种情绪的却一直没有得到解决。海马、杏仁核以及扣带回都与情绪的调控相关。以杏仁核研究最为多见。杏仁核参与恐惧、快乐、奖赏、抑郁、应激等多种情感行为的调控。最近发表于Neuron上的一项研究表明杏仁核的CRF神经元分泌的CRF可以调控杏仁核的神经元的活动进而调控特异化恐惧行为。 解剖学证据:CRF主要表达于杏仁核的头端和中部,尾端几乎不表达。 2. 行为学证据:CRF神经元参与条件恐惧记忆的调控。 3. CRF为恐惧记忆的学习所必需。 4. 抑制CRF神经元则抑制小鼠的恐惧记忆的学习。 5. 抑制CRF信号并不能抑制恐惧的泛化。 6. CRF神经元为恐惧记忆的习得所必需,但与恐惧的表达无关。 7. CRF受体广泛的表达于杏仁核的各个部分。 8. CRF受体为轻中度恐惧记忆的习得所必需。 总结 这项研究表明:CRF信号参与杏仁核恐惧记忆的习得,但一旦小鼠获得了恐惧记忆,那么即使抑制CRF信号通路也不会对恐惧记忆造成影响。
个人分类: 神经科学临床和基础|4452 次阅读|0 个评论
Science——VTA的多巴胺能神经元编码鸟儿唱歌时的误差反馈信息
热度 1 CZC 2017-1-9 13:23
Science——VTA的多巴胺能神经元编码鸟儿唱歌时的误差反馈信息 当我们在弹钢琴时,我们的大脑不断的接受反馈的信息,告诉我们按下的键产生的音符和韵律与我们所预定的那个音符和节律是否相一致,这是最初我们的小朋友们学习弹钢琴时所作的事情。当我们拉小提琴的时候,我们的手指在琴弦上的位置,以及我们按压的力度都会影响我们听到的琴声,最终我们大脑会更根据反馈到的声音,对我们的手指和指力进行调节,这就是反馈环,没有反馈,也就没有音乐家了。 在我们的鸟儿在唱歌的时候,他们也在不断的接受反馈的信息,即音乐的音节。但到底大脑是如何把这些信息进行处理和编码的,一直是一个未解之谜。科学家发现了,VTA的多巴胺能神经元负责编码反馈的误差信息,而且误差的概率直接决定最终的神经元的反应强度。而当鸟儿不唱歌的时候,VTA的误差神经元的反应就消失了。 科学家设计实验证明唱歌鸟儿的大脑不断接受误差信息以矫正自己的歌声。他们把错乱音节的误差信息施加给鸟儿,看VTA的多巴胺能神经元能否反应。 接下来,科学家证明了VTA的多巴胺能神经元负责编码误差信息。 科学家发现 误差出生的概率直接决定VTA神经元的反应强度。 当鸟儿不唱歌时,VTA神经元的误差反馈信息就消失了。 总结 从这项研究我们得出结论:1.大脑的学习是一个不断优化和不断纠正误差信息的过程;2. VTA的多巴胺能神经元负责编码误差信息。
个人分类: 神经科学临床和基础|2938 次阅读|1 个评论
热性惊厥诊断治疗​与管理专家共识(2016)
CZC 2017-1-4 12:07
热性惊厥诊断治疗与管理专家共识(201 6) 热性惊厥(febrile seizures)是儿童时期常见的神经系统疾病之一,是 惊厥最常见 的原因,患病率为 3%~5% 。关于热性惊厥的定义、临床诊断及评估、治疗和预防等问题,近年来有一些新的认识。为促进临床儿科医生全面、正确地诊断和处理热性惊厥及相关癫痫综合征,中华医学会儿科学分会神经学组成立专家组,讨论并制定儿童热性惊厥诊断与治疗的专家共识,旨在对热性惊厥患儿进行规范化诊治,避免过度的检查和治疗。 概念 热性惊厥是儿童时期年龄依赖性的疾病,首次发作多见于6月龄至5岁。根据 2011年美国儿科学会(AAP)标准,热性惊厥为发热状态下(肛温≥38.5℃,腋温≥38℃)出现的惊厥发作,无中枢神经系统感染证据及导致惊厥的其他原因,既往也没有无热惊厥病史。 部分热性惊厥患儿以惊厥起病,发作前可能未察觉到发热,但发作时或发作后立即发现发热,临床上应注意 避免误诊为癫痫首次发作 。热性惊厥通常发生于发热后24 h内,如发热/3 d才出现惊厥发作,注意应寻找其他导致惊厥发作的原因。 热性惊厥的确切发病机制未明,主要系 脑发育未成熟、发热、遗传易感性 三方面因素交互作用所致。引起发热的常见病因包括急性上呼吸道感染、鼻炎、中耳炎、肺炎、急性胃肠炎、幼儿急疹、尿路感染以及个别非感染性的疾病等, 病毒感染是主要原因 。本病具有明显的家族遗传倾向,常为 多基因遗传或常染色体显性遗传伴不完全外显 ,同卵双胎同病率高于异卵双胎(62%比16%)。热性惊厥发病的遗传相关机制涉及个人与家族易感性、炎症与免疫调节反应、神经元兴奋与抑制以及机体与病毒等病原体的相互作用。已报道多个基因和(或)染色体异常与热性惊厥相关,有些变异和癫痫重叠(表1)。对首发年龄小或发作频繁者可行基因检测,为进一步精准治疗及预后评估奠定基础。 临床诊断及评估 1.诊断: 热性惊厥绝大多数预后良好,根据临床特征分为 单纯性热性惊厥和复杂性热性惊厥 ,发作情况见表2。单纯性占70%一80%,表现为 全面性发作,24 h内无复发,无异常神经系统体征 。复杂性占20%一30%, 发作持续时间长或为局灶性发作,24 h内有反复发作,发作后可有神经系统异常表现 ,如Todd’S麻痹。 热性惊厥持续状态(FSE)是指热性惊厥发作时间30min,或反复发作、发作间期意识未恢复达30 min及以上。 Hayakawa等对381例发热伴惊厥持续状态患儿进行病因分析显示, 81.6%为FSE ,6.6%为脑病或脑炎,0.8%为脑膜炎,7.6%为癫痫,3.4%为其他原因。因此对FSE的诊断必须排除其他病因。 2. 鉴别诊断: 热性惊厥应与发热寒战、婴幼儿屏气发作及晕厥等鉴别。以下情况不应诊断为热性惊厥:既往有癫痫病史者因感染诱发惊厥发作、中枢神经系统感染、中毒性脑病、新生儿发热伴惊厥、全身代谢紊乱、急性中毒或遗传代谢病所致的惊厥。 3.辅助检查: 包括常规 实验室检查、脑脊液检查、脑电图与神经影像学检查。 主要目的为明确发热的病因,排除引起惊厥的其他疾病怛,川。相关建议和推荐见表3。应根据病情选择相应辅助检查:(1) 血常规、尿常规、血生化(包括血糖、电解质及血气分析) ,应常规检查,目的为明确发热原因及鉴别常见的惊厥病因;(2) 病史和体检 如提示颅内感染,患儿应进行 腰椎穿刺 检查;(3) 单纯性热性惊厥患儿不需常规进行脑电图或神经影像检查 ;但 局灶性发作或有局灶性神经体征者应进行脑电图及神经影像检查 。在热性惊厥发作后1周内,脑电图监测可见痫样放电或后头部非特异性慢波,不能用于热性惊厥的复发或继发癫痫的预测。因此在热性惊厥急性发作期,不推荐进行脑电图检查来评估。对于有继发癫痫危险因素的复杂性热性惊厥及FSE患儿需要检查和随访脑电图。 局灶性发作伴有脑电图局灶性痫样放电可作为癫痫发生的预测指标。 对首次单纯性热性惊厥发作者,不建议常规进行头颅CT或磁共振成像(MRI)检查。 对于复杂性热性惊厥患儿,出现以下情况需进行头颅CT或MRI检查寻找病因: 头围异常、皮肤异常色素斑、局灶性神经体征、神经系统发育缺陷或惊厥发作后神经系统异常持续数小时。 对相关脑病变的检出,通常MRI较CT更敏感,但检查时间相对较长。 FSE的患儿急性期可能发生海马肿胀,远期则可能引起海马萎缩,并可能导致日后颞叶癫痫的发生,必要时应复查头颅MRI 。 4.复发风险的评估: 热性惊厥首次发作的 复发率为30%-40% ,多在 发病后1年内复发 ; ≥2次发作后的复发率为50% 。复发的危险因素:(1) 起始年龄小 (18月龄);(2) 发作前发热时间短 (1 h);(3) 一级亲属中有热性惊厥史 ;(4) 低热时出现发作 。无任何上述危险因素者2年复发率为14%,具备 1项危险因素者复发率20%,2项危险因素者复发率30%,3项危险因素者60%,4项危险因素的复发率70% 。年龄越小,复发风险越高,小于1岁的热性惊厥患儿有50%的复发可能,而首发年龄大于3岁者复发率降至20%。FSE与单纯性热f生惊厥相比,其再发为FSE的风险明显增高,表明长时程热性惊厥发作后易再次发生惊厥持续状态。头颅MRI异常者复发风险增高3.4倍。 与热性惊厥相关的癫痫或癫痫综合征 10%~15%的癫痫患者既往有热性惊厥史,热性惊厥后继发癫痫的比例不一,与临床类型和随访时间不同有关。单纯性热性惊厥、复杂性热性惊厥发展为癫痫的概率分别为1.O%~1.5%与4.0%~15.0%。 热性惊厥继发癫痫的主要危险因素 :(1) 神经系统发育异常 ;(2) 一级亲属有特发性或遗传性癫痫病史 ;(3) 复杂性热性惊厥 。无上述危险因素者约占所有热性惊厥患儿的60.0%,其患癫痫的可能性为0.9%;存在 1个危险因素,癫痫发生率为2.0%;存在上述2个或以上危险因素,癫痫发生率增至10.0% 。长时程惊厥发作, 癫痫发生率为9.4% 。另外,惊厥发作前发热时间短以及热性惊厥发作次数多也是继发癫痫的危险因素。 一些癫痫及癫痫综合征可以热性惊厥起病,表现为发热容易诱发,具有“ 热敏感 ”的特点或早期呈热性惊厥表现,不易与热性惊厥鉴别,需引起重视。 热敏感相关的癫痫综合征包括Dravet综合征和遗传性癫痫伴热性惊厥附加症(GEFS+) 。临床上根据患儿发病年龄、发作表现、脑电图特点、病程演变及家族史等进行诊断。 Dravet综合征是一种 难治性癫痫综合征 ,2001年国际抗癫痫联盟(ILAE)将其归为癫痫性脑病。其特征为:(1) 1岁以内起病,常因发热诱发首次发作 ;(2)主要表现为 发热诱发的全面性或半侧阵挛发作 , 1次热程中易反复发作 ;(3)具有 热敏感 的特点,易发生惊厥持续状态;(4) 1岁以后出现多种形式的无热发作 ;(5) 智力、运动发育倒退 ;(6)初期脑电图多数正常,1岁以后出现 全导棘慢波或多棘慢波,或局灶性,或多灶性放电 。多数患儿药物疗效不佳,发作难以控制。Dravet综合征是遗传性癫痫常见类型之一,70%一80%的患儿与 SCNlA基因突变 有关。 SCN9A、PCDHl9 等基因突变也可导致此综合征。 GEFS+为 家族性遗传性癫痫综合征 ,具有表型异质性,最常见的表型是 热性惊厥,发病年龄3月龄至6岁 ;其次是热性惊厥附加症,表现为6岁后仍出现 有热或无热全身强直阵挛发作 ;其他表型包括 热性惊厥和(或)热性惊厥附加症伴其他全面性发作或局灶性发作 。目前通过对家系研究已发现多种离子通道蛋白亚单位基因( SCNlA、SCN2A、SCNlB、GABRG2 )突变与GEFS+发病有关。 伴热性惊厥病史的其他癫痫或癫痫综合征有 内侧颞叶癫痫、儿童失神癫痫、Panayiotopoulos综合征、特发性儿童枕叶癫痫Gastaut型、Doose综合征、少年肌阵挛癫痫、伴中央颞区棘波的儿童良性癫痫 等。对于反复的热性惊厥发作、局灶性发作或惊厥持续状态、家族史阳性的患儿应警惕热敏感相关的癫痫综合征,进行必要的遗传学检测,同时进行发育评估、脑电图及神经影像学监测。 治疗与预防 热性惊厥的治疗分为 急性发作期治疗、间歇性预防治疗及长期预防治疗。 需根据患儿个体情况和家长意愿进行综合评估与选择(表4)。 1.急性发作期的治疗: 大多数单纯性热性惊厥呈短暂的单次发作,持续时间一般 1~3 min , 不必急于止惊药物治疗 。应保持气道通畅、监测生命体征、保证正常心肺功能,必要时吸氧,建立静脉通路。 若惊厥发作持续5 min,则需要尽快使用药物止惊 。 静脉注射 地西泮 简单快速、安全有效,是一线止惊剂。如难以立即建立静脉通路, 咪达唑仑肌肉注射或水合氯醛灌肠 也可满意发挥止惊效果。对于FSE的病例,需要静脉用药积极止惊,并密切监护发作后状态,积极退热,寻找并处理发热和惊厥的原因。热性惊厥急性期的处理流程见图1。 2.间歇性预防治疗: 指征: ①短时间内频繁惊厥发作(6个月内3次或1年内4次);或②发生惊厥持续状态,需止惊药物治疗才能终止发作。 在发热性疾病初期间断足剂量口服地西泮、氯硝西泮或水合氯醛灌肠,大多可有效防止惊厥发生;有报道新型抗癫痫药物左乙拉西坦间歇性用药可预防热性惊厥复发。卡马西平和苯妥英间歇性用药对预防复发疗效欠佳。 3.长期预防治疗: 单纯性热性惊厥远期预后良好,不推荐长期抗癫痫药物治疗。 FSE、复杂性热性惊厥等具有复发或存在继发癫痫高风险的患儿 ,可考虑 长期抗癫痫治疗 。用药前应和监护人充分沟通,告知可能的疗效和不良反应。虽然研究证实长期口服苯巴比妥与丙戊酸对防止热性惊厥复发有效,但临床应权衡其利益与药物不良反应的风险。对于长期口服左乙拉西坦预防热性惊厥复发尚需大样本研究进一步评估。 健康教育与长期管理 1.健康教育与指导: 需要对家长进行热性惊厥疾病诊断、防治及管理的系统性指导,减轻家长对疾病的焦虑和担忧,并掌握热性惊厥家庭救治的基本知识。重点强调以下内容: (1)热性惊厥的疾病特点 :热性惊厥的发生与年龄、发热和神经系统易感性相关,虽然人群中患病率较高,为3.0%~5.0%,但单纯性热性惊厥远期预后良好。 (2)热性惊厥的治疗原则和预防 :没有证据表明对热性惊厥患儿进行预防性抗癫痫药物治疗可降低远期癫痫发生率或改善远期认知结局,但根据惊厥发作频率、程度并结合家长治疗意愿,可给予阶梯式预防治疗。 (3)热性惊厥的复发与疾病预后 :复发与首发年龄相关,小于12月龄婴儿首次单纯性热性惊厥后复发率高于12月龄以上幼儿;两次单纯性热性惊厥后不管发病年龄,复发率为50%。 单纯性热性惊厥患儿继发癫痫发生率仅轻度增高,为1.0%~1.%;复杂性热性惊厥患儿癫痫发生率增高。 (4)惊厥发作期的家庭处理: 多为短暂的自限性发作,家长应镇定,将患儿予侧卧位平躺防止意外伤害,不应刺激患儿,清除口腔异物或分泌物防止误吸;若发作 超过5 min或发作后意识不清需尽快就医 。 2.疾病管理中的相关问题: 退热药不能防止热性惊厥发作 , 也不会降低热性惊厥复发的风险,而且退热药物有相应的不良反应,应按常规使用退热药物,不应过分积极。 在处理惊厥的同时应积极查找发热的病因,制定相应的治疗方案,防止惊厥的反复发作。预防接种是疾病管理中常遇到的问题之一。热性惊厥患儿原则上无预防接种禁忌。一些疫苗如三价灭活流感疫苗、肺炎球菌疫苗、百白破、麻风腮疫苗可能引起发热进而导致惊厥。其惊厥发生主要与自身遗传机制有关(如SCNlA、PCDHl9等基因突变等),并非疫苗本身对大脑的直接作用。由疫苗诱发的热性惊厥与其他发热疾病诱发的热性惊厥,在发作严重性、复发率、远期预后等各方面均无明显差异。应告知家长一些疫苗可能会引起发热并导致惊厥,但不必因此禁忌接种疫苗,否则,患儿将面临更大风险,其预后可能更严重。
个人分类: 临床指南和病例解析|3040 次阅读|0 个评论
Nature neuroscience——RSC皮层存在路标双向编码细胞
CZC 2017-1-3 13:24
Nature neuroscience——RSC皮层存在路标双向编码细胞 人类的祖先能够从遥远的非洲不断迁移,遍布世界各地不仅仅依靠人类的运动功能,还需要另一项十分重要的功能,那就是空间定向能力。大脑是人类空间定向的中枢,据研究,出租车司机的海马区域会比一般人大一些,因为海马和内嗅皮层都与我们大脑对世界的空间认知相关,出租车司机经常奔跑于城市各处,自然大脑的空间定位能力异于常人,同时也伴有脑结构的改变。 我们的痴呆患者的空间定向能力就是损害的,很多的阿尔茨海默病的患者会表现为对熟悉的空间环境的认知丧失,不能出行,出去找不到回家的路。回想起来上世纪70年代J.O'Keefe发现了位置细胞以来,我们对于大脑空间的认知就不断进步。2005年,他的两个学生Moser夫妇,就发现了网格细胞。2014年诺贝尔医学及生理学奖就颁给了他们3个人以表彰他们在人类GPS系统发现中所做出的贡献。 可是我们的大脑中除了place cell和grid cell之外,还有另一些cell,包括速度细胞(也是Moser夫妇发现的)以及今天我们的主角—头导向细胞。这头导向细胞的特点就是,头朝向某一方向的时候,它们的动作电位频率就增加,而在其他方向则没有增加。 在最新的一项发表于Nature neuroscience上的研究发现了在我们的RSC皮层存在另一类方向细胞,他们具有对成性的双向性,也就是他们在相隔180度的轴线上动作电位最多,而在其他方向上几乎不变。我们就来看一下,这些细胞的特征吧! 研究人员发现了除了头导向细胞(HD cell)之外,还有双向细胞(BD cell),这些BD cell的特征是与大鼠所处的caompartment相关的,如果两个compartment之间有小门敞开,那么这种细胞就表现为BD,但是如果这道小门被关起来了,那BD cell就变为HD cell了,也就是说,这类BD cell能够对两个compartment进行导向,不知道他们如果位于3个compartment里面,结果会如何,是不是会有三个方向呢? 研究人员于是对这些BD cell的空间解剖学位置进行了定位,发现基本上位于RSC皮层,而RSC皮层恰好是HD cell所发现的区域。这个计算的Flip score就是用来表征这种细胞的双向特性。 此外,研究人员还发现了另一类细胞,也属于BD cell,但是这类BD cell在当个compartment里面就能表现为双向,即使你把小门关了,双向特性还是照样存在,研究人员称为WC-BD cell。 总结 这项研究表明,我们大脑中不止存在着一种跟路标和方向相关的神经元群,而是有很多种,他们可能扮演着不同的作用。这些研究将会逐渐的改写我们的教科书,我们的神经生物学教材需要更新了。
个人分类: 神经科学临床和基础|2708 次阅读|0 个评论
ImportError: No module named openbabel
giraffelove 2015-3-3 16:15
在python脚本里面使用import命令调用openbabel模块的时候 可能会出现ImportError: No module named openbabel这样的错误 在yum里面搜索一个叫python-openbabel.i686的程序安装之后可以解决这个问题
4566 次阅读|0 个评论
Python2.7同时导入arcpy和gdal
热度 1 wenzhaofei 2015-2-17 22:56
在利用python处理地理数据的时候,通常用到gdal,但自从arcpy问世后,其强大的数据处理功能也受到青睐,因此可能需要在一段代码中同时import gdal 和arcpy。 arcpy默认安装在arcgis安装目录下,但在python目录下arcgis10.x文件夹下建立了一个.pth文件,并在其中指定了arcpy的安装路径。gdal则安装在python目录下。为了同时导入gdal和arcpy,需要将.pth文件copy到C:\Python27\Lib目录下(以arcgis10.2为例,arcgis10.2支持的python版本是python 2.7.3) Python 2.7.3 (default, Apr 10 2012, 23:31:26) on win32 Type copyright, credits or license() for more information. import arcpy from osgeo import gdal
6161 次阅读|1 个评论
[转载]Powermarker V3.25,及TASSEL软件使用操作纪要
hongli057 2013-3-5 16:34
Part 1 : Genetic diversity and cluster analysis case analysis Related Software:Powermarker V3.25;Figtree Case used Data : 169clDiliPowerMarker Key steps: 1. 右击”dataset”后, 左击弹出的“import”,左击“Browse”选择数据文件所在文件夹。 2.Column Delimeters(列定义项)选项里选中“Space”,点击“next”。 3.Column列中line和group的类型改为“categorical”,操作方法为左击line后,左击Categorical, 左击group后,左击Categorical. 注意右侧Hierarchy框中,level-1下拉框选择“line”,level-2下拉框选择“group”,点击“next”及随后的“finish”至数据录入成功。 4. 点击窗口顶部“Analysis”,在phylogene后拉框中选择compute frequence,在弹出的对话框中点击数据文件名“169clDiliPowerMarker”后,注意选择右侧相应的计算水平level-1,点击submit. 5. 点击窗口顶部“Analysis”,在Phylogene后拉框中选择“Frequence Based Distance”,在弹出的对话框中点击数据文件名“169clDiliPowerMarker.frequency”后,注意选择右侧距离计算方法,最后点击submit。 6. 点击窗口顶部“Analysis”,在phylogene后拉框中选择“UPGMA/ NJ tree”,在弹出的对话框中点击数据文件名“169clDiliPowerMarker.frequency.share allele”后,注意选择右侧聚类模型,最后点击submit。 7. 点击窗口顶部“Data”,选择Batch export, 弹出的对话框中点击以NJ或upgma结尾的数据文件名,选择输出文件保存路径,再点击submit. 8.用Figtree软件打开输出树形图文件进行编辑。 Part2 : Association mapping Case Studies By using the data files in the tutorial dataset, we create following cases to illustrate the usage of association study performed by GLM and MLM. Case Data type 1 Phenotype + Candidate SNP markers (haploid) 2 Phenotype + Candidate SNP markers (haploid) + Q 3 Phenotype + Candidate SNP markers (haploid) + Q + K 4 Phenotype + SSR markers (haploid) 5 Phenotype + Candidate SNP markers (diploid) In practice, the association study may involve the combination of two or more cases listed above.. For example, diploid SSR markers is equivalent to Case 5 + 6. Case 1: Phenotype + Candidate SNP markers (haploid) This is the simplest association analyses with assumption with completely random mating population. Files used 1) d8coding_rn_rename_sel.txt 2) three_traits_rn_rename.txt Statistical model: y = marker + e Key steps 1. Join the two files by highlight them and then click “AND” Joint button on data Panel. 2. Highlight the joint file and click GLM on Analysis panel. Click OK on the Dada definition dialog window and click RUN button on “Build a Linear Model” dialog window. Results The result is display as “GLM_three_traits_rn_rename + d8coding_rn_rename_sel” on data tree. The result was also saved in the result folder in the tutorial dataset. Case 2: Phenotype + Candidate SNP markers (haploid) + Q Thin case introduce population structure (Q) to reduce false positives due to population stratification. Files used 1) d8coding_rn_rename_sel.txt 2) three_traits_rn_rename.txt 3) popStructure_taxa286_rn_rename.txt. 79 Statistical model: y = marker + Q + e Key steps 1. Join the three files by highlight them and then click “AND” Joint button on data Panel. 2. Highlight the joint file and click GLM on Analysis panel. Change Q1 and Q2 as Covariate and exclude Q3 on the Dada definition dialog window , click OK to go to “Build a Linear Model” dialog window and click RUN button. Results The result is display as “GLM_d8coding_rn_rename_sel + three_traits_rn_rename + popStructure_taxa286_rn_rename” on data tree. Case 3: Phenotype + Candidate SNP markers (haploid) + Q +K Thin case use mixed model approach to incorporate both population structure (Q) and kinship among individuals to reduce false positives due to population stratification and relatedness at individual level. Files used 1) d8coding_rn_rename_sel.txt 2) three_traits_rn_rename.txt 3) popStructure_taxa286_rn_rename.txt. 4) kinship_277taxa_by_Spagedi_rn_sq_rename.txt. Statistical model: y = marker + Q + K + e Key steps 1. Join the top three files by highlight them and then click “AND” Joint button on data Panel. Note: Do not join the kinship file. 2. Highlight the joint file and the kinship file, click MLM on Analysis panel. Change Q1 and Q2 as Covariate and exclude Q3 on the Dada definition dialog window , click OK to go to “Build a Mixed Linear Model” dialog window . Click “” button to add all factors. and click Next button. 3. Modify heritability of dpoll to 0.45, choose the option of “Use the heritability given above” and change analysis method to “EM”. Click Run. Results The result is display as “MLM_Asso_d8coding_rn_rename_sel + three_traits_rn_rename + popStructure_taxa286_rn_rename” on data tree. Case 4: Phenotype + Candidate SSR markers (haploid) This case introduces usage of SSR markers which need to be converted first. Files used 1) haploid_SSR_A 2) diploid_Stru 3) diploid_traits. Statistical model: y = marker + Q + e Key steps 1. Currently the Joint function does not work with directly loaded SSR polymorphism markers such as SSR. They need to be converted first. highlight the SSR data set and click Genotype on data 81 panel. Then choose the “Convert into one gametic alignment. A data called “Haplotype” is added to data tree. 2. Highlight dataset Haplotype, diploid_traits and diploid_Stru , then click “AND” Joint button on data Panel. 3. Highlight the joint file and click GLM on Analysis panel. Change PC1, PC2 and PC2 as Covariate on the Dada definition dialog window , click OK to go to “Build a Linear Model” dialog window and click RUN button. Results The result is display as “GLM_Haplotype + diploid_traits + diploid_Stru” on data tree. Case 5: Phenotype + Candidate SNP markers (diploid) Multiple ploid genetic markers have to be converted to genotype indicated by single character, which can be performed by the function of Genotype in data panel . Files used 1) diploid_SNP 2) diploid_Stru 3) diploid_traits. Statistical model: y = marker + Q + e Key steps 1. Highlight the diploid SNP marker data set and click Genotype on data panel. Then choose the option “ Create alignment based on genotypic status (eg. A:aAa)”. A data called “ GenoStates ” is added to data tree. 2. Highlight dataset GenoStates, diploid_traits and diploid_Stru , then click “AND” Joint button on data Panel. 3. Highlight the joint file and click GLM on Analysis panel. Change PC1, PC2 and PC2 as Covariate on the Dada definition dialog window, click OK to go to “ Build a Linear Model ” dialog window and click RUN button. Results The result is display as “ GLM_diploid_traits + diploid_Stru + GenoStates ” on data tree. Part 3 : Genetic linkage map construction Case Study Key steps: 1 prepare data N1231.txt;2photo 1231.out;3 cent kos;4 s all;5 group;6 s {2 3 4 5 … };7 s 2 4 5; 8 try ; 9map
0 个评论
[转载]Can COMSOL import topological data, meshes and images?
hanzhongren 2013-2-11 14:31
http://www.comsol.com/support/knowledgebase/838/ http://www.comsol.com/community/forums/general/thread/3182/ Solution Number: 838 Title: Can COMSOL import topological data, meshes and images? Platform: All Platforms Applies to: All Products Versions: 4.2a, 4.3, 4.3a Created: April 1, 2002 Last Modified: January 9, 2013 Categories: Mesh , Import , Geometry , General Keywords: Problem Description Can COMSOL Multiphysics import meshes, topological data, and images? SolutionImporting Meshes Simpleware and Materialise can export volumetric meshes created from 3D scans, that can be directly imported into COMSOL. ( Information about COMSOL's partners. ) More on the COMSOL mesh format can be found in the section The COMSOL File Formats in the COMSOL Multiphysics Reference Guide . Because the images are converted directly into a mesh and not into a geometry object, as in the other methods below, it is advisable to fine-tune the geometry/mesh within partnering software before the import is done to COMSOL. Arbitrary mesh data can be imported to COMSOL, providing the mphtxt mesh format is adhered to. Topological Data, GIS, Digital Elevation Models (DEM) If you have topological information saved in the DEM format, you can bring it into your COMSOL model by selecting Definitions Functions Elevation (DEM) . This gives you a function containing the imported data. To turn this function into an actual geometry, use Geometry More Primitives Parametric Surface . The model StHelens.mph , available for download at the bottom of this article, demonstrates how to fill in the Settings tab of this feature. Note especially that you will often need to increase the number of knots from the default 20 to for example 100 in order to make the COMSOL geometry an accurate copy of the original DEM geometry. The model also shows how to create a solid object bounded by the parametric surface. The Parametric Surface feature can also be used with analytical expressions or interpolation data from a text file. See Case 935 for details on the latter. Importing Images COMSOL supports import of BMP, JPEG, PNG, and GIF images. Definitions Functions Image leads you to the settings needed to convert an image file into a function. As with the DEM import, you can use this function to specify the local z -coordinate of a parametric surface. Another common use of images is to assign material properties based on the color scale. For example, in brains, grey and white matter can have different dielectric properties. Rather than create a complicated geometry of the cross-section of a brain, it can be more convenient to just map these properties from an MRI image. hot_circuit.mph is a toy example showing the principle. This model interpolates the local heat conductivity from a ballpoint drawing of a circuit. Note first the expression for the Color Scaling on the Settings tab of the Image feature, (r+g)/20.8 . The default scaling is (r+g+b)/3 , which results in a number on a linear grayscale from 0 for black to 1 for white. Removing the b means that the white background as well as the gray checkering of the notebook will get a high value and the blue drawing a low value. Finally, as comparisons are interpreted as 1 when true and 0 when false, the scaling expression will evaluate to 1 in the patch and 0 outside of it. This is a useful approach in situations where the colors in your picture represent a discrete set of materials. If you instead want your material parameters to be continuous functions of the color intensity, just skip the comparison. The resulting image function, im1(x,y) , is used in defining the thermal conductivity of the user-generated Material 1 . The value of 5+395 im1(x,y) renders 400 W/(m K) in the patch and 5 W/(m*K) in the surrounding circuit board material. Here the remaining parameters are assumed to be identical in both materials, but you could enter their values too as similar function-dependent expressions. Related Files hot_circuit.mph 327 KB my_circuit.jpg 45 KB StHelens.mph 3.2 MB sthelens.dem 8.5 MB
0 个评论
用Python做科学计算(自己做的几个例子)洛仑兹吸引子
热度 2 bennyg 2012-2-8 12:53
用Python做科学计算(自己做的几个例子)洛仑兹吸引子
需要安装Python(x,y) http://www.pythonxy.com 发布的Python(x,y)将近400M,收集了众多的函数库以及文档、教程。并 且提供了一个方便的启动界面 洛仑兹吸引子代码如下 # -*- coding: utf-8 -*- from scipy.integrate import odeint import numpy as np def lorenz(w, t, p, r, b): # 给出位置矢量w,和三个参数p, r, b计算出 # dx/dt, dy/dt, dz/dt的值 x, y, z = w # 直接与lorenz的计算公式对应 return np.array( ) t = np.arange(0, 30, 0.01) # 创建时间点 # 调用ode对lorenz进行求解, 用两个不同的初始值 track1 = odeint(lorenz, (0.0, 1.00, 0.0), t, args=(10.0, 28.0, 3.0)) track2 = odeint(lorenz, (0.0, 1.01, 0.0), t, args=(10.0, 28.0, 3.0)) # 绘图 from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure() ax = Axes3D(fig) ax.plot(track1 , track1 , track1 ) ax.plot(track2 , track2 , track2 ) plt.show() 字符串分形代码如下 # -*- coding: utf-8 -*- #L-System(Lindenmayer system)是一种用字符串替代产生分形图形的算法 from math import sin, cos, pi import matplotlib.pyplot as pl from matplotlib import collections class L_System(object): def __init__(self, rule): info = rule for i in range(rule ): ninfo = ) else: ninfo.append(c) info = "".join(ninfo) self.rule = rule self.info = info def get_lines(self): d = self.rule a = self.rule p = (0.0, 0.0) l = 1.0 lines = for c in self.info: if c in "Ff": r = d * pi / 180 t = p + l*cos(r), p + l*sin(r) lines.append(((p , p ), (t , t ))) p = t elif c == "+": d += a elif c == "-": d -= a elif c == " ": p, d = stack del stack return lines rules = +X]+F -X", "F":"FF", "S":"X", "direct":-45, "angle":25, "iter":6, "title":"Plant" }, { "S":"X", "X":"-YF+XFX+FY-", "Y":"+XF-YFY-FX+", "direct":0, "angle":90, "iter":6, "title":"Hilbert" }, { "S":"L--F--L--F", "L":"+R-F-R+", "R":"-L+F+L-", "direct":0, "angle":45, "iter":10, "title":"Sierpinski" }, ] def draw(ax, rule, iter=None): if iter!=None: rule = iter lines = L_System(rule).get_lines() linecollections = collections.LineCollection(lines) ax.add_collection(linecollections, autolim=True) ax.axis("equal") ax.set_axis_off() ax.set_xlim(ax.dataLim.xmin, ax.dataLim.xmax) ax.invert_yaxis() fig = pl.figure(figsize=(7,4.5)) fig.patch.set_facecolor("w") for i in xrange(6): ax = fig.add_subplot(231+i) draw(ax, rules ) fig.subplots_adjust(left=0,right=1,bottom=0,top=1,wspace=0,hspace=0) pl.show()
8629 次阅读|2 个评论
[转载]LOCOG Annual Report 2010-2011
whyhoo 2012-1-14 22:49
Chairman’s statement London’s transformation into the Host City of the 2012 Olympic and Paralympic Games continues to gather pace. We are working to deliver an ambitious vision of magical Games that will reinforce the role of sport in modern society, and re-establish the importance of sport in communities and in the lives of young people. We know that hopes, expectations and support for the Games are high. Like most Olympic and Paralympic athletes, this is our once-in-a-lifetime opportunity. We only have one chance to deliver an event that will have a profound and positive impact on millions of people throughout the UK and around the world. Despite very challenging economic conditions, the London Organising Committee of the Olympic Games and Paralympic Games Limited (‘the Company’, ‘LOCOG’) has completed another year of impressive achievement. Our vision is to use the power of the Games to inspire lasting change, and we are fulfilling our commitment to create sports facilities, open spaces, homes, jobs and opportunities for this generation and the next. The scene is setA powerful example of progress across the London 2012 project was the completion in December of the Lee Valley White Water Centre, the first brand new venue to be finished. It opened to the public more than a year before theGames, providing early benefits to the local and sporting communities, and giving an early indication of the great sporting legacy that the Games will leave the UK. In fact, the Olympic Delivery Authority(ODA) completed construction of all the main sporting venues and infrastructure with one year to go to the Games – with the venues ready to be transferred to LOCOG for the installation of Games-time facilities. The first venue in the Olympic Park to be transferred to LOCOG was the Velodrome, in February 2011. The completion of its construction was marked with an event at which Sir Chris Hoy, Victoria Pendleton and other members of Team GB were the first cyclists to ride on the track. This was a special moment in a spectacular venue where we hope to see many British medals won next summer. In addition to the superb work carried out on the Olympic Park by our colleagues at the ODA, the unveiling of the London 2012 countdown clock in Trafalgar Square and the installation of the first set of giant Olympic Rings at St Pancras International station serve to remind residents and visitors alike that the countdown to the start of London 2012 has well and truly begun and that the greatest show on earth is coming soon to our country. Athletes at the heart of our GamesEver since London won the right to host the Games back in 2005, our focus has been on the athletes. We are committed to providing the best possible venues, fields of play, food, accommodation and transport to enable the sportsmen and women of the world to perform at their best. We are also progressing our plans for high-impact sport presentationformats, and for ticketing arrangements that will fill our venues with passionate fans. By doing this we will create an exciting spectator, viewer and broadcaster experience, and showcase the power of sport to inspire greater participation, especially among young people. We are also working with London 2012 partners, sponsors, Government departments, sporting bodies and community groups on activation programmes to enable more sports participation opportunities. For example, as part of London 2012’s Get Set education programme, 14,000 schools and more than five million young people across the UK participated in the 2010 National School Sport Week, organised in July by Lloyds TSB, a LOCOG Tier One partner. Seb Coe, Chair,London Organising Committee of the Olympic Games and Paralympic Games 原文见 http://www.london2012.com/documents/locog-publications/locog-annual-report-2010-11.pdf
个人分类: 社会|887 次阅读|0 个评论
成功解决ENDNOTE管理参考文献杂志名称缩写与全名混乱问题
热度 2 tengyj06 2011-12-7 11:01
每次用ENDNOTE X5导入文献时,杂志的名称总是有些是简写有些是全称,很是混乱。每次我都是投稿前手动改,很是麻烦。 这次终于解决了这个问题,很是松了一口气。 先分享如下: 1.最好先备份原有的terms, 2.在tools-open term lists删除未定义简写的原有期刊名, 3.导入tools-define term lists,import“endnote-journal-j.txt ” 【见附件】 endnote-journal-j.txt 4.edit-output style-edit-journal name-abbreviation1 注:一定要删除原有的错误的缩写,否则无用。 此条目根据2004年SCI收录的5746余种期刊制作,但不保证包括所需全部。 有此问题的可以参考一下
25502 次阅读|5 个评论
[原创教程]将一篇文章后面的参考文献导入Endnote
dcaterpillar 2009-12-17 12:15
在使用Endnote过程中遇到这样一个情况,如果发现一篇很好的文章,其后参考文献都很好,是某一方向或领域的经典,如何将这些文章一次性导入自己的Endnote中呢?最初用笨笨的方法,那就是一条条的往里输,等几十篇文章输完,快则一两个小时,慢的话一个上午甚至一天才能搞定。于是就上网搜相关的一次性import的方法,结果只搜到了几个相同提问的帖子,没有找到答案,于是自己打开Endnote的帮助文件自己研究,终于搞定,把过程写下来与大家共学习,不知道对大家有没有用,高手们不要笑话俺,如有更好的方法请一定通知俺啊,先谢过了。 Step 1:先将PDF的文章转成TXT格式的,这一步不用细说了,大家都会的。 Step 2: 将TXT格式的文件中文章内容部分删掉,只留下参考文献部分。 Step 3: 大家会看到每一条文献分成以下几个部分:Author, Year, Title, Journal, Volume, Pages。在每一条参考文献的以上每个部分之间以tab相间隔,tab是键盘左上方第三排的第一个键。 Step 4: 每条文献的最后以回车键结束。 Step 5: 将所有文献以step 3和step 4的要求整理好后,在该文件的最前边加上两行内容,第一行内容是*Journal Article并以回车结束,这一行表示你要加入的文献是Journal article类型的。第二行内容就是参考文献每一部分的名字,如Author,Year,Title等,并以参考文献的顺序进行排序,每个名字之间仍以tab相间隔,最终以回车结束。注意,每一条参考文献中Author,Year,Title等几部分的顺序要同第二行中每一部分的排序完全相同,见下面例图。 Step 6: 最后一步就可以用Endnote下的import功能将以上编辑的文件导入了。Import在file菜单下。注意,导入时Import Option选项要选择Tab Delimited。其他的默认就可以了。 最终编辑好的TXT文件如下面例图所示。
个人分类: 未分类|10136 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-3 19:38

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部