ggplot2 specific command

本文介绍如何在ggplot2中使用不同缩放比例的面板来更清晰地展示每组数据的特征,同时提供了如何在每个面板中重复显示相同数据的方法,以便于观察。还介绍了如何使用labs()来修改坐标轴、图例和标签。

# By default, the same scales are used for all panels. You can allow
# scales to vary across the panels with the `scales` argument.
# Free scales make it easier to see patterns within each panel, but
# harder to compare across panels.
#通过实践该代码即可领悟
##1
ggplot(mpg, aes(displ, hwy)) + geom_point() +facet_wrap(~class, scales = "free")

ggplot(mpg, aes(displ, hwy)) + geom_point() +facet_wrap(~class)
# To repeat the same data in every panel, 
# simply construct a data frame that does not contain the facetting variable.
#通过实践该代码即可领悟
ggplot(mpg, aes(displ, hwy)) + geom_point(data = transform(mpg, class = NULL), colour = "grey85") + geom_point() + facet_wrap(~class)

ggplot(mpg, aes(displ, hwy)) + geom_point() + facet_wrap(~class)
#labs() ----Modify axis, legend, and plot labels
#ggplot2 绘图时使用该参数来调整坐标轴、图例和标签

#reorder 根据数值型变量对分类变量进行重新排序
#reorder is a generic function. The "default" method treats its first argument as a categorical variable, and reorders its levels based on the values of a second variable, usually numeric.
请参考网站https://busco.ezlab.org/busco_userguide.html busco的要求,数据库使用本地下载库/public1/home/scb3201/db/metazoa_odb12/ /public1/home/scb3201/db/lophotrochozoa_odb12/ /public1/home/scb3201/db/metazoa_odb10/ /public1/home/scb3201/db/eukaryota_odb10/ /public1/home/scb3201/db/arthropoda_odb10/ ,禁止自动联网下载,环境 conda activate leech_genome中安装好这些软件初步评估 conda install bioconda::hmmer conda install biocore::blast-plus conda install bioconda::busco conda install bioconda::augustus conda install bioconda::sepp conda install bioconda::prodigal conda install -c conda-forge r-base=3.5.1 r-ggplot2=2.2.1 r-reshape2=1.4.3 r-cairo=1.5_9 -y同时也下载了数据库/public1/home/scb3201/db/metazoa_odb10.2024-01-08.tar.gz,工作目录/public1/home/scb3201/rawdata/BUSCO/;日志目录:/public1/home/scb3201/rawdata/BUSCO/logs/;输出目录/public1/home/scb3201/results/genome/busco/;输入文件/public1/home/scb3201/results/genome/Medaka/genome.nextpolish.medaka.fasta,数据库若需要解压,可在/public1/home/scb3201/db/生成临时解压文件,评分结束后删除该临时文件。基于这些材料请给我生成一个超算作业提交脚本按照这样的开头:”#!/bin/bash #SBATCH -p amd_256 # 与组装/抛光工具共享集群分区 #SBATCH -N 1 # 单节点(BUSCO不支持多节点并行) #SBATCH -n 24 # 线程数(BUSCO为CPU密集型,建议16线程) #SBATCH -t 8:00:00 # 运行时间(真核数据集通常2-4小时,复杂基因组≤8小时) #SBATCH --mem=32G # 总内存(16线程×2G=32G,Metaeuk基因预测需较高内存) #SBATCH -J busco_eval # 作业名 #SBATCH -o logs/%j_busco.out # 输出日志 #SBATCH -e logs/%j_busco.err # 错误日志 ########################################################## 环境配置与工具验证 ########################################################## 创建日志目录(若不存在) mkdir -p logs 激活BUSCO所在环境(leech_genome) source ~/.bashrc && conda activate leech_genome “请帮重新生成脚本,同时要求模型可换
11-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值