想知道单细胞国自然基金有哪些?

一、国家自然科学基金-单细胞项目

基金首页 - 科学网 - 基金 - 构建全球华人科学社区(http://fund.sciencenet.cn/)
以“单细胞”作为关键词查询2009-2019之间的项目,总计449项,
累计金额:39285 万元。

“单细胞”作为关键词2009-2019查询结果(http://fund.sciencenet.cn/search?name=%E5%8D%95%E7%BB%86%E8%83%9E&code=&yearStart=2009&yearEnd=2019&subject=&category=&fundStart=&fundEnd=&submit=list)

二、国家自然科学基金-单细胞项目爬取

我最早接触的R语言爬取,还是生信技能树Jimmy的【生信技能树】生信人应该这样学R语言(https://www.bilibili.com/video/av25643438/?p=28),又发现了两个比较好的博文:

和你息息相关——国自然基金标题爬取(https://www.jianshu.com/p/12159d9fee3c)
R语言的爬虫 | RVDSD的个人笔记本 (http://rvdsd.top/2019/10/12/R/R%E8%AF%AD%E8%A8%80%E7%9A%84%E7%88%AC%E8%99%AB/)

按照博文里面的代码,就可以进行爬取数据。整理的过程中发现,某一个关键词,现在科学网只允许显示200条项目(怀疑是由于爬取或查询的太多了,进行了限制),今年8月份基金刚刚公布的时候,本人仔细查询了单细胞相关的项目,当时还能显示全部的项目。由于只能显示20页,200条项目的信息,因此分时间段进行查询;然后,合并文件。

1#R包爬取2010-2019单细胞相关的国家自然科学基金项目,主要包括单细胞及微流控相关
2
3rm(list = ls())
4
5##安装rvest与stringr包
6BiocManager::install("rvest")
7BioBiocManager::install("stringr")
8
9# 加载相应的包
10library(rvest)
11library(stringr)
12#site <- 'http://fund.sciencenet.cn/search?name=%E5%8D%95%E7%BB%86%E8%83%9E&yearStart=2010&yearEnd=2019&submit=list&page='
13#由于科学网基金查询限制了结果,只展示200个项目,下面是2018-2019单细胞相关的项目192项
14site <- 'http://fund.sciencenet.cn/search?name=%E5%8D%95%E7%BB%86%E8%83%9E&yearStart=2018&yearEnd=2019&submit=list&page='
15#2014-2017单细胞相关的项目
16site <- 'http://fund.sciencenet.cn/search?name=%E5%8D%95%E7%BB%86%E8%83%9E&yearStart=2014&yearEnd=2017&submit=list&page='
17
18#2009-2013
19site <- 'http://fund.sciencenet.cn/search?name=%E5%8D%95%E7%BB%86%E8%83%9E&yearStart=2009&yearEnd=2013&submit=list&page='
20table2 <- NULL
21# 下面写一个循环,为了时间关系,我只循环到第20页
22for(page in 1:20){
23  url0 <- paste(site, page, sep = "")
24  web <- read_html(url0)
25  News <- web %>% html_nodes('p.t') # 标题内容
26  #---获得基金标题---
27  Title <- News %>% html_text() # 标题内容解析
28  Title <- gsub('\n','',Title) # 去除换行符
29  Title <- gsub('\\s+',' ',Title) # 去除空格
30  Title
31  #---获得负责人信息---
32  Information <- web %>% html_nodes('div.d') %>% html_text() # 负责人等相关消息解析
33  Information <- gsub('\n', ' ', Information)
34  Information <- gsub('\\s+', ' ', Information)
35  Information
36  #Author <- web %>% html_nodes('div.d  .author') %>% html_text()
37  #---获得申请单位---
38  # Department <- web %>% html_nodes('.ico , #resultLst a') %>% html_text()
39  # Department <- gsub('\n',' ',Department) # 去除换行符
40  # Department <- gsub('\\s+',' ',Department) # 去除空格
41
42  #---保存为csv文件---
43  #组合成数据框
44  # dat <- data.frame(Title,Time,link1)
45  dat <- cbind(Title, Information)
46  table2 <- as.data.frame(rbind(table2, dat))
47  write.csv(table2,file = 'scRNA_NSFC2009_2013.csv',row.names = FALSE)
48}
49
50# 对表格进行处理
51df <- cbind(table2$Title,data.frame(do.call(rbind, strsplit(as.character(table2$Information), split = " "))))
52df$X1 <- NULL  # 将空值的那一列删除
53# 给每一列附上列名
54names(df) <- c("基金名称","负责人","申请单位","研究类型","项目批准号",
55               "批准年度","金额","关键词")
56write.csv(df,file = 'scRNA_NSFC2009_2013_revised.csv',row.names = F)
57
58###合并数据
59#list.files命令将input文件夹下所有文件名
60a = list.files() ##a 设定当前工作目录
61dir = paste("./",a,sep="")
62n = length(dir) 
63merge.data = read.csv(file = dir[1],sep=",",header=T) 
64
65for (i in 2:n){
66  new.data = read.csv(file = dir[i], header=T, sep=",")
67  merge.data = rbind(merge.data,new.data)
68}
69
70#循环从第二个文件开始读入所有文件,并组合到merge.data变量中
71write.csv(merge.data,file = "./merge.csv",row.names=F)  #输出组合后的文件merge.csv到input文件夹
72
73###合并文件,有多种方法
74
75#先读入数据
76file1 <- read.csv("scRNA_NSFC2009_2013_revised.csv")
77file2 <- read.csv("scRNA_NSFC2014_2017_revised.csv")
78file3 <- read.csv("scRNA_NSFC2018_2019_revised.csv")
79
80library(dplyr)
81file4 <- bind_rows(file1,file2)
82file5 <- bind_rows(file3,file4)
83
84write.csv(file4,file = 'scRNA_NSFC2009_2017_revised.csv',row.names = F)
85write.csv(file5,file = 'scRNA_NSFC2009_2019_revised.csv',row.names = F)
86
87file6 <- read.csv("scRNA_NSFC2009_2019_revised.csv",sep = ".",header = T)

后续可以对历年项目进行分析,发现2013年单细胞项目的爆发年,虽然只有31个项目,但是金额却是目前为止最高的一年,11379 万元。主要是2013有一个国家重大研发计划(6400万)、多个国家重大科研仪器设备研制专项(1150)、一个重点(2000万),重大研究计划(200万)、一个优青(100万),青年项目金额普遍不高。

科学网基金查询今年也推出了分析功能,另外还有一些网站也推出了相应的功能,如LetPub(http://www.letpub.com.cn/?page=grant&name=%E5%8D%95%E7%BB%86%E8%83%9E&person=&no=&company=&addcomment_s1=&addcomment_s2=&addcomment_s3=&addcomment_s4=&money1=&money2=&startTime=2009&endTime=2019&subcategory=&searchsubmit=true&submit.x=53&submit.y=13&submit=advSearch#fundlisttable)

END

(0)

相关推荐