$items['admin/tripal/extension/tripal_blast/help'] = array( 'title' => 'Help', 'page callback' => 'theme', 'page arguments' => array('blast_help'), 'access arguments' => array('administer tripal'), 'type' => MENU_LOCAL_TASK, );
时间: 2023-12-26 16:06:07 浏览: 26
这是一个示例的Drupal菜单定义代码段。它定义了一个名为'admin/tripal/extension/tripal_blast/help'的菜单项,具有以下属性:
- 'title'属性定义了菜单项的标题为'Help'。
- 'page callback'属性指定了处理该菜单项的回调函数为'theme'。
- 'page arguments'属性定义了传递给回调函数的参数为数组['blast_help']。
- 'access arguments'属性定义了访问该菜单项所需的权限为'administer tripal'。
- 'type'属性指定了菜单项的类型为MENU_LOCAL_TASK。
这段代码的作用是在Drupal后台管理界面的菜单中添加一个名为'Help'的子菜单项,并指定了相关的回调函数和权限设置。请注意,这只是一个示例,实际使用时可能需要根据具体需求进行修改。
相关问题
df <- read.csv("/Users/imac/Desktop/left_join/blast_lineage.csv") df <- subset(df, virus_name_N == "Virus" | virus_name_X == "Virus") write.csv(df, "/Users/imac/Desktop/left_join/blast_lineage_new.csv", row.names = FALSE) 输出为啥是个空表,改一下代码
可能是因为在使用 `subset()` 函数时,条件过滤出的数据集是空的,导致输出的结果也是空表。你可以再次检查一下数据集中是否存在符合条件的数据。
另外,由于你没有对空缺值进行处理,若数据集中存在空缺值,则在写入新的csv文件时可能会出现问题。
你可以尝试修改代码,如下所示:
```R
df <- read.csv("/Users/imac/Desktop/left_join/blast_lineage.csv")
df <- subset(df, virus_name_N == "Virus" | virus_name_X == "Virus", na.action = "na.pass") # na.action参数用于指定对空缺值的处理方式,na.pass表示保留空缺值
df[is.na(df)] <- "NA" # 将空缺值替换为NA
write.csv(df, "/Users/imac/Desktop/left_join/blast_lineage_new.csv", row.names = FALSE)
```
这样,你就可以得到正确的输出结果了。
SampleID=JN_1901 Blast_out=/Analysis_B/20220326_JNILI/007_blastn/ Diamond_file_in=/Analysis_B/20220326_JNILI/004_Trinity/JN_1901_trinity.fa #### 003 #### cd ${Blast_out} blastn -query ${Diamond_file_in} -db "/home/Reference_database/NCBI_db_nt/" -out ${Blast_out}${SampleID}_blastn.out -num_threads 12 -outfmt 6 qseqid qlen saccver salltitles slen pident length qcovs bitscore evalue staxids -evalue 1e-5 awk -F$'/t' '!seen[$1]++' ${Blast_out}${SampleID}_blastn.out > ${Blast_out}${SampleID}_blastn.out.unique帮我解释一下这段代码
这段代码主要是进行基因序列比对和去重的过程,其中:
- SampleID=JN_1901 是样本的编号;
- Blast_out=/Analysis_B/20220326_JNILI/007_blastn/ 是blast比对结果的输出路径;
- Diamond_file_in=/Analysis_B/20220326_JNILI/004_Trinity/JN_1901_trinity.fa 是基因组装结果的路径;
- cd ${Blast_out} 进入blast比对结果的输出路径;
- blastn -query ${Diamond_file_in} -db "/home/Reference_database/NCBI_db_nt/" -out ${Blast_out}${SampleID}_blastn.out -num_threads 12 -outfmt 6 qseqid qlen saccver salltitles slen pident length qcovs bitscore evalue staxids -evalue 1e-5 进行blastn比对,-query指定比对的查询序列,-db指定参考序列库,-out指定输出文件名,-num_threads指定线程数,-outfmt指定输出格式,这里是tabular格式;
- awk -F$'/t' '!seen[$1]++' ${Blast_out}${SampleID}_blastn.out > ${Blast_out}${SampleID}_blastn.out.unique 根据比对结果中的qseqid(即查询序列的ID)进行去重,这里使用awk命令,-F指定分隔符为制表符,!seen[$1]++表示如果第一个字段(即qseqid)没有出现过,则保留该行,否则忽略该行,最终输出去重后的结果到${Blast_out}${SampleID}_blastn.out.unique文件中。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)